increase 0.308.0 → 0.310.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 (59) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/index.d.mts +0 -3
  3. package/index.d.ts +0 -3
  4. package/index.d.ts.map +1 -1
  5. package/index.js +0 -4
  6. package/index.js.map +1 -1
  7. package/index.mjs +0 -4
  8. package/index.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/index.d.ts +0 -1
  11. package/resources/index.d.ts.map +1 -1
  12. package/resources/index.js +3 -6
  13. package/resources/index.js.map +1 -1
  14. package/resources/index.mjs +0 -1
  15. package/resources/index.mjs.map +1 -1
  16. package/resources/routing-numbers.d.ts +7 -0
  17. package/resources/routing-numbers.d.ts.map +1 -1
  18. package/resources/routing-numbers.js.map +1 -1
  19. package/resources/routing-numbers.mjs.map +1 -1
  20. package/resources/simulations/index.d.ts +0 -1
  21. package/resources/simulations/index.d.ts.map +1 -1
  22. package/resources/simulations/index.js +1 -3
  23. package/resources/simulations/index.js.map +1 -1
  24. package/resources/simulations/index.mjs +0 -1
  25. package/resources/simulations/index.mjs.map +1 -1
  26. package/resources/simulations/simulations.d.ts +0 -4
  27. package/resources/simulations/simulations.d.ts.map +1 -1
  28. package/resources/simulations/simulations.js +0 -4
  29. package/resources/simulations/simulations.js.map +1 -1
  30. package/resources/simulations/simulations.mjs +0 -4
  31. package/resources/simulations/simulations.mjs.map +1 -1
  32. package/resources/transactions.d.ts +0 -12
  33. package/resources/transactions.d.ts.map +1 -1
  34. package/resources/transactions.js.map +1 -1
  35. package/resources/transactions.mjs.map +1 -1
  36. package/src/index.ts +0 -18
  37. package/src/resources/index.ts +0 -7
  38. package/src/resources/routing-numbers.ts +8 -0
  39. package/src/resources/simulations/index.ts +0 -1
  40. package/src/resources/simulations/simulations.ts +0 -6
  41. package/src/resources/transactions.ts +0 -15
  42. package/src/version.ts +1 -1
  43. package/version.d.ts +1 -1
  44. package/version.js +1 -1
  45. package/version.mjs +1 -1
  46. package/resources/card-disputes.d.ts +0 -262
  47. package/resources/card-disputes.d.ts.map +0 -1
  48. package/resources/card-disputes.js +0 -49
  49. package/resources/card-disputes.js.map +0 -1
  50. package/resources/card-disputes.mjs +0 -44
  51. package/resources/card-disputes.mjs.map +0 -1
  52. package/resources/simulations/card-disputes.d.ts +0 -45
  53. package/resources/simulations/card-disputes.d.ts.map +0 -1
  54. package/resources/simulations/card-disputes.js +0 -27
  55. package/resources/simulations/card-disputes.js.map +0 -1
  56. package/resources/simulations/card-disputes.mjs +0 -23
  57. package/resources/simulations/card-disputes.mjs.map +0 -1
  58. package/src/resources/card-disputes.ts +0 -326
  59. package/src/resources/simulations/card-disputes.ts +0 -56
