-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add partner's api's #351
Changes from 1 commit
a35e37a
fde71a3
966bdc8
d95616a
5e9e780
42da2ec
0035d3e
c1996d1
c22bda2
4fa14d7
b3f2666
821d9e0
c0bbe20
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import { IMap, INormalizeError, PartialOptional, RazorpayPaginationOptions } from "./api"; | ||
import * as fs from 'fs'; | ||
|
||
export declare namespace Accounts { | ||
interface RazorpayAccountBaseRequestBody { | ||
|
@@ -217,7 +218,16 @@ export declare namespace Accounts { | |
created_at: number; | ||
} | ||
|
||
interface FileCreateParams {} | ||
interface FileCreateParams { | ||
file: { | ||
value: fs.ReadStream; | ||
options: { | ||
filename: string; | ||
contentType: string | null; | ||
}; | ||
}; | ||
document_type: string; | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @1995navinkumar added form-data params type check for document upload api |
||
interface RazorpayAccountDocuments { | ||
business_proof_of_identification: [ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import { Accounts } from "./accounts"; | ||
import { IMap, INormalizeError, PartialOptional, RazorpayPaginationOptions } from "./api"; | ||
import * as fs from "fs"; | ||
|
||
export declare namespace Stakeholders { | ||
interface RazorpayStakeholderBaseRequestBody { | ||
|
@@ -47,7 +48,7 @@ export declare namespace Stakeholders { | |
|
||
interface RazorpayStakeholderCreateRequestBody extends RazorpayStakeholderBaseRequestBody { } | ||
|
||
interface RazorpayStakeholderUpdateRequestBody extends Omit<RazorpayStakeholderBaseRequestBody, 'email'> { } | ||
interface RazorpayStakeholderUpdateRequestBody extends Partial<Omit<RazorpayStakeholderBaseRequestBody, 'email'>> { } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @1995navinkumar added partial because all params is optional , also checked with empty objects as well in postmen. |
||
|
||
interface RazorpayStakeholder extends RazorpayStakeholderBaseRequestBody { | ||
/** | ||
|
@@ -86,7 +87,16 @@ export declare namespace Stakeholders { | |
director?: boolean; | ||
} | ||
|
||
interface FileCreateParams {} | ||
interface FileCreateParams { | ||
file: { | ||
value: fs.ReadStream; | ||
options: { | ||
filename: string; | ||
contentType: string | null; | ||
}; | ||
}; | ||
document_type: string; | ||
} | ||
|
||
interface RazorpayStakeholderDocuments { | ||
individual_proof_of_address: [ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this
normalizeNotes
do? I saw the implementation, it just addsnotes
to every key? The curl request didn't have this in req body.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@1995navinkumar i had checked this one, but notes are not working without
normalizeNotes
.sending notes without normalizeNotes , its throw error
sending notes with normalizeNotes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ankitdas13 How did you test this? Using a test account? Also, can you share the request payload before and after normalizeNotes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@1995navinkumar Yes, I have a test key, instead of creating a new object by
Object.assign
, I pass the params to data and it's working without normalizeNotespayload
Should I remove the normalizeNotes from other methods after testing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@1995navinkumar reverted previous changes except client validation