-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add Quote/Transaction discriminators and remove inline examples #129
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
Open
pengying
wants to merge
1
commit into
main
Choose a base branch
from
01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,14 @@ | ||
| type: object | ||
| required: | ||
| - destinationType | ||
| - accountId | ||
| properties: | ||
| destinationType: | ||
| type: string | ||
| const: ACCOUNT | ||
| description: Destination type identifier | ||
| accountId: | ||
| type: string | ||
| description: Destination account identifier | ||
| example: ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 | ||
| description: Destination account details |
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,18 @@ | ||
| type: object | ||
| required: | ||
| - sourceType | ||
| - accountId | ||
| properties: | ||
| sourceType: | ||
| type: string | ||
| const: ACCOUNT | ||
| description: Source type identifier | ||
| accountId: | ||
| type: string | ||
| description: Funding internal account identifier | ||
| example: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 | ||
| customerId: | ||
| type: string | ||
| description: Required when funding from an FBO account to identify the customer on whose behalf the transaction is being initiated. Otherwise, will default to the customerId of the account owner. | ||
| example: Customer:019542f5-b3e7-1d02-0000-000000000001 | ||
| description: Fund a quote from a prefunded internal account. After the quote is created, you'll need to call execute to complete the transaction. |
19 changes: 19 additions & 0 deletions
19
openapi/components/schemas/common/UmaAddressDestination.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 @@ | ||
| type: object | ||
| required: | ||
| - destinationType | ||
| - umaAddress | ||
| - currency | ||
| properties: | ||
| destinationType: | ||
| type: string | ||
| const: UMA_ADDRESS | ||
| description: Destination type identifier | ||
| umaAddress: | ||
| type: string | ||
| description: UMA address of the recipient | ||
| example: $receiver@uma.domain.com | ||
| currency: | ||
| type: string | ||
| description: Currency code for the destination. This should be one of the options returned in the UMA lookup response. | ||
| example: EUR | ||
| description: UMA address destination details |
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
27 changes: 27 additions & 0 deletions
27
openapi/components/schemas/quotes/QuoteRealtimeFundingSource.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,27 @@ | ||
| type: object | ||
| required: | ||
| - sourceType | ||
| - currency | ||
| properties: | ||
| sourceType: | ||
| type: string | ||
| const: REALTIME_FUNDING | ||
| description: Source type identifier | ||
| customerId: | ||
| type: string | ||
| description: >- | ||
| If this transaction is being initiated on behalf of a customer, this is required. | ||
| If customerId is not provided, the quote will be created on behalf of the platform itself. | ||
| example: Customer:019542f5-b3e7-1d02-0000-000000000009 | ||
| currency: | ||
| type: string | ||
| description: >- | ||
| Currency code for the funding source. See | ||
| [Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) | ||
| for the full list of supported fiat and crypto currencies. | ||
| example: USD | ||
| description: >- | ||
| Fund the quote using a real-time funding source (RTP, SEPA Instant, Spark, Stables, etc.). | ||
| This will require manual just-in-time funding using `paymentInstructions` in the response. | ||
| Because quotes expire quickly, this option is only valid for instant payment methods. Do not try | ||
| to fund a quote with a non-instant payment method (ACH, etc.). |
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
16 changes: 16 additions & 0 deletions
16
openapi/components/schemas/quotes/QuoteRequestExternalAccountDetailsDestination.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,16 @@ | ||
| type: object | ||
| required: | ||
| - destinationType | ||
| - externalAccountDetails | ||
| properties: | ||
| destinationType: | ||
| type: string | ||
| const: EXTERNAL_ACCOUNT_DETAILS | ||
| description: Destination type identifier | ||
| externalAccountDetails: | ||
| $ref: ../external_accounts/ExternalAccountCreateRequest.yaml | ||
| description: >- | ||
| A convenient destination option which adds the external account and creates | ||
| the quote in one step rather than first needing to call /external-accounts | ||
| to add the account. Useful for one-off payments to some destination. | ||
| See the external accounts endpoints for test values in sandbox mode. |
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 |
|---|---|---|
| @@ -1,42 +1,12 @@ | ||
| required: | ||
| - sourceType | ||
pengying marked this conversation as resolved.
Show resolved
Hide resolved
pengying marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| oneOf: | ||
| - title: Account | ||
| type: object | ||
| required: | ||
| - accountId | ||
| properties: | ||
| accountId: | ||
| type: string | ||
| description: Source account identifier | ||
| example: InternalAccount:85dcbd6-dced-4ec4-b756-3c3a9ea3d965 | ||
| currency: | ||
| type: string | ||
| description: >- | ||
| Currency code for the funding source. See | ||
| [Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) | ||
| for the full list of supported fiat and crypto currencies. | ||
| example: USD | ||
| description: Source account details | ||
| - title: Real-time funding | ||
| type: object | ||
| required: | ||
| - currency | ||
| - customerId | ||
| properties: | ||
| customerId: | ||
| type: string | ||
| description: >- | ||
| Source customer ID. If this transaction is being initiated on behalf of a customer, this is required. | ||
| If customerId is not provided, the quote will be created on behalf of the platform itself. | ||
| example: Customer:019542f5-b3e7-1d02-0000-000000000009 | ||
| currency: | ||
| type: string | ||
| description: >- | ||
| Currency code for the funding source. See | ||
| [Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails) | ||
| for the full list of supported fiat and crypto currencies. | ||
| example: USD | ||
| description: >- | ||
| Fund the quote using a real-time funding source (RTP, SEPA Instant, Spark, Stables, etc.). | ||
| This will require manual just-in-time funding using `paymentInstructions` in the response. | ||
| Because quotes expire quickly, this option is only valid for instant payment methods. Do not try | ||
| to fund a quote with a non-instant payment method (ACH, etc.). | ||
| - title: Real-Time Funding | ||
| $ref: ./QuoteRealtimeFundingSource.yaml | ||
| - title: Internal Account | ||
| $ref: ../common/AccountSource.yaml | ||
| discriminator: | ||
| propertyName: sourceType | ||
| mapping: | ||
| ACCOUNT: ../common/AccountSource.yaml | ||
| REALTIME_FUNDING: ./QuoteRealtimeFundingSource.yaml | ||
14 changes: 14 additions & 0 deletions
14
openapi/components/schemas/quotes/QuoteUmaAddressDestination.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,14 @@ | ||
| allOf: | ||
| - $ref: ../common/UmaAddressDestination.yaml | ||
| - type: object | ||
| properties: | ||
| counterpartyInformation: | ||
| type: object | ||
| description: >- | ||
| Information about the recipient, as required by the platform in their | ||
| configuration. | ||
| additionalProperties: true | ||
| example: | ||
| FULL_NAME: Jane Receiver | ||
| BIRTH_DATE: '1990-01-01' | ||
| NATIONALITY: FR |
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
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.
Uh oh!
There was an error while loading. Please reload this page.