stripe 11.6.0 → 11.7.0-beta.2

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 (94) hide show
  1. package/CHANGELOG.md +132 -100
  2. package/VERSION +1 -1
  3. package/lib/Webhooks.js +17 -10
  4. package/lib/multipart.js +10 -7
  5. package/lib/resources/AccountSessions.js +10 -0
  6. package/lib/resources/Capital/FinancingOffers.js +19 -0
  7. package/lib/resources/Capital/FinancingSummary.js +10 -0
  8. package/lib/resources/Capital/FinancingTransactions.js +15 -0
  9. package/lib/resources/GiftCards/Cards.js +27 -0
  10. package/lib/resources/GiftCards/Transactions.js +31 -0
  11. package/lib/resources/Orders.js +40 -0
  12. package/lib/resources/QuotePhases.js +20 -0
  13. package/lib/resources/Quotes.js +32 -0
  14. package/lib/resources/SubscriptionSchedules.js +4 -0
  15. package/lib/resources/Tax/Calculations.js +15 -0
  16. package/lib/resources/Tax/Registrations.js +19 -0
  17. package/lib/resources/Tax/Transactions.js +18 -0
  18. package/lib/resources/Terminal/Readers.js +4 -0
  19. package/lib/resources.js +17 -0
  20. package/lib/stripe.js +2 -1
  21. package/lib/utils.js +23 -5
  22. package/package.json +1 -1
  23. package/types/AccountSessions.d.ts +45 -0
  24. package/types/AccountSessionsResource.d.ts +27 -0
  25. package/types/Accounts.d.ts +46 -0
  26. package/types/AccountsResource.d.ts +116 -0
  27. package/types/Capital/FinancingOffers.d.ts +183 -0
  28. package/types/Capital/FinancingOffersResource.d.ts +95 -0
  29. package/types/Capital/FinancingSummary.d.ts +101 -0
  30. package/types/Capital/FinancingSummaryResource.d.ts +27 -0
  31. package/types/Capital/FinancingTransactions.d.ts +119 -0
  32. package/types/Capital/FinancingTransactionsResource.d.ts +63 -0
  33. package/types/Charges.d.ts +48 -0
  34. package/types/Checkout/SessionsResource.d.ts +10 -0
  35. package/types/Coupons.d.ts +1 -1
  36. package/types/CouponsResource.d.ts +1 -1
  37. package/types/CustomersResource.d.ts +4 -1
  38. package/types/Discounts.d.ts +10 -0
  39. package/types/GiftCards/Cards.d.ts +118 -0
  40. package/types/GiftCards/CardsResource.d.ts +159 -0
  41. package/types/GiftCards/Transactions.d.ts +129 -0
  42. package/types/GiftCards/TransactionsResource.d.ts +201 -0
  43. package/types/InvoiceItemsResource.d.ts +88 -0
  44. package/types/InvoiceLineItems.d.ts +23 -0
  45. package/types/Invoices.d.ts +25 -2
  46. package/types/InvoicesResource.d.ts +410 -0
  47. package/types/Issuing/Authorizations.d.ts +25 -0
  48. package/types/Issuing/CardholdersResource.d.ts +4 -2
  49. package/types/Issuing/Transactions.d.ts +17 -0
  50. package/types/LineItems.d.ts +7 -0
  51. package/types/Mandates.d.ts +4 -0
  52. package/types/Orders.d.ts +950 -0
  53. package/types/OrdersResource.d.ts +2575 -0
  54. package/types/PaymentIntents.d.ts +83 -0
  55. package/types/PaymentIntentsResource.d.ts +334 -3
  56. package/types/PaymentLinks.d.ts +1 -0
  57. package/types/PaymentLinksResource.d.ts +2 -0
  58. package/types/PaymentMethods.d.ts +16 -1
  59. package/types/PaymentMethodsResource.d.ts +43 -2
  60. package/types/Prices.d.ts +22 -0
  61. package/types/PricesResource.d.ts +22 -0
  62. package/types/Products.d.ts +39 -0
  63. package/types/ProductsResource.d.ts +36 -0
  64. package/types/QuoteLines.d.ts +541 -0
  65. package/types/QuotePhases.d.ts +164 -0
  66. package/types/QuotePhasesResource.d.ts +67 -0
  67. package/types/Quotes.d.ts +507 -1
  68. package/types/QuotesResource.d.ts +3017 -215
  69. package/types/SetupIntents.d.ts +35 -0
  70. package/types/SetupIntentsResource.d.ts +75 -3
  71. package/types/Sources.d.ts +23 -0
  72. package/types/SubscriptionItems.d.ts +23 -0
  73. package/types/SubscriptionItemsResource.d.ts +147 -0
  74. package/types/SubscriptionSchedules.d.ts +215 -0
  75. package/types/SubscriptionSchedulesResource.d.ts +1094 -2
  76. package/types/Subscriptions.d.ts +32 -0
  77. package/types/SubscriptionsResource.d.ts +411 -0
  78. package/types/Tax/Calculations.d.ts +230 -0
  79. package/types/Tax/CalculationsResource.d.ts +242 -0
  80. package/types/Tax/Registrations.d.ts +75 -0
  81. package/types/Tax/RegistrationsResource.d.ts +111 -0
  82. package/types/Tax/Transactions.d.ts +179 -0
  83. package/types/Tax/TransactionsResource.d.ts +130 -0
  84. package/types/Terminal/Readers.d.ts +52 -0
  85. package/types/Terminal/ReadersResource.d.ts +50 -0
  86. package/types/TestHelpers/Terminal/ReadersResource.d.ts +15 -1
  87. package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
  88. package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
  89. package/types/Treasury/OutboundTransfers.d.ts +26 -0
  90. package/types/Treasury/OutboundTransfersResource.d.ts +26 -0
  91. package/types/Treasury/ReceivedCredits.d.ts +26 -0
  92. package/types/Treasury/ReceivedDebits.d.ts +31 -0
  93. package/types/WebhookEndpointsResource.d.ts +8 -0
  94. package/types/index.d.ts +40 -0
package/CHANGELOG.md CHANGED
@@ -1,9 +1,38 @@
1
1
  # Changelog
2
2
 
