Skip to content

Commit d7d5e6e

Browse files
committed
feat: remaining payment functionality and tests
1 parent 1d167e5 commit d7d5e6e

22 files changed

+1240
-63
lines changed

openapi.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,18 @@
113113
"/received-payments": {
114114
"$ref": "./schemas/payment/paymentsPaths.json#/listReceivedPayments"
115115
},
116+
"/returns/{transactionId}": {
117+
"$ref": "./schemas/payment/paymentsPaths.json#/returnReceivedACHTransaction"
118+
},
116119
"/received-payments/{paymentId}": {
117120
"$ref": "./schemas/payment/paymentsPaths.json#/receivedPayments"
118121
},
119122
"/received-payments/{paymentId}/advance": {
120123
"$ref": "./schemas/payment/paymentsPaths.json#/advanceReceivedPayment"
121124
},
125+
"/received-payments/{paymentId}/reprocess": {
126+
"$ref": "./schemas/payment/paymentsPaths.json#/reprocessReceivedPayment"
127+
},
122128
"/counterparties": {
123129
"$ref": "./schemas/counterparty/counterpartyPaths.json#/counterparties"
124130
},
@@ -331,6 +337,15 @@
331337
},
332338
"/tax-forms/{taxFormId}/pdf": {
333339
"$ref": "./schemas/tax-forms/taxFormsPaths.json#/getTaxFormPdf"
340+
},
341+
"/sandbox/atm-deposits": {
342+
"$ref": "./schemas/simulation/simulationPaths.json#/createAtmDeposit"
343+
},
344+
"/sandbox/cards/{cardId}/activate": {
345+
"$ref": "./schemas/simulation/simulationPaths.json#/activateCard"
346+
},
347+
"/sandbox/received-payments": {
348+
"$ref": "./schemas/simulation/simulationPaths.json#/receivedPaymentTransaction"
334349
}
335350
},
336351
"components": {
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"components": {
3+
"schemas": {
4+
"CashDepositBarcodeRelationships": {
5+
"allOf": [
6+
{
7+
"type": "object",
8+
"title": "Cash Deposit Barcode",
9+
"required": ["account", "customer"],
10+
"additionalProperties": false
11+
},
12+
{
13+
"$ref": "../relationships.json#/components/schemas/AccountRelationship"
14+
},
15+
{
16+
"$ref": "../relationships.json#/components/schemas/CustomerRelationship"
17+
}
18+
]
19+
},
20+
"CashDepositBarcode": {
21+
"title": "Cash Deposit Barcode",
22+
"type": "object",
23+
"properties": {
24+
"type": {
25+
"type": "string",
26+
"enum": ["cashDepositBarcode"],
27+
"default": "cashDepositBarcode"
28+
},
29+
"attributes": {
30+
"type": "object",
31+
"properties": {
32+
"barcodeNumber": {
33+
"type": "string"
34+
},
35+
"expiration": {
36+
"type": "string",
37+
"format": "date-time"
38+
},
39+
"tags": {
40+
"$ref": "../types.json#/components/schemas/Tags"
41+
}
42+
},
43+
"required": ["amount", "description"],
44+
"additionalProperties": false
45+
},
46+
"relationships": {
47+
"$ref": "#/components/schemas/FeeRelationships"
48+
}
49+
},
50+
"required": ["type", "attributes", "relationships"]
51+
}
52+
}
53+
}
54+
}
Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
{
2+
"components": {
3+
"schemas": {
4+
"UnitStoreLocationsListResponse": {
5+
"type": "object",
6+
"properties": {
7+
"data": {
8+
"type": "array",
9+
"items": {
10+
"$ref": "./storeLocation.json#/schemas/components/StoreLocation"
11+
}
12+
},
13+
"meta": {
14+
"$ref": "../types.json#/components/schemas/PaginationMeta"
15+
}
16+
}
17+
}
18+
}
19+
},
20+
"generateBarcode": {
21+
"post": {
22+
"tags": ["unit"],
23+
"operationId": "createFee",
24+
"summary": "Generate Cash Deposit Barcode",
25+
"description": "Generate Cash Deposit Barcode via API ",
26+
"requestBody": {
27+
"description": "Generate Cash Deposit Barcode Request",
28+
"required": true,
29+
"content": {
30+
"application/vnd.api+json": {
31+
"schema": {
32+
"$ref": "./generateBarcode.json#/components/schemas/GenerateBarcodeRequest"
33+
}
34+
}
35+
}
36+
},
37+
"responses": {
38+
"201": {
39+
"description": "Successful Response",
40+
"content": {
41+
"application/vnd.api+json": {
42+
"schema": {
43+
"type": "object",
44+
"title": "Unit Cash Deposit Barcode Response",
45+
"properties": {
46+
"data": {
47+
"$ref": "./cashDepositBarcode.json#/components/schemas/CashDepositBarcode"
48+
}
49+
}
50+
}
51+
}
52+
}
53+
}
54+
}
55+
}
56+
},
57+
"listByCoordinates": {
58+
"get": {
59+
"tags": ["unit"],
60+
"operationId": "getCashDepositStoreLocationsListByCoordinates",
61+
62+
"summary": "Get Cash Deposit Store Locations List By Coordinates",
63+
"description": "Get Cash Deposit Store Locations List By Coordinates from API ",
64+
"parameters": [
65+
{
66+
"$ref": "../types.json#/components/schemas/PageQuery"
67+
},
68+
{
69+
"name": "filter",
70+
"in": "query",
71+
"style": "deepObject",
72+
"allowReserved": true,
73+
"schema": {
74+
"type": "object",
75+
"properties": {
76+
"coordinates": {
77+
"$ref": "../types.json#/components/schemas/Coordinates"
78+
},
79+
"serviceType": {
80+
"type": "string",
81+
"enum": ["Swipe", "Barcode"]
82+
}
83+
}
84+
}
85+
}
86+
],
87+
"responses": {
88+
"200": {
89+
"description": "Successful Response",
90+
"content": {
91+
"application/vnd.api+json; charset=utf-8": {
92+
"schema": {
93+
"$ref": "#/components/schemas/UnitStoreLocationsListResponse"
94+
}
95+
}
96+
}
97+
}
98+
}
99+
}
100+
},
101+
"listByPostalCode": {
102+
"get": {
103+
"tags": ["unit"],
104+
"operationId": "getCashDepositStoreLocationsListByPostalCode",
105+
106+
"summary": "Get Cash Deposit Store Locations List By Postal Code",
107+
"description": "Get Cash Deposit Store Locations List By Postal Code from API ",
108+
"parameters": [
109+
{
110+
"$ref": "../types.json#/components/schemas/PageQuery"
111+
},
112+
{
113+
"name": "filter",
114+
"in": "query",
115+
"style": "deepObject",
116+
"allowReserved": true,
117+
"schema": {
118+
"type": "object",
119+
"properties": {
120+
"postalCode": {
121+
"type": "string"
122+
},
123+
"serviceType": {
124+
"type": "string",
125+
"enum": ["Swipe", "Barcode"]
126+
}
127+
}
128+
}
129+
}
130+
],
131+
"responses": {
132+
"200": {
133+
"description": "Successful Response",
134+
"content": {
135+
"application/vnd.api+json; charset=utf-8": {
136+
"schema": {
137+
"$ref": "#/components/schemas/UnitStoreLocationsListResponse"
138+
}
139+
}
140+
}
141+
}
142+
}
143+
}
144+
},
145+
"getBarcodeImage": {
146+
"get": {
147+
"tags": ["unit"],
148+
"operationId": "getBarcodeImage",
149+
150+
"summary": "Get Barcode Image By Barcode Number",
151+
"description": "Get Barcode Image By Barcode Number from API ",
152+
"parameters": [
153+
{
154+
"$ref": "../types.json#/components/schemas/PageQuery"
155+
},
156+
{
157+
"name": "barcodeNumber",
158+
"in": "query",
159+
"required": true,
160+
"schema": {
161+
"type": "string"
162+
}
163+
}
164+
],
165+
"responses": {
166+
"200": {
167+
"description": "Successful Response",
168+
"content": {
169+
"image/png": {
170+
"schema": {
171+
"type": "string",
172+
"format": "binary"
173+
}
174+
}
175+
}
176+
}
177+
}
178+
}
179+
}
180+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"components": {
3+
"schemas": {
4+
"GenerateBarcodeRequestRelationships": {
5+
"allOf": [
6+
{
7+
"title": "Generate Barcode Relationships",
8+
"required": ["account", "customer"]
9+
},
10+
{
11+
"$ref": "../relationships.json#/components/schemas/AccountRelationship"
12+
},
13+
{
14+
"$ref": "../relationships.json#/components/schemas/CustomerRelationship"
15+
}
16+
]
17+
},
18+
"GenerateBarcodeRequest": {
19+
"type": "object",
20+
"properties": {
21+
"data": {
22+
"type": "object",
23+
"properties": {
24+
"type": {
25+
"type": "string",
26+
"enum": ["cashDepositBarcode"],
27+
"default": "cashDepositBarcode"
28+
},
29+
"attributes": {
30+
"type": "object",
31+
"properties": {
32+
"storeId": {
33+
"type": "integer"
34+
}
35+
},
36+
"required": ["storeId"]
37+
},
38+
"relationships": {
39+
"$ref": "#/components/schemas/GenerateBarcodeRequestRelationships"
40+
}
41+
},
42+
"required": ["type", "attributes", "relationships"]
43+
}
44+
},
45+
"required": ["data"]
46+
}
47+
}
48+
}
49+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"components": {
3+
"schemas": {
4+
"StoreLocation": {
5+
"title": "Store Location",
6+
"type": "object",
7+
"properties": {
8+
"type": {
9+
"type": "string",
10+
"enum": ["storeLocation"],
11+
"default": "storeLocation"
12+
},
13+
"attributes": {
14+
"type": "object",
15+
"properties": {
16+
"storeId": {
17+
"type": "string"
18+
},
19+
"retailerName": {
20+
"type": "string"
21+
},
22+
"phone": {
23+
"$ref": "../types.json#/components/schemas/Phone"
24+
},
25+
"address": {
26+
"$ref": "../types.json#/components/schemas/Address"
27+
},
28+
"coordinates": {
29+
"$ref": "../types.json#/components/schemas/Coordinates"
30+
},
31+
"distance": {
32+
"type": "number"
33+
}
34+
},
35+
"required": [
36+
"storeId",
37+
"retailerName",
38+
"phone",
39+
"address",
40+
"coordinates",
41+
"distance"
42+
],
43+
"additionalProperties": false
44+
}
45+
},
46+
"required": ["type", "attributes"]
47+
}
48+
}
49+
}
50+
}

0 commit comments

Comments
 (0)