stripe 9.0.0 → 9.3.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 (69) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/VERSION +1 -1
  3. package/lib/resources/Apps/Secrets.js +31 -0
  4. package/lib/resources/Customers.js +5 -0
  5. package/lib/resources/FinancialConnections/Accounts.js +12 -0
  6. package/lib/resources/TestHelpers/Treasury/InboundTransfers.js +25 -0
  7. package/lib/resources/TestHelpers/Treasury/OutboundPayments.js +25 -0
  8. package/lib/resources/TestHelpers/Treasury/OutboundTransfers.js +25 -0
  9. package/lib/resources/TestHelpers/Treasury/ReceivedCredits.js +15 -0
  10. package/lib/resources/TestHelpers/Treasury/ReceivedDebits.js +15 -0
  11. package/lib/resources/Treasury/CreditReversals.js +26 -0
  12. package/lib/resources/Treasury/DebitReversals.js +26 -0
  13. package/lib/resources/Treasury/FinancialAccounts.js +41 -0
  14. package/lib/resources/Treasury/InboundTransfers.js +31 -0
  15. package/lib/resources/Treasury/OutboundPayments.js +31 -0
  16. package/lib/resources/Treasury/OutboundTransfers.js +31 -0
  17. package/lib/resources/Treasury/ReceivedCredits.js +21 -0
  18. package/lib/resources/Treasury/ReceivedDebits.js +21 -0
  19. package/lib/resources/Treasury/TransactionEntries.js +21 -0
  20. package/lib/resources/Treasury/Transactions.js +21 -0
  21. package/lib/resources.js +22 -0
  22. package/package.json +1 -1
  23. package/types/2020-08-27/Accounts.d.ts +5 -5
  24. package/types/2020-08-27/Apps/Secrets.d.ts +241 -0
  25. package/types/2020-08-27/BillingPortal/Configurations.d.ts +1 -1
  26. package/types/2020-08-27/BillingPortal/Sessions.d.ts +1 -1
  27. package/types/2020-08-27/Charges.d.ts +8 -0
  28. package/types/2020-08-27/Checkout/Sessions.d.ts +51 -3
  29. package/types/2020-08-27/Customers.d.ts +24 -0
  30. package/types/2020-08-27/Discounts.d.ts +4 -4
  31. package/types/2020-08-27/FinancialConnections/Accounts.d.ts +63 -0
  32. package/types/2020-08-27/Invoices.d.ts +3 -0
  33. package/types/2020-08-27/Issuing/Authorizations.d.ts +22 -0
  34. package/types/2020-08-27/Issuing/Cards.d.ts +7 -0
  35. package/types/2020-08-27/Issuing/Disputes.d.ts +29 -0
  36. package/types/2020-08-27/Issuing/Transactions.d.ts +17 -0
  37. package/types/2020-08-27/LineItems.d.ts +2 -3
  38. package/types/2020-08-27/Mandates.d.ts +4 -0
  39. package/types/2020-08-27/Orders.d.ts +84 -4
  40. package/types/2020-08-27/PaymentIntents.d.ts +332 -2
  41. package/types/2020-08-27/PaymentLinks.d.ts +167 -0
  42. package/types/2020-08-27/PaymentMethods.d.ts +73 -0
  43. package/types/2020-08-27/PromotionCodes.d.ts +2 -2
  44. package/types/2020-08-27/Quotes.d.ts +6 -9
  45. package/types/2020-08-27/Refunds.d.ts +1 -1
  46. package/types/2020-08-27/SetupAttempts.d.ts +4 -0
  47. package/types/2020-08-27/SetupIntents.d.ts +157 -0
  48. package/types/2020-08-27/SubscriptionSchedules.d.ts +15 -0
  49. package/types/2020-08-27/Subscriptions.d.ts +41 -2
  50. package/types/2020-08-27/Terminal/Configurations.d.ts +63 -0
  51. package/types/2020-08-27/TestHelpers/Treasury/InboundTransfers.d.ts +108 -0
  52. package/types/2020-08-27/TestHelpers/Treasury/OutboundPayments.d.ts +105 -0
  53. package/types/2020-08-27/TestHelpers/Treasury/OutboundTransfers.d.ts +105 -0
  54. package/types/2020-08-27/TestHelpers/Treasury/ReceivedCredits.d.ts +93 -0
  55. package/types/2020-08-27/TestHelpers/Treasury/ReceivedDebits.d.ts +91 -0
  56. package/types/2020-08-27/Tokens.d.ts +2 -2
  57. package/types/2020-08-27/Treasury/CreditReversals.d.ts +168 -0
  58. package/types/2020-08-27/Treasury/DebitReversals.d.ts +187 -0
  59. package/types/2020-08-27/Treasury/FinancialAccountFeatures.d.ts +622 -0
  60. package/types/2020-08-27/Treasury/FinancialAccounts.d.ts +833 -0
  61. package/types/2020-08-27/Treasury/InboundTransfers.d.ts +349 -0
  62. package/types/2020-08-27/Treasury/OutboundPayments.d.ts +550 -0
  63. package/types/2020-08-27/Treasury/OutboundTransfers.d.ts +385 -0
  64. package/types/2020-08-27/Treasury/ReceivedCredits.d.ts +303 -0
  65. package/types/2020-08-27/Treasury/ReceivedDebits.d.ts +231 -0
  66. package/types/2020-08-27/Treasury/TransactionEntries.d.ts +257 -0
  67. package/types/2020-08-27/Treasury/Transactions.d.ts +268 -0
  68. package/types/2020-08-27/WebhookEndpoints.d.ts +62 -2
  69. package/types/2020-08-27/index.d.ts +39 -0