3
+ ## 11.7.0-beta.2 - 2023-01-12
4
+ * [#1653](https://github.com/stripe/stripe-node/pull/1653) API Updates for beta branch
5
+ * Updated stable APIs to the latest version
6
+ * Add support for new resource `Tax.Registration`
7
+ * Add support for `create`, `list`, and `update` methods on resource `Registration`
8
+ * Add support for `controller` on `AccountCreateParams` and `AccountUpdateParams`
9
+ * Add support for `application` and `dashboard` on `Account.controller`
10
+ * Change type of `Quote.subscription_data_overrides[].proration_behavior` from `enum('always_invoice'|'create_prorations'|'none')` to `enum('always_invoice'|'create_prorations'|'none') | null`
11
+ * Remove support for `timestamp` on `QuoteLine.actions[].add_discount.discount_end`
12
+ * Change type of `QuoteLine.actions[].add_discount.discount_end.type` from `literal('timestamp')` to `literal('line_ends_at')`
13
+ * Remove support for `index` on `QuoteLine.actions[].add_item.discounts[]`, `QuoteLine.actions[].remove_discount`, `QuoteLine.actions[].set_discounts[]`, `QuoteLine.actions[].set_items[].discounts[]`, `SubscriptionSchedule.phases[].add_invoice_items[].discounts[]`, `SubscriptionSchedule.phases[].discounts[]`, and `SubscriptionSchedule.phases[].items[].discounts[]`
14
+ * Change `QuoteLine.actions[].add_discount.index` to be required
15
+ * Add support for new values `quote.accepting`, `quote.reestimated`, and `quote.stale` on enums `WebhookEndpointCreateParams.enabled_events[]` and `WebhookEndpointUpdateParams.enabled_events[]`
16
+
17
+ * Change `quote.draft_quote` implementation from hitting `POST /v1/quotes/{quote}/draft` to `POST /v1/quotes/{quote}/mark_draft`
18
+
19
+ ## 11.7.0-beta.1 - 2023-01-05
20
+ * [#1648](https://github.com/stripe/stripe-node/pull/1648) API Updates for beta branch
21
+ * Updated stable APIs to the latest version
22
+ * Add support for `mark_stale_quote` method on resource `Quote`
23
+ * Add support for `duration` and `line_ends_at` on `QuoteCreateParams.subscription_data.bill_on_acceptance.bill_until`, `QuoteCreateParams.subscription_data_overrides[].bill_on_acceptance.bill_until`, `QuoteUpdateParams.subscription_data.bill_on_acceptance.bill_until`, and `QuoteUpdateParams.subscription_data_overrides[].bill_on_acceptance.bill_until`
24
+ * Remove support for `line_starts_at` on `QuoteCreateParams.subscription_data.bill_on_acceptance.bill_until`, `QuoteCreateParams.subscription_data_overrides[].bill_on_acceptance.bill_until`, `QuoteUpdateParams.subscription_data.bill_on_acceptance.bill_until`, and `QuoteUpdateParams.subscription_data_overrides[].bill_on_acceptance.bill_until`
25
+ * Add support for `metadata` on `Terminal.Reader.action.refund_payment` and `TerminalReaderRefundPaymentParams`
26
+
3
27
  ## 11.6.0 - 2023-01-05
4
28
  * [#1646](https://github.com/stripe/stripe-node/pull/1646) API Updates
5
29
  * Add support for `card_issuing` on `Issuing.Cardholder.individual`
6
30
 
31
+ ## 11.6.0-beta.1 - 2022-12-22
32
+ * [#1643](https://github.com/stripe/stripe-node/pull/1643) API Updates for beta branch
33
+ * Updated stable APIs to the latest version
34
+ * Move `stripe.taxCalculations` to `stripe.tax.calculations` and `stripe.taxTransactions` to `stripe.tax.transactions`.
35
+
7
36
  ## 11.5.0 - 2022-12-22
8
37
  * [#1642](https://github.com/stripe/stripe-node/pull/1642) API Updates
9
38
  * Add support for new value `merchant_default` on enums `CashBalanceUpdateParams.settings.reconciliation_mode`, `CustomerCreateParams.cash_balance.settings.reconciliation_mode`, and `CustomerUpdateParams.cash_balance.settings.reconciliation_mode`
@@ -11,6 +40,13 @@
11
40
  * Change `CheckoutSessionCreateParams.cancel_url` to be optional
12
41
  * Change type of `Checkout.Session.cancel_url` from `string` to `string | null`
13
42
 
43
+ ## 11.5.0-beta.1 - 2022-12-15
44
+ * [#1640](https://github.com/stripe/stripe-node/pull/1640) API Updates for beta branch
45
+ * Updated stable APIs to the latest version
46
+ * Add support for new resources `QuoteLine`, `TaxCalculation`, and `TaxTransaction`
47
+ * Add support for `create` and `list_line_items` methods on resource `TaxCalculation`
48
+ * Add support for `create_reversal`, `create`, and `retrieve` methods on resource `TaxTransaction`
49
+
14
50
  ## 11.4.0 - 2022-12-15
15
51
  * [#1639](https://github.com/stripe/stripe-node/pull/1639) API Updates
16
52
  * Add support for new value `invoice_overpaid` on enum `CustomerBalanceTransaction.type`
@@ -20,6 +56,12 @@
20
56
  * [#1634](https://github.com/stripe/stripe-node/pull/1634) API Updates
21
57
  * Change `CustomerListPaymentMethodsParams.type` and `PaymentMethodListParams.type` to be optional
22
58
 
59
+ ## 11.3.0-beta.1 - 2022-12-08
60
+ * [#1635](https://github.com/stripe/stripe-node/pull/1635) API Updates for beta branch
61
+ * Updated stable APIs to the latest version
62
+ * [#1633](https://github.com/stripe/stripe-node/pull/1633) API Updates for beta branch
63
+ * Updated stable APIs to the latest version
64
+
23
65
  ## 11.2.0 - 2022-12-06
24
66
  * [#1632](https://github.com/stripe/stripe-node/pull/1632) API Updates
25
67
  * Add support for `flow_data` on `BillingPortalSessionCreateParams`
@@ -43,7 +85,6 @@
43
85
  * Add support for `custom_text` on `Checkout.Session`, `CheckoutSessionCreateParams`, `PaymentLinkCreateParams`, `PaymentLinkUpdateParams`, and `PaymentLink`
44
86
  * Add support for `hosted_instructions_url` on `PaymentIntent.next_action.paynow_display_qr_code`
45
87
 
46
-
47
88
  ## 11.0.0 - 2022-11-16
48
89
 
49
90
  This release includes breaking changes resulting from moving to use the new API version "2022-11-15". To learn more about these changes to Stripe products, see https://stripe.com/docs/upgrades#2022-11-15
@@ -56,62 +97,11 @@ This release includes breaking changes resulting from moving to use the new API
56
97
  * [#1615](https://github.com/stripe/stripe-node/pull/1615) API Updates
57
98
  * ⚠️ Remove support for `tos_shown_and_accepted` on `CheckoutSessionCreateParams.payment_method_options.paynow`. The property was mistakenly released and never worked.
58
99
 
59
- ### ⚠️ Changed
60
- * Drop support for Node.js 8 and 10. We now support Node.js 12+. ((#1579)
61
- * Change `StripeSignatureVerificationError` to have `header` and `payload` fields instead of `detail`. To access these properties, use `err.header` and `err.payload` instead of `err.detail.header` and `err.detail.payload`. (#1574)
62
-
63
- ### ⚠️ Removed
64
- * Remove `Orders` resource. (#1580)
65
- * Remove `SKU` resource (#1583)
66
- * Remove deprecated `CheckoutSessionCreateParams.subscription_data.items`. (#1580)
67
- * Remove deprecated configuration setter methods (`setHost`, `setProtocol`, `setPort`, `setApiVersion`, `setApiKey`, `setTimeout`, `setAppInfo`, `setHttpAgent`, `setMaxNetworkRetries`, and `setTelemetryEnabled`). (#1597)
68
-
69
- Use the config object to set these options instead, for example:
70
- ```typescript
71
- const stripe = Stripe('sk_test_...', {
72
- apiVersion: '2019-08-08',
73
- maxNetworkRetries: 1,
74
- httpAgent: new ProxyAgent(process.env.http_proxy),
75
- timeout: 1000,
76
- host: 'api.example.com',
77
- port: 123,
78
- telemetry: true,
79
- });
80
- ```
81
- * Remove deprecated basic method definitions. (#1600)
82
- Use basic methods defined on the resource instead.
83
- ```typescript
84
- // Before
85
- basicMethods: true
86
-
87
- // After
88
- create: stripeMethod({
89
- method: 'POST',
90
- fullPath: '/v1/resource',
91
- }),
92
- list: stripeMethod({
93
- method: 'GET',
94
- methodType: 'list',
95
- fullPath: '/v1/resource',
96
- }),
97
- retrieve: stripeMethod({
98
- method: 'GET',
99
- fullPath: '/v1/resource/{id}',
100
- }),
101
- update: stripeMethod({
102
- method: 'POST',
103
- fullPath: '/v1/resource/{id}',
104
- }),
105
- // Avoid 'delete' keyword in JS
106
- del: stripeMethod({
107
- method: 'DELETE',
108
- fullPath: '/v1/resource/{id}',
109
- }),
110
- ```
111
- * Remove deprecated option names. Use the following option names instead (`OLD`->`NEW`): `api_key`->`apiKey`, `idempotency_key`->`idempotencyKey`, `stripe_account`->`stripeAccount`, `stripe_version`->`apiVersion`, `stripeVersion`->`apiVersion`. (#1600)
112
- * Remove `charges` field on `PaymentIntent` and replace it with `latest_charge`. (#1614 )
113
- * Remove deprecated `amount` field on `Checkout.Session.LineItem`. (#1614 )
114
- * Remove support for `tos_shown_and_accepted` on `Checkout.Session.PaymentMethodOptions.Paynow`. (#1614 )
100
+ ## 10.18.0-beta.1 - 2022-11-10
101
+ * [#1616](https://github.com/stripe/stripe-node/pull/1616) API Updates for beta branch
102
+ * Updated stable APIs to the latest version
103
+ * Add `discount_end` to `Discount`.
104
+ * Add `url` to `MerchantData`.
115
105
 
116
106
  ## 10.17.0 - 2022-11-08
117
107
  * [#1610](https://github.com/stripe/stripe-node/pull/1610) API Updates
@@ -125,6 +115,22 @@ This release includes breaking changes resulting from moving to use the new API
125
115
  * Add support for `on_behalf_of` on `CheckoutSessionCreateParams.subscription_data`, `SubscriptionCreateParams`, `SubscriptionSchedule.default_settings`, `SubscriptionSchedule.phases[]`, `SubscriptionScheduleCreateParams.default_settings`, `SubscriptionScheduleCreateParams.phases[]`, `SubscriptionScheduleUpdateParams.default_settings`, `SubscriptionScheduleUpdateParams.phases[]`, `SubscriptionUpdateParams`, and `Subscription`
126
116
  * Add support for `tax_behavior` and `tax_code` on `InvoiceItemCreateParams`, `InvoiceItemUpdateParams`, `InvoiceUpcomingLinesParams.invoice_items[]`, and `InvoiceUpcomingParams.invoice_items[]`
127
117
 
118
+ ## 10.16.0-beta.2 - 2022-11-02
119
+ * [#1598](https://github.com/stripe/stripe-node/pull/1598) API Updates for beta branch
120
+ * Updated beta APIs to the latest stable version
121
+ * Add support for `cashappPayments` and `zipPayments` on `Account`.
122
+ * Add support for `cashapp` and `zip` on `Charge`, `PaymentMethod`.
123
+ * Add support for `trialSettings` on `SubscriptionSchedule`.
124
+
125
+ ## 10.16.0-beta.1 - 2022-10-21
126
+ * [#1589](https://github.com/stripe/stripe-node/pull/1589) API Updates for beta branch
127
+ * Updated stable APIs to the latest version
128
+ * Add support for new value `revoked` on enum `CapitalFinancingOfferListParams.status`
129
+ * Add support for `paypal` on `Charge.payment_method_details` and `Source`
130
+ * Add support for `network_data` on `Issuing.Transaction`
131
+ * Add support for new value `paypal` on enum `Source.type`
132
+ * Add support for `billing_cycle_anchor` on `SubscriptionScheduleAmendParams.amendments[]`
133
+
128
134
  ## 10.15.0 - 2022-10-20
129
135
  * [#1588](https://github.com/stripe/stripe-node/pull/1588) API Updates
130
136
  * Add support for new values `jp_trn` and `ke_pin` on enums `Checkout.Session.customer_details.tax_ids[].type`, `Invoice.customer_tax_ids[].type`, `Order.tax_details.tax_ids[].type`, and `TaxId.type`
@@ -132,6 +138,11 @@ This release includes breaking changes resulting from moving to use the new API
132
138
  * Add support for `tipping` on `Terminal.Reader.action.process_payment_intent.process_config` and `TerminalReaderProcessPaymentIntentParams.process_config`
133
139
  * [#1585](https://github.com/stripe/stripe-node/pull/1585) use native UUID method if available
134
140
 
141
+ ## 10.15.0-beta.1 - 2022-10-14
142
+ * Add support for `schedule_settings` on `SubscriptionScheduleAmendParams`
143
+ * Add support for new value `upcoming_invoice` on enum `SubscriptionScheduleAmendParams.amendments[].amendment_end.type`
144
+ * Add support for new values `schedule_end` and `upcoming_invoice` on enum `SubscriptionScheduleAmendParams.amendments[].amendment_start.type`
145
+
135
146
  ## 10.14.0 - 2022-10-13
136
147
  * [#1582](https://github.com/stripe/stripe-node/pull/1582) API Updates
137
148
  * Add support for new values `invalid_representative_country` and `verification_failed_residential_address` on enums `Account.future_requirements.errors[].code`, `Account.requirements.errors[].code`, `Capability.future_requirements.errors[].code`, `Capability.requirements.errors[].code`, `Person.future_requirements.errors[].code`, and `Person.requirements.errors[].code`
@@ -139,6 +150,11 @@ This release includes breaking changes resulting from moving to use the new API
139
150
  * Add support for `network_data` on `Issuing.Authorization`
140
151
  * ⚠️ Remove `currency`, `description`, `images`, and `name` from `Checkout.SessionCreateParams`. These properties do not work on the latest API version. (fixes #1575)
141
152
 
153
+ ## 10.14.0-beta.1 - 2022-10-07
154
+ * [#1572](https://github.com/stripe/stripe-node/pull/1572) API Updates for beta branch
155
+ * Updated stable APIs to the latest version
156
+ * Add `reference_id` to `Paypal` interface.
157
+
142
158
  ## 10.13.0 - 2022-10-06
143
159
  * [#1571](https://github.com/stripe/stripe-node/pull/1571) API Updates
144
160
  * Add support for new value `invalid_dob_age_under_18` on enums `Account.future_requirements.errors[].code`, `Account.requirements.errors[].code`, `Capability.future_requirements.errors[].code`, `Capability.requirements.errors[].code`, `Person.future_requirements.errors[].code`, and `Person.requirements.errors[].code`
@@ -159,6 +175,11 @@ This release includes breaking changes resulting from moving to use the new API
159
175
  * [#1562](https://github.com/stripe/stripe-node/pull/1562) Restore lib after generating
160
176
  * [#1551](https://github.com/stripe/stripe-node/pull/1551) Re-introduce Typescript changes
161
177
 
178
+ ## 10.12.0-beta.1 - 2022-09-26
179
+ * [#1561](https://github.com/stripe/stripe-node/pull/1561) API Updates for beta branch
180
+ * Updated stable APIs to the latest version
181
+ * Add `FinancingOffer`, `FinancingSummary` and `FinancingTransaction` resources.
182
+
162
183
  ## 10.11.0 - 2022-09-22
163
184
  * [#1560](https://github.com/stripe/stripe-node/pull/1560) API Updates
164
185
  * Add support for `terms_of_service` on `Checkout.Session.consent_collection`, `Checkout.Session.consent`, `CheckoutSessionCreateParams.consent_collection`, `PaymentLink.consent_collection`, and `PaymentLinkCreateParams.consent_collection`
@@ -166,7 +187,6 @@ This release includes breaking changes resulting from moving to use the new API
166
187
  * Add support for `statement_descriptor` on `PaymentIntentIncrementAuthorizationParams`
167
188
  * Change `SubscriptionSchedule.phases[].currency` to be required
168
189
 
169
-
170
190
  ## 10.10.0 - 2022-09-15
171
191
  * [#1552](https://github.com/stripe/stripe-node/pull/1552) API Updates
172
192
  * Add support for `pix` on `Charge.payment_method_details`, `Checkout.Session.payment_method_options`, `CheckoutSessionCreateParams.payment_method_options`, `PaymentIntent.payment_method_options`, `PaymentIntentConfirmParams.payment_method_data`, `PaymentIntentConfirmParams.payment_method_options`, `PaymentIntentCreateParams.payment_method_data`, `PaymentIntentCreateParams.payment_method_options`, `PaymentIntentUpdateParams.payment_method_data`, `PaymentIntentUpdateParams.payment_method_options`, `PaymentMethodCreateParams`, `PaymentMethod`, `SetupIntentConfirmParams.payment_method_data`, `SetupIntentCreateParams.payment_method_data`, and `SetupIntentUpdateParams.payment_method_data`
@@ -209,6 +229,11 @@ This release includes breaking changes resulting from moving to use the new API
209
229
  * [#1532](https://github.com/stripe/stripe-node/pull/1532) Update coveralls step to run for one node version, remove finish step
210
230
  * [#1531](https://github.com/stripe/stripe-node/pull/1531) Regen yarn.lock.
211
231
 
232
+ ## 10.6.0-beta.1 - 2022-08-26
233
+ * [#1529](https://github.com/stripe/stripe-node/pull/1529) API Updates for beta branch
234
+ * Updated stable APIs to the latest version
235
+ * Add support for the beta [Gift Card API](https://stripe.com/docs/gift-cards).
236
+
212
237
  ## 10.5.0 - 2022-08-24
213
238
  * [#1527](https://github.com/stripe/stripe-node/pull/1527) fix: Update FetchHttpClient to send empty string for empty POST/PUT/PATCH requests.
214
239
  * [#1528](https://github.com/stripe/stripe-node/pull/1528) Update README.md to use a new NOTE notation
@@ -223,6 +248,11 @@ This release includes breaking changes resulting from moving to use the new API
223
248
  * Change the return type of `Customer.fundCashBalance` test helper from `CustomerBalanceTransaction` to `CustomerCashBalanceTransaction`.
224
249
  * This would generally be considered a breaking change, but we've worked with all existing users to migrate and are comfortable releasing this as a minor as it is solely a test helper method. This was essentially broken prior to this change.
225
250
 
251
+ ## 10.4.0-beta.1 - 2022-08-23
252
+ * [#1523](https://github.com/stripe/stripe-node/pull/1523) API Updates for beta branch
253
+ - Updated stable APIs to the latest version
254
+ - `Stripe-Version` beta headers are not pinned by-default and need to be manually specified, please refer to [beta SDKs README section](https://github.com/stripe/stripe-node/blob/master/README.md#beta-sdks)
255
+ * [#1521](https://github.com/stripe/stripe-node/pull/1521) fix: Update FetchHttpClient to send empty string for empty POST/PUT/PATCH requests.
226
256
 
227
257
  ## 10.3.0 - 2022-08-19
228
258
  * [#1516](https://github.com/stripe/stripe-node/pull/1516) API Updates
@@ -235,11 +265,15 @@ This release includes breaking changes resulting from moving to use the new API
235
265
  * Add support for new value `customer_cash_balance_transaction.created` on enums `WebhookEndpointCreateParams.enabled_events[]` and `WebhookEndpointUpdateParams.enabled_events[]`
236
266
  * [#1515](https://github.com/stripe/stripe-node/pull/1515) Add a support section to the readme
237
267
 
268
+ ## 10.3.0-beta.1 - 2022-08-11
269
+ * [#1511](https://github.com/stripe/stripe-node/pull/1511) API Updates for beta branch
270
+ - Updated stable APIs to the latest version
271
+ - Add refund_payment method to Terminal resource
272
+
238
273
  ## 10.2.0 - 2022-08-11
239
274
  * [#1510](https://github.com/stripe/stripe-node/pull/1510) API Updates
240
275
  * Add support for `payment_method_collection` on `Checkout.Session`, `CheckoutSessionCreateParams`, `PaymentLinkCreateParams`, `PaymentLinkUpdateParams`, and `PaymentLink`
241
276
 
242
-
243
277
  ## 10.1.0 - 2022-08-09
244
278
  * [#1506](https://github.com/stripe/stripe-node/pull/1506) API Updates
245
279
  * Add support for `process_config` on `Terminal.Reader.action.process_payment_intent`
@@ -249,50 +283,22 @@ This release includes breaking changes resulting from moving to use the new API
249
283
  * [#1503](https://github.com/stripe/stripe-node/pull/1503) API Updates
250
284
  * Add support for `expires_at` on `Apps.Secret` and `AppsSecretCreateParams`
251
285
 
286
+ ## 10.1.0-beta.1 - 2022-08-03
287
+ * [#1498](https://github.com/stripe/stripe-node/pull/1498) API Updates for beta branch
288
+ - Updated stable APIs to the latest version
289
+ - Added the `Order` resource support
290
+
252
291
  ## 10.0.0 - 2022-08-02
253
292
 
254
- This release includes breaking changes resulting from:
293
+ Major version release for API version 2022-08-01. Default API version changed to "2022-08-01".
255
294
 
256
- * Moving to use the new API version "2022-08-01". To learn more about these changes to Stripe products, see https://stripe.com/docs/upgrades#2022-08-01
257
- * Cleaning up the SDK to remove deprecated/unused APIs and rename classes/methods/properties to sync with product APIs. Read more detailed description at https://github.com/stripe/stripe-node/wiki/Migration-guide-for-v10.
295
+ Breaking changes that arose during code generation of the library that we postponed for the next major version. For changes to the SDK, read more detailed description at https://github.com/stripe/stripe-node/wiki/Migration-guide-for-v10. For changes to the Stripe products, read more at https://stripe.com/docs/upgrades#2022-08-01.
258
296
 
259
297
  "⚠️" symbol highlights breaking changes.
260
298
 
261
299
  * [#1497](https://github.com/stripe/stripe-node/pull/1497) API Updates
262
300
  * [#1493](https://github.com/stripe/stripe-node/pull/1493) Next major release changes
263
301
 
264
- ### Added
265
- * Add support for new value `invalid_tos_acceptance` on enums `Account.future_requirements.errors[].code`, `Account.requirements.errors[].code`, `Capability.future_requirements.errors[].code`, `Capability.requirements.errors[].code`, `Person.future_requirements.errors[].code`, and `Person.requirements.errors[].code`
266
- * Add support for `shipping_cost` and `shipping_details` on `Checkout.Session`
267
-
268
- ### ⚠️ Changed
269
- * Change type of `business_profile`, `business_type`, `country`, `default_currency`, and `settings` properties on `Account` resource to be nullable.
270
- * Change type of `currency` property on `Checkout.Session` resource from `string` to `'cad' | 'usd'`.
271
- * Change location of TypeScript definitions for `CreditNoteLineItemListPreviewParams`, `CreditNoteLineItemListPreviewParams.Line`, `CreditNoteLineItemListPreviewParams.Line.Type`, and `CreditNoteLineItemListPreviewParams.Line.Reason` interfaces from `CreditNoteLineItems.d.ts` to `CreditNotes.d.ts`.
272
- * Change type of `address`, `currency`, `delinquent`, `discount`, `invoice_prefix`, `name`, `phone`, and `preferred_locales` properties on `Customer` resource to be nullable.
273
- * Rename `InvoiceRetrieveUpcomingParams` to `InvoiceListUpcomingLinesParams`.
274
-
275
- ### ⚠️ Removed
276
- * Remove for `AlipayAccount`, `DeletedAlipayAccount`, `BitcoinReceiver`, `DeletedBitcoinReceiver`, `BitcoinTransaction`, and `BitcoinTransactionListParams` definitions.
277
- * Remove `AlipayAccount` and `BitcoinReceiver` from `CustomerSource`.
278
- * Remove `Stripe.DeletedAlipayAccount` and `Stripe.DeletedBitcoinReceiver` from possible values of `source` property in `PaymentIntent`.
279
- * Remove `IssuerFraudRecord`, `IssuerFraudRecordRetrieveParams`, `IssuerFraudRecordListParams`, and `IssuerFraudRecordsResource`, definitions.
280
- * Remove `treasury.received_credit.reversed` webhook event constant. Please use `treasury.received_credit.returned` instead.
281
- * Remove `order.payment_failed`, `transfer.failed`, and `transfer.paid`. The events were deprecated.
282
- * Remove `retrieveDetails` method from `Issuing.Card` resource. The method was unsupported. Read more at https://stripe.com/docs/issuing/cards/virtual.
283
- * Remove `Issuing.CardDetails` and `CardRetrieveDetailsParams` definition.
284
- * Remove `IssuerFraudRecords` resource.
285
- * Remove `Recipient` resource and`recipient` property from `Card` resource.
286
- * Remove `InvoiceMarkUncollectibleParams` definition.
287
- * Remove deprecated `Stripe.Errors` and `StripeError` (and derived `StripeCardError`, `StripeInvalidRequestError`, `StripeAPIError`, `StripeAuthenticationError`, `StripePermissionError`, `StripeRateLimitError`, `StripeConnectionError`, `StripeSignatureVerificationError`, `StripeIdempotencyError`, and `StripeInvalidGrantError`) definitions.
288
- * Remove `redirect_url` from `LoginLinks` definition. The property is no longer supported.
289
- * Remove `LineItemListParams` definition. The interface was no longer in use.
290
-
291
- ### ⚠️ Renamed
292
- * Rename `listUpcomingLineItems` method on `Invoice` resource to `listUpcomingLines`.
293
- * Rename `InvoiceLineItemListUpcomingParams` to `InvoiceListUpcomingLinesParams`.
294
- * Rename `InvoiceRetrieveUpcomingParams` to `InvoiceListUpcomingLinesParams`.
295
-
296
302
  ## 9.16.0 - 2022-07-26
297
303
  * [#1492](https://github.com/stripe/stripe-node/pull/1492) API Updates
298
304
  * Add support for new value `exempted` on enums `Charge.payment_method_details.card.three_d_secure.result` and `SetupAttempt.payment_method_details.card.three_d_secure.result`
@@ -309,6 +315,20 @@ This release includes breaking changes resulting from:
309
315
  * Add support for `mandate` on `InvoicePayParams`
310
316
  * Add support for `product_data` on `OrderCreateParams.line_items[]` and `OrderUpdateParams.line_items[]`
311
317
 
318
+ ## 9.15.0-beta.1 - 2022-07-22
319
+ * [#1485](https://github.com/stripe/stripe-node/pull/1485) API Updates for beta branch
320
+ - Updated stable APIs to the latest version
321
+ * [#1483](https://github.com/stripe/stripe-node/pull/1483) API Updates for beta branch
322
+ - Updated stable APIs to the latest version
323
+ - Add `QuotePhase` resource
324
+ * [#1479](https://github.com/stripe/stripe-node/pull/1479) API Updates for beta branch
325
+ - Updated stable APIs to the latest version
326
+ - Add `Price.migrate_to` property
327
+ - Add `SubscriptionSchedule.amend` method.
328
+ - Add `Discount.subscription_item` property.
329
+ - Add `Quote.subscription_data.billing_behavior`, `billing_cycle_anchor`, `end_behavior`, `from_schedule`, `from_subscription`, `prebilling`, `proration_behavior` properties.
330
+ - Add `phases` parameter to `Quote.create`
331
+ - Add `Subscription.discounts`, `prebilling` properties.
312
332
 
313
333
  ## 9.14.0 - 2022-07-18
314
334
  * [#1477](https://github.com/stripe/stripe-node/pull/1477) API Updates
@@ -331,6 +351,18 @@ This release includes breaking changes resulting from:
331
351
  * Change `Transfer.source_type` to be optional and not nullable
332
352
  * [#1471](https://github.com/stripe/stripe-node/pull/1471) Update readme to include a note on beta packages
333
353
 
354
+ ## 9.13.0-beta.1 - 2022-07-07
355
+ * [#1469](https://github.com/stripe/stripe-node/pull/1469) API Updates for beta branch
356
+ - Include `server_side_confirmation_beta=v1` beta
357
+ - Add `secretKeyConfirmation` to `PaymentIntent`
358
+ * [#1451](https://github.com/stripe/stripe-node/pull/1451) API Updates
359
+ - Updated stable APIs to the latest version
360
+ * [#1457](https://github.com/stripe/stripe-node/pull/1457) Use the generated API version
361
+ * [#1445](https://github.com/stripe/stripe-node/pull/1445) Support updating pre-release versions
362
+ * [#1442](https://github.com/stripe/stripe-node/pull/1442) API Updates
363
+ * Add support for `network_details` method on resource `ReceivedCredits`/`ReceivedDebits`
364
+ * [#1444](https://github.com/stripe/stripe-node/pull/1444) Merge master branch into beta branch
365
+
334
366
  ## 9.12.0 - 2022-07-07
335
367
  * [#1468](https://github.com/stripe/stripe-node/pull/1468) API Updates
336
368
  * Add support for `currency` on `CheckoutSessionCreateParams`, `InvoiceUpcomingLinesParams`, `InvoiceUpcomingParams`, `PaymentLinkCreateParams`, `SubscriptionCreateParams`, `SubscriptionSchedule.phases[]`, `SubscriptionScheduleCreateParams.phases[]`, `SubscriptionScheduleUpdateParams.phases[]`, and `Subscription`
@@ -393,6 +425,10 @@ This release includes breaking changes resulting from:
393
425
  * Change type of `Order.payment.settings.payment_method_options.customer_balance.bank_transfer.requested_address_types[]`, `OrderCreateParams.payment.settings.payment_method_options.customer_balance.bank_transfer.requested_address_types[]`, `OrderUpdateParams.payment.settings.payment_method_options.customer_balance.bank_transfer.requested_address_types[]`, `PaymentIntent.payment_method_options.customer_balance.bank_transfer.requested_address_types[]`, `PaymentIntentConfirmParams.payment_method_options.customer_balance.bank_transfer.requested_address_types[]`, `PaymentIntentCreateParams.payment_method_options.customer_balance.bank_transfer.requested_address_types[]`, and `PaymentIntentUpdateParams.payment_method_options.customer_balance.bank_transfer.requested_address_types[]` from `literal('zengin')` to `enum`
394
426
  * Add support for `custom_unit_amount` on `PriceCreateParams` and `Price`
395
427
 
428
+ ## 9.8.0-beta.1 - 2022-06-08
429
+ * [#1442](https://github.com/stripe/stripe-node/pull/1442) API Updates
430
+ * Add support for `network_details` method on resource `ReceivedCredits`/`ReceivedDebits`
431
+
396
432
  ## 9.7.0 - 2022-06-08
397
433
  * [#1441](https://github.com/stripe/stripe-node/pull/1441) API Updates
398
434
  * Add support for `affirm`, `bancontact`, `card`, `ideal`, `p24`, and `sofort` on `Checkout.Session.payment_method_options` and `CheckoutSessionCreateParams.payment_method_options`
@@ -413,7 +449,6 @@ This release includes breaking changes resulting from:
413
449
  * Add support for `network` on `SetupIntent.payment_method_options.card`
414
450
  * Add support for new value `simulated_wisepos_e` on enums `Terminal.Reader.device_type` and `TerminalReaderListParams.device_type`
415
451
 
416
-
417
452
  ## 9.5.0 - 2022-05-26
418
453
  * [#1434](https://github.com/stripe/stripe-node/pull/1434) API Updates
419
454
  * Add support for `affirm_payments` and `link_payments` on `Account.capabilities`, `AccountCreateParams.capabilities`, and `AccountUpdateParams.capabilities`
@@ -484,7 +519,6 @@ Major version release - The [migration guide](https://github.com/stripe/stripe-n
484
519
  * Add support for `default_price` on `ProductUpdateParams` and `Product`
485
520
  * Add support for `instructions_email` on `RefundCreateParams` and `Refund`
486
521
 
487
-
488
522
  ## 8.221.0 - 2022-05-05
489
523
  * [#1413](https://github.com/stripe/stripe-node/pull/1413) API Updates
490
524
  * Add support for new resources `FinancialConnections.AccountOwner`, `FinancialConnections.AccountOwnership`, `FinancialConnections.Account`, and `FinancialConnections.Session`
@@ -761,7 +795,6 @@ Major version release - The [migration guide](https://github.com/stripe/stripe-n
761
795
  * [#1297](https://github.com/stripe/stripe-node/pull/1297) API Updates
762
796
  * Add support for `automatic_payment_methods` on `PaymentIntentCreateParams` and `PaymentIntent`
763
797
 
764
-
765
798
  ## 8.189.0 - 2021-11-16
766
799
  * [#1295](https://github.com/stripe/stripe-node/pull/1295) API Updates
767
800
  * Add support for new resource `ShippingRate`
@@ -784,7 +817,6 @@ Major version release - The [migration guide](https://github.com/stripe/stripe-n
784
817
  * Remove support for `ownership_declaration_shown_and_signed` on `TokenCreateParams.account`. This API was unused.
785
818
  * Add support for `ownership_declaration_shown_and_signed` on `TokenCreateParams.account.company`
786
819
 
787
-
788
820
  ## 8.186.0 - 2021-11-01
789
821
  * [#1283](https://github.com/stripe/stripe-node/pull/1283) API Updates
790
822
  * Add support for `ownership_declaration` on `AccountUpdateParams.company`, `AccountCreateParams.company`, `Account.company`, and `TokenCreateParams.account.company`
@@ -928,7 +960,6 @@ Major version release - The [migration guide](https://github.com/stripe/stripe-n
928
960
  * Add support for `wallet` on `Issuing.Transaction`
929
961
  * Add support for `ideal` on `PaymentIntentCreateParams.payment_method_options`, `PaymentIntentUpdateParams.payment_method_options`, `PaymentIntentConfirmParams.payment_method_options`, and `PaymentIntent.payment_method_options`
930
962
 
931
-
932
963
  ## 8.163.0 - 2021-07-15
933
964
  * [#1102](https://github.com/stripe/stripe-node/pull/1102), [#1191](https://github.com/stripe/stripe-node/pull/1191) Add support for `stripeAccount` when initializing the client
934
965
 
@@ -2461,7 +2492,7 @@ Pull requests included in this release (cf. [#606](https://github.com/stripe/str
2461
2492
 
2462
2493
  - [BUGFIX] Fix incorrect deleteDiscount method & related spec(s)
2463
2494
 
2464
- ### 2.2.1 - 2013-12-01
2495
+ ## 2.2.1 - 2013-12-01
2465
2496
 
2466
2497
  - [BUGFIX] Fix user-agent header issue (see issue #75)
2467
2498
 
@@ -2524,3 +2555,4 @@ Pull requests included in this release (cf. [#606](https://github.com/stripe/str
2524
2555
  ## 0.0.2 - 2011-09-28
2525
2556
 
2526
2557
  - Initial release with customers and tokens APIs
2558
+
package/VERSION CHANGED
@@ -1 +1 @@
1
- 11.6.0
1
+ 11.7.0-beta.2
package/lib/Webhooks.js CHANGED
@@ -14,8 +14,10 @@ const Webhook = {
14
14
  tolerance || Webhook.DEFAULT_TOLERANCE,
15
15
  cryptoProvider
16
16
  );
17
- // @ts-ignore
18
- const jsonPayload = JSON.parse(payload);
17
+ const jsonPayload =
18
+ payload instanceof Uint8Array
19
+ ? JSON.parse(new TextDecoder('utf8').decode(payload))
20
+ : JSON.parse(payload);
19
21
  return jsonPayload;
20
22
  },
21
23
  async constructEventAsync(
@@ -32,8 +34,10 @@ const Webhook = {
32
34
  tolerance || Webhook.DEFAULT_TOLERANCE,
33
35
  cryptoProvider
34
36
  );
35
- // @ts-ignore
36
- const jsonPayload = JSON.parse(payload);
37
+ const jsonPayload =
38
+ payload instanceof Uint8Array
39
+ ? JSON.parse(new TextDecoder('utf8').decode(payload))
40
+ : JSON.parse(payload);
37
41
  return jsonPayload;
38
42
  },
39
43
  /**
@@ -128,9 +132,11 @@ function makeHMACContent(payload, details) {
128
132
  return `${details.timestamp}.${payload}`;
129
133
  }
130
134
  function parseEventDetails(encodedPayload, encodedHeader, expectedScheme) {
131
- const decodedPayload = Buffer.isBuffer(encodedPayload)
132
- ? encodedPayload.toString('utf8')
133
- : encodedPayload;
135
+ const textDecoder = new TextDecoder('utf8');
136
+ const decodedPayload =
137
+ encodedPayload instanceof Uint8Array
138
+ ? textDecoder.decode(encodedPayload)
139
+ : encodedPayload;
134
140
  // Express's type for `Request#headers` is `string | []string`
135
141
  // which is because the `set-cookie` header is an array,
136
142
  // but no other headers are an array (docs: https://nodejs.org/api/http.html#http_message_headers)
@@ -140,9 +146,10 @@ function parseEventDetails(encodedPayload, encodedHeader, expectedScheme) {
140
146
  'Unexpected: An array was passed as a header, which should not be possible for the stripe-signature header.'
141
147
  );
142
148
  }
143
- const decodedHeader = Buffer.isBuffer(encodedHeader)
144
- ? encodedHeader.toString('utf8')
145
- : encodedHeader;
149
+ const decodedHeader =
150
+ encodedHeader instanceof Uint8Array
151
+ ? textDecoder.decode(encodedHeader)
152
+ : encodedHeader;
146
153
  const details = parseHeader(decodedHeader, expectedScheme);
147
154
  if (!details || details.timestamp === -1) {
148
155
  throw new StripeSignatureVerificationError(decodedHeader, decodedPayload, {
package/lib/multipart.js CHANGED
@@ -11,14 +11,17 @@ const multipartDataGenerator = (method, data, headers) => {
11
11
  Math.round(Math.random() * 1e16) + Math.round(Math.random() * 1e16)
12
12
  ).toString();
13
13
  headers['Content-Type'] = `multipart/form-data; boundary=${segno}`;
14
- let buffer = Buffer.alloc(0);
14
+ const textEncoder = new TextEncoder();
15
+ let buffer = new Uint8Array(0);
16
+ const endBuffer = textEncoder.encode('\r\n');
15
17
  function push(l) {
16
18
  const prevBuffer = buffer;
17
- const newBuffer = l instanceof Buffer ? l : Buffer.from(l);
18
- buffer = Buffer.alloc(prevBuffer.length + newBuffer.length + 2);
19
- prevBuffer.copy(buffer);
20
- newBuffer.copy(buffer, prevBuffer.length);
21
- buffer.write('\r\n', buffer.length - 2);
19
+ const newBuffer =
20
+ l instanceof Uint8Array ? l : new Uint8Array(textEncoder.encode(l));
21
+ buffer = new Uint8Array(prevBuffer.length + newBuffer.length + 2);
22
+ buffer.set(prevBuffer);
23
+ buffer.set(newBuffer, prevBuffer.length);
24
+ buffer.set(endBuffer, buffer.length - 2);
22
25
  }
23
26
  function q(s) {
24
27
  return `"${s.replace(/"|"/g, '%22').replace(/\r\n|\r|\n/g, ' ')}"`;
@@ -55,7 +58,7 @@ const streamProcessor = (method, data, headers, callback) => {
55
58
  .once('end', () => {
56
59
  // @ts-ignore
57
60
  const bufferData = Object.assign({}, data);
58
- bufferData.file.data = Buffer.concat(bufferArray);
61
+ bufferData.file.data = utils.concat(bufferArray);
59
62
  const buffer = multipartDataGenerator(method, bufferData, headers);
60
63
  callback(null, buffer);
61
64
  })
@@ -0,0 +1,10 @@
1
+ // File generated from our OpenAPI spec
2
+ 'use strict';
3
+ const StripeResource = require('../StripeResource');
4
+ const stripeMethod = StripeResource.method;
5
+ module.exports = StripeResource.extend({
6
+ create: stripeMethod({
7
+ method: 'POST',
8
+ fullPath: '/v1/account_sessions',
9
+ }),
10
+ });
@@ -0,0 +1,19 @@
1
+ // File generated from our OpenAPI spec
2
+ 'use strict';
3
+ const StripeResource = require('../../StripeResource');
4
+ const stripeMethod = StripeResource.method;
5
+ module.exports = StripeResource.extend({
6
+ retrieve: stripeMethod({
7
+ method: 'GET',
8
+ fullPath: '/v1/capital/financing_offers/{financing_offer}',
9
+ }),
10
+ list: stripeMethod({
11
+ method: 'GET',
12
+ fullPath: '/v1/capital/financing_offers',
13
+ methodType: 'list',
14
+ }),
15
+ markDelivered: stripeMethod({
16
+ method: 'POST',
17
+ fullPath: '/v1/capital/financing_offers/{financing_offer}/mark_delivered',
18
+ }),
19
+ });
@@ -0,0 +1,10 @@
1
+ // File generated from our OpenAPI spec
2
+ 'use strict';
3
+ const StripeResource = require('../../StripeResource');
4
+ const stripeMethod = StripeResource.method;
5
+ module.exports = StripeResource.extend({
6
+ retrieve: stripeMethod({
7
+ method: 'GET',
8
+ fullPath: '/v1/capital/financing_summary',
9
+ }),
10
+ });
@@ -0,0 +1,15 @@
1
+ // File generated from our OpenAPI spec
2
+ 'use strict';
3
+ const StripeResource = require('../../StripeResource');
4
+ const stripeMethod = StripeResource.method;
5
+ module.exports = StripeResource.extend({
6
+ retrieve: stripeMethod({
7
+ method: 'GET',
8
+ fullPath: '/v1/capital/financing_transactions/{financing_transaction}',
9
+ }),
10
+ list: stripeMethod({
11
+ method: 'GET',
12
+ fullPath: '/v1/capital/financing_transactions',
13
+ methodType: 'list',
14
+ }),
15
+ });
@@ -0,0 +1,27 @@
1
+ // File generated from our OpenAPI spec
2
+ 'use strict';
3
+ const StripeResource = require('../../StripeResource');
4
+ const stripeMethod = StripeResource.method;
5
+ module.exports = StripeResource.extend({
6
+ create: stripeMethod({
7
+ method: 'POST',
8
+ fullPath: '/v1/gift_cards/cards',
9
+ }),
10
+ retrieve: stripeMethod({
11
+ method: 'GET',
12
+ fullPath: '/v1/gift_cards/cards/{id}',
13
+ }),
14
+ update: stripeMethod({
15
+ method: 'POST',
16
+ fullPath: '/v1/gift_cards/cards/{id}',
17
+ }),
18
+ list: stripeMethod({
19
+ method: 'GET',
20
+ fullPath: '/v1/gift_cards/cards',
21
+ methodType: 'list',
22
+ }),
23
+ validate: stripeMethod({
24
+ method: 'POST',
25
+ fullPath: '/v1/gift_cards/cards/validate',
26
+ }),
27
+ });
@@ -0,0 +1,31 @@
1
+ // File generated from our OpenAPI spec
2
+ 'use strict';
3
+ const StripeResource = require('../../StripeResource');
4
+ const stripeMethod = StripeResource.method;
5
+ module.exports = StripeResource.extend({
6
+ create: stripeMethod({
7
+ method: 'POST',
8
+ fullPath: '/v1/gift_cards/transactions',
9
+ }),
10
+ retrieve: stripeMethod({
11
+ method: 'GET',
12
+ fullPath: '/v1/gift_cards/transactions/{id}',
13
+ }),
14
+ update: stripeMethod({
15
+ method: 'POST',
16
+ fullPath: '/v1/gift_cards/transactions/{id}',
17
+ }),
18
+ list: stripeMethod({
19
+ method: 'GET',
20
+ fullPath: '/v1/gift_cards/transactions',
21
+ methodType: 'list',
22
+ }),
23
+ cancel: stripeMethod({
24
+ method: 'POST',
25
+ fullPath: '/v1/gift_cards/transactions/{id}/cancel',
26
+ }),
27
+ confirm: stripeMethod({
28
+ method: 'POST',
29
+ fullPath: '/v1/gift_cards/transactions/{id}/confirm',
30
+ }),
31
+ });