increase 0.538.0 → 0.540.0

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 (99) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/bin/cli +5 -12
  3. package/client.d.mts +6 -12
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +6 -12
  6. package/client.d.ts.map +1 -1
  7. package/client.js +6 -12
  8. package/client.js.map +1 -1
  9. package/client.mjs +6 -12
  10. package/client.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/check-deposits.d.mts +4 -3
  13. package/resources/check-deposits.d.mts.map +1 -1
  14. package/resources/check-deposits.d.ts +4 -3
  15. package/resources/check-deposits.d.ts.map +1 -1
  16. package/resources/inbound-mail-items.d.mts +19 -7
  17. package/resources/inbound-mail-items.d.mts.map +1 -1
  18. package/resources/inbound-mail-items.d.ts +19 -7
  19. package/resources/inbound-mail-items.d.ts.map +1 -1
  20. package/resources/index.d.mts +2 -4
  21. package/resources/index.d.mts.map +1 -1
  22. package/resources/index.d.ts +2 -4
  23. package/resources/index.d.ts.map +1 -1
  24. package/resources/index.js +6 -10
  25. package/resources/index.js.map +1 -1
  26. package/resources/index.mjs +2 -4
  27. package/resources/index.mjs.map +1 -1
  28. package/resources/lockbox-addresses.d.mts +184 -0
  29. package/resources/lockbox-addresses.d.mts.map +1 -0
  30. package/resources/lockbox-addresses.d.ts +184 -0
  31. package/resources/lockbox-addresses.d.ts.map +1 -0
  32. package/resources/lockbox-addresses.js +64 -0
  33. package/resources/lockbox-addresses.js.map +1 -0
  34. package/resources/lockbox-addresses.mjs +60 -0
  35. package/resources/lockbox-addresses.mjs.map +1 -0
  36. package/resources/lockbox-recipients.d.mts +202 -0
  37. package/resources/lockbox-recipients.d.mts.map +1 -0
  38. package/resources/lockbox-recipients.d.ts +202 -0
  39. package/resources/lockbox-recipients.d.ts.map +1 -0
  40. package/resources/lockbox-recipients.js +69 -0
  41. package/resources/lockbox-recipients.js.map +1 -0
  42. package/resources/lockbox-recipients.mjs +65 -0
  43. package/resources/lockbox-recipients.mjs.map +1 -0
  44. package/resources/simulations/inbound-mail-items.d.mts +9 -5
  45. package/resources/simulations/inbound-mail-items.d.mts.map +1 -1
  46. package/resources/simulations/inbound-mail-items.d.ts +9 -5
  47. package/resources/simulations/inbound-mail-items.d.ts.map +1 -1
  48. package/resources/simulations/inbound-mail-items.js +0 -1
  49. package/resources/simulations/inbound-mail-items.js.map +1 -1
  50. package/resources/simulations/inbound-mail-items.mjs +0 -1
  51. package/resources/simulations/inbound-mail-items.mjs.map +1 -1
  52. package/src/client.ts +34 -70
  53. package/src/resources/check-deposits.ts +4 -3
  54. package/src/resources/inbound-mail-items.ts +27 -7
  55. package/src/resources/index.ts +15 -30
  56. package/src/resources/lockbox-addresses.ts +235 -0
  57. package/src/resources/lockbox-recipients.ts +257 -0
  58. package/src/resources/simulations/inbound-mail-items.ts +12 -6
  59. package/src/version.ts +1 -1
  60. package/version.d.mts +1 -1
  61. package/version.d.ts +1 -1
  62. package/version.js +1 -1
  63. package/version.mjs +1 -1
  64. package/resources/bookkeeping-accounts.d.mts +0 -164
  65. package/resources/bookkeeping-accounts.d.mts.map +0 -1
  66. package/resources/bookkeeping-accounts.d.ts +0 -164
  67. package/resources/bookkeeping-accounts.d.ts.map +0 -1
  68. package/resources/bookkeeping-accounts.js +0 -71
  69. package/resources/bookkeeping-accounts.js.map +0 -1
  70. package/resources/bookkeeping-accounts.mjs +0 -67
  71. package/resources/bookkeeping-accounts.mjs.map +0 -1
  72. package/resources/bookkeeping-entries.d.mts +0 -74
  73. package/resources/bookkeeping-entries.d.mts.map +0 -1
  74. package/resources/bookkeeping-entries.d.ts +0 -74
  75. package/resources/bookkeeping-entries.d.ts.map +0 -1
  76. package/resources/bookkeeping-entries.js +0 -39
  77. package/resources/bookkeeping-entries.js.map +0 -1
  78. package/resources/bookkeeping-entries.mjs +0 -35
  79. package/resources/bookkeeping-entries.mjs.map +0 -1
  80. package/resources/bookkeeping-entry-sets.d.mts +0 -156
  81. package/resources/bookkeeping-entry-sets.d.mts.map +0 -1
  82. package/resources/bookkeeping-entry-sets.d.ts +0 -156
  83. package/resources/bookkeeping-entry-sets.d.ts.map +0 -1
  84. package/resources/bookkeeping-entry-sets.js +0 -67
  85. package/resources/bookkeeping-entry-sets.js.map +0 -1
  86. package/resources/bookkeeping-entry-sets.mjs +0 -63
  87. package/resources/bookkeeping-entry-sets.mjs.map +0 -1
  88. package/resources/lockboxes.d.mts +0 -217
  89. package/resources/lockboxes.d.mts.map +0 -1
  90. package/resources/lockboxes.d.ts +0 -217
  91. package/resources/lockboxes.d.ts.map +0 -1
  92. package/resources/lockboxes.js +0 -64
  93. package/resources/lockboxes.js.map +0 -1
  94. package/resources/lockboxes.mjs +0 -60
  95. package/resources/lockboxes.mjs.map +0 -1
  96. package/src/resources/bookkeeping-accounts.ts +0 -220
  97. package/src/resources/bookkeeping-entries.ts +0 -98
  98. package/src/resources/bookkeeping-entry-sets.ts +0 -198
  99. package/src/resources/lockboxes.ts +0 -273
