modern-treasury 0.0.1

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 (169) hide show
  1. package/.eslintrc.js +10 -0
  2. package/.prettierrc +6 -0
  3. package/LICENSE +7 -0
  4. package/README.md +198 -0
  5. package/build +10 -0
  6. package/core.ts +746 -0
  7. package/dist/cjs/core.d.ts +215 -0
  8. package/dist/cjs/core.js +815 -0
  9. package/dist/cjs/core.js.map +1 -0
  10. package/dist/cjs/index.d.ts +118 -0
  11. package/dist/cjs/index.js +128 -0
  12. package/dist/cjs/index.js.map +1 -0
  13. package/dist/cjs/pagination.d.ts +14 -0
  14. package/dist/cjs/pagination.js +22 -0
  15. package/dist/cjs/pagination.js.map +1 -0
  16. package/dist/cjs/resource.d.ts +11 -0
  17. package/dist/cjs/resource.js +16 -0
  18. package/dist/cjs/resource.js.map +1 -0
  19. package/dist/cjs/resources/counterparties.d.ts +500 -0
  20. package/dist/cjs/resources/counterparties.js +57 -0
  21. package/dist/cjs/resources/counterparties.js.map +1 -0
  22. package/dist/cjs/resources/documents.d.ts +66 -0
  23. package/dist/cjs/resources/documents.js +23 -0
  24. package/dist/cjs/resources/documents.js.map +1 -0
  25. package/dist/cjs/resources/events.d.ts +53 -0
  26. package/dist/cjs/resources/events.js +22 -0
  27. package/dist/cjs/resources/events.js.map +1 -0
  28. package/dist/cjs/resources/expected-payments.d.ts +928 -0
  29. package/dist/cjs/resources/expected-payments.js +31 -0
  30. package/dist/cjs/resources/expected-payments.js.map +1 -0
  31. package/dist/cjs/resources/external-accounts.d.ts +597 -0
  32. package/dist/cjs/resources/external-accounts.js +51 -0
  33. package/dist/cjs/resources/external-accounts.js.map +1 -0
  34. package/dist/cjs/resources/incoming-payment-details.d.ts +487 -0
  35. package/dist/cjs/resources/incoming-payment-details.js +35 -0
  36. package/dist/cjs/resources/incoming-payment-details.js.map +1 -0
  37. package/dist/cjs/resources/index.d.ts +15 -0
  38. package/dist/cjs/resources/index.js +46 -0
  39. package/dist/cjs/resources/index.js.map +1 -0
  40. package/dist/cjs/resources/internal-accounts.d.ts +666 -0
  41. package/dist/cjs/resources/internal-accounts.js +31 -0
  42. package/dist/cjs/resources/internal-accounts.js.map +1 -0
  43. package/dist/cjs/resources/line-items.d.ts +90 -0
  44. package/dist/cjs/resources/line-items.js +38 -0
  45. package/dist/cjs/resources/line-items.js.map +1 -0
  46. package/dist/cjs/resources/paper-items.d.ts +279 -0
  47. package/dist/cjs/resources/paper-items.js +25 -0
  48. package/dist/cjs/resources/paper-items.js.map +1 -0
  49. package/dist/cjs/resources/payment-orders/index.d.ts +2 -0
  50. package/dist/cjs/resources/payment-orders/index.js +33 -0
  51. package/dist/cjs/resources/payment-orders/index.js.map +1 -0
  52. package/dist/cjs/resources/payment-orders/payment-orders.d.ts +2180 -0
  53. package/dist/cjs/resources/payment-orders/payment-orders.js +56 -0
  54. package/dist/cjs/resources/payment-orders/payment-orders.js.map +1 -0
  55. package/dist/cjs/resources/payment-orders/reversals.d.ts +46 -0
  56. package/dist/cjs/resources/payment-orders/reversals.js +23 -0
  57. package/dist/cjs/resources/payment-orders/reversals.js.map +1 -0
  58. package/dist/cjs/resources/returns.d.ts +487 -0
  59. package/dist/cjs/resources/returns.js +31 -0
  60. package/dist/cjs/resources/returns.js.map +1 -0
  61. package/dist/cjs/resources/top-level.d.ts +3 -0
  62. package/dist/cjs/resources/top-level.js +4 -0
  63. package/dist/cjs/resources/top-level.js.map +1 -0
  64. package/dist/cjs/resources/transactions.d.ts +377 -0
  65. package/dist/cjs/resources/transactions.js +31 -0
  66. package/dist/cjs/resources/transactions.js.map +1 -0
  67. package/dist/cjs/resources/validations.d.ts +97 -0
  68. package/dist/cjs/resources/validations.js +16 -0
  69. package/dist/cjs/resources/validations.js.map +1 -0
  70. package/dist/cjs/resources/webhooks.d.ts +31 -0
  71. package/dist/cjs/resources/webhooks.js +44 -0
  72. package/dist/cjs/resources/webhooks.js.map +1 -0
  73. package/dist/cjs/tests/api-resources/counterparties.test.d.ts +1 -0
  74. package/dist/cjs/tests/api-resources/counterparties.test.js +275 -0
  75. package/dist/cjs/tests/api-resources/counterparties.test.js.map +1 -0
  76. package/dist/cjs/tests/api-resources/documents.test.d.ts +1 -0
  77. package/dist/cjs/tests/api-resources/documents.test.js +78 -0
  78. package/dist/cjs/tests/api-resources/documents.test.js.map +1 -0
  79. package/dist/cjs/tests/api-resources/events.test.d.ts +1 -0
  80. package/dist/cjs/tests/api-resources/events.test.js +100 -0
  81. package/dist/cjs/tests/api-resources/events.test.js.map +1 -0
  82. package/dist/cjs/tests/api-resources/expected-payments.test.d.ts +1 -0
  83. package/dist/cjs/tests/api-resources/expected-payments.test.js +176 -0
  84. package/dist/cjs/tests/api-resources/expected-payments.test.js.map +1 -0
  85. package/dist/cjs/tests/api-resources/external-accounts.test.d.ts +1 -0
  86. package/dist/cjs/tests/api-resources/external-accounts.test.js +248 -0
  87. package/dist/cjs/tests/api-resources/external-accounts.test.js.map +1 -0
  88. package/dist/cjs/tests/api-resources/incoming-payment-details.test.d.ts +1 -0
  89. package/dist/cjs/tests/api-resources/incoming-payment-details.test.js +130 -0
  90. package/dist/cjs/tests/api-resources/incoming-payment-details.test.js.map +1 -0
  91. package/dist/cjs/tests/api-resources/internal-accounts.test.d.ts +1 -0
  92. package/dist/cjs/tests/api-resources/internal-accounts.test.js +144 -0
  93. package/dist/cjs/tests/api-resources/internal-accounts.test.js.map +1 -0
  94. package/dist/cjs/tests/api-resources/line-items.test.d.ts +1 -0
  95. package/dist/cjs/tests/api-resources/line-items.test.js +123 -0
  96. package/dist/cjs/tests/api-resources/line-items.test.js.map +1 -0
  97. package/dist/cjs/tests/api-resources/paper-items.test.d.ts +1 -0
  98. package/dist/cjs/tests/api-resources/paper-items.test.js +96 -0
  99. package/dist/cjs/tests/api-resources/paper-items.test.js.map +1 -0
  100. package/dist/cjs/tests/api-resources/payment-orders/payment-orders.test.d.ts +1 -0
  101. package/dist/cjs/tests/api-resources/payment-orders/payment-orders.test.js +77 -0
  102. package/dist/cjs/tests/api-resources/payment-orders/payment-orders.test.js.map +1 -0
  103. package/dist/cjs/tests/api-resources/returns.test.d.ts +1 -0
  104. package/dist/cjs/tests/api-resources/returns.test.js +116 -0
  105. package/dist/cjs/tests/api-resources/returns.test.js.map +1 -0
  106. package/dist/cjs/tests/api-resources/top-level.test.d.ts +1 -0
  107. package/dist/cjs/tests/api-resources/top-level.test.js +59 -0
  108. package/dist/cjs/tests/api-resources/top-level.test.js.map +1 -0
  109. package/dist/cjs/tests/api-resources/transactions.test.d.ts +1 -0
  110. package/dist/cjs/tests/api-resources/transactions.test.js +134 -0
  111. package/dist/cjs/tests/api-resources/transactions.test.js.map +1 -0
  112. package/dist/cjs/tests/api-resources/validations.test.d.ts +1 -0
  113. package/dist/cjs/tests/api-resources/validations.test.js +62 -0
  114. package/dist/cjs/tests/api-resources/validations.test.js.map +1 -0
  115. package/dist/cjs/tests/api-resources/webhooks.test.d.ts +1 -0
  116. package/dist/cjs/tests/api-resources/webhooks.test.js +100 -0
  117. package/dist/cjs/tests/api-resources/webhooks.test.js.map +1 -0
  118. package/dist/cjs/tests/form.test.d.ts +1 -0
  119. package/dist/cjs/tests/form.test.js +61 -0
  120. package/dist/cjs/tests/form.test.js.map +1 -0
  121. package/dist/cjs/tests/index.test.d.ts +1 -0
  122. package/dist/cjs/tests/index.test.js +57 -0
  123. package/dist/cjs/tests/index.test.js.map +1 -0
  124. package/dist/cjs/tests/responses.test.d.ts +1 -0
  125. package/dist/cjs/tests/responses.test.js +60 -0
  126. package/dist/cjs/tests/responses.test.js.map +1 -0
  127. package/index.ts +175 -0
  128. package/jest.config.js +8 -0
  129. package/package.json +47 -0
  130. package/pagination.ts +36 -0
  131. package/resource.ts +22 -0
  132. package/resources/counterparties.ts +666 -0
  133. package/resources/documents.ts +97 -0
  134. package/resources/events.ts +86 -0
  135. package/resources/expected-payments.ts +1016 -0
  136. package/resources/external-accounts.ts +762 -0
  137. package/resources/incoming-payment-details.ts +592 -0
  138. package/resources/index.ts +16 -0
  139. package/resources/internal-accounts.ts +774 -0
  140. package/resources/line-items.ts +138 -0
  141. package/resources/paper-items.ts +317 -0
  142. package/resources/payment-orders/index.ts +3 -0
  143. package/resources/payment-orders/payment-orders.ts +2486 -0
  144. package/resources/payment-orders/reversals.ts +72 -0
  145. package/resources/returns.ts +545 -0
  146. package/resources/top-level.ts +5 -0
  147. package/resources/transactions.ts +441 -0
  148. package/resources/validations.ts +115 -0
  149. package/resources/webhooks.ts +48 -0
  150. package/tests/api-resources/counterparties.test.ts +237 -0
  151. package/tests/api-resources/documents.test.ts +40 -0
  152. package/tests/api-resources/events.test.ts +62 -0
  153. package/tests/api-resources/expected-payments.test.ts +138 -0
  154. package/tests/api-resources/external-accounts.test.ts +210 -0
  155. package/tests/api-resources/incoming-payment-details.test.ts +92 -0
  156. package/tests/api-resources/internal-accounts.test.ts +103 -0
  157. package/tests/api-resources/line-items.test.ts +85 -0
  158. package/tests/api-resources/paper-items.test.ts +58 -0
  159. package/tests/api-resources/payment-orders/payment-orders.test.ts +39 -0
  160. package/tests/api-resources/returns.test.ts +78 -0
  161. package/tests/api-resources/top-level.test.ts +21 -0
  162. package/tests/api-resources/transactions.test.ts +96 -0
  163. package/tests/api-resources/validations.test.ts +24 -0
  164. package/tests/api-resources/webhooks.test.ts +102 -0
  165. package/tests/form.test.ts +27 -0
  166. package/tests/index.test.ts +62 -0
  167. package/tests/responses.test.ts +25 -0
  168. package/tsconfig.cjs.json +8 -0
  169. package/tsconfig.json +36 -0
