Skip to content

Commit 382d510

Browse files
committed
feat: new transaction types
1 parent f2348a2 commit 382d510

File tree

2 files changed

+194
-7
lines changed

2 files changed

+194
-7
lines changed

openapi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"info": {
44
"title": "Unit OpenAPI specifications",
55
"description": "An OpenAPI specifications for unit-sdk clients",
6-
"version": "0.2.3"
6+
"version": "0.2.4"
77
},
88
"servers": [
99
{

schemas/transaction/transaction.json

Lines changed: 193 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@
451451
}
452452
]
453453
},
454-
"PustToCardTransactionRelationships": {
454+
"PushToCardTransactionRelationships": {
455455
"allOf": [
456456
{
457457
"type": "object",
@@ -551,6 +551,16 @@
551551
}
552552
]
553553
},
554+
"WriteOffTransactionRelationships": {
555+
"allOf": [
556+
{
557+
"title": "Write Off Transaction Relationships"
558+
},
559+
{
560+
"$ref": "#/components/schemas/DefaultTransactionRelationships"
561+
}
562+
]
563+
},
554564
"OriginatedAchTransaction": {
555565
"title": "Originated ACH",
556566
"type": "object",
@@ -1557,6 +1567,72 @@
15571567
}
15581568
]
15591569
},
1570+
"ReturnedWireTransaction": {
1571+
"title": "Returned Wire Transaction",
1572+
"type": "object",
1573+
"allOf": [
1574+
{
1575+
"$ref": "#/components/schemas/Transaction"
1576+
},
1577+
{
1578+
"type": "object",
1579+
"properties": {
1580+
"attributes": {
1581+
"type": "object",
1582+
"properties": {
1583+
"createdAt": {
1584+
"type": "string",
1585+
"format": "date-time"
1586+
},
1587+
"direction": {
1588+
"type": "string",
1589+
"enum": ["Credit", "Debit"]
1590+
},
1591+
"amount": {
1592+
"type": "integer",
1593+
"format": "int64"
1594+
},
1595+
"balance": {
1596+
"type": "integer",
1597+
"format": "int64"
1598+
},
1599+
"summary": {
1600+
"type": "string"
1601+
},
1602+
"reason": {
1603+
"type": "string"
1604+
},
1605+
"imad": {
1606+
"type": "string"
1607+
},
1608+
"omad": {
1609+
"type": "string"
1610+
},
1611+
"tags": {
1612+
"$ref": "../types.json#/components/schemas/Tags"
1613+
}
1614+
},
1615+
"required": [
1616+
"createdAt",
1617+
"amount",
1618+
"direction",
1619+
"balance",
1620+
"summary",
1621+
"counterparty",
1622+
"reason",
1623+
"imad"
1624+
],
1625+
"additionalProperties": false
1626+
},
1627+
"relationships": {
1628+
"$ref": "#/components/schemas/ReturnedWireTransactionRelationships"
1629+
}
1630+
},
1631+
"additionalProperties": false,
1632+
"required": ["attributes", "relationships"]
1633+
}
1634+
]
1635+
},
15601636
"AdjustmentTransaction": {
15611637
"title": "Adjustment Transaction",
15621638
"type": "object",
@@ -2164,9 +2240,6 @@
21642240
"summary": {
21652241
"type": "string"
21662242
},
2167-
"reason": {
2168-
"type": "string"
2169-
},
21702243
"tags": {
21712244
"$ref": "../types.json#/components/schemas/Tags"
21722245
}
@@ -2745,6 +2818,114 @@
27452818
}
27462819
]
27472820
},
2821+
"PushToCardTransaction": {
2822+
"title": "Push To Card Transaction",
2823+
"type": "object",
2824+
"allOf": [
2825+
{
2826+
"$ref": "#/components/schemas/Transaction"
2827+
},
2828+
{
2829+
"type": "object",
2830+
"properties": {
2831+
"attributes": {
2832+
"type": "object",
2833+
"properties": {
2834+
"createdAt": {
2835+
"type": "string",
2836+
"format": "date-time"
2837+
},
2838+
"direction": {
2839+
"type": "string",
2840+
"enum": ["Credit", "Debit"]
2841+
},
2842+
"amount": {
2843+
"type": "integer",
2844+
"format": "int64"
2845+
},
2846+
"balance": {
2847+
"type": "integer",
2848+
"format": "int64"
2849+
},
2850+
"summary": {
2851+
"type": "string"
2852+
},
2853+
"tags": {
2854+
"$ref": "../types.json#/components/schemas/Tags"
2855+
}
2856+
},
2857+
"required": [
2858+
"createdAt",
2859+
"amount",
2860+
"direction",
2861+
"balance",
2862+
"summary"
2863+
],
2864+
"additionalProperties": false
2865+
},
2866+
"relationships": {
2867+
"$ref": "#/components/schemas/PushToCardTransactionRelationships"
2868+
}
2869+
},
2870+
"additionalProperties": false,
2871+
"required": ["attributes", "relationships"]
2872+
}
2873+
]
2874+
},
2875+
"WriteOffTransaction": {
2876+
"title": "Write Off Transaction",
2877+
"type": "object",
2878+
"allOf": [
2879+
{
2880+
"$ref": "#/components/schemas/Transaction"
2881+
},
2882+
{
2883+
"type": "object",
2884+
"properties": {
2885+
"attributes": {
2886+
"type": "object",
2887+
"properties": {
2888+
"createdAt": {
2889+
"type": "string",
2890+
"format": "date-time"
2891+
},
2892+
"direction": {
2893+
"type": "string",
2894+
"enum": ["Credit", "Debit"]
2895+
},
2896+
"amount": {
2897+
"type": "integer",
2898+
"format": "int64"
2899+
},
2900+
"balance": {
2901+
"type": "integer",
2902+
"format": "int64"
2903+
},
2904+
"summary": {
2905+
"type": "string"
2906+
},
2907+
"tags": {
2908+
"$ref": "../types.json#/components/schemas/Tags"
2909+
}
2910+
},
2911+
"required": [
2912+
"createdAt",
2913+
"amount",
2914+
"direction",
2915+
"balance",
2916+
"summary"
2917+
],
2918+
"additionalProperties": false
2919+
},
2920+
"relationships": {
2921+
"$ref": "#/components/schemas/WriteOffTransactionRelationships"
2922+
}
2923+
},
2924+
"additionalProperties": false,
2925+
"required": ["attributes", "relationships"]
2926+
}
2927+
]
2928+
},
27482929

