@checkdigit/eslint-plugin 7.17.1 → 7.18.0-PR.143-8290

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/dist-mjs/athena/api-locator.mjs +30 -0
  2. package/dist-mjs/athena/api-matcher.mjs +108 -0
  3. package/dist-mjs/athena/athena.mjs +331 -0
  4. package/dist-mjs/athena/column.mjs +1 -0
  5. package/dist-mjs/athena/context.mjs +21 -0
  6. package/dist-mjs/athena/index.mjs +1 -0
  7. package/dist-mjs/athena/service-table.mjs +32 -0
  8. package/dist-mjs/athena/types.mjs +1 -0
  9. package/dist-mjs/athena/visitor.mjs +258 -0
  10. package/dist-mjs/index.mjs +8 -4
  11. package/dist-mjs/no-status-code-assert.mjs +1 -1
  12. package/dist-mjs/openapi/deref-schema.mjs +14 -0
  13. package/dist-mjs/openapi/generate-schema.mjs +273 -0
  14. package/dist-mjs/openapi/service-schema-generator.mjs +147 -0
  15. package/dist-mjs/peggy/athena-peggy.mjs +20629 -0
  16. package/dist-types/athena/api-locator.d.ts +2 -0
  17. package/dist-types/athena/api-matcher.d.ts +14 -0
  18. package/dist-types/athena/athena.d.ts +6 -0
  19. package/dist-types/athena/column.d.ts +1 -0
  20. package/dist-types/athena/context.d.ts +21 -0
  21. package/dist-types/athena/index.d.ts +8 -0
  22. package/dist-types/athena/service-table.d.ts +8 -0
  23. package/dist-types/athena/types.d.ts +474 -0
  24. package/dist-types/athena/visitor.d.ts +63 -0
  25. package/dist-types/no-status-code-assert.d.ts +1 -1
  26. package/dist-types/openapi/deref-schema.d.ts +1 -0
  27. package/dist-types/openapi/generate-schema.d.ts +33 -0
  28. package/dist-types/openapi/service-schema-generator.d.ts +5 -0
  29. package/dist-types/peggy/athena-peggy.d.ts +13 -0
  30. package/package.json +1 -96
  31. package/src/athena/ATHENA.md +387 -0
  32. package/src/athena/PLAN.md +355 -0
  33. package/src/athena/api-locator.ts +39 -0
  34. package/src/athena/api-matcher.ts +169 -0
  35. package/src/athena/athena.ts +491 -0
  36. package/src/athena/column.ts +2 -0
  37. package/src/athena/context.ts +47 -0
  38. package/src/athena/index.ts +11 -0
  39. package/src/athena/service-table.ts +55 -0
  40. package/src/athena/types.ts +526 -0
  41. package/src/athena/visitor.ts +365 -0
  42. package/src/index.ts +4 -0
  43. package/src/no-side-effects.ts +1 -1
  44. package/src/no-status-code-assert.ts +2 -2
  45. package/src/openapi/deref-schema.ts +14 -0
  46. package/src/openapi/generate-schema.ts +422 -0
  47. package/src/openapi/service-schema-generator.ts +189 -0
  48. package/src/peggy/athena-chat.peggy +608 -0
  49. package/src/peggy/athena-peggy.ts +22078 -0
  50. package/src/peggy/athena.peggy +2967 -0
  51. package/src/require-service-call-response-declaration.ts +2 -2
  52. package/src/services/interchange/v1/swagger.schema.deref.json +849 -0
  53. package/src/services/interchange/v1/swagger.schema.json +473 -0
  54. package/src/services/interchange/v1/swagger.yml +414 -0
  55. package/src/services/ledger/v1/swagger.schema.deref.json +6694 -0
  56. package/src/services/ledger/v1/swagger.schema.json +1820 -0
  57. package/src/services/ledger/v1/swagger.yml +1094 -0
  58. package/src/services/link/v1/swagger.schema.deref.json +648 -0
  59. package/src/services/link/v1/swagger.schema.json +444 -0
  60. package/src/services/link/v1/swagger.yml +343 -0
  61. package/src/services/message/v1/swagger.schema.deref.json +22049 -0
  62. package/src/services/message/v1/swagger.schema.json +3470 -0
  63. package/src/services/message/v1/swagger.yml +2798 -0
  64. package/src/services/message/v2/swagger.schema.deref.json +72221 -0
  65. package/src/services/message/v2/swagger.schema.json +3558 -0
  66. package/src/services/message/v2/swagger.yml +3009 -0
  67. package/src/services/paymentCard/v1/swagger.schema.deref.json +4346 -0
  68. package/src/services/paymentCard/v1/swagger.schema.json +2181 -0
  69. package/src/services/paymentCard/v1/swagger.yml +1161 -0
  70. package/src/services/paymentCard/v2/swagger.schema.deref.json +4336 -0
  71. package/src/services/paymentCard/v2/swagger.schema.json +2155 -0
  72. package/src/services/paymentCard/v2/swagger.yml +1149 -0
  73. package/src/services/person/v1/swagger.schema.deref.json +6786 -0
  74. package/src/services/person/v1/swagger.schema.json +1445 -0
  75. package/src/services/person/v1/swagger.yml +1157 -0
  76. package/src/services/teampayApproval/v1/swagger.schema.deref.json +9898 -0
  77. package/src/services/teampayCardManagement/v1/swagger.schema.deref.json +6187 -0
  78. package/src/services/teampayClientManagement/v1/swagger.schema.deref.json +4914 -0
  79. package/src/services/teampayClientManagement/v1/swagger.schema.json +1964 -0
  80. package/src/services/teampayClientManagement/v1/swagger.yml +1376 -0