@@ -0,0 +1,90 @@
1
+ import * as Core from '../core';
2
+ import { APIResource } from '../resource';
3
+ import { Page, PageParams } from '../pagination';
4
+ export declare class LineItems extends APIResource {
5
+ /**
6
+ * Get a single line item
7
+ */
8
+ retrieve(
9
+ itemizableType: string,
10
+ itemizableId: string,
11
+ id: string,
12
+ options?: Core.RequestOptions,
13
+ ): Promise<Core.APIResponse<LineItem>>;
14
+ update(
15
+ itemizableType: string,
16
+ itemizableId: string,
17
+ id: string,
18
+ body?: LineItemUpdateParams,
19
+ options?: Core.RequestOptions,
20
+ ): Promise<Core.APIResponse<LineItem>>;
21
+ update(
22
+ itemizableType: string,
23
+ itemizableId: string,
24
+ id: string,
25
+ options?: Core.RequestOptions,
26
+ ): Promise<Core.APIResponse<LineItem>>;
27
+ /**
28
+ * Get a list of line items
29
+ */
30
+ list(
31
+ itemizableType: string,
32
+ id: string,
33
+ query?: LineItemListParams,
34
+ options?: Core.RequestOptions,
35
+ ): Core.PagePromise<LineItemsPage>;
36
+ list(itemizableType: string, id: string, options?: Core.RequestOptions): Core.PagePromise<LineItemsPage>;
37
+ }
38
+ export declare class LineItemsPage extends Page<LineItem> {}
39
+ export interface LineItem {
40
+ /**
41
+ * The ID of one of your accounting categories. Note that these will only be
42
+ * accessible if your accounting system has been connected.
43
+ */
44
+ accounting_category_id?: string | null;
45
+ /**
46
+ * The ID of one of the class objects in your accounting system. Class objects
47
+ * track segments of your business independent of client or project. Note that
48
+ * these will only be accessible if your accounting system has been connected.
49
+ */
50
+ accounting_ledger_class_id?: string | null;
51
+ /**
52
+ * Value in specified currency's smallest unit. e.g. $10 would be represented
53
+ * as 1000.
54
+ */
55
+ amount?: number;
56
+ created_at?: string;
57
+ /**
58
+ * A free-form description of the line item.
59
+ */
60
+ description?: string | null;
61
+ id?: string;
62
+ /**
63
+ * The ID of the payment order or expected payment.
64
+ */
65
+ itemizable_id?: string;
66
+ /**
67
+ * One of `payment_orders` or `expected_payments`.
68
+ */
69
+ itemizable_type?: 'ExpectedPayment' | 'PaymentOrder';
70
+ /**
71
+ * This field will be true if this object exists in the live environment or false
72
+ * if it exists in the test environment.
73
+ */
74
+ live_mode?: boolean;
75
+ /**
76
+ * Additional data represented as key-value pairs. Both the key and value must be
77
+ * strings.
78
+ */
79
+ metadata?: Record<string, string>;
80
+ object?: string;
81
+ updated_at?: string;
82
+ }
83
+ export interface LineItemUpdateParams {
84
+ /**
85
+ * Additional data represented as key-value pairs. Both the key and value must be
86
+ * strings.
87
+ */
88
+ metadata?: Record<string, string>;
89
+ }
90
+ export interface LineItemListParams extends PageParams {}
@@ -0,0 +1,38 @@
1
+ 'use strict';
2
+ // File generated from our OpenAPI spec by Stainless.
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+ exports.LineItemsPage = exports.LineItems = void 0;
5
+ const resource_1 = require('../resource');
6
+ const core_1 = require('../core');
7
+ const pagination_1 = require('../pagination');
8
+ class LineItems extends resource_1.APIResource {
9
+ /**
10
+ * Get a single line item
11
+ */
12
+ retrieve(itemizableType, itemizableId, id, options) {
13
+ return this.get(`/api/${itemizableType}/${itemizableId}/line_items/${id}`, options);
14
+ }
15
+ update(itemizableType, itemizableId, id, body = {}, options) {
16
+ if ((0, core_1.isRequestOptions)(body)) {
17
+ return this.update(itemizableType, itemizableId, id, {}, body);
18
+ }
19
+ return this.patch(
20
+ `/api/${itemizableType}/${itemizableId}/line_items/${id}`,
21
+ Object.assign({ body }, options),
22
+ );
23
+ }
24
+ list(itemizableType, id, query = {}, options) {
25
+ if ((0, core_1.isRequestOptions)(query)) {
26
+ return this.list(itemizableType, id, {}, query);
27
+ }
28
+ return this.getAPIList(
29
+ `/api/${itemizableType}/${id}/line_items`,
30
+ LineItemsPage,
31
+ Object.assign({ query }, options),
32
+ );
33
+ }
34
+ }
35
+ exports.LineItems = LineItems;
36
+ class LineItemsPage extends pagination_1.Page {}
37
+ exports.LineItemsPage = LineItemsPage;
38
+ //# sourceMappingURL=line-items.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"line-items.js","sourceRoot":"","sources":["../../../resources/line-items.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAGrD,yCAAyC;AACzC,iCAA0C;AAC1C,6CAAgD;AAEhD,MAAa,SAAU,SAAQ,sBAAW;IACxC;;OAEG;IACH,QAAQ,CACN,cAAsB,EACtB,YAAoB,EACpB,EAAU,EACV,OAA6B;QAE7B,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,cAAc,IAAI,YAAY,eAAe,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACtF,CAAC;IAeD,MAAM,CACJ,cAAsB,EACtB,YAAoB,EACpB,EAAU,EACV,OAAmD,EAAE,EACrD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,IAAI,CAAC,EAAE;YAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,YAAY,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;SAChE;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,cAAc,IAAI,YAAY,eAAe,EAAE,EAAE,kBAAI,IAAI,IAAK,OAAO,EAAG,CAAC;IACrG,CAAC;IAYD,IAAI,CACF,cAAsB,EACtB,EAAU,EACV,QAAkD,EAAE,EACpD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACjD;QAED,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,cAAc,IAAI,EAAE,aAAa,EAAE,aAAa,kBAAI,KAAK,IAAK,OAAO,EAAG,CAAC;IAC1G,CAAC;CACF;AA9DD,8BA8DC;AAED,MAAa,aAAc,SAAQ,iBAAc;CAAG;AAApD,sCAAoD"}
@@ -0,0 +1,279 @@
1
+ import * as Core from '../core';
2
+ import { APIResource } from '../resource';
3
+ import { Page, PageParams } from '../pagination';
4
+ export declare class PaperItems extends APIResource {
5
+ /**
6
+ * Get details on a single paper item.
7
+ */
8
+ retrieve(id: string, options?: Core.RequestOptions): Promise<Core.APIResponse<PaperItem>>;
9
+ /**
10
+ * Get a list of all paper items.
11
+ */
12
+ list(query?: PaperItemListParams, options?: Core.RequestOptions): Core.PagePromise<PaperItemsPage>;
13
+ list(options?: Core.RequestOptions): Core.PagePromise<PaperItemsPage>;
14
+ }
15
+ export declare class PaperItemsPage extends Page<PaperItem> {}
16
+ export interface PaperItem {
17
+ /**
18
+ * The account number on the paper item.
19
+ */
20
+ account_number?: string | null;
21
+ /**
22
+ * The amount of the paper item.
23
+ */
24
+ amount?: number;
25
+ /**
26
+ * The check number on the paper item.
27
+ */
28
+ check_number?: string | null;
29
+ created_at?: string;
30
+ /**
31
+ * The currency of the paper item.
32
+ */
33
+ currency?:
34
+ | 'AED'
35
+ | 'AFN'
36
+ | 'ALL'
37
+ | 'AMD'
38
+ | 'ANG'
39
+ | 'AOA'
40
+ | 'ARS'
41
+ | 'AUD'
42
+ | 'AWG'
43
+ | 'AZN'
44
+ | 'BAM'
45
+ | 'BBD'
46
+ | 'BCH'
47
+ | 'BDT'
48
+ | 'BGN'
49
+ | 'BHD'
50
+ | 'BIF'
51
+ | 'BMD'
52
+ | 'BND'
53
+ | 'BOB'
54
+ | 'BRL'
55
+ | 'BSD'
56
+ | 'BTC'
57
+ | 'BTN'
58
+ | 'BWP'
59
+ | 'BYN'
60
+ | 'BYR'
61
+ | 'BZD'
62
+ | 'CAD'
63
+ | 'CDF'
64
+ | 'CHF'
65
+ | 'CLF'
66
+ | 'CLP'
67
+ | 'CNH'
68
+ | 'CNY'
69
+ | 'COP'
70
+ | 'CRC'
71
+ | 'CUC'
72
+ | 'CUP'
73
+ | 'CVE'
74
+ | 'CZK'
75
+ | 'DJF'
76
+ | 'DKK'
77
+ | 'DOP'
78
+ | 'DZD'
79
+ | 'EEK'
80
+ | 'EGP'
81
+ | 'ERN'
82
+ | 'ETB'
83
+ | 'EUR'
84
+ | 'FJD'
85
+ | 'FKP'
86
+ | 'GBP'
87
+ | 'GBX'
88
+ | 'GEL'
89
+ | 'GGP'
90
+ | 'GHS'
91
+ | 'GIP'
92
+ | 'GMD'
93
+ | 'GNF'
94
+ | 'GTQ'
95
+ | 'GYD'
96
+ | 'HKD'
97
+ | 'HNL'
98
+ | 'HRK'
99
+ | 'HTG'
100
+ | 'HUF'
101
+ | 'IDR'
102
+ | 'ILS'
103
+ | 'IMP'
104
+ | 'INR'
105
+ | 'IQD'
106
+ | 'IRR'
107
+ | 'ISK'
108
+ | 'JEP'
109
+ | 'JMD'
110
+ | 'JOD'
111
+ | 'JPY'
112
+ | 'KES'
113
+ | 'KGS'
114
+ | 'KHR'
115
+ | 'KMF'
116
+ | 'KPW'
117
+ | 'KRW'
118
+ | 'KWD'
119
+ | 'KYD'
120
+ | 'KZT'
121
+ | 'LAK'
122
+ | 'LBP'
123
+ | 'LKR'
124
+ | 'LRD'
125
+ | 'LSL'
126
+ | 'LTL'
127
+ | 'LVL'
128
+ | 'LYD'
129
+ | 'MAD'
130
+ | 'MDL'
131
+ | 'MGA'
132
+ | 'MKD'
133
+ | 'MMK'
134
+ | 'MNT'
135
+ | 'MOP'
136
+ | 'MRO'
137
+ | 'MRU'
138
+ | 'MTL'
139
+ | 'MUR'
140
+ | 'MVR'
141
+ | 'MWK'
142
+ | 'MXN'
143
+ | 'MYR'
144
+ | 'MZN'
145
+ | 'NAD'
146
+ | 'NGN'
147
+ | 'NIO'
148
+ | 'NOK'
149
+ | 'NPR'
150
+ | 'NZD'
151
+ | 'OMR'
152
+ | 'PAB'
153
+ | 'PEN'
154
+ | 'PGK'
155
+ | 'PHP'
156
+ | 'PKR'
157
+ | 'PLN'
158
+ | 'PYG'
159
+ | 'QAR'
160
+ | 'RON'
161
+ | 'RSD'
162
+ | 'RUB'
163
+ | 'RWF'
164
+ | 'SAR'
165
+ | 'SBD'
166
+ | 'SCR'
167
+ | 'SDG'
168
+ | 'SEK'
169
+ | 'SGD'
170
+ | 'SHP'
171
+ | 'SKK'
172
+ | 'SLL'
173
+ | 'SOS'
174
+ | 'SRD'
175
+ | 'SSP'
176
+ | 'STD'
177
+ | 'SVC'
178
+ | 'SYP'
179
+ | 'SZL'
180
+ | 'THB'
181
+ | 'TJS'
182
+ | 'TMM'
183
+ | 'TMT'
184
+ | 'TND'
185
+ | 'TOP'
186
+ | 'TRY'
187
+ | 'TTD'
188
+ | 'TWD'
189
+ | 'TZS'
190
+ | 'UAH'
191
+ | 'UGX'
192
+ | 'USD'
193
+ | 'UYU'
194
+ | 'UZS'
195
+ | 'VEF'
196
+ | 'VES'
197
+ | 'VND'
198
+ | 'VUV'
199
+ | 'WST'
200
+ | 'XAF'
201
+ | 'XAG'
202
+ | 'XAU'
203
+ | 'XBA'
204
+ | 'XBB'
205
+ | 'XBC'
206
+ | 'XBD'
207
+ | 'XCD'
208
+ | 'XDR'
209
+ | 'XFU'
210
+ | 'XOF'
211
+ | 'XPD'
212
+ | 'XPF'
213
+ | 'XPT'
214
+ | 'XTS'
215
+ | 'YER'
216
+ | 'ZAR'
217
+ | 'ZMK'
218
+ | 'ZMW'
219
+ | 'ZWD'
220
+ | 'ZWL'
221
+ | 'ZWN'
222
+ | 'ZWR';
223
+ /**
224
+ * The date the paper item was deposited into your organization's bank account.
225
+ */
226
+ deposit_date?: string;
227
+ id?: string;
228
+ /**
229
+ * This field will be true if this object exists in the live environment or false
230
+ * if it exists in the test environment.
231
+ */
232
+ live_mode?: boolean;
233
+ /**
234
+ * The identifier for the lockbox assigned by the bank.
235
+ */
236
+ lockbox_number?: string;
237
+ /**
238
+ * The memo field on the paper item.
239
+ */
240
+ memo_field?: string | null;
241
+ object?: string;
242
+ /**
243
+ * The name of the remitter on the paper item.
244
+ */
245
+ remitter_name?: string | null;
246
+ /**
247
+ * The routing number on the paper item.
248
+ */
249
+ routing_number?: string | null;
250
+ /**
251
+ * The current status of the paper item. One of `pending`, `completed`, or
252
+ * `returned`.
253
+ */
254
+ status?: 'completed' | 'pending' | 'returned';
255
+ /**
256
+ * The ID of the reconciled Transaction or `null`.
257
+ */
258
+ transaction_id?: string | null;
259
+ /**
260
+ * The ID of the reconciled Transaction Line Item or `null`.
261
+ */
262
+ transaction_line_item_id?: string | null;
263
+ updated_at?: string;
264
+ }
265
+ export interface PaperItemListParams extends PageParams {
266
+ /**
267
+ * Specify an inclusive end date (YYYY-MM-DD) when filtering by deposit_date
268
+ */
269
+ deposit_date_end?: string;
270
+ /**
271
+ * Specify an inclusive start date (YYYY-MM-DD) when filtering by deposit_date
272
+ */
273
+ deposit_date_start?: string;
274
+ /**
275
+ * Specify `lockbox_number` if you wish to see paper items that are associated with
276
+ * a specific lockbox number.
277
+ */
278
+ lockbox_number?: string;
279
+ }
@@ -0,0 +1,25 @@
1
+ 'use strict';
2
+ // File generated from our OpenAPI spec by Stainless.
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+ exports.PaperItemsPage = exports.PaperItems = void 0;
5
+ const resource_1 = require('../resource');
6
+ const core_1 = require('../core');
7
+ const pagination_1 = require('../pagination');
8
+ class PaperItems extends resource_1.APIResource {
9
+ /**
10
+ * Get details on a single paper item.
11
+ */
12
+ retrieve(id, options) {
13
+ return this.get(`/api/paper_items/${id}`, options);
14
+ }
15
+ list(query = {}, options) {
16
+ if ((0, core_1.isRequestOptions)(query)) {
17
+ return this.list({}, query);
18
+ }
19
+ return this.getAPIList('/api/paper_items', PaperItemsPage, Object.assign({ query }, options));
20
+ }
21
+ }
22
+ exports.PaperItems = PaperItems;
23
+ class PaperItemsPage extends pagination_1.Page {}
24
+ exports.PaperItemsPage = PaperItemsPage;
25
+ //# sourceMappingURL=paper-items.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paper-items.js","sourceRoot":"","sources":["../../../resources/paper-items.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAGrD,yCAAyC;AACzC,iCAA0C;AAC1C,6CAAgD;AAEhD,MAAa,UAAW,SAAQ,sBAAW;IACzC;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAA6B;QAChD,OAAO,IAAI,CAAC,GAAG,CAAC,oBAAoB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACrD,CAAC;IAOD,IAAI,CACF,QAAmD,EAAE,EACrD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QAED,OAAO,IAAI,CAAC,UAAU,CAAC,kBAAkB,EAAE,cAAc,kBAAI,KAAK,IAAK,OAAO,EAAG,CAAC;IACpF,CAAC;CACF;AAvBD,gCAuBC;AAED,MAAa,cAAe,SAAQ,iBAAe;CAAG;AAAtD,wCAAsD"}
@@ -0,0 +1,2 @@
1
+ export * from './payment-orders';
2
+ export * from './reversals';
@@ -0,0 +1,33 @@
1
+ 'use strict';
2
+ var __createBinding =
3
+ (this && this.__createBinding) ||
4
+ (Object.create
5
+ ? function (o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ('get' in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = {
10
+ enumerable: true,
11
+ get: function () {
12
+ return m[k];
13
+ },
14
+ };
15
+ }
16
+ Object.defineProperty(o, k2, desc);
17
+ }
18
+ : function (o, m, k, k2) {
19
+ if (k2 === undefined) k2 = k;
20
+ o[k2] = m[k];
21
+ });
22
+ var __exportStar =
23
+ (this && this.__exportStar) ||
24
+ function (m, exports) {
25
+ for (var p in m)
26
+ if (p !== 'default' && !Object.prototype.hasOwnProperty.call(exports, p))
27
+ __createBinding(exports, m, p);
28
+ };
29
+ Object.defineProperty(exports, '__esModule', { value: true });
30
+ // File generated from our OpenAPI spec by Stainless.
31
+ __exportStar(require('./payment-orders'), exports);
32
+ __exportStar(require('./reversals'), exports);
33
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../resources/payment-orders/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAqD;AACrD,mDAAiC;AACjC,8CAA4B"}