increase 0.322.0 → 0.324.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 (51) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/index.d.mts +3 -0
  3. package/index.d.ts +3 -0
  4. package/index.d.ts.map +1 -1
  5. package/index.js +4 -0
  6. package/index.js.map +1 -1
  7. package/index.mjs +4 -0
  8. package/index.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/card-disputes.d.ts +5386 -0
  11. package/resources/card-disputes.d.ts.map +1 -0
  12. package/resources/card-disputes.js +77 -0
  13. package/resources/card-disputes.js.map +1 -0
  14. package/resources/card-disputes.mjs +72 -0
  15. package/resources/card-disputes.mjs.map +1 -0
  16. package/resources/index.d.ts +1 -0
  17. package/resources/index.d.ts.map +1 -1
  18. package/resources/index.js +6 -3
  19. package/resources/index.js.map +1 -1
  20. package/resources/index.mjs +1 -0
  21. package/resources/index.mjs.map +1 -1
  22. package/resources/simulations/card-disputes.d.ts +137 -0
  23. package/resources/simulations/card-disputes.d.ts.map +1 -0
  24. package/resources/simulations/card-disputes.js +27 -0
  25. package/resources/simulations/card-disputes.js.map +1 -0
  26. package/resources/simulations/card-disputes.mjs +23 -0
  27. package/resources/simulations/card-disputes.mjs.map +1 -0
  28. package/resources/simulations/index.d.ts +1 -0
  29. package/resources/simulations/index.d.ts.map +1 -1
  30. package/resources/simulations/index.js +3 -1
  31. package/resources/simulations/index.js.map +1 -1
  32. package/resources/simulations/index.mjs +1 -0
  33. package/resources/simulations/index.mjs.map +1 -1
  34. package/resources/simulations/simulations.d.ts +4 -0
  35. package/resources/simulations/simulations.d.ts.map +1 -1
  36. package/resources/simulations/simulations.js +4 -0
  37. package/resources/simulations/simulations.js.map +1 -1
  38. package/resources/simulations/simulations.mjs +4 -0
  39. package/resources/simulations/simulations.mjs.map +1 -1
  40. package/resources/transactions.d.ts +11 -11
  41. package/src/index.ts +20 -0
  42. package/src/resources/card-disputes.ts +6531 -0
  43. package/src/resources/index.ts +8 -0
  44. package/src/resources/simulations/card-disputes.ts +170 -0
  45. package/src/resources/simulations/index.ts +1 -0
  46. package/src/resources/simulations/simulations.ts +6 -0
  47. package/src/resources/transactions.ts +11 -11
  48. package/src/version.ts +1 -1
  49. package/version.d.ts +1 -1
  50. package/version.js +1 -1
  51. package/version.mjs +1 -1
@@ -68,6 +68,14 @@ export {
68
68
  type BookkeepingEntrySetCreateParams,
69
69
  type BookkeepingEntrySetListParams,
70
70
  } from './bookkeeping-entry-sets';
