Skip to content

Commit baa7734

Browse files
authored
[Grid] Move source into outgoing/incoming transaction (#115)
This moves source out of the base transaction object and into the incoming/outgoing transaction. We still enforce it for outgoing transaction but not for a incoming transaction. The reason why we need to do this is because an incoming transaction like a funding event will not have a source
1 parent 7461515 commit baa7734

5 files changed

Lines changed: 189 additions & 96 deletions

File tree

mintlify/openapi.yaml

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

openapi.yaml

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

openapi/components/schemas/transactions/IncomingTransaction.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,37 @@ allOf:
44
required:
55
- receivedAmount
66
properties:
7+
source:
8+
oneOf:
9+
- title: Account Source
10+
type: object
11+
required:
12+
- accountId
13+
- currency
14+
properties:
15+
accountId:
16+
type: string
17+
description: Source account identifier
18+
example: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965
19+
currency:
20+
type: string
21+
description: Currency code for the source account
22+
example: USD
23+
description: Source account details
24+
- title: UMA Address Source
25+
type: object
26+
required:
27+
- umaAddress
28+
properties:
29+
umaAddress:
30+
type: string
31+
description: UMA address of the sender
32+
example: $sender@uma.domain.com
33+
currency:
34+
type: string
35+
description: Currency code for the source
36+
example: USD
37+
description: UMA address source details
738
receivedAmount:
839
$ref: ../common/CurrencyAmount.yaml
940
description: Amount received in the recipient's currency

openapi/components/schemas/transactions/OutgoingTransaction.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,39 @@ allOf:
44
required:
55
- sentAmount
66
- paymentInstructions
7+
- source
78
properties:
9+
source:
10+
oneOf:
11+
- title: Account Source
12+
type: object
13+
required:
14+
- accountId
15+
- currency
16+
properties:
17+
accountId:
18+
type: string
19+
description: Source account identifier
20+
example: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965
21+
currency:
22+
type: string
23+
description: Currency code for the source account
24+
example: USD
25+
description: Source account details
26+
- title: UMA Address Source
27+
type: object
28+
required:
29+
- umaAddress
30+
properties:
31+
umaAddress:
32+
type: string
33+
description: UMA address of the sender
34+
example: $sender@uma.domain.com
35+
currency:
36+
type: string
37+
description: Currency code for the source
38+
example: USD
39+
description: UMA address source details
840
sentAmount:
941
$ref: ../common/CurrencyAmount.yaml
1042
description: Amount sent in the sender's currency

openapi/components/schemas/transactions/Transaction.yaml

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ required:
33
- id
44
- status
55
- type
6-
- source
76
- destination
87
- customerId
98
- platformCustomerId
@@ -16,37 +15,6 @@ properties:
1615
$ref: ./TransactionStatus.yaml
1716
type:
1817
$ref: ./TransactionType.yaml
19-
source:
20-
oneOf:
21-
- title: Account Source
22-
type: object
23-
required:
24-
- accountId
25-
- currency
26-
properties:
27-
accountId:
28-
type: string
29-
description: Source account identifier
30-
example: InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965
31-
currency:
32-
type: string
33-
description: Currency code for the source account
34-
example: USD
35-
description: Source account details
36-
- title: UMA Address Source
37-
type: object
38-
required:
39-
- umaAddress
40-
properties:
41-
umaAddress:
42-
type: string
43-
description: UMA address of the sender
44-
example: $sender@uma.domain.com
45-
currency:
46-
type: string
47-
description: Currency code for the source
48-
example: USD
49-
description: UMA address source details
5018
destination:
5119
oneOf:
5220
- title: Account Destination

0 commit comments

Comments
 (0)