-
Notifications
You must be signed in to change notification settings - Fork 10
feat: add beneficiary to crypto wallet external accounts #828
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
6dde637
feat: add beneficiary to crypto wallet external accounts
shreyav a379f92
Merge main
shreyav c0af306
Require fullName and countryOfResidence for wallet individual benefic…
shreyav 26ed1d4
Name the wallet beneficiary union WalletBeneficiaryOneOf
shreyav b610c41
Trim wallet beneficiary to transmitted fields and tighten docs
shreyav File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
openapi/components/schemas/common/WalletIndividualBeneficiary.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| title: Individual Beneficiary | ||
| type: object | ||
| required: | ||
| - beneficiaryType | ||
| - fullName | ||
| - countryOfResidence | ||
| properties: | ||
| beneficiaryType: | ||
| type: string | ||
| enum: | ||
| - INDIVIDUAL | ||
| fullName: | ||
| type: string | ||
| description: The full name of the beneficiary | ||
| example: John Michael Doe | ||
| countryOfResidence: | ||
| type: string | ||
| description: The country of residence of the beneficiary (ISO 3166-1 alpha-2) | ||
| example: US |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
openapi/components/schemas/external_accounts/WalletBeneficiaryFields.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| type: object | ||
| properties: | ||
| beneficiary: | ||
| description: >- | ||
| The wallet's owner. Optional for `FIRST_PARTY` accounts — the | ||
| customer's verified identity is used. Required for `THIRD_PARTY` | ||
| wallets on platforms with counterparty requirements (e.g. EU Travel | ||
| Rule); if missing there, creation fails with `400 INVALID_INPUT`. | ||
| $ref: ./WalletBeneficiaryOneOf.yaml |
12 changes: 12 additions & 0 deletions
12
openapi/components/schemas/external_accounts/WalletBeneficiaryOneOf.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| description: >- | ||
| The person or business that owns a crypto wallet external account. | ||
| oneOf: | ||
| - title: Individual Beneficiary | ||
| $ref: ../common/WalletIndividualBeneficiary.yaml | ||
| - title: Business Beneficiary | ||
| $ref: ../common/BusinessBeneficiary.yaml | ||
| discriminator: | ||
| propertyName: beneficiaryType | ||
| mapping: | ||
| INDIVIDUAL: ../common/WalletIndividualBeneficiary.yaml | ||
| BUSINESS: ../common/BusinessBeneficiary.yaml | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
does this mean there'll be a business beneficiary as well?
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.
Er I mean is there a individual beneficiary we can resuse
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.
Huh i guess not I see a bunch of different types of beneficiaries depending on the country but not a generic one.
Do you think this one will be generic or is it only for wallets?
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.
yeah we went through the exercise of splitting up beneficiaries for individuals based on region reqs but we havent done that for business yet -- so reusing the existing business one and added a new one just for wallets w the minimum requirements