@@ -0,0 +1,187 @@
1
+ // File generated from our OpenAPI spec
2
+
3
+ declare module 'stripe' {
4
+ namespace Stripe {
5
+ namespace Treasury {
6
+ /**
7
+ * The DebitReversal object.
8
+ */
9
+ interface DebitReversal {
10
+ /**
11
+ * Unique identifier for the object.
12
+ */
13
+ id: string;
14
+
15
+ /**
16
+ * String representing the object's type. Objects of the same type share the same value.
17
+ */
18
+ object: 'treasury.debit_reversal';
19
+
20
+ /**
21
+ * Amount (in cents) transferred.
22
+ */
23
+ amount: number;
24
+
25
+ /**
26
+ * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
27
+ */
28
+ currency: string;
29
+
30
+ /**
31
+ * The FinancialAccount to reverse funds from.
32
+ */
33
+ financial_account: string | null;
34
+
35
+ /**
36
+ * A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
37
+ */
38
+ hosted_regulatory_receipt_url: string | null;
39
+
40
+ /**
41
+ * Other flows linked to a DebitReversal.
42
+ */
43
+ linked_flows: DebitReversal.LinkedFlows | null;
44
+
45
+ /**
46
+ * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
47
+ */
48
+ livemode: boolean;
49
+
50
+ /**
51
+ * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
52
+ */
53
+ metadata: Stripe.Metadata;
54
+
55
+ /**
56
+ * The rails used to reverse the funds.
57
+ */
58
+ network: DebitReversal.Network;
59
+
60
+ /**
61
+ * The ReceivedDebit being reversed.
62
+ */
63
+ received_debit: string;
64
+
65
+ /**
66
+ * Status of the DebitReversal
67
+ */
68
+ status: DebitReversal.Status;
69
+
70
+ status_transitions: DebitReversal.StatusTransitions;
71
+
72
+ /**
73
+ * The Transaction associated with this object.
74
+ */
75
+ transaction: string | Stripe.Treasury.Transaction | null;
76
+ }
77
+
78
+ namespace DebitReversal {
79
+ interface LinkedFlows {
80
+ /**
81
+ * Set if there is an Issuing dispute associated with the DebitReversal.
82
+ */
83
+ issuing_dispute: string | null;
84
+ }
85
+
86
+ type Network = 'ach' | 'card';
87
+
88
+ type Status = 'failed' | 'processing' | 'succeeded';
89
+
90
+ interface StatusTransitions {
91
+ /**
92
+ * Timestamp describing when the DebitReversal changed status to `completed`.
93
+ */
94
+ completed_at: number | null;
95
+ }
96
+ }
97
+
98
+ interface DebitReversalCreateParams {
99
+ /**
100
+ * The ReceivedDebit to reverse.
101
+ */
102
+ received_debit: string;
103
+
104
+ /**
105
+ * Specifies which fields in the response should be expanded.
106
+ */
107
+ expand?: Array<string>;
108
+
109
+ /**
110
+ * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
111
+ */
112
+ metadata?: Stripe.MetadataParam;
113
+ }
114
+
115
+ interface DebitReversalRetrieveParams {
116
+ /**
117
+ * Specifies which fields in the response should be expanded.
118
+ */
119
+ expand?: Array<string>;
120
+ }
121
+
122
+ interface DebitReversalListParams extends PaginationParams {
123
+ /**
124
+ * Returns objects associated with this FinancialAccount.
125
+ */
126
+ financial_account: string;
127
+
128
+ /**
129
+ * Specifies which fields in the response should be expanded.
130
+ */
131
+ expand?: Array<string>;
132
+
133
+ /**
134
+ * Only return DebitReversals for the ReceivedDebit ID.
135
+ */
136
+ received_debit?: string;
137
+
138
+ /**
139
+ * Only return DebitReversals for a given resolution.
140
+ */
141
+ resolution?: DebitReversalListParams.Resolution;
142
+
143
+ /**
144
+ * Only return DebitReversals for a given status.
145
+ */
146
+ status?: DebitReversalListParams.Status;
147
+ }
148
+
149
+ namespace DebitReversalListParams {
150
+ type Resolution = 'lost' | 'won';
151
+
152
+ type Status = 'canceled' | 'completed' | 'processing';
153
+ }
154
+
155
+ class DebitReversalsResource {
156
+ /**
157
+ * Reverses a ReceivedDebit and creates a DebitReversal object.
158
+ */
159
+ create(
160
+ params: DebitReversalCreateParams,
161
+ options?: RequestOptions
162
+ ): Promise<Stripe.Response<Stripe.Treasury.DebitReversal>>;
163
+
164
+ /**
165
+ * Retrieves a DebitReversal object.
166
+ */
167
+ retrieve(
168
+ id: string,
169
+ params?: DebitReversalRetrieveParams,
170
+ options?: RequestOptions
171
+ ): Promise<Stripe.Response<Stripe.Treasury.DebitReversal>>;
172
+ retrieve(
173
+ id: string,
174
+ options?: RequestOptions
175
+ ): Promise<Stripe.Response<Stripe.Treasury.DebitReversal>>;
176
+
177
+ /**
178
+ * Returns a list of DebitReversals.
179
+ */
180
+ list(
181
+ params: DebitReversalListParams,
182
+ options?: RequestOptions
183
+ ): ApiListPromise<Stripe.Treasury.DebitReversal>;
184
+ }
185
+ }
186
+ }
187
+ }