@@ -1,326 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { APIResource } from '../resource';
4
- import { isRequestOptions } from '../core';
5
- import * as Core from '../core';
6
- import { Page, type PageParams } from '../pagination';
7
-
8
- export class CardDisputes extends APIResource {
9
- /**
10
- * Create a Card Dispute
11
- *
12
- * @example
13
- * ```ts
14
- * const cardDispute = await client.cardDisputes.create({
15
- * disputed_transaction_id:
16
- * 'transaction_uyrp7fld2ium70oa7oi',
17
- * explanation: 'Unauthorized recurring transaction.',
18
- * });
19
- * ```
20
- */
21
- create(body: CardDisputeCreateParams, options?: Core.RequestOptions): Core.APIPromise<CardDispute> {
22
- return this._client.post('/card_disputes', { body, ...options });
23
- }
24
-
25
- /**
26
- * Retrieve a Card Dispute
27
- *
28
- * @example
29
- * ```ts
30
- * const cardDispute = await client.cardDisputes.retrieve(
31
- * 'card_dispute_h9sc95nbl1cgltpp7men',
32
- * );
33
- * ```
34
- */
35
- retrieve(cardDisputeId: string, options?: Core.RequestOptions): Core.APIPromise<CardDispute> {
36
- return this._client.get(`/card_disputes/${cardDisputeId}`, options);
37
- }
38
-
39
- /**
40
- * List Card Disputes
41
- *
42
- * @example
43
- * ```ts
44
- * // Automatically fetches more pages as needed.
45
- * for await (const cardDispute of client.cardDisputes.list()) {
46
- * // ...
47
- * }
48
- * ```
49
- */
50
- list(
51
- query?: CardDisputeListParams,
52
- options?: Core.RequestOptions,
53
- ): Core.PagePromise<CardDisputesPage, CardDispute>;
54
- list(options?: Core.RequestOptions): Core.PagePromise<CardDisputesPage, CardDispute>;
55
- list(
56
- query: CardDisputeListParams | Core.RequestOptions = {},
57
- options?: Core.RequestOptions,
58
- ): Core.PagePromise<CardDisputesPage, CardDispute> {
59
- if (isRequestOptions(query)) {
60
- return this.list({}, query);
61
- }
62
- return this._client.getAPIList('/card_disputes', CardDisputesPage, { query, ...options });
63
- }
64
- }
65
-
66
- export class CardDisputesPage extends Page<CardDispute> {}
67
-
68
- /**
69
- * If unauthorized activity occurs on a card, you can create a Card Dispute and
70
- * we'll return the funds if appropriate.
71
- */
72
- export interface CardDispute {
73
- /**
74
- * The Card Dispute identifier.
75
- */
76
- id: string;
77
-
78
- /**
79
- * If the Card Dispute's status is `accepted`, this will contain details of the
80
- * successful dispute.
81
- */
82
- acceptance: CardDispute.Acceptance | null;
83
-
84
- /**
85
- * The amount of the dispute, if provided, or the transaction amount otherwise.
86
- */
87
- amount: number | null;
88
-
89
- /**
90
- * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
91
- * the Card Dispute was created.
92
- */
93
- created_at: string;
94
-
95
- /**
96
- * The identifier of the Transaction that was disputed.
97
- */
98
- disputed_transaction_id: string;
99
-
100
- /**
101
- * Why you disputed the Transaction in question.
102
- */
103
- explanation: string;
104
-
105
- /**
106
- * The idempotency key you chose for this object. This value is unique across
107
- * Increase and is used to ensure that a request is only processed once. Learn more
108
- * about [idempotency](https://increase.com/documentation/idempotency-keys).
109
- */
110
- idempotency_key: string | null;
111
-
112
- /**
113
- * If the Card Dispute's status is `lost`, this will contain details of the lost
114
- * dispute.
115
- */
116
- loss: CardDispute.Loss | null;
117
-
118
- /**
119
- * If the Card Dispute's status is `rejected`, this will contain details of the
120
- * unsuccessful dispute.
121
- */
122
- rejection: CardDispute.Rejection | null;
123
-
124
- /**
125
- * The results of the Dispute investigation.
126
- *
127
- * - `pending_reviewing` - The Card Dispute is pending review.
128
- * - `pending_user_information` - Increase has requested more information related
129
- * to the Card Dispute from you.
130
- * - `accepted` - The Card Dispute has been accepted and your funds have been
131
- * returned. The card dispute will eventually transition into `won` or `lost`
132
- * depending on the outcome.
133
- * - `rejected` - The Card Dispute has been rejected.
134
- * - `lost` - The Card Dispute has been lost and funds previously credited from the
135
- * acceptance have been debited.
136
- * - `won` - The Card Dispute has been won and no further action can be taken.
137
- */
138
- status: 'pending_reviewing' | 'pending_user_information' | 'accepted' | 'rejected' | 'lost' | 'won';
139
-
140
- /**
141
- * A constant representing the object's type. For this resource it will always be
142
- * `card_dispute`.
143
- */
144
- type: 'card_dispute';
145
-
146
- /**
147
- * If the Card Dispute's status is `won`, this will contain details of the won
148
- * dispute.
149
- */
150
- win: CardDispute.Win | null;
151
- }
152
-
153
- export namespace CardDispute {
154
- /**
155
- * If the Card Dispute's status is `accepted`, this will contain details of the
156
- * successful dispute.
157
- */
158
- export interface Acceptance {
159
- /**
160
- * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
161
- * the Card Dispute was accepted.
162
- */
163
- accepted_at: string;
164
-
165
- /**
166
- * The identifier of the Card Dispute that was accepted.
167
- */
168
- card_dispute_id: string;
169
-
170
- /**
171
- * The identifier of the Transaction that was created to return the disputed funds
172
- * to your account.
173
- */
174
- transaction_id: string;
175
- }
176
-
177
- /**
178
- * If the Card Dispute's status is `lost`, this will contain details of the lost
179
- * dispute.
180
- */
181
- export interface Loss {
182
- /**
183
- * The identifier of the Card Dispute that was lost.
184
- */
185
- card_dispute_id: string;
186
-
187
- /**
188
- * Why the Card Dispute was lost.
189
- */
190
- explanation: string;
191
-
192
- /**
193
- * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
194
- * the Card Dispute was lost.
195
- */
196
- lost_at: string;
197
-
198
- /**
199
- * The identifier of the Transaction that was created to debit the disputed funds
200
- * from your account.
201
- */
202
- transaction_id: string;
203
- }
204
-
205
- /**
206
- * If the Card Dispute's status is `rejected`, this will contain details of the
207
- * unsuccessful dispute.
208
- */
209
- export interface Rejection {
210
- /**
211
- * The identifier of the Card Dispute that was rejected.
212
- */
213
- card_dispute_id: string;
214
-
215
- /**
216
- * Why the Card Dispute was rejected.
217
- */
218
- explanation: string;
219
-
220
- /**
221
- * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
222
- * the Card Dispute was rejected.
223
- */
224
- rejected_at: string;
225
- }
226
-
227
- /**
228
- * If the Card Dispute's status is `won`, this will contain details of the won
229
- * dispute.
230
- */
231
- export interface Win {
232
- /**
233
- * The identifier of the Card Dispute that was won.
234
- */
235
- card_dispute_id: string;
236
-
237
- /**
238
- * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
239
- * the Card Dispute was won.
240
- */
241
- won_at: string;
242
- }
243
- }
244
-
245
- export interface CardDisputeCreateParams {
246
- /**
247
- * The Transaction you wish to dispute. This Transaction must have a `source_type`
248
- * of `card_settlement`.
249
- */
250
- disputed_transaction_id: string;
251
-
252
- /**
253
- * Why you are disputing this Transaction.
254
- */
255
- explanation: string;
256
-
257
- /**
258
- * The monetary amount of the part of the transaction that is being disputed. This
259
- * is optional and will default to the full amount of the transaction if not
260
- * provided. If provided, the amount must be less than or equal to the amount of
261
- * the transaction.
262
- */
263
- amount?: number;
264
- }
265
-
266
- export interface CardDisputeListParams extends PageParams {
267
- created_at?: CardDisputeListParams.CreatedAt;
268
-
269
- /**
270
- * Filter records to the one with the specified `idempotency_key` you chose for
271
- * that object. This value is unique across Increase and is used to ensure that a
272
- * request is only processed once. Learn more about
273
- * [idempotency](https://increase.com/documentation/idempotency-keys).
274
- */
275
- idempotency_key?: string;
276
-
277
- status?: CardDisputeListParams.Status;
278
- }
279
-
280
- export namespace CardDisputeListParams {
281
- export interface CreatedAt {
282
- /**
283
- * Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
284
- * timestamp.
285
- */
286
- after?: string;
287
-
288
- /**
289
- * Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
290
- * timestamp.
291
- */
292
- before?: string;
293
-
294
- /**
295
- * Return results on or after this
296
- * [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.
297
- */
298
- on_or_after?: string;
299
-
300
- /**
301
- * Return results on or before this
302
- * [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.
303
- */
304
- on_or_before?: string;
305
- }
306
-
307
- export interface Status {
308
- /**
309
- * Filter Card Disputes for those with the specified status or statuses. For GET
310
- * requests, this should be encoded as a comma-delimited string, such as
311
- * `?in=one,two,three`.
312
- */
313
- in?: Array<'pending_reviewing' | 'pending_user_information' | 'accepted' | 'rejected' | 'lost' | 'won'>;
314
- }
315
- }
316
-
317
- CardDisputes.CardDisputesPage = CardDisputesPage;
318
-
319
- export declare namespace CardDisputes {
320
- export {
321
- type CardDispute as CardDispute,
322
- CardDisputesPage as CardDisputesPage,
323
- type CardDisputeCreateParams as CardDisputeCreateParams,
324
- type CardDisputeListParams as CardDisputeListParams,
325
- };
326
- }
@@ -1,56 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { APIResource } from '../../resource';
4
- import * as Core from '../../core';
5
- import * as CardDisputesAPI from '../card-disputes';
6
-
7
- export class CardDisputes extends APIResource {
8
- /**
9
- * After a [Card Dispute](#card-disputes) is created in production, the dispute
10
- * will be reviewed. Since no review happens in sandbox, this endpoint simulates
11
- * moving a Card Dispute into a rejected or accepted state. A Card Dispute can only
12
- * be actioned one time and must have a status of `pending_reviewing`.
13
- *
14
- * @example
15
- * ```ts
16
- * const cardDispute =
17
- * await client.simulations.cardDisputes.action(
18
- * 'card_dispute_h9sc95nbl1cgltpp7men',
19
- * { status: 'rejected' },
20
- * );
21
- * ```
22
- */
23
- action(
24
- cardDisputeId: string,
25
- body: CardDisputeActionParams,
26
- options?: Core.RequestOptions,
27
- ): Core.APIPromise<CardDisputesAPI.CardDispute> {
28
- return this._client.post(`/simulations/card_disputes/${cardDisputeId}/action`, { body, ...options });
29
- }
30
- }
31
-
32
- export interface CardDisputeActionParams {
33
- /**
34
- * The status to move the dispute to.
35
- *
36
- * - `pending_user_information` - Increase has requested more information related
37
- * to the Card Dispute from you.
38
- * - `accepted` - The Card Dispute has been accepted and your funds have been
39
- * returned. The card dispute will eventually transition into `won` or `lost`
40
- * depending on the outcome.
41
- * - `rejected` - The Card Dispute has been rejected.
42
- * - `lost` - The Card Dispute has been lost and funds previously credited from the
43
- * acceptance have been debited.
44
- * - `won` - The Card Dispute has been won and no further action can be taken.
45
- */
46
- status: 'pending_user_information' | 'accepted' | 'rejected' | 'lost' | 'won';
47
-
48
- /**
49
- * Why the dispute was rejected. Not required for accepting disputes.
50
- */
51
- explanation?: string;
52
- }
53
-
54
- export declare namespace CardDisputes {
55
- export { type CardDisputeActionParams as CardDisputeActionParams };
56
- }