Skip to content

Commit 152d09c

Browse files
committed
feat: add Quote/Transaction discriminators and remove inline examples
1 parent f05d11f commit 152d09c

16 files changed

Lines changed: 512 additions & 745 deletions

mintlify/openapi.yaml

Lines changed: 168 additions & 240 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openapi.yaml

Lines changed: 168 additions & 240 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
type: object
2+
required:
3+
- destinationType
4+
- accountId
5+
properties:
6+
destinationType:
7+
type: string
8+
const: ACCOUNT
9+
description: Destination type identifier
10+
accountId:
11+
type: string
12+
description: Destination account identifier
13+
example: ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123
14+
description: Destination account details
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
type: object
2+
required:
3+
- sourceType
4+
- accountId
5+
properties:
6+
sourceType:
7+
type: string
8+
const: INTERNAL_ACCOUNT
9+
description: Source type identifier
10+
accountId:
11+
type: string
12+
description: Funding internal account identifier
13+
example: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965
14+
customerId:
15+
type: string
16+
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.
17+
example: Customer:019542f5-b3e7-1d02-0000-000000000001
18+
description: Fund a quote from a prefunded internal account. After the quote is created, you'll need to call execute to complete the transaction.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
type: object
2+
required:
3+
- destinationType
4+
- umaAddress
5+
- currency
6+
properties:
7+
destinationType:
8+
type: string
9+
const: UMA_ADDRESS
10+
description: Destination type identifier
11+
umaAddress:
12+
type: string
13+
description: UMA address of the recipient
14+
example: $receiver@uma.domain.com
15+
currency:
16+
type: string
17+
description: Currency code for the destination. This should be one of the options returned in the UMA lookup response.
18+
example: EUR
19+
description: UMA address destination details

openapi/components/schemas/quotes/Quote.yaml

Lines changed: 9 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -42,45 +42,16 @@ properties:
4242
source:
4343
$ref: ./QuoteSource.yaml
4444
destination:
45+
required:
46+
- destinationType
4547
oneOf:
46-
- title: Account Destination
47-
type: object
48-
required:
49-
- accountId
50-
properties:
51-
accountId:
52-
type: string
53-
description: Destination account identifier
54-
example: ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123
55-
currency:
56-
type: string
57-
description: Currency code for the destination account
58-
example: EUR
59-
description: Destination account details
60-
- title: UMA Address Destination
61-
type: object
62-
required:
63-
- umaAddress
64-
properties:
65-
umaAddress:
66-
type: string
67-
description: UMA address of the recipient
68-
example: $receiver@uma.domain.com
69-
currency:
70-
type: string
71-
description: Currency code for the destination
72-
example: EUR
73-
counterpartyInformation:
74-
type: object
75-
description: >-
76-
Information about the recipient, as required by the platform in their
77-
configuration.
78-
additionalProperties: true
79-
example:
80-
FULL_NAME: Jane Receiver
81-
BIRTH_DATE: '1990-01-01'
82-
NATIONALITY: FR
83-
description: UMA address destination details
48+
- $ref: ../common/AccountDestination.yaml
49+
- $ref: ./QuoteUmaAddressDestination.yaml
50+
discriminator:
51+
propertyName: destinationType
52+
mapping:
53+
ACCOUNT: ../common/AccountDestination.yaml
54+
UMA_ADDRESS: ./QuoteUmaAddressDestination.yaml
8455
sendingCurrency:
8556
$ref: ../common/Currency.yaml
8657
description: Currency for the sending amount
@@ -120,15 +91,6 @@ properties:
12091
description: Payment instructions for executing the payment. This is not required when using an internal account source.
12192
items:
12293
$ref: ../common/PaymentInstructions.yaml
123-
example:
124-
- accountType: US_ACCOUNT
125-
accountNumber: "1234567890"
126-
routingNumber: "021000021"
127-
bankName: "Chase Bank"
128-
referenceCode: "REF123456"
129-
- accountType: SPARK_WALLET
130-
address: "spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu"
131-
invoice: "lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs"
13294
transactionId:
13395
type: string
13496
description: The ID of the transaction created from this quote.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
type: object
2+
required:
3+
- sourceType
4+
- currency
5+
properties:
6+
sourceType:
7+
type: string
8+
const: REALTIME_FUNDING
9+
description: Source type identifier
10+
customerId:
11+
type: string
12+
description: >-
13+
If this transaction is being initiated on behalf of a customer, this is required.
14+
If customerId is not provided, the quote will be created on behalf of the platform itself.
15+
example: Customer:019542f5-b3e7-1d02-0000-000000000009
16+
currency:
17+
type: string
18+
description: >-
19+
Currency code for the funding source. See
20+
[Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails)
21+
for the full list of supported fiat and crypto currencies.
22+
example: USD
23+
description: >-
24+
Fund the quote using a real-time funding source (RTP, SEPA Instant, Spark, Stables, etc.).
25+
This will require manual just-in-time funding using `paymentInstructions` in the response.
26+
Because quotes expire quickly, this option is only valid for instant payment methods. Do not try
27+
to fund a quote with a non-instant payment method (ACH, etc.).