71
+ export {
72
+ CardDisputesPage,
73
+ CardDisputes,
74
+ type CardDispute,
75
+ type CardDisputeCreateParams,
76
+ type CardDisputeListParams,
77
+ type CardDisputeSubmitUserSubmissionParams,
78
+ } from './card-disputes';
71
79
  export {
72
80
  CardPaymentsPage,
73
81
  CardPayments,
@@ -0,0 +1,170 @@
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 initially be in a `pending_user_submission_reviewing` state. Since no
11
+ * review or further action happens in sandbox, this endpoint simulates moving a
12
+ * Card Dispute through its various states.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const cardDispute =
17
+ * await client.simulations.cardDisputes.action(
18
+ * 'card_dispute_h9sc95nbl1cgltpp7men',
19
+ * { network: 'visa' },
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 network of the Card Dispute. Details specific to the network are required
35
+ * under the sub-object with the same identifier as the network.
36
+ *
37
+ * - `visa` - Visa
38
+ */
39
+ network: 'visa';
40
+
41
+ /**
42
+ * The Visa-specific parameters for the taking action on the dispute. Required if
43
+ * and only if `network` is `visa`.
44
+ */
45
+ visa?: CardDisputeActionParams.Visa;
46
+ }
47
+
48
+ export namespace CardDisputeActionParams {
49
+ /**
50
+ * The Visa-specific parameters for the taking action on the dispute. Required if
51
+ * and only if `network` is `visa`.
52
+ */
53
+ export interface Visa {
54
+ /**
55
+ * The action to take. Details specific to the action are required under the
56
+ * sub-object with the same identifier as the action.
57
+ *
58
+ * - `accept_chargeback` - Simulate the merchant accepting the chargeback. This
59
+ * will move the dispute to a `won` state.
60
+ * - `accept_user_submission` - Accept the user's submission and transmit it to the
61
+ * network. This will move the dispute to a `pending_response` state.
62
+ * - `decline_user_prearbitration` - Simulate the merchant declining the user's
63
+ * pre-arbitration. This will move the dispute to a `lost` state.
64
+ * - `receive_merchant_prearbitration` - Simulate the merchant issuing
65
+ * pre-arbitration. This will move the dispute to a `user_submission_required`
66
+ * state.
67
+ * - `represent` - Simulate the merchant re-presenting the dispute. This will move
68
+ * the dispute to a `user_submission_required` state.
69
+ * - `request_further_information` - Simulate further information being requested
70
+ * from the user. This will move the dispute to a `user_submission_required`
71
+ * state.
72
+ * - `time_out_chargeback` - Simulate the merchant timing out responding to the
73
+ * chargeback. This will move the dispute to a `won` state.
74
+ * - `time_out_merchant_prearbitration` - Simulate the user timing out responding
75
+ * to a merchant pre-arbitration. This will move the dispute to a `lost` state.
76
+ * - `time_out_representment` - Simulate the user timing out responding to a
77
+ * merchant re-presentment. This will move the dispute to a `lost` state.
78
+ * - `time_out_user_prearbitration` - Simulate the merchant timing out responding
79
+ * to a user pre-arbitration. This will move the dispute to a `win` state.
80
+ */
81
+ action:
82
+ | 'accept_chargeback'
83
+ | 'accept_user_submission'
84
+ | 'decline_user_prearbitration'
85
+ | 'receive_merchant_prearbitration'
86
+ | 'represent'
87
+ | 'request_further_information'
88
+ | 'time_out_chargeback'
89
+ | 'time_out_merchant_prearbitration'
90
+ | 'time_out_representment'
91
+ | 'time_out_user_prearbitration';
92
+
93
+ /**
94
+ * The parameters for accepting the chargeback. Required if and only if `action` is
95
+ * `accept_chargeback`.
96
+ */
97
+ accept_chargeback?: unknown;
98
+
99
+ /**
100
+ * The parameters for accepting the user submission. Required if and only if
101
+ * `action` is `accept_user_submission`.
102
+ */
103
+ accept_user_submission?: unknown;
104
+
105
+ /**
106
+ * The parameters for declining the prearbitration. Required if and only if
107
+ * `action` is `decline_user_prearbitration`.
108
+ */
109
+ decline_user_prearbitration?: unknown;
110
+
111
+ /**
112
+ * The parameters for receiving the prearbitration. Required if and only if
113
+ * `action` is `receive_merchant_prearbitration`.
114
+ */
115
+ receive_merchant_prearbitration?: unknown;
116
+
117
+ /**
118
+ * The parameters for re-presenting the dispute. Required if and only if `action`
119
+ * is `represent`.
120
+ */
121
+ represent?: unknown;
122
+
123
+ /**
124
+ * The parameters for requesting further information from the user. Required if and
125
+ * only if `action` is `request_further_information`.
126
+ */
127
+ request_further_information?: Visa.RequestFurtherInformation;
128
+
129
+ /**
130
+ * The parameters for timing out the chargeback. Required if and only if `action`
131
+ * is `time_out_chargeback`.
132
+ */
133
+ time_out_chargeback?: unknown;
134
+
135
+ /**
136
+ * The parameters for timing out the merchant prearbitration. Required if and only
137
+ * if `action` is `time_out_merchant_prearbitration`.
138
+ */
139
+ time_out_merchant_prearbitration?: unknown;
140
+
141
+ /**
142
+ * The parameters for timing out the re-presentment. Required if and only if
143
+ * `action` is `time_out_representment`.
144
+ */
145
+ time_out_representment?: unknown;
146
+
147
+ /**
148
+ * The parameters for timing out the user prearbitration. Required if and only if
149
+ * `action` is `time_out_user_prearbitration`.
150
+ */
151
+ time_out_user_prearbitration?: unknown;
152
+ }
153
+
154
+ export namespace Visa {
155
+ /**
156
+ * The parameters for requesting further information from the user. Required if and
157
+ * only if `action` is `request_further_information`.
158
+ */
159
+ export interface RequestFurtherInformation {
160
+ /**
161
+ * The reason for requesting further information from the user.
162
+ */
163
+ reason: string;
164
+ }
165
+ }
166
+ }
167
+
168
+ export declare namespace CardDisputes {
169
+ export { type CardDisputeActionParams as CardDisputeActionParams };
170
+ }
@@ -17,6 +17,7 @@ export {
17
17
  type CardAuthorizationCreateResponse,
18
18
  type CardAuthorizationCreateParams,
19
19
  } from './card-authorizations';
20
+ export { CardDisputes, type CardDisputeActionParams } from './card-disputes';
20
21
  export { CardFuelConfirmations, type CardFuelConfirmationCreateParams } from './card-fuel-confirmations';
21
22
  export { CardIncrements, type CardIncrementCreateParams } from './card-increments';
22
23
  export { CardRefunds, type CardRefundCreateParams } from './card-refunds';
@@ -23,6 +23,8 @@ import {
23
23
  CardAuthorizationCreateResponse,
24
24
  CardAuthorizations,
25
25
  } from './card-authorizations';
26
+ import * as CardDisputesAPI from './card-disputes';
27
+ import { CardDisputeActionParams, CardDisputes } from './card-disputes';
26
28
  import * as CardFuelConfirmationsAPI from './card-fuel-confirmations';
27
29
  import { CardFuelConfirmationCreateParams, CardFuelConfirmations } from './card-fuel-confirmations';
28
30
  import * as CardIncrementsAPI from './card-increments';
@@ -101,6 +103,7 @@ export class Simulations extends APIResource {
101
103
  cardFuelConfirmations: CardFuelConfirmationsAPI.CardFuelConfirmations =
102
104
  new CardFuelConfirmationsAPI.CardFuelConfirmations(this._client);
103
105
  cardRefunds: CardRefundsAPI.CardRefunds = new CardRefundsAPI.CardRefunds(this._client);
106
+ cardDisputes: CardDisputesAPI.CardDisputes = new CardDisputesAPI.CardDisputes(this._client);
104
107
  physicalCards: PhysicalCardsAPI.PhysicalCards = new PhysicalCardsAPI.PhysicalCards(this._client);
105
108
  digitalWalletTokenRequests: DigitalWalletTokenRequestsAPI.DigitalWalletTokenRequests =
106
109
  new DigitalWalletTokenRequestsAPI.DigitalWalletTokenRequests(this._client);
@@ -144,6 +147,7 @@ Simulations.CardReversals = CardReversals;
144
147
  Simulations.CardIncrements = CardIncrements;
145
148
  Simulations.CardFuelConfirmations = CardFuelConfirmations;
146
149
  Simulations.CardRefunds = CardRefunds;
150
+ Simulations.CardDisputes = CardDisputes;
147
151
  Simulations.PhysicalCards = PhysicalCards;
148
152
  Simulations.DigitalWalletTokenRequests = DigitalWalletTokenRequests;
149
153
  Simulations.PendingTransactions = PendingTransactions;
@@ -199,6 +203,8 @@ export declare namespace Simulations {
199
203
 
200
204
  export { CardRefunds as CardRefunds, type CardRefundCreateParams as CardRefundCreateParams };
201
205
 
206
+ export { CardDisputes as CardDisputes, type CardDisputeActionParams as CardDisputeActionParams };
207
+
202
208
  export {
203
209
  PhysicalCards as PhysicalCards,
204
210
  type PhysicalCardCreateParams as PhysicalCardCreateParams,
@@ -179,7 +179,7 @@ export namespace Transaction {
179
179
  ach_transfer_return: Source.ACHTransferReturn | null;
180
180
 
181
181
  /**
182
- * A Card Dispute Acceptance object. This field will be present in the JSON
182
+ * A Legacy Card Dispute Acceptance object. This field will be present in the JSON
183
183
  * response if and only if `category` is equal to `card_dispute_acceptance`.
184
184
  * Contains the details of a successful Card Dispute.
185
185
  */
@@ -193,9 +193,9 @@ export namespace Transaction {
193
193
  card_dispute_financial: Source.CardDisputeFinancial | null;
194
194
 
195
195
  /**
196
- * A Card Dispute Loss object. This field will be present in the JSON response if
197
- * and only if `category` is equal to `card_dispute_loss`. Contains the details of
198
- * a lost Card Dispute.
196
+ * A Legacy Card Dispute Loss object. This field will be present in the JSON
197
+ * response if and only if `category` is equal to `card_dispute_loss`. Contains the
198
+ * details of a lost Card Dispute.
199
199
  */
200
200
  card_dispute_loss: Source.CardDisputeLoss | null;
201
201
 
@@ -261,11 +261,11 @@ export namespace Transaction {
261
261
  * `ach_transfer_return` object.
262
262
  * - `cashback_payment` - Cashback Payment: details will be under the
263
263
  * `cashback_payment` object.
264
- * - `card_dispute_acceptance` - Card Dispute Acceptance: details will be under the
265
- * `card_dispute_acceptance` object.
264
+ * - `card_dispute_acceptance` - Legacy Card Dispute Acceptance: details will be
265
+ * under the `card_dispute_acceptance` object.
266
266
  * - `card_dispute_financial` - Card Dispute Financial: details will be under the
267
267
  * `card_dispute_financial` object.
268
- * - `card_dispute_loss` - Card Dispute Loss: details will be under the
268
+ * - `card_dispute_loss` - Legacy Card Dispute Loss: details will be under the
269
269
  * `card_dispute_loss` object.
270
270
  * - `card_refund` - Card Refund: details will be under the `card_refund` object.
271
271
  * - `card_settlement` - Card Settlement: details will be under the
@@ -925,7 +925,7 @@ export namespace Transaction {
925
925
  }
926
926
 
927
927
  /**
928
- * A Card Dispute Acceptance object. This field will be present in the JSON
928
+ * A Legacy Card Dispute Acceptance object. This field will be present in the JSON
929
929
  * response if and only if `category` is equal to `card_dispute_acceptance`.
930
930
  * Contains the details of a successful Card Dispute.
931
931
  */
@@ -1008,9 +1008,9 @@ export namespace Transaction {
1008
1008
  }
1009
1009
 
1010
1010
  /**
1011
- * A Card Dispute Loss object. This field will be present in the JSON response if
1012
- * and only if `category` is equal to `card_dispute_loss`. Contains the details of
1013
- * a lost Card Dispute.
1011
+ * A Legacy Card Dispute Loss object. This field will be present in the JSON
1012
+ * response if and only if `category` is equal to `card_dispute_loss`. Contains the
1013
+ * details of a lost Card Dispute.
1014
1014
  */
1015
1015
  export interface CardDisputeLoss {
1016
1016
  /**
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.322.0'; // x-release-please-version
1
+ export const VERSION = '0.324.0'; // x-release-please-version
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.322.0";
1
+ export declare const VERSION = "0.324.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.322.0'; // x-release-please-version
4
+ exports.VERSION = '0.324.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.322.0'; // x-release-please-version
1
+ export const VERSION = '0.324.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map