@@ -0,0 +1,1376 @@
1
+ openapi: 3.0.0
2
+ info:
3
+ title: Teampay Client Management
4
+ version: 1.28.0
5
+ description: |
6
+ Teampay Client Management is a service used to create, update and retrieve a client and its payment sources.
7
+
8
+ The service also initiates payment transactions between a client account and its payment sources.
9
+
10
+ This service follows REST principles. `GET` operations are cache-able, and `PUT` operations are idempotent.
11
+
12
+ Client name, address and limits are mutable. Any updates to issuingCountryCode, funding, and products will result in a 400 Bad Request.
13
+ contact:
14
+ name: Teampay
15
+
16
+ servers:
17
+ - url: /teampay-client-management/v1
18
+ tags:
19
+ - name: Service Health
20
+ - name: API
21
+
22
+ x-firehose-logged: false
23
+
24
+ paths:
25
+ /ping:
26
+ get:
27
+ tags:
28
+ - Service Health
29
+ operationId: 'ping-get'
30
+ description: Tests the availability of the service and returns the current server time.
31
+ responses:
32
+ '200':
33
+ $ref: '#/components/responses/Ping'
34
+ default:
35
+ $ref: '#/components/responses/ServerError'
36
+
37
+ /client/{clientId}:
38
+ get:
39
+ tags:
40
+ - API
41
+ operationId: 'client-get'
42
+ description: Retrieves client details.
43
+ parameters:
44
+ - $ref: '#/components/parameters/clientId'
45
+ - $ref: '#/components/parameters/at'
46
+ responses:
47
+ '200':
48
+ description: Client details obtained.
49
+ content:
50
+ application/json:
51
+ schema:
52
+ $ref: '#/components/schemas/Client'
53
+ headers:
54
+ Last-Modified:
55
+ $ref: '#/components/headers/Last-Modified'
56
+ Created-On:
57
+ $ref: '#/components/headers/Created-On'
58
+ Updated-On:
59
+ $ref: '#/components/headers/Updated-On'
60
+ ETag:
61
+ $ref: '#/components/headers/ETag'
62
+ '404':
63
+ $ref: '#/components/responses/NotFound'
64
+ default:
65
+ $ref: '#/components/responses/ServerError'
66
+ put:
67
+ tags:
68
+ - API
69
+ operationId: 'client-put'
70
+ x-firehose-logged: true
71
+ description: |
72
+ Create or update a client.
73
+ The If-Match header should be supplied when updating an existing client but not when creating a new one.
74
+ When updating a client, the If-Match header value should equal the ETag header value of the latest version of the specified client.
75
+ ETag values can be retrieved by using the GET /client/{clientId} endpoint.
76
+ parameters:
77
+ - $ref: '#/components/parameters/clientId'
78
+ - $ref: '#/components/parameters/ifMatch'
79
+ requestBody:
80
+ $ref: '#/components/requestBodies/NewClient'
81
+ responses:
82
+ '200':
83
+ description: Client created or updated successfully.
84
+ content:
85
+ application/json:
86
+ schema:
87
+ $ref: '#/components/schemas/Client'
88
+ headers:
89
+ Last-Modified:
90
+ $ref: '#/components/headers/Last-Modified'
91
+ Created-On:
92
+ $ref: '#/components/headers/Created-On'
93
+ Updated-On:
94
+ $ref: '#/components/headers/Updated-On'
95
+ ETag:
96
+ $ref: '#/components/headers/ETag'
97
+ '409':
98
+ $ref: '#/components/responses/Conflict'
99
+ '412':
100
+ $ref: '#/components/responses/PreconditionFailed'
101
+ default:
102
+ $ref: '#/components/responses/ServerError'
103
+
104
+ /client/{clientId}/balance:
105
+ get:
106
+ tags:
107
+ - API
108
+ operationId: 'client-balance-get'
109
+ description: Retrieve the available balance and ledger balance of a client account
110
+ parameters:
111
+ - $ref: '#/components/parameters/clientId'
112
+ - $ref: '#/components/parameters/at'
113
+ responses:
114
+ '200':
115
+ description: Balance retrieved
116
+ content:
117
+ application/json:
118
+ schema:
119
+ $ref: '#/components/schemas/ClientBalance'
120
+ '404':
121
+ description: Client not found
122
+ default:
123
+ $ref: '#/components/responses/ServerError'
124
+
125
+ /ach-payment-source/{achPaymentSourceId}:
126
+ get:
127
+ tags:
128
+ - API
129
+ operationId: 'ach-payment-source-get'
130
+ description: |
131
+ Retrieve a client ACH payment Source.
132
+ Some achPaymentSource data found in the response will be encrypted.
133
+
134
+ # Decrypting the achPaymentSource data
135
+
136
+ - Decrypt the transmissionKey found in the response using the RSA algorithm, and the matching private key for the public key that was shared with Check Digit to be able to decrypt ACH payment source data.
137
+ - Decrypt each encrypted achPaymentSource field using the AES-256-CBC algorithm, and the decrypted transmissionKey
138
+
139
+ Note - The AES secret key obtained after decrypting the transmission key will not be the same one that was used to create the ACH payment source.
140
+
141
+ Example achPaymentSource data
142
+ ###
143
+ {
144
+ "accountName":"hEajv5fwZp0Q0GgF2VYySspD4/xIL+t4q2Sp4PK7fXY=", <- Decrypt encrypted fields using the AES-256-CBC algorithm, and the decrypted encryptedDataEncryptionKey
145
+ "accountType":"CHECKING",
146
+ "accountNumber":"79M1/JWToIRV6UhKx3qH37+fg+3D/UWsNMILdTQtI6Y=",
147
+ "routingNumber":"82XBXUA18oEDBXj22V7/lMaou6uXMkbdnrqQf+UpFUk="
148
+ }
149
+ ###
150
+ parameters:
151
+ - $ref: '#/components/parameters/achPaymentSourceId'
152
+ - $ref: '#/components/parameters/at'
153
+ responses:
154
+ '200':
155
+ description: Client ACH payment source obtained
156
+ content:
157
+ application/json:
158
+ schema:
159
+ $ref: '#/components/schemas/ClientAchPaymentSource'
160
+ headers:
161
+ Last-Modified:
162
+ $ref: '#/components/headers/Last-Modified'
163
+ Created-On:
164
+ $ref: '#/components/headers/Created-On'
165
+ Updated-On:
166
+ $ref: '#/components/headers/Updated-On'
167
+ '404':
168
+ $ref: '#/components/responses/NotFound'
169
+ default:
170
+ $ref: '#/components/responses/ServerError'
171
+ put:
172
+ tags:
173
+ - API
174
+ operationId: 'ach-payment-source-put'
175
+ x-firehose-logged: true
176
+ description: |
177
+ Create an ACH payment source linked to a client.
178
+ The resulting ACH payment source ledger account IDs will be in the format of "{achPaymentSourceId}/payment/*"
179
+
180
+ ### Personally Identifiable Information (PII)
181
+ Some of the fields required for creation of a new ACH payment source are considered
182
+ personally identifiable information and hence must be transmitted and stored securely.
183
+
184
+ ### Encryption
185
+ All fields that are expected to be encrypted include the word 'encrypted' in their description.
186
+
187
+ Creation of new ACH payment sources uses a combination of both symmetric encryption, using the AES-256-CBC algorithm,
188
+ and asymmetric encryption, using the RSA algorithm. More specifically, the field values are encrypted symmetrically
189
+ with a secret key and the secret key is encrypted asymmetrically using a public/private key pair.
190
+
191
+ # Encrypting new ACH payment source data
192
+
193
+ - Generate a random secret key using AES
194
+ - AES encrypt each field (encryption expected) of the achPaymentSource with the secret key.
195
+ - RSA encrypt the secret key with the public key shared by Check Digit associated with the Teampay Client Management service and specific environment to produce a transmissionKey.
196
+ - Submit the transmissionKey in the ACH payment source creation request.
197
+
198
+ Example ACH payment source request data
199
+ ###
200
+ {
201
+ "clientId":"e28d87d7-dff3-44a6-b62e-e7d0065207c0",
202
+ "transmissionKey":"XhpZPSmNVVWrAzABhNXfHmTZIUlHt0wzHr/v2N3FaLwtL0stPnHC6+8okkCoHXvmmn4...", <-- Encrypted secret key using the RSA algorithm, and the public key shared by Check Digit
203
+ "achPaymentSource":{
204
+ "accountName":"hEajv5fwZp0Q0GgF2VYySspD4/xIL+t4q2Sp4PK7fXY=", <- AES-256-CBC encrypted field using the above secret key (before encryption)
205
+ "accountType":"CHECKING",
206
+ "accountNumber":"79M1/JWToIRV6UhKx3qH37+fg+3D/UWsNMILdTQtI6Y=",
207
+ "routingNumber":"82XBXUA18oEDBXj22V7/lMaou6uXMkbdnrqQf+UpFUk="
208
+ }
209
+ }
210
+ ###
211
+ parameters:
212
+ - $ref: '#/components/parameters/achPaymentSourceId'
213
+ requestBody:
214
+ $ref: '#/components/requestBodies/NewClientAchPaymentSource'
215
+ responses:
216
+ '200':
217
+ description: Client ACH payment source created
218
+ content:
219
+ application/json:
220
+ schema:
221
+ $ref: '#/components/schemas/ClientAchPaymentSource'
222
+ headers:
223
+ Last-Modified:
224
+ $ref: '#/components/headers/Last-Modified'
225
+ Created-On:
226
+ $ref: '#/components/headers/Created-On'
227
+ Updated-On:
228
+ $ref: '#/components/headers/Updated-On'
229
+ '409':
230
+ $ref: '#/components/responses/Conflict'
231
+ default:
232
+ $ref: '#/components/responses/ServerError'
233
+
234
+ /client/{clientId}/ach-payment-sources:
235
+ get:
236
+ tags:
237
+ - API
238
+ operationId: 'client-ach-payment-sources-get'
239
+ description: Retrieve a list of the client's ACH payment sources
240
+ parameters:
241
+ - $ref: '#/components/parameters/clientId'
242
+ - $ref: '#/components/parameters/at'
243
+ responses:
244
+ '200':
245
+ description: |
246
+ Client ACH payment sources obtained.
247
+ An empty array will be returned if there are no associated ACH payment sources with the client.
248
+ content:
249
+ application/json:
250
+ schema:
251
+ type: array
252
+ description: List of client ACH payment sources
253
+ items:
254
+ $ref: '#/components/schemas/ClientAchPaymentSource'
255
+ default:
256
+ $ref: '#/components/responses/ServerError'
257
+
258
+ /request/{paymentId}:
259
+ put:
260
+ tags:
261
+ - API
262
+ operationId: 'request-payment-put'
263
+ x-firehose-logged: true
264
+ description: Initiate a new payment requesting funds from a client's payment source
265
+ parameters:
266
+ - $ref: '#/components/parameters/paymentId'
267
+ requestBody:
268
+ $ref: '#/components/requestBodies/NewPayment'
269
+ responses:
270
+ '200':
271
+ description: Payment initiated
272
+ content:
273
+ application/json:
274
+ schema:
275
+ $ref: '#/components/schemas/PayOrRequestPaymentResponse'
276
+ headers:
277
+ Last-Modified:
278
+ $ref: '#/components/headers/Last-Modified'
279
+ Created-On:
280
+ $ref: '#/components/headers/Created-On'
281
+ Updated-On:
282
+ $ref: '#/components/headers/Updated-On'
283
+ '409':
284
+ $ref: '#/components/responses/Conflict'
285
+ default:
286
+ $ref: '#/components/responses/ServerError'
287
+
288
+ /pay/{paymentId}:
289
+ put:
290
+ tags:
291
+ - API
292
+ operationId: 'pay-payment-put'
293
+ x-firehose-logged: true
294
+ description: Initiate a new payment to pay funds to a client's payment source
295
+ parameters:
296
+ - $ref: '#/components/parameters/paymentId'
297
+ requestBody:
298
+ $ref: '#/components/requestBodies/NewPayment'
299
+ responses:
300
+ '200':
301
+ description: Payment initiated
302
+ content:
303
+ application/json:
304
+ schema:
305
+ $ref: '#/components/schemas/PayOrRequestPaymentResponse'
306
+ headers:
307
+ Last-Modified:
308
+ $ref: '#/components/headers/Last-Modified'
309
+ Created-On:
310
+ $ref: '#/components/headers/Created-On'
311
+ Updated-On:
312
+ $ref: '#/components/headers/Updated-On'
313
+ '409':
314
+ $ref: '#/components/responses/Conflict'
315
+ default:
316
+ $ref: '#/components/responses/ServerError'
317
+
318
+ /cancel/{paymentId}:
319
+ put:
320
+ tags:
321
+ - API
322
+ operationId: 'cancel-payment-put'
323
+ x-firehose-logged: true
324
+ description: Cancel a payment
325
+ parameters:
326
+ - $ref: '#/components/parameters/paymentId'
327
+ responses:
328
+ '200':
329
+ description: Payment cancelled
330
+ content:
331
+ application/json:
332
+ schema:
333
+ $ref: '#/components/schemas/CancelPaymentResponse'
334
+ headers:
335
+ Last-Modified:
336
+ $ref: '#/components/headers/Last-Modified'
337
+ Created-On:
338
+ $ref: '#/components/headers/Created-On'
339
+ Updated-On:
340
+ $ref: '#/components/headers/Updated-On'
341
+ '412':
342
+ description: Payment already in process and cannot be canceled
343
+ default:
344
+ $ref: '#/components/responses/ServerError'
345
+
346
+ /credit-account-adjustment/{entryId}:
347
+ put:
348
+ tags:
349
+ - API
350
+ operationId: 'credit-account-adjustment-put'
351
+ x-firehose-logged: true
352
+ description: |
353
+ Create a credit account balance adjustment entry against a credit client's account.
354
+ - If the transactionType is 'CREDIT', the resulting entry will debit from the account with id '{clientId}/credit/adjustment' and credit the client account.
355
+ - If the transactionType is 'DEBIT', the resulting entry will debit from the client account and credit the account with id '{clientId}/credit/adjustment'.
356
+ parameters:
357
+ - $ref: '#/components/parameters/entryId'
358
+ requestBody:
359
+ $ref: '#/components/requestBodies/NewCreditAccountEntry'
360
+ responses:
361
+ '204':
362
+ description: Credit account balance adjustment entry successfully created
363
+ headers:
364
+ Last-Modified:
365
+ $ref: '#/components/headers/Last-Modified'
366
+ Created-On:
367
+ $ref: '#/components/headers/Created-On'
368
+ Updated-On:
369
+ $ref: '#/components/headers/Updated-On'
370
+ '409':
371
+ $ref: '#/components/responses/Conflict'
372
+ default:
373
+ $ref: '#/components/responses/ServerError'
374
+
375
+ /credit-account-payment/{entryId}:
376
+ put:
377
+ tags:
378
+ - API
379
+ operationId: 'credit-account-payment-put'
380
+ x-firehose-logged: true
381
+ description: |
382
+ Create a credit account payment entry against a credit client's account.
383
+ - If the transactionType is 'CREDIT', the resulting entry will debit from the account with id '{clientId}/credit/payment' and credit the client account.
384
+ - If the transactionType is 'DEBIT', the resulting entry will debit from the client account and credit the account with id '{clientId}/credit/payment'.
385
+ parameters:
386
+ - $ref: '#/components/parameters/entryId'
387
+ requestBody:
388
+ $ref: '#/components/requestBodies/NewCreditAccountEntry'
389
+ responses:
390
+ '204':
391
+ description: Credit account payment entry successfully created
392
+ headers:
393
+ Last-Modified:
394
+ $ref: '#/components/headers/Last-Modified'
395
+ Created-On:
396
+ $ref: '#/components/headers/Created-On'
397
+ Updated-On:
398
+ $ref: '#/components/headers/Updated-On'
399
+ '409':
400
+ $ref: '#/components/responses/Conflict'
401
+ default:
402
+ $ref: '#/components/responses/ServerError'
403
+
404
+ /correction/{entryId}:
405
+ put:
406
+ tags:
407
+ - API
408
+ operationId: 'correction-put'
409
+ x-firehose-logged: true
410
+ description: |
411
+ Create a correction payment entry against a client's account.
412
+ - If the transactionType is 'CREDIT', the resulting entry will debit from the account with id '{clientId}/correction' and credit the client account.
413
+ - If the transactionType is 'DEBIT', the resulting entry will debit from the client account and credit the account with id '{clientId}/correction'.
414
+ - An intermediary correction entry account with id matching the {entryId} supplied in the path parameter will also be created and part of the entry postings. This account can be used to keep track of the specific correction and its purpose.
415
+ parameters:
416
+ - $ref: '#/components/parameters/entryId'
417
+ requestBody:
418
+ $ref: '#/components/requestBodies/NewCorrectionAccountEntry'
419
+ responses:
420
+ '204':
421
+ description: Client correction account entry successfully created
422
+ headers:
423
+ Last-Modified:
424
+ $ref: '#/components/headers/Last-Modified'
425
+ Created-On:
426
+ $ref: '#/components/headers/Created-On'
427
+ Updated-On:
428
+ $ref: '#/components/headers/Updated-On'
429
+ '409':
430
+ $ref: '#/components/responses/Conflict'
431
+ default:
432
+ $ref: '#/components/responses/ServerError'
433
+
434
+ components:
435
+ schemas:
436
+ Ping:
437
+ type: object
438
+ additionalProperties: false
439
+ required:
440
+ - serverTime
441
+ properties:
442
+ serverTime:
443
+ type: string
444
+ format: date-time
445
+ description: Current server time
446
+
447
+ Error:
448
+ type: object
449
+ additionalProperties: false
450
+ description: Server error message
451
+ properties:
452
+ message:
453
+ type: string
454
+ code:
455
+ type: string
456
+
457
+ NewClient:
458
+ type: object
459
+ additionalProperties: false
460
+ description: New client request schema.
461
+ required:
462
+ - name
463
+ - address
464
+ - issuingCountryCode
465
+ - products
466
+ - limits
467
+ properties:
468
+ name:
469
+ $ref: '#/components/schemas/Name'
470
+ address:
471
+ $ref: '#/components/schemas/Address'
472
+ issuingCountryCode:
473
+ $ref: '#/components/schemas/IssuingCountryCode'
474
+ products:
475
+ $ref: '#/components/schemas/Products'
476
+ limits:
477
+ $ref: '#/components/schemas/Limits'
478
+ funding:
479
+ $ref: '#/components/schemas/Funding'
480
+ active:
481
+ $ref: '#/components/schemas/ActiveStatus'
482
+ subsidiaryOf:
483
+ $ref: '#/components/schemas/SubsidiaryOf'
484
+
485
+ Client:
486
+ type: object
487
+ additionalProperties: false
488
+ description: Client Schema.
489
+ required:
490
+ - name
491
+ - address
492
+ - issuingCountryCode
493
+ - limits
494
+ - products
495
+ - clientAccountId
496
+ - lastModified
497
+ - createdOn
498
+ - funding
499
+ - active
500
+ - configurationId
501
+ properties:
502
+ name:
503
+ $ref: '#/components/schemas/Name'
504
+ address:
505
+ $ref: '#/components/schemas/Address'
506
+ issuingCountryCode:
507
+ $ref: '#/components/schemas/IssuingCountryCode'
508
+ limits:
509
+ $ref: '#/components/schemas/Limits'
510
+ products:
511
+ $ref: '#/components/schemas/Products'
512
+ clientAccountId:
513
+ type: string
514
+ description: The ledger account that holds the funds which are spendable by cardholders linked to the client.
515
+ lastModified:
516
+ $ref: '#/components/schemas/LastModified'
517
+ createdOn:
518
+ $ref: '#/components/schemas/CreatedOn'
519
+ updatedOn:
520
+ $ref: '#/components/schemas/UpdatedOn'
521
+ funding:
522
+ $ref: '#/components/schemas/Funding'
523
+ active:
524
+ $ref: '#/components/schemas/ActiveStatus'
525
+ configurationId:
526
+ type: string
527
+ description: The unique identifier for the client's configuration data.
528
+ subsidiaryOf:
529
+ $ref: '#/components/schemas/SubsidiaryOf'
530
+
531
+ Products:
532
+ type: array
533
+ minItems: 1
534
+ description: Array of products that are applicable to the client
535
+ items:
536
+ $ref: '#/components/schemas/Product'
537
+
538
+ IssuingCountryCode:
539
+ type: string
540
+ description: The country in which the cards are issued
541
+ enum:
542
+ - US
543
+ - CA
544
+
545
+ Limits:
546
+ type: array
547
+ minItems: 0
548
+ description: |
549
+ An array of limits that apply at the organization level.
550
+ The organization level represents the combined total of all card transactions for the client.
551
+ items:
552
+ $ref: '#/components/schemas/Limit'
553
+
554
+ Limit:
555
+ type: object
556
+ additionalProperties: false
557
+ description: |
558
+ Limit Details
559
+ - There can only be one limit per client for each period, periodLength, and limitFunction combination.
560
+ Multiple limits with the same values for the combination of properties listed above will result in a 400 Bad Request.
561
+ required:
562
+ - period
563
+ - periodLength
564
+ - limitFunction
565
+ - value
566
+ properties:
567
+ period:
568
+ $ref: '#/components/schemas/Period'
569
+ periodLength:
570
+ $ref: '#/components/schemas/PeriodLength'
571
+ limitFunction:
572
+ $ref: '#/components/schemas/LimitFunction'
573
+ value:
574
+ $ref: '#/components/schemas/LimitValue'
575
+
576
+ Period:
577
+ type: string
578
+ description: |
579
+ DAY is a calendar day and will begin at 00:00:00 UTC.
580
+ MONTH is a calendar month and will begin on the first day of the month at 00:00:00 UTC.
581
+ All periods are rolling if the associated periodLength is greater than 1
582
+ enum:
583
+ - DAY
584
+ - MONTH
585
+
586
+ LimitFunction:
587
+ type: string
588
+ description: AMOUNT functions by summing up the aggregate data point values.
589
+ enum:
590
+ - AMOUNT
591
+
592
+ Product:
593
+ type: string
594
+ description: Type of card product
595
+ enum:
596
+ - VIRTUAL
597
+ - STANDARD
598
+ - PREMIUM
599
+
600
+ PeriodLength:
601
+ type: string
602
+ pattern: '^\d+$'
603
+ minLength: 1
604
+ description: How long the period lasts
605
+
606
+ LimitValue:
607
+ type: string
608
+ pattern: '^\d+$'
609
+ minLength: 1
610
+ description: Limit value to use. The value is expected to be in cents.
611
+
612
+ Name:
613
+ type: string
614
+ description: The name of the client.
615
+ minLength: 1
616
+
617
+ NewClientAchPaymentSource:
618
+ type: object
619
+ additionalProperties: false
620
+ description: New client ACH payment source details
621
+ required:
622
+ - clientId
623
+ - achPaymentSource
624
+ - transmissionKey
625
+ properties:
626
+ clientId:
627
+ $ref: '#/components/schemas/ClientId'
628
+ achPaymentSource:
629
+ $ref: '#/components/schemas/AchPaymentSource'
630
+ transmissionKey:
631
+ $ref: '#/components/schemas/TransmissionKey'
632
+
633
+ ClientId:
634
+ type: string
635
+ description: The Unique identifier for the client in uuid format
636
+ format: uuid
637
+
638
+ CreatedOn:
639
+ type: string
640
+ format: date-time
641
+ description: Original created on date time
642
+
643
+ LastModified:
644
+ type: string
645
+ format: date-time
646
+ description: Resource last modified date time
647
+
648
+ UpdatedOn:
649
+ type: string
650
+ format: date-time
651
+ description: Resource last modified date time
652
+
653
+ AchPaymentSource:
654
+ type: object
655
+ additionalProperties: false
656
+ description: ACH Payment Source
657
+ required:
658
+ - accountName
659
+ - accountType
660
+ - accountNumber
661
+ - routingNumber
662
+ properties:
663
+ accountName:
664
+ $ref: '#/components/schemas/AccountName'
665
+ accountType:
666
+ $ref: '#/components/schemas/AccountType'
667
+ accountNumber:
668
+ $ref: '#/components/schemas/AccountNumber'
669
+ routingNumber:
670
+ $ref: '#/components/schemas/RoutingNumber'
671
+
672
+ AccountName:
673
+ type: string
674
+ description: |
675
+ Name of the account owner, encrypted. The following conditions not being met will result in a 400 Bad Request:
676
+ - Must be less than or equal to 22 characters long
677
+ - Must contain only alphanumeric and space characters
678
+ minLength: 1
679
+
680
+ AccountType:
681
+ type: string
682
+ description: Type of account
683
+ minLength: 1
684
+ enum:
685
+ - CHECKING
686
+ - SAVINGS
687
+
688
+ AccountNumber:
689
+ type: string
690
+ description: |
691
+ Account number, encrypted. The following conditions not being met will result in a 400 Bad Request:
692
+ - Must be less than or equal to 17 characters long
693
+ - Must contain only numerical digits
694
+ - Must not only contain zeros
695
+ minLength: 1
696
+
697
+ RoutingNumber:
698
+ type: string
699
+ description: |
700
+ Routing number, encrypted. The following conditions not being met will result in a 400 Bad Request:
701
+ - Must be a valid bank routing number
702
+ - Must be 9 characters
703
+ - Must contain only numerical digits
704
+ - Must not only contain zeros
705
+ minLength: 1
706
+
707
+ ClientAchPaymentSource:
708
+ type: object
709
+ additionalProperties: false
710
+ description: Client ACH Payment Source Details
711
+ required:
712
+ - achPaymentSourceId
713
+ - clientId
714
+ - transmissionKey
715
+ - storageKeyId
716
+ - achPaymentSource
717
+ - lastModified
718
+ - createdOn
719
+ properties:
720
+ achPaymentSourceId:
721
+ $ref: '#/components/schemas/AchPaymentSourceId'
722
+ clientId:
723
+ $ref: '#/components/schemas/ClientId'
724
+ transmissionKey:
725
+ $ref: '#/components/schemas/TransmissionKey'
726
+ storageKeyId:
727
+ $ref: '#/components/schemas/StorageKeyId'
728
+ achPaymentSource:
729
+ $ref: '#/components/schemas/AchPaymentSource'
730
+ lastModified:
731
+ $ref: '#/components/schemas/LastModified'
732
+ createdOn:
733
+ $ref: '#/components/schemas/CreatedOn'
734
+ updatedOn:
735
+ $ref: '#/components/schemas/UpdatedOn'
736
+
737
+ NewPayment:
738
+ type: object
739
+ additionalProperties: false
740
+ description: Payment details
741
+ required:
742
+ - paymentSourceId
743
+ - clientId
744
+ - amount
745
+ properties:
746
+ paymentSourceId:
747
+ type: string
748
+ description: |
749
+ Identifier of a payment source from/to which funds are requested/paid.
750
+ The payment source must be associated with the client whose clientId is being submitted in the request or
751
+ a 400 Bad Request will be returned.
752
+ clientId:
753
+ type: string
754
+ description: The client whose account will be DEBITED/CREDITED funds from/to when the request/pay transaction is accepted.
755
+ amount:
756
+ type: string
757
+ pattern: '^[1-9]\d*$'
758
+ minLength: 1
759
+ maxLength: 9
760
+ description: |
761
+ The amount to be credited or debited.
762
+ The value is expected to be in cents.
763
+ As an example, a value of 100 would be equal to 1 dollar
764
+ companyEntryDescription:
765
+ $ref: '#/components/schemas/CompanyEntryDescription'
766
+
767
+ AchPaymentSourceId:
768
+ type: string
769
+ description: Identifier for the ACH payment source
770
+ format: uuid
771
+
772
+ Address:
773
+ description: The business address of the client. This will be the address used by the Address Verification Service
774
+ required:
775
+ - country
776
+ - streetLines
777
+ type: object
778
+ properties:
779
+ streetLines:
780
+ maxItems: 4
781
+ minItems: 1
782
+ type: array
783
+ description: Street lines
784
+ items:
785
+ minLength: 1
786
+ type: string
787
+ description: Street line
788
+ city:
789
+ minLength: 1
790
+ type: string
791
+ description: City
792
+ region:
793
+ minLength: 1
794
+ type: string
795
+ description: Region, State or Provence
796
+ postalCode:
797
+ minLength: 1
798
+ type: string
799
+ description: Postal or zip code
800
+ reportablePostalCode:
801
+ type: string
802
+ description: Postal code for reporting purposes.
803
+ country:
804
+ type: string
805
+ description: Country ISO 3166-1 alpha-2 codes
806
+ enum:
807
+ - AD
808
+ - AE
809
+ - AF
810
+ - AG
811
+ - AI
812
+ - AL
813
+ - AM
814
+ - AO
815
+ - AQ
816
+ - AR
817
+ - AS
818
+ - AT
819
+ - AU
820
+ - AW
821
+ - AX
822
+ - AZ
823
+ - BA
824
+ - BB
825
+ - BD
826
+ - BE
827
+ - BF
828
+ - BG
829
+ - BH
830
+ - BI
831
+ - BJ
832
+ - BL
833
+ - BM
834
+ - BN
835
+ - BO
836
+ - BQ
837
+ - BR
838
+ - BS
839
+ - BT
840
+ - BV
841
+ - BW
842
+ - BY
843
+ - BZ
844
+ - CA
845
+ - CC
846
+ - CD
847
+ - CF
848
+ - CG
849
+ - CH
850
+ - CI
851
+ - CK
852
+ - CL
853
+ - CM
854
+ - CN
855
+ - CO
856
+ - CR
857
+ - CU
858
+ - CV
859
+ - CW
860
+ - CX
861
+ - CY
862
+ - CZ
863
+ - DE
864
+ - DJ
865
+ - DK
866
+ - DM
867
+ - DO
868
+ - DZ
869
+ - EC
870
+ - EE
871
+ - EG
872
+ - EH
873
+ - ER
874
+ - ES
875
+ - ET
876
+ - FI
877
+ - FJ
878
+ - FK
879
+ - FM
880
+ - FO
881
+ - FR
882
+ - GA
883
+ - GB
884
+ - GD
885
+ - GE
886
+ - GF
887
+ - GG
888
+ - GH
889
+ - GI
890
+ - GL
891
+ - GM
892
+ - GN
893
+ - GP
894
+ - GQ
895
+ - GR
896
+ - GS
897
+ - GT
898
+ - GU
899
+ - GW
900
+ - GY
901
+ - HK
902
+ - HM
903
+ - HN
904
+ - HR
905
+ - HT
906
+ - HU
907
+ - ID
908
+ - IE
909
+ - IL
910
+ - IM
911
+ - IN
912
+ - IO
913
+ - IQ
914
+ - IR
915
+ - IS
916
+ - IT
917
+ - JE
918
+ - JM
919
+ - JO
920
+ - JP
921
+ - KE
922
+ - KG
923
+ - KH
924
+ - KI
925
+ - KM
926
+ - KN
927
+ - KP
928
+ - KR
929
+ - KW
930
+ - KY
931
+ - KZ
932
+ - LA
933
+ - LB
934
+ - LC
935
+ - LI
936
+ - LK
937
+ - LR
938
+ - LS
939
+ - LT
940
+ - LU
941
+ - LV
942
+ - LY
943
+ - MA
944
+ - MC
945
+ - MD
946
+ - ME
947
+ - MF
948
+ - MG
949
+ - MH
950
+ - MK
951
+ - ML
952
+ - MM
953
+ - MN
954
+ - MO
955
+ - MP
956
+ - MQ
957
+ - MR
958
+ - MS
959
+ - MT
960
+ - MU
961
+ - MV
962
+ - MW
963
+ - MX
964
+ - MY
965
+ - MZ
966
+ - NA
967
+ - NC
968
+ - NE
969
+ - NF
970
+ - NG
971
+ - NI
972
+ - NL
973
+ - NO
974
+ - NP
975
+ - NR
976
+ - NU
977
+ - NZ
978
+ - OM
979
+ - PA
980
+ - PE
981
+ - PF
982
+ - PG
983
+ - PH
984
+ - PK
985
+ - PL
986
+ - PM
987
+ - PN
988
+ - PR
989
+ - PS
990
+ - PT
991
+ - PW
992
+ - PY
993
+ - QA
994
+ - RE
995
+ - RO
996
+ - RS
997
+ - RU
998
+ - RW
999
+ - SA
1000
+ - SB
1001
+ - SC
1002
+ - SD
1003
+ - SE
1004
+ - SG
1005
+ - SH
1006
+ - SI
1007
+ - SJ
1008
+ - SK
1009
+ - SL
1010
+ - SM
1011
+ - SN
1012
+ - SO
1013
+ - SR
1014
+ - SS
1015
+ - ST
1016
+ - SV
1017
+ - SX
1018
+ - SY
1019
+ - SZ
1020
+ - TC
1021
+ - TD
1022
+ - TF
1023
+ - TG
1024
+ - TH
1025
+ - TJ
1026
+ - TK
1027
+ - TL
1028
+ - TM
1029
+ - TN
1030
+ - TO
1031
+ - TR
1032
+ - TT
1033
+ - TV
1034
+ - TW
1035
+ - TZ
1036
+ - UA
1037
+ - UG
1038
+ - UM
1039
+ - US
1040
+ - UY
1041
+ - UZ
1042
+ - VA
1043
+ - VC
1044
+ - VE
1045
+ - VG
1046
+ - VI
1047
+ - VN
1048
+ - VU
1049
+ - WF
1050
+ - WS
1051
+ - YE
1052
+ - YT
1053
+ - ZA
1054
+ - ZM
1055
+ - ZW
1056
+
1057
+ StorageKeyId:
1058
+ type: string
1059
+ description: |
1060
+ DEK's non-derived identifier to be used by Check Digit services only.
1061
+
1062
+ TransmissionKey:
1063
+ description: The Encrypted version of the AES-256 DEK
1064
+ type: string
1065
+
1066
+ ClientBalance:
1067
+ type: object
1068
+ additionalProperties: false
1069
+ description: |
1070
+ Client account balance details.
1071
+ - The currency of the balances are according to the issuingCountryCode of the client: USD for 'US' and CAD for 'CA'.
1072
+ - The balance values are to the smallest decimal place for that currency. For example, 100 US Dollars would show as 10000.
1073
+ - Negative balance values will have a '-' character in front of the value.
1074
+ required:
1075
+ - at
1076
+ - ledgerBalance
1077
+ - availableBalance
1078
+ properties:
1079
+ at:
1080
+ type: string
1081
+ format: date-time
1082
+ description: The date/time that the balances apply to.
1083
+ ledgerBalance:
1084
+ type: string
1085
+ minLength: 1
1086
+ description: Ledger balance of the client account. This value does not take into account any pending transactions.
1087
+ availableBalance:
1088
+ type: string
1089
+ minLength: 1
1090
+ description: Available balance of the client account. This value takes into account pending transactions.
1091
+
1092
+ Funding:
1093
+ type: string
1094
+ description: |
1095
+ The way in which client accounts will be funded.
1096
+ - The default value is ACH if not supplied when creating a client
1097
+ - Credit clients are not permitted to create ach payment sources, a 400 Bad Request will be returned
1098
+ - ACH clients are not permitted to create credit account entries, a 400 Bad request will be returned
1099
+ enum:
1100
+ - ACH
1101
+ - CREDIT
1102
+
1103
+ NewCreditAccountEntry:
1104
+ type: object
1105
+ additionalProperties: false
1106
+ description: Credit account entry details
1107
+ required:
1108
+ - clientId
1109
+ - transactionType
1110
+ - amount
1111
+ properties:
1112
+ clientId:
1113
+ type: string
1114
+ description: The client whose credit balance will be adjusted by the specified amount.
1115
+ transactionType:
1116
+ type: string
1117
+ description: |
1118
+ Credit or Debit. Please note that the available credit balance may go negative if the DEBIT amount is greater than the current available credit balance.
1119
+ - CREDIT will raise the available credit balance by the requested amount
1120
+ - DEBIT will lower the available credit balance by the requested amount
1121
+ enum:
1122
+ - CREDIT
1123
+ - DEBIT
1124
+ amount:
1125
+ type: string
1126
+ pattern: '^[1-9]\d*$'
1127
+ minLength: 1
1128
+ description: |
1129
+ The amount to be credited to or debited from the available credit balance
1130
+ The value is expected to be in cents.
1131
+ As an example, a value of 100 would be equal to 1 dollar
1132
+
1133
+ NewCorrectionAccountEntry:
1134
+ type: object
1135
+ additionalProperties: false
1136
+ description: Correction account entry details
1137
+ required:
1138
+ - clientId
1139
+ - transactionType
1140
+ - amount
1141
+ - purpose
1142
+ properties:
1143
+ clientId:
1144
+ type: string
1145
+ description: The client whose available balance will be adjusted by the specified amount.
1146
+ transactionType:
1147
+ type: string
1148
+ description: |
1149
+ Credit or Debit. Please note that the client balance may go negative if the DEBIT amount is greater than the current available client balance.
1150
+ - CREDIT will raise the available client balance by the requested amount
1151
+ - DEBIT will lower the available client balance by the requested amount
1152
+ enum:
1153
+ - CREDIT
1154
+ - DEBIT
1155
+ amount:
1156
+ type: string
1157
+ pattern: '^[1-9]\d*$'
1158
+ minLength: 1
1159
+ description: |
1160
+ The amount to be credited to or debited from the available client balance
1161
+ The value is expected to be in cents.
1162
+ As an example, a value of 100 would be equal to 1 dollar
1163
+ purpose:
1164
+ type: object
1165
+ description: The purpose for the correction. This will be JSON stringified to form the name of the correction entry account.
1166
+
1167
+ EntryId:
1168
+ type: string
1169
+ description: Ledger entryId associated with a paymentId
1170
+
1171
+ PayOrRequestPaymentResponse:
1172
+ type: object
1173
+ additionalProperties: false
1174
+ required:
1175
+ - entryId
1176
+ - traceNumber
1177
+ properties:
1178
+ entryId:
1179
+ $ref: '#/components/schemas/EntryId'
1180
+ referenceId:
1181
+ type: string
1182
+ description: Hash value of the paymentId, if the payment source destination does not allow passing in the UUID
1183
+ traceNumber:
1184
+ type: string
1185
+ description: Uniquely identifies each Entry Detail Record within an ACH batch file.
1186
+
1187
+ CancelPaymentResponse:
1188
+ type: object
1189
+ additionalProperties: false
1190
+ required:
1191
+ - entryId
1192
+ properties:
1193
+ entryId:
1194
+ $ref: '#/components/schemas/EntryId'
1195
+
1196
+ ActiveStatus:
1197
+ type: string
1198
+ description: |
1199
+ The client's active status
1200
+ - The value is set to ACTIVE by default if not present when creating a client
1201
+ - All new incoming card preauthorization and tokenization requests will be declined for INACTIVE clients
1202
+ enum:
1203
+ - ACTIVE
1204
+ - INACTIVE
1205
+
1206
+ SubsidiaryOf:
1207
+ type: string
1208
+ description: |
1209
+ Used to indicate the client is a subsidiary of another client
1210
+ - This value must be set to a client ID of a client that is not already a subsidiary of another client
1211
+ - An attempt to change the value of this field once set will result in a 400 Bad Request
1212
+ format: uuid
1213
+
1214
+ CompanyEntryDescription:
1215
+ type: string
1216
+ description: Purpose or intent of the payment
1217
+ minLength: 1
1218
+ maxLength: 10
1219
+
1220
+ parameters:
1221
+ clientId:
1222
+ in: path
1223
+ name: clientId
1224
+ description: The unique identifier for the client in uuid format
1225
+ required: true
1226
+ schema:
1227
+ $ref: '#/components/schemas/ClientId'
1228
+
1229
+ at:
1230
+ in: query
1231
+ name: at
1232
+ description: Return data as it was before this time. Must be at least 1 second in the past.
1233
+ required: true
1234
+ schema:
1235
+ type: string
1236
+ format: date-time
1237
+
1238
+ ifMatch:
1239
+ name: If-Match
1240
+ in: header
1241
+ description: Required to make idempotent changes to data.
1242
+ schema:
1243
+ type: string
1244
+
1245
+ achPaymentSourceId:
1246
+ in: path
1247
+ name: achPaymentSourceId
1248
+ description: The unique identifier for the ACH payment source in uuid format
1249
+ required: true
1250
+ schema:
1251
+ $ref: '#/components/schemas/AchPaymentSourceId'
1252
+
1253
+ paymentId:
1254
+ in: path
1255
+ name: paymentId
1256
+ description: The unique identifier for the payment request in uuid format
1257
+ required: true
1258
+ schema:
1259
+ type: string
1260
+ format: uuid
1261
+
1262
+ entryId:
1263
+ in: path
1264
+ name: entryId
1265
+ description: The unique identifier for the credit account entry in uuid format
1266
+ required: true
1267
+ schema:
1268
+ type: string
1269
+ format: uuid
1270
+
1271
+ responses:
1272
+ Ping:
1273
+ description: ping successful response
1274
+ content:
1275
+ application/json:
1276
+ schema:
1277
+ $ref: '#/components/schemas/Ping'
1278
+
1279
+ ServerError:
1280
+ description: Server Error response
1281
+ content:
1282
+ application/json:
1283
+ schema:
1284
+ $ref: '#/components/schemas/Error'
1285
+
1286
+ Conflict:
1287
+ description: Conflict
1288
+
1289
+ NotFound:
1290
+ description: Requested resource not found
1291
+
1292
+ PreconditionFailed:
1293
+ description: Precondition failed
1294
+
1295
+ headers:
1296
+ ETag:
1297
+ description: Version information
1298
+ required: true
1299
+ schema:
1300
+ type: string
1301
+
1302
+ Last-Modified:
1303
+ description: The most recent date data for the client was changed
1304
+ required: true
1305
+ schema:
1306
+ type: string
1307
+ format: date-time
1308
+
1309
+ Created-On:
1310
+ description: Original created on date time
1311
+ required: true
1312
+ schema:
1313
+ type: string
1314
+ format: date-time
1315
+
1316
+ Updated-On:
1317
+ description: Time data was last modified
1318
+ required: true
1319
+ schema:
1320
+ type: string
1321
+ format: date-time
1322
+
1323
+ requestBodies:
1324
+ NewClient:
1325
+ required: true
1326
+ content:
1327
+ application/json:
1328
+ schema:
1329
+ $ref: '#/components/schemas/NewClient'
1330
+ examples:
1331
+ newClient:
1332
+ value:
1333
+ name: Bobs Asphalt Company LLC.
1334
+ address:
1335
+ streetLines:
1336
+ - 123 Asphalt Lane
1337
+ country: US
1338
+ limits:
1339
+ - period: DAY
1340
+ periodLength: '30'
1341
+ limitFunction: AMOUNT
1342
+ value: '10000000'
1343
+ issuingCountryCode: US
1344
+ products:
1345
+ - VIRTUAL
1346
+ - STANDARD
1347
+ funding: CREDIT
1348
+ active: ACTIVE
1349
+
1350
+ NewClientAchPaymentSource:
1351
+ required: true
1352
+ content:
1353
+ application/json:
1354
+ schema:
1355
+ $ref: '#/components/schemas/NewClientAchPaymentSource'
1356
+
1357
+ NewPayment:
1358
+ required: true
1359
+ content:
1360
+ application/json:
1361
+ schema:
1362
+ $ref: '#/components/schemas/NewPayment'
1363
+
1364
+ NewCreditAccountEntry:
1365
+ required: true
1366
+ content:
1367
+ application/json:
1368
+ schema:
1369
+ $ref: '#/components/schemas/NewCreditAccountEntry'
1370
+
1371
+ NewCorrectionAccountEntry:
1372
+ required: true
1373
+ content:
1374
+ application/json:
1375
+ schema:
1376
+ $ref: '#/components/schemas/NewCorrectionAccountEntry'