27492930
"Transaction": {
27502931
"title": "Transaction Resource",
@@ -2768,6 +2949,7 @@
27682949
"cardTransaction",
27692950
"releaseTransaction",
27702951
"wireTransaction",
2952+
"returnedWireTransaction",
27712953
"interestShareTransaction",
27722954
"interestTransaction",
27732955
"adjustmentTransaction",
@@ -2789,8 +2971,10 @@
27892971
"returnedCheckPaymentTransaction",
27902972
"cardReversalTransaction",
27912973
"feeReversalTransaction",
2974+
"pushToCardTransaction",
27922975
"pushToCardReversalTransaction",
2793-
"paymentCanceledTransaction"
2976+
"paymentCanceledTransaction",
2977+
"writeOffTransaction"
27942978
]
27952979
}
27962980
},
@@ -2809,6 +2993,7 @@
28092993
"cardTransaction": "#/components/schemas/CardTransaction",
28102994
"releaseTransaction": "#/components/schemas/ReleaseTransaction",
28112995
"wireTransaction": "#/components/schemas/WireTransaction",
2996+
"returnedWireTransaction": "#/components/schemas/ReturnedWireTransaction",
28122997
"interestShareTransaction": "#/components/schemas/InterestShareTransaction",
28132998
"interestTransaction": "#/components/schemas/InterestTransaction",
28142999
"adjustmentTransaction": "#/components/schemas/AdjustmentTransaction",
@@ -2830,8 +3015,10 @@
28303015
"returnedCheckPaymentTransaction": "#/components/schemas/ReturnedCheckPaymentTransaction",
28313016
"cardReversalTransaction": "#/components/schemas/CardReversalTransaction",
28323017
"feeReversalTransaction": "#/components/schemas/FeeReversalTransaction",
3018+
"pushToCardTransaction": "#/components/schemas/PushToCardTransaction",
28333019
"pushToCardReversalTransaction": "#/components/schemas/PushToCardReversalTransaction",
2834-
"paymentCanceledTransaction": "#/components/schemas/PaymentCanceledTransaction"
3020+
"paymentCanceledTransaction": "#/components/schemas/PaymentCanceledTransaction",
3021+
"writeOffTransaction": "#/components/schemas/WriteOffTransaction"
28353022
}
28363023
}
28373024
}

0 commit comments

Comments
 (0)