openapi/components/schemas/quotes/QuoteRequest.yaml

Lines changed: 9 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -19,53 +19,17 @@ properties:
1919
destination:
2020
oneOf:
2121
- title: Account
22-
type: object
23-
required:
24-
- accountId
25-
- currency
26-
properties:
27-
accountId:
28-
type: string
29-
description: Destination account identifier
30-
example: a12dcbd6-dced-4ec4-b756-3c3a9ea3d123
31-
currency:
32-
type: string
33-
description: >-
34-
Currency code for the destination account. See
35-
[Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails)
36-
for the full list of supported fiat and crypto currencies.
37-
example: EUR
38-
description: Destination account details
22+
$ref: ../common/AccountDestination.yaml
3923
- title: UMA Address
40-
type: object
41-
required:
42-
- umaAddress
43-
- currency
44-
properties:
45-
umaAddress:
46-
type: string
47-
description: UMA address of the recipient
48-
example: $receiver@uma.domain.com
49-
currency:
50-
type: string
51-
description: >-
52-
Currency code for the destination. See
53-
[Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails)
54-
for the full list of supported fiat and crypto currencies.
55-
example: EUR
56-
description: UMA address destination details
24+
$ref: ../common/UmaAddressDestination.yaml
5725
- title: External Account Details
58-
type: object
59-
required:
60-
- externalAccountDetails
61-
properties:
62-
externalAccountDetails:
63-
$ref: ../external_accounts/ExternalAccountCreateRequest.yaml
64-
description: >-
65-
A convenient destination option which adds the external account and creates
66-
the quote in one step rather than first needing to call /external-accounts
67-
to add the account. Useful for one-off payments to some destination.
68-
See the external accounts endpoints for test values in sandbox mode.
26+
$ref: ./QuoteRequestExternalAccountDetailsDestination.yaml
27+
discriminator:
28+
propertyName: destinationType
29+
mapping:
30+
ACCOUNT: ../common/AccountDestination.yaml
31+
UMA_ADDRESS: ../common/UmaAddressDestination.yaml
32+
EXTERNAL_ACCOUNT_DETAILS: ./QuoteRequestExternalAccountDetailsDestination.yaml
6933
lockedCurrencySide:
7034
$ref: ./QuoteLockSide.yaml
7135
lockedCurrencyAmount:
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
type: object
2+
required:
3+
- destinationType
4+
- externalAccountDetails
5+
properties:
6+
destinationType:
7+
type: string
8+
const: EXTERNAL_ACCOUNT_DETAILS
9+
description: Destination type identifier
10+
externalAccountDetails:
11+
$ref: ../external_accounts/ExternalAccountCreateRequest.yaml
12+
description: >-
13+
A convenient destination option which adds the external account and creates
14+
the quote in one step rather than first needing to call /external-accounts
15+
to add the account. Useful for one-off payments to some destination.
16+
See the external accounts endpoints for test values in sandbox mode.
Lines changed: 11 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,12 @@
1+
required:
2+
- sourceType
13
oneOf:
2-
- title: Account
3-
type: object
4-
required:
5-
- accountId
6-
properties:
7-
accountId:
8-
type: string
9-
description: Source account identifier
10-
example: InternalAccount:85dcbd6-dced-4ec4-b756-3c3a9ea3d965
11-
currency:
12-
type: string
13-
description: >-
14-
Currency code for the funding source. See
15-
[Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails)
16-
for the full list of supported fiat and crypto currencies.
17-
example: USD
18-
description: Source account details
19-
- title: Real-time funding
20-
type: object
21-
required:
22-
- currency
23-
- customerId
24-
properties:
25-
customerId:
26-
type: string
27-
description: >-
28-
Source customer ID. If this transaction is being initiated on behalf of a customer, this is required.
29-
If customerId is not provided, the quote will be created on behalf of the platform itself.
30-
example: Customer:019542f5-b3e7-1d02-0000-000000000009
31-
currency:
32-
type: string
33-
description: >-
34-
Currency code for the funding source. See
35-
[Supported Currencies](https://grid.lightspark.com/platform-overview/core-concepts/currencies-and-rails)
36-
for the full list of supported fiat and crypto currencies.
37-
example: USD
38-
description: >-
39-
Fund the quote using a real-time funding source (RTP, SEPA Instant, Spark, Stables, etc.).
40-
This will require manual just-in-time funding using `paymentInstructions` in the response.
41-
Because quotes expire quickly, this option is only valid for instant payment methods. Do not try
42-
to fund a quote with a non-instant payment method (ACH, etc.).
4+
- title: Real-Time Funding
5+
$ref: ./QuoteRealtimeFundingSource.yaml
6+
- title: Internal Account
7+
$ref: ../common/AccountSource.yaml
8+
discriminator:
9+
propertyName: sourceType
10+
mapping:
11+
ACCOUNT: ../common/AccountSource.yaml
12+
REALTIME_FUNDING: ./QuoteRealtimeFundingSource.yaml

0 commit comments

Comments
 (0)