@@ -1,198 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { APIResource } from '../core/resource';
4
- import { APIPromise } from '../core/api-promise';
5
- import { Page, type PageParams, PagePromise } from '../core/pagination';
6
- import { RequestOptions } from '../internal/request-options';
7
- import { path } from '../internal/utils/path';
8
-
9
- export class BookkeepingEntrySets extends APIResource {
10
- /**
11
- * Create a Bookkeeping Entry Set
12
- *
13
- * @example
14
- * ```ts
15
- * const bookkeepingEntrySet =
16
- * await client.bookkeepingEntrySets.create({
17
- * entries: [
18
- * {
19
- * account_id:
20
- * 'bookkeeping_account_9husfpw68pzmve9dvvc7',
21
- * amount: 100,
22
- * },
23
- * {
24
- * account_id:
25
- * 'bookkeeping_account_t2obldz1rcu15zr54umg',
26
- * amount: -100,
27
- * },
28
- * ],
29
- * });
30
- * ```
31
- */
32
- create(body: BookkeepingEntrySetCreateParams, options?: RequestOptions): APIPromise<BookkeepingEntrySet> {
33
- return this._client.post('/bookkeeping_entry_sets', { body, ...options });
34
- }
35
-
36
- /**
37
- * Retrieve a Bookkeeping Entry Set
38
- *
39
- * @example
40
- * ```ts
41
- * const bookkeepingEntrySet =
42
- * await client.bookkeepingEntrySets.retrieve(
43
- * 'bookkeeping_entry_set_n80c6wr2p8gtc6p4ingf',
44
- * );
45
- * ```
46
- */
47
- retrieve(bookkeepingEntrySetID: string, options?: RequestOptions): APIPromise<BookkeepingEntrySet> {
48
- return this._client.get(path`/bookkeeping_entry_sets/${bookkeepingEntrySetID}`, options);
49
- }
50
-
51
- /**
52
- * List Bookkeeping Entry Sets
53
- *
54
- * @example
55
- * ```ts
56
- * // Automatically fetches more pages as needed.
57
- * for await (const bookkeepingEntrySet of client.bookkeepingEntrySets.list()) {
58
- * // ...
59
- * }
60
- * ```
61
- */
62
- list(
63
- query: BookkeepingEntrySetListParams | null | undefined = {},
64
- options?: RequestOptions,
65
- ): PagePromise<BookkeepingEntrySetsPage, BookkeepingEntrySet> {
66
- return this._client.getAPIList('/bookkeeping_entry_sets', Page<BookkeepingEntrySet>, {
67
- query,
68
- ...options,
69
- });
70
- }
71
- }
72
-
73
- export type BookkeepingEntrySetsPage = Page<BookkeepingEntrySet>;
74
-
75
- /**
76
- * Entry Sets are accounting entries that are transactionally applied. Your
77
- * compliance setup might require annotating money movements using this API. Learn
78
- * more in our
79
- * [guide to Bookkeeping](https://increase.com/documentation/bookkeeping#bookkeeping).
80
- */
81
- export interface BookkeepingEntrySet {
82
- /**
83
- * The entry set identifier.
84
- */
85
- id: string;
86
-
87
- /**
88
- * When the entry set was created.
89
- */
90
- created_at: string;
91
-
92
- /**
93
- * The timestamp of the entry set.
94
- */
95
- date: string;
96
-
97
- /**
98
- * The entries.
99
- */
100
- entries: Array<BookkeepingEntrySet.Entry>;
101
-
102
- /**
103
- * The idempotency key you chose for this object. This value is unique across
104
- * Increase and is used to ensure that a request is only processed once. Learn more
105
- * about [idempotency](https://increase.com/documentation/idempotency-keys).
106
- */
107
- idempotency_key: string | null;
108
-
109
- /**
110
- * The transaction identifier, if any.
111
- */
112
- transaction_id: string | null;
113
-
114
- /**
115
- * A constant representing the object's type. For this resource it will always be
116
- * `bookkeeping_entry_set`.
117
- */
118
- type: 'bookkeeping_entry_set';
119
- }
120
-
121
- export namespace BookkeepingEntrySet {
122
- export interface Entry {
123
- /**
124
- * The entry identifier.
125
- */
126
- id: string;
127
-
128
- /**
129
- * The bookkeeping account impacted by the entry.
130
- */
131
- account_id: string;
132
-
133
- /**
134
- * The amount of the entry in minor units.
135
- */
136
- amount: number;
137
- }
138
- }
139
-
140
- export interface BookkeepingEntrySetCreateParams {
141
- /**
142
- * The bookkeeping entries.
143
- */
144
- entries: Array<BookkeepingEntrySetCreateParams.Entry>;
145
-
146
- /**
147
- * The date of the transaction. Optional if `transaction_id` is provided, in which
148
- * case we use the `date` of that transaction. Required otherwise.
149
- */
150
- date?: string;
151
-
152
- /**
153
- * The identifier of the Transaction related to this entry set, if any.
154
- */
155
- transaction_id?: string;
156
-
157
- [k: string]: unknown;
158
- }
159
-
160
- export namespace BookkeepingEntrySetCreateParams {
161
- export interface Entry {
162
- /**
163
- * The identifier for the Bookkeeping Account impacted by this entry.
164
- */
165
- account_id: string;
166
-
167
- /**
168
- * The entry amount in the minor unit of the account currency. For dollars, for
169
- * example, this is cents. Debit entries have positive amounts; credit entries have
170
- * negative amounts.
171
- */
172
- amount: number;
173
- }
174
- }
175
-
176
- export interface BookkeepingEntrySetListParams extends PageParams {
177
- /**
178
- * Filter records to the one with the specified `idempotency_key` you chose for
179
- * that object. This value is unique across Increase and is used to ensure that a
180
- * request is only processed once. Learn more about
181
- * [idempotency](https://increase.com/documentation/idempotency-keys).
182
- */
183
- idempotency_key?: string;
184
-
185
- /**
186
- * Filter to the Bookkeeping Entry Set that maps to this Transaction.
187
- */
188
- transaction_id?: string;
189
- }
190
-
191
- export declare namespace BookkeepingEntrySets {
192
- export {
193
- type BookkeepingEntrySet as BookkeepingEntrySet,
194
- type BookkeepingEntrySetsPage as BookkeepingEntrySetsPage,
195
- type BookkeepingEntrySetCreateParams as BookkeepingEntrySetCreateParams,
196
- type BookkeepingEntrySetListParams as BookkeepingEntrySetListParams,
197
- };
198
- }
@@ -1,273 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { APIResource } from '../core/resource';
4
- import { APIPromise } from '../core/api-promise';
5
- import { Page, type PageParams, PagePromise } from '../core/pagination';
6
- import { RequestOptions } from '../internal/request-options';
7
- import { path } from '../internal/utils/path';
8
-
9
- export class Lockboxes extends APIResource {
10
- /**
11
- * Create a Lockbox
12
- *
13
- * @example
14
- * ```ts
15
- * const lockbox = await client.lockboxes.create({
16
- * account_id: 'account_in71c4amph0vgo2qllky',
17
- * });
18
- * ```
19
- */
20
- create(body: LockboxCreateParams, options?: RequestOptions): APIPromise<Lockbox> {
21
- return this._client.post('/lockboxes', { body, ...options });
22
- }
23
-
24
- /**
25
- * Retrieve a Lockbox
26
- *
27
- * @example
28
- * ```ts
29
- * const lockbox = await client.lockboxes.retrieve(
30
- * 'lockbox_3xt21ok13q19advds4t5',
31
- * );
32
- * ```
33
- */
34
- retrieve(lockboxID: string, options?: RequestOptions): APIPromise<Lockbox> {
35
- return this._client.get(path`/lockboxes/${lockboxID}`, options);
36
- }
37
-
38
- /**
39
- * Update a Lockbox
40
- *
41
- * @example
42
- * ```ts
43
- * const lockbox = await client.lockboxes.update(
44
- * 'lockbox_3xt21ok13q19advds4t5',
45
- * );
46
- * ```
47
- */
48
- update(lockboxID: string, body: LockboxUpdateParams, options?: RequestOptions): APIPromise<Lockbox> {
49
- return this._client.patch(path`/lockboxes/${lockboxID}`, { body, ...options });
50
- }
51
-
52
- /**
53
- * List Lockboxes
54
- *
55
- * @example
56
- * ```ts
57
- * // Automatically fetches more pages as needed.
58
- * for await (const lockbox of client.lockboxes.list()) {
59
- * // ...
60
- * }
61
- * ```
62
- */
63
- list(
64
- query: LockboxListParams | null | undefined = {},
65
- options?: RequestOptions,
66
- ): PagePromise<LockboxesPage, Lockbox> {
67
- return this._client.getAPIList('/lockboxes', Page<Lockbox>, { query, ...options });
68
- }
69
- }
70
-
71
- export type LockboxesPage = Page<Lockbox>;
72
-
73
- /**
74
- * Lockboxes are physical locations that can receive mail containing paper checks.
75
- * Increase will automatically create a Check Deposit for checks received this way.
76
- */
77
- export interface Lockbox {
78
- /**
79
- * The Lockbox identifier.
80
- */
81
- id: string;
82
-
83
- /**
84
- * The identifier for the Account checks sent to this lockbox will be deposited
85
- * into.
86
- */
87
- account_id: string;
88
-
89
- /**
90
- * The mailing address for the Lockbox.
91
- */
92
- address: Lockbox.Address;
93
-
94
- /**
95
- * Indicates if checks mailed to this lockbox will be deposited.
96
- *
97
- * - `enabled` - Checks mailed to this Lockbox will be deposited.
98
- * - `disabled` - Checks mailed to this Lockbox will not be deposited.
99
- * - `pend_for_processing` - Checks mailed to this Lockbox will be pending until
100
- * actioned.
101
- */
102
- check_deposit_behavior: 'enabled' | 'disabled' | 'pend_for_processing';
103
-
104
- /**
105
- * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Lockbox
106
- * was created.
107
- */
108
- created_at: string;
109
-
110
- /**
111
- * The description you choose for the Lockbox.
112
- */
113
- description: string | null;
114
-
115
- /**
116
- * The idempotency key you chose for this object. This value is unique across
117
- * Increase and is used to ensure that a request is only processed once. Learn more
118
- * about [idempotency](https://increase.com/documentation/idempotency-keys).
119
- */
120
- idempotency_key: string | null;
121
-
122
- /**
123
- * The recipient name you choose for the Lockbox.
124
- */
125
- recipient_name: string | null;
126
-
127
- /**
128
- * A constant representing the object's type. For this resource it will always be
129
- * `lockbox`.
130
- */
131
- type: 'lockbox';
132
-
133
- [k: string]: unknown;
134
- }
135
-
136
- export namespace Lockbox {
137
- /**
138
- * The mailing address for the Lockbox.
139
- */
140
- export interface Address {
141
- /**
142
- * The city of the address.
143
- */
144
- city: string;
145
-
146
- /**
147
- * The first line of the address.
148
- */
149
- line1: string;
150
-
151
- /**
152
- * The second line of the address.
153
- */
154
- line2: string;
155
-
156
- /**
157
- * The postal code of the address.
158
- */
159
- postal_code: string;
160
-
161
- /**
162
- * The recipient line of the address. This will include the recipient name you
163
- * provide when creating the address, as well as an ATTN suffix to help route the
164
- * mail to your lockbox. Mail senders must include this ATTN line to receive mail
165
- * at this Lockbox.
166
- */
167
- recipient: string | null;
168
-
169
- /**
170
- * The two-letter United States Postal Service (USPS) abbreviation for the state of
171
- * the address.
172
- */
173
- state: string;
174
- }
175
- }
176
-
177
- export interface LockboxCreateParams {
178
- /**
179
- * The Account checks sent to this Lockbox should be deposited into.
180
- */
181
- account_id: string;
182
-
183
- /**
184
- * The description you choose for the Lockbox, for display purposes.
185
- */
186
- description?: string;
187
-
188
- /**
189
- * The name of the recipient that will receive mail at this location.
190
- */
191
- recipient_name?: string;
192
-
193
- [k: string]: unknown;
194
- }
195
-
196
- export interface LockboxUpdateParams {
197
- /**
198
- * This indicates if checks mailed to this lockbox will be deposited.
199
- *
200
- * - `enabled` - Checks mailed to this Lockbox will be deposited.
201
- * - `disabled` - Checks mailed to this Lockbox will not be deposited.
202
- * - `pend_for_processing` - Checks mailed to this Lockbox will be pending until
203
- * actioned.
204
- */
205
- check_deposit_behavior?: 'enabled' | 'disabled' | 'pend_for_processing';
206
-
207
- /**
208
- * The description you choose for the Lockbox.
209
- */
210
- description?: string;
211
-
212
- /**
213
- * The recipient name you choose for the Lockbox.
214
- */
215
- recipient_name?: string;
216
-
217
- [k: string]: unknown;
218
- }
219
-
220
- export interface LockboxListParams extends PageParams {
221
- /**
222
- * Filter Lockboxes to those associated with the provided Account.
223
- */
224
- account_id?: string;
225
-
226
- created_at?: LockboxListParams.CreatedAt;
227
-
228
- /**
229
- * Filter records to the one with the specified `idempotency_key` you chose for
230
- * that object. This value is unique across Increase and is used to ensure that a
231
- * request is only processed once. Learn more about
232
- * [idempotency](https://increase.com/documentation/idempotency-keys).
233
- */
234
- idempotency_key?: string;
235
- }
236
-
237
- export namespace LockboxListParams {
238
- export interface CreatedAt {
239
- /**
240
- * Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
241
- * timestamp.
242
- */
243
- after?: string;
244
-
245
- /**
246
- * Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
247
- * timestamp.
248
- */
249
- before?: string;
250
-
251
- /**
252
- * Return results on or after this
253
- * [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.
254
- */
255
- on_or_after?: string;
256
-
257
- /**
258
- * Return results on or before this
259
- * [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.
260
- */
261
- on_or_before?: string;
262
- }
263
- }
264
-
265
- export declare namespace Lockboxes {
266
- export {
267
- type Lockbox as Lockbox,
268
- type LockboxesPage as LockboxesPage,
269
- type LockboxCreateParams as LockboxCreateParams,
270
- type LockboxUpdateParams as LockboxUpdateParams,
271
- type LockboxListParams as LockboxListParams,
272
- };
273
- }