stripe 16.5.0 → 16.6.0-beta.1

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 (161) hide show
  1. package/CHANGELOG.md +779 -109
  2. package/README.md +33 -0
  3. package/VERSION +1 -1
  4. package/cjs/RequestSender.js +66 -5
  5. package/cjs/StripeResource.js +1 -1
  6. package/cjs/apiVersion.js +2 -1
  7. package/cjs/multipart.js +1 -1
  8. package/cjs/resources/AccountNotices.js +21 -0
  9. package/cjs/resources/Billing/Alerts.js +27 -0
  10. package/cjs/resources/Capital/FinancingOffers.js +21 -0
  11. package/cjs/resources/Capital/FinancingSummary.js +12 -0
  12. package/cjs/resources/Capital/FinancingTransactions.js +17 -0
  13. package/cjs/resources/FinancialConnections/Accounts.js +5 -0
  14. package/cjs/resources/FinancialConnections/Institutions.js +17 -0
  15. package/cjs/resources/GiftCards/Cards.js +23 -0
  16. package/cjs/resources/GiftCards/Transactions.js +33 -0
  17. package/cjs/resources/Invoices.js +13 -0
  18. package/cjs/resources/Issuing/CreditUnderwritingRecords.js +33 -0
  19. package/cjs/resources/Margins.js +22 -0
  20. package/cjs/resources/OAuth.js +1 -1
  21. package/cjs/resources/Orders.js +24 -0
  22. package/cjs/resources/PaymentIntents.js +4 -0
  23. package/cjs/resources/QuotePhases.js +22 -0
  24. package/cjs/resources/Quotes.js +32 -0
  25. package/cjs/resources/SubscriptionSchedules.js +4 -0
  26. package/cjs/resources/Tax/Associations.js +9 -0
  27. package/cjs/resources/Tax/Forms.js +20 -0
  28. package/cjs/resources/Terminal/Readers.js +12 -0
  29. package/cjs/resources.js +42 -10
  30. package/cjs/stripe.core.js +6 -3
  31. package/cjs/utils.js +30 -3
  32. package/esm/RequestSender.js +67 -6
  33. package/esm/StripeResource.js +2 -2
  34. package/esm/apiVersion.js +1 -0
  35. package/esm/multipart.js +2 -2
  36. package/esm/resources/AccountNotices.js +18 -0
  37. package/esm/resources/Billing/Alerts.js +24 -0
  38. package/esm/resources/Capital/FinancingOffers.js +18 -0
  39. package/esm/resources/Capital/FinancingSummary.js +9 -0
  40. package/esm/resources/Capital/FinancingTransactions.js +14 -0
  41. package/esm/resources/FinancialConnections/Accounts.js +5 -0
  42. package/esm/resources/FinancialConnections/Institutions.js +14 -0
  43. package/esm/resources/GiftCards/Cards.js +20 -0
  44. package/esm/resources/GiftCards/Transactions.js +30 -0
  45. package/esm/resources/Invoices.js +13 -0
  46. package/esm/resources/Issuing/CreditUnderwritingRecords.js +30 -0
  47. package/esm/resources/Margins.js +19 -0
  48. package/esm/resources/OAuth.js +2 -2
  49. package/esm/resources/Orders.js +21 -0
  50. package/esm/resources/PaymentIntents.js +4 -0
  51. package/esm/resources/QuotePhases.js +19 -0
  52. package/esm/resources/Quotes.js +32 -0
  53. package/esm/resources/SubscriptionSchedules.js +4 -0
  54. package/esm/resources/Tax/Associations.js +6 -0
  55. package/esm/resources/Tax/Forms.js +17 -0
  56. package/esm/resources/Terminal/Readers.js +12 -0
  57. package/esm/resources.js +28 -0
  58. package/esm/stripe.core.js +6 -3
  59. package/esm/utils.js +27 -1
  60. package/package.json +1 -1
  61. package/types/AccountLinksResource.d.ts +5 -1
  62. package/types/AccountNotices.d.ts +113 -0
  63. package/types/AccountNoticesResource.d.ts +98 -0
  64. package/types/AccountSessions.d.ts +15 -0
  65. package/types/AccountSessionsResource.d.ts +163 -0
  66. package/types/Accounts.d.ts +106 -1
  67. package/types/AccountsResource.d.ts +246 -0
  68. package/types/Billing/AlertTriggereds.d.ts +42 -0
  69. package/types/Billing/Alerts.d.ts +80 -0
  70. package/types/Billing/AlertsResource.d.ts +176 -0
  71. package/types/Capital/FinancingOffers.d.ts +188 -0
  72. package/types/Capital/FinancingOffersResource.d.ts +97 -0
  73. package/types/Capital/FinancingSummary.d.ts +106 -0
  74. package/types/Capital/FinancingSummaryResource.d.ts +27 -0
  75. package/types/Capital/FinancingTransactions.d.ts +135 -0
  76. package/types/Capital/FinancingTransactionsResource.d.ts +68 -0
  77. package/types/Charges.d.ts +68 -1
  78. package/types/ChargesResource.d.ts +1294 -0
  79. package/types/Checkout/Sessions.d.ts +28 -1
  80. package/types/Checkout/SessionsResource.d.ts +15 -1
  81. package/types/ConfirmationTokens.d.ts +62 -0
  82. package/types/Coupons.d.ts +1 -1
  83. package/types/CouponsResource.d.ts +1 -1
  84. package/types/CreditNotes.d.ts +21 -0
  85. package/types/CreditNotesResource.d.ts +51 -0
  86. package/types/CustomersResource.d.ts +2 -0
  87. package/types/Disputes.d.ts +168 -0
  88. package/types/DisputesResource.d.ts +120 -0
  89. package/types/EventTypes.d.ts +443 -0
  90. package/types/Events.d.ts +84 -0
  91. package/types/FinancialConnections/AccountInferredBalances.d.ts +38 -0
  92. package/types/FinancialConnections/Accounts.d.ts +29 -1
  93. package/types/FinancialConnections/AccountsResource.d.ts +35 -3
  94. package/types/FinancialConnections/Institutions.d.ts +93 -0
  95. package/types/FinancialConnections/InstitutionsResource.d.ts +47 -0
  96. package/types/FinancialConnections/Sessions.d.ts +49 -1
  97. package/types/FinancialConnections/SessionsResource.d.ts +38 -1
  98. package/types/GiftCards/Cards.d.ts +118 -0
  99. package/types/GiftCards/CardsResource.d.ts +159 -0
  100. package/types/GiftCards/Transactions.d.ts +129 -0
  101. package/types/GiftCards/TransactionsResource.d.ts +201 -0
  102. package/types/InvoiceItems.d.ts +5 -0
  103. package/types/InvoiceItemsResource.d.ts +98 -0
  104. package/types/InvoiceLineItems.d.ts +22 -0
  105. package/types/InvoicePayments.d.ts +138 -0
  106. package/types/Invoices.d.ts +116 -1
  107. package/types/InvoicesResource.d.ts +5395 -1818
  108. package/types/Issuing/CardholdersResource.d.ts +2 -1
  109. package/types/Issuing/CreditUnderwritingRecords.d.ts +446 -0
  110. package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1017 -0
  111. package/types/LineItems.d.ts +7 -0
  112. package/types/Mandates.d.ts +77 -0
  113. package/types/Margins.d.ts +56 -0
  114. package/types/MarginsResource.d.ts +114 -0
  115. package/types/Orders.d.ts +1057 -0
  116. package/types/OrdersResource.d.ts +2711 -0
  117. package/types/PaymentIntents.d.ts +490 -1
  118. package/types/PaymentIntentsResource.d.ts +6884 -3356
  119. package/types/PaymentMethodConfigurations.d.ts +36 -0
  120. package/types/PaymentMethodConfigurationsResource.d.ts +50 -0
  121. package/types/PaymentMethods.d.ts +62 -0
  122. package/types/PaymentMethodsResource.d.ts +110 -0
  123. package/types/Prices.d.ts +22 -0
  124. package/types/PricesResource.d.ts +22 -0
  125. package/types/Products.d.ts +39 -0
  126. package/types/ProductsResource.d.ts +36 -0
  127. package/types/QuoteLines.d.ts +634 -0
  128. package/types/QuotePhases.d.ts +198 -0
  129. package/types/QuotePhasesResource.d.ts +67 -0
  130. package/types/QuotePreviewInvoices.d.ts +1528 -0
  131. package/types/QuotePreviewSubscriptionSchedules.d.ts +778 -0
  132. package/types/Quotes.d.ts +578 -1
  133. package/types/QuotesResource.d.ts +3174 -265
  134. package/types/SetupAttempts.d.ts +9 -0
  135. package/types/SetupIntents.d.ts +110 -1
  136. package/types/SetupIntentsResource.d.ts +498 -3
  137. package/types/Sources.d.ts +23 -0
  138. package/types/SubscriptionItems.d.ts +21 -0
  139. package/types/SubscriptionItemsResource.d.ts +109 -0
  140. package/types/SubscriptionSchedules.d.ts +164 -0
  141. package/types/SubscriptionSchedulesResource.d.ts +1234 -16
  142. package/types/Subscriptions.d.ts +46 -1
  143. package/types/SubscriptionsResource.d.ts +347 -2
  144. package/types/Tax/Associations.d.ts +126 -0
  145. package/types/Tax/AssociationsResource.d.ts +29 -0
  146. package/types/Tax/Forms.d.ts +133 -0
  147. package/types/Tax/FormsResource.d.ts +90 -0
  148. package/types/Terminal/Readers.d.ts +278 -0
  149. package/types/Terminal/ReadersResource.d.ts +208 -0
  150. package/types/TestHelpers/ConfirmationTokensResource.d.ts +55 -0
  151. package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
  152. package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
  153. package/types/Treasury/FinancialAccounts.d.ts +5 -0
  154. package/types/Treasury/FinancialAccountsResource.d.ts +10 -0
  155. package/types/Treasury/OutboundTransfers.d.ts +26 -0
  156. package/types/Treasury/OutboundTransfersResource.d.ts +26 -0
  157. package/types/Treasury/ReceivedCredits.d.ts +26 -0
  158. package/types/Treasury/ReceivedDebits.d.ts +31 -0
  159. package/types/WebhookEndpointsResource.d.ts +52 -0
  160. package/types/index.d.ts +71 -0
  161. package/types/lib.d.ts +12 -0
package/cjs/resources.js CHANGED
@@ -1,30 +1,39 @@
1
1
  "use strict";
2
2
  // File generated from our OpenAPI spec
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Topups = exports.Tokens = exports.TaxRates = exports.TaxIds = exports.TaxCodes = exports.Subscriptions = exports.SubscriptionSchedules = exports.SubscriptionItems = exports.Sources = exports.ShippingRates = exports.SetupIntents = exports.SetupAttempts = exports.Reviews = exports.Refunds = exports.Quotes = exports.PromotionCodes = exports.Products = exports.Prices = exports.Plans = exports.Payouts = exports.PaymentMethods = exports.PaymentMethodDomains = exports.PaymentMethodConfigurations = exports.PaymentLinks = exports.PaymentIntents = exports.OAuth = exports.Mandates = exports.Invoices = exports.InvoiceItems = exports.Files = exports.FileLinks = exports.ExchangeRates = exports.Events = exports.EphemeralKeys = exports.Disputes = exports.Customers = exports.CustomerSessions = exports.CreditNotes = exports.Coupons = exports.CountrySpecs = exports.ConfirmationTokens = exports.Charges = exports.BalanceTransactions = exports.Balance = exports.ApplicationFees = exports.ApplePayDomains = exports.Accounts = exports.AccountSessions = exports.AccountLinks = exports.Account = void 0;
5
- exports.Treasury = exports.TestHelpers = exports.Terminal = exports.Tax = exports.Sigma = exports.Reporting = exports.Radar = exports.Issuing = exports.Identity = exports.Forwarding = exports.FinancialConnections = exports.Entitlements = exports.Climate = exports.Checkout = exports.BillingPortal = exports.Billing = exports.Apps = exports.WebhookEndpoints = exports.Transfers = void 0;
4
+ exports.TaxCodes = exports.Subscriptions = exports.SubscriptionSchedules = exports.SubscriptionItems = exports.Sources = exports.ShippingRates = exports.SetupIntents = exports.SetupAttempts = exports.Reviews = exports.Refunds = exports.Quotes = exports.QuotePhases = exports.PromotionCodes = exports.Products = exports.Prices = exports.Plans = exports.Payouts = exports.PaymentMethods = exports.PaymentMethodDomains = exports.PaymentMethodConfigurations = exports.PaymentLinks = exports.PaymentIntents = exports.Orders = exports.OAuth = exports.Margins = exports.Mandates = exports.Invoices = exports.InvoiceItems = exports.Files = exports.FileLinks = exports.ExchangeRates = exports.Events = exports.EphemeralKeys = exports.Disputes = exports.Customers = exports.CustomerSessions = exports.CreditNotes = exports.Coupons = exports.CountrySpecs = exports.ConfirmationTokens = exports.Charges = exports.BalanceTransactions = exports.Balance = exports.ApplicationFees = exports.ApplePayDomains = exports.Accounts = exports.AccountSessions = exports.AccountNotices = exports.AccountLinks = exports.Account = void 0;
5
+ exports.Treasury = exports.TestHelpers = exports.Terminal = exports.Tax = exports.Sigma = exports.Reporting = exports.Radar = exports.Issuing = exports.Identity = exports.GiftCards = exports.Forwarding = exports.FinancialConnections = exports.Entitlements = exports.Climate = exports.Checkout = exports.Capital = exports.BillingPortal = exports.Billing = exports.Apps = exports.WebhookEndpoints = exports.Transfers = exports.Topups = exports.Tokens = exports.TaxRates = exports.TaxIds = void 0;
6
6
  const ResourceNamespace_js_1 = require("./ResourceNamespace.js");
7
7
  const Accounts_js_1 = require("./resources/FinancialConnections/Accounts.js");
8
8
  const ActiveEntitlements_js_1 = require("./resources/Entitlements/ActiveEntitlements.js");
9
+ const Alerts_js_1 = require("./resources/Billing/Alerts.js");
10
+ const Associations_js_1 = require("./resources/Tax/Associations.js");
9
11
  const Authorizations_js_1 = require("./resources/TestHelpers/Issuing/Authorizations.js");
10
12
  const Authorizations_js_2 = require("./resources/Issuing/Authorizations.js");
11
13
  const Calculations_js_1 = require("./resources/Tax/Calculations.js");
12
14
  const Cardholders_js_1 = require("./resources/Issuing/Cardholders.js");
13
15
  const Cards_js_1 = require("./resources/TestHelpers/Issuing/Cards.js");
14
- const Cards_js_2 = require("./resources/Issuing/Cards.js");
16
+ const Cards_js_2 = require("./resources/GiftCards/Cards.js");
17
+ const Cards_js_3 = require("./resources/Issuing/Cards.js");
15
18
  const Configurations_js_1 = require("./resources/BillingPortal/Configurations.js");
16
19
  const Configurations_js_2 = require("./resources/Terminal/Configurations.js");
17
20
  const ConfirmationTokens_js_1 = require("./resources/TestHelpers/ConfirmationTokens.js");
18
21
  const ConnectionTokens_js_1 = require("./resources/Terminal/ConnectionTokens.js");
19
22
  const CreditReversals_js_1 = require("./resources/Treasury/CreditReversals.js");
23
+ const CreditUnderwritingRecords_js_1 = require("./resources/Issuing/CreditUnderwritingRecords.js");
20
24
  const Customers_js_1 = require("./resources/TestHelpers/Customers.js");
21
25
  const DebitReversals_js_1 = require("./resources/Treasury/DebitReversals.js");
22
26
  const Disputes_js_1 = require("./resources/Issuing/Disputes.js");
23
27
  const EarlyFraudWarnings_js_1 = require("./resources/Radar/EarlyFraudWarnings.js");
24
28
  const Features_js_1 = require("./resources/Entitlements/Features.js");
25
29
  const FinancialAccounts_js_1 = require("./resources/Treasury/FinancialAccounts.js");
30
+ const FinancingOffers_js_1 = require("./resources/Capital/FinancingOffers.js");
31
+ const FinancingSummary_js_1 = require("./resources/Capital/FinancingSummary.js");
32
+ const FinancingTransactions_js_1 = require("./resources/Capital/FinancingTransactions.js");
33
+ const Forms_js_1 = require("./resources/Tax/Forms.js");
26
34
  const InboundTransfers_js_1 = require("./resources/TestHelpers/Treasury/InboundTransfers.js");
27
35
  const InboundTransfers_js_2 = require("./resources/Treasury/InboundTransfers.js");
36
+ const Institutions_js_1 = require("./resources/FinancialConnections/Institutions.js");
28
37
  const Locations_js_1 = require("./resources/Terminal/Locations.js");
29
38
  const MeterEventAdjustments_js_1 = require("./resources/Billing/MeterEventAdjustments.js");
30
39
  const MeterEvents_js_1 = require("./resources/Billing/MeterEvents.js");
@@ -61,9 +70,10 @@ const Tokens_js_1 = require("./resources/Issuing/Tokens.js");
61
70
  const TransactionEntries_js_1 = require("./resources/Treasury/TransactionEntries.js");
62
71
  const Transactions_js_1 = require("./resources/TestHelpers/Issuing/Transactions.js");
63
72
  const Transactions_js_2 = require("./resources/FinancialConnections/Transactions.js");
64
- const Transactions_js_3 = require("./resources/Issuing/Transactions.js");
65
- const Transactions_js_4 = require("./resources/Tax/Transactions.js");
66
- const Transactions_js_5 = require("./resources/Treasury/Transactions.js");
73
+ const Transactions_js_3 = require("./resources/GiftCards/Transactions.js");
74
+ const Transactions_js_4 = require("./resources/Issuing/Transactions.js");
75
+ const Transactions_js_5 = require("./resources/Tax/Transactions.js");
76
+ const Transactions_js_6 = require("./resources/Treasury/Transactions.js");
67
77
  const ValueListItems_js_1 = require("./resources/Radar/ValueListItems.js");
68
78
  const ValueLists_js_1 = require("./resources/Radar/ValueLists.js");
69
79
  const VerificationReports_js_1 = require("./resources/Identity/VerificationReports.js");
@@ -72,6 +82,8 @@ var Accounts_js_2 = require("./resources/Accounts.js");
72
82
  Object.defineProperty(exports, "Account", { enumerable: true, get: function () { return Accounts_js_2.Accounts; } });
73
83
  var AccountLinks_js_1 = require("./resources/AccountLinks.js");
74
84
  Object.defineProperty(exports, "AccountLinks", { enumerable: true, get: function () { return AccountLinks_js_1.AccountLinks; } });
85
+ var AccountNotices_js_1 = require("./resources/AccountNotices.js");
86
+ Object.defineProperty(exports, "AccountNotices", { enumerable: true, get: function () { return AccountNotices_js_1.AccountNotices; } });
75
87
  var AccountSessions_js_1 = require("./resources/AccountSessions.js");
76
88
  Object.defineProperty(exports, "AccountSessions", { enumerable: true, get: function () { return AccountSessions_js_1.AccountSessions; } });
77
89
  var Accounts_js_3 = require("./resources/Accounts.js");
@@ -116,8 +128,12 @@ var Invoices_js_1 = require("./resources/Invoices.js");
116
128
  Object.defineProperty(exports, "Invoices", { enumerable: true, get: function () { return Invoices_js_1.Invoices; } });
117
129
  var Mandates_js_1 = require("./resources/Mandates.js");
118
130
  Object.defineProperty(exports, "Mandates", { enumerable: true, get: function () { return Mandates_js_1.Mandates; } });
131
+ var Margins_js_1 = require("./resources/Margins.js");
132
+ Object.defineProperty(exports, "Margins", { enumerable: true, get: function () { return Margins_js_1.Margins; } });
119
133
  var OAuth_js_1 = require("./resources/OAuth.js");
120
134
  Object.defineProperty(exports, "OAuth", { enumerable: true, get: function () { return OAuth_js_1.OAuth; } });
135
+ var Orders_js_2 = require("./resources/Orders.js");
136
+ Object.defineProperty(exports, "Orders", { enumerable: true, get: function () { return Orders_js_2.Orders; } });
121
137
  var PaymentIntents_js_1 = require("./resources/PaymentIntents.js");
122
138
  Object.defineProperty(exports, "PaymentIntents", { enumerable: true, get: function () { return PaymentIntents_js_1.PaymentIntents; } });
123
139
  var PaymentLinks_js_1 = require("./resources/PaymentLinks.js");
@@ -138,6 +154,8 @@ var Products_js_2 = require("./resources/Products.js");
138
154
  Object.defineProperty(exports, "Products", { enumerable: true, get: function () { return Products_js_2.Products; } });
139
155
  var PromotionCodes_js_1 = require("./resources/PromotionCodes.js");
140
156
  Object.defineProperty(exports, "PromotionCodes", { enumerable: true, get: function () { return PromotionCodes_js_1.PromotionCodes; } });
157
+ var QuotePhases_js_1 = require("./resources/QuotePhases.js");
158
+ Object.defineProperty(exports, "QuotePhases", { enumerable: true, get: function () { return QuotePhases_js_1.QuotePhases; } });
141
159
  var Quotes_js_1 = require("./resources/Quotes.js");
142
160
  Object.defineProperty(exports, "Quotes", { enumerable: true, get: function () { return Quotes_js_1.Quotes; } });
143
161
  var Refunds_js_2 = require("./resources/Refunds.js");
@@ -174,6 +192,7 @@ var WebhookEndpoints_js_1 = require("./resources/WebhookEndpoints.js");
174
192
  Object.defineProperty(exports, "WebhookEndpoints", { enumerable: true, get: function () { return WebhookEndpoints_js_1.WebhookEndpoints; } });
175
193
  exports.Apps = (0, ResourceNamespace_js_1.resourceNamespace)('apps', { Secrets: Secrets_js_1.Secrets });
176
194
  exports.Billing = (0, ResourceNamespace_js_1.resourceNamespace)('billing', {
195
+ Alerts: Alerts_js_1.Alerts,
177
196
  MeterEventAdjustments: MeterEventAdjustments_js_1.MeterEventAdjustments,
178
197
  MeterEvents: MeterEvents_js_1.MeterEvents,
179
198
  Meters: Meters_js_1.Meters,
@@ -182,6 +201,11 @@ exports.BillingPortal = (0, ResourceNamespace_js_1.resourceNamespace)('billingPo
182
201
  Configurations: Configurations_js_1.Configurations,
183
202
  Sessions: Sessions_js_1.Sessions,
184
203
  });
204
+ exports.Capital = (0, ResourceNamespace_js_1.resourceNamespace)('capital', {
205
+ FinancingOffers: FinancingOffers_js_1.FinancingOffers,
206
+ FinancingSummary: FinancingSummary_js_1.FinancingSummary,
207
+ FinancingTransactions: FinancingTransactions_js_1.FinancingTransactions,
208
+ });
185
209
  exports.Checkout = (0, ResourceNamespace_js_1.resourceNamespace)('checkout', {
186
210
  Sessions: Sessions_js_2.Sessions,
187
211
  });
@@ -196,12 +220,17 @@ exports.Entitlements = (0, ResourceNamespace_js_1.resourceNamespace)('entitlemen
196
220
  });
197
221
  exports.FinancialConnections = (0, ResourceNamespace_js_1.resourceNamespace)('financialConnections', {
198
222
  Accounts: Accounts_js_1.Accounts,
223
+ Institutions: Institutions_js_1.Institutions,
199
224
  Sessions: Sessions_js_3.Sessions,
200
225
  Transactions: Transactions_js_2.Transactions,
201
226
  });
202
227
  exports.Forwarding = (0, ResourceNamespace_js_1.resourceNamespace)('forwarding', {
203
228
  Requests: Requests_js_1.Requests,
204
229
  });
230
+ exports.GiftCards = (0, ResourceNamespace_js_1.resourceNamespace)('giftCards', {
231
+ Cards: Cards_js_2.Cards,
232
+ Transactions: Transactions_js_3.Transactions,
233
+ });
205
234
  exports.Identity = (0, ResourceNamespace_js_1.resourceNamespace)('identity', {
206
235
  VerificationReports: VerificationReports_js_1.VerificationReports,
207
236
  VerificationSessions: VerificationSessions_js_1.VerificationSessions,
@@ -209,12 +238,13 @@ exports.Identity = (0, ResourceNamespace_js_1.resourceNamespace)('identity', {
209
238
  exports.Issuing = (0, ResourceNamespace_js_1.resourceNamespace)('issuing', {
210
239
  Authorizations: Authorizations_js_2.Authorizations,
211
240
  Cardholders: Cardholders_js_1.Cardholders,
212
- Cards: Cards_js_2.Cards,
241
+ Cards: Cards_js_3.Cards,
242
+ CreditUnderwritingRecords: CreditUnderwritingRecords_js_1.CreditUnderwritingRecords,
213
243
  Disputes: Disputes_js_1.Disputes,
214
244
  PersonalizationDesigns: PersonalizationDesigns_js_2.PersonalizationDesigns,
215
245
  PhysicalBundles: PhysicalBundles_js_1.PhysicalBundles,
216
246
  Tokens: Tokens_js_1.Tokens,
217
- Transactions: Transactions_js_3.Transactions,
247
+ Transactions: Transactions_js_4.Transactions,
218
248
  });
219
249
  exports.Radar = (0, ResourceNamespace_js_1.resourceNamespace)('radar', {
220
250
  EarlyFraudWarnings: EarlyFraudWarnings_js_1.EarlyFraudWarnings,
@@ -229,10 +259,12 @@ exports.Sigma = (0, ResourceNamespace_js_1.resourceNamespace)('sigma', {
229
259
  ScheduledQueryRuns: ScheduledQueryRuns_js_1.ScheduledQueryRuns,
230
260
  });
231
261
  exports.Tax = (0, ResourceNamespace_js_1.resourceNamespace)('tax', {
262
+ Associations: Associations_js_1.Associations,
232
263
  Calculations: Calculations_js_1.Calculations,
264
+ Forms: Forms_js_1.Forms,
233
265
  Registrations: Registrations_js_1.Registrations,
234
266
  Settings: Settings_js_1.Settings,
235
- Transactions: Transactions_js_4.Transactions,
267
+ Transactions: Transactions_js_5.Transactions,
236
268
  });
237
269
  exports.Terminal = (0, ResourceNamespace_js_1.resourceNamespace)('terminal', {
238
270
  Configurations: Configurations_js_2.Configurations,
@@ -272,5 +304,5 @@ exports.Treasury = (0, ResourceNamespace_js_1.resourceNamespace)('treasury', {
272
304
  ReceivedCredits: ReceivedCredits_js_2.ReceivedCredits,
273
305
  ReceivedDebits: ReceivedDebits_js_2.ReceivedDebits,
274
306
  TransactionEntries: TransactionEntries_js_1.TransactionEntries,
275
- Transactions: Transactions_js_5.Transactions,
307
+ Transactions: Transactions_js_6.Transactions,
276
308
  });
@@ -5,7 +5,7 @@ const _Error = require("./Error.js");
5
5
  const RequestSender_js_1 = require("./RequestSender.js");
6
6
  const StripeResource_js_1 = require("./StripeResource.js");
7
7
  const Webhooks_js_1 = require("./Webhooks.js");
8
- const apiVersion = require("./apiVersion.js");
8
+ const apiVersion_js_1 = require("./apiVersion.js");
9
9
  const CryptoProvider_js_1 = require("./crypto/CryptoProvider.js");
10
10
  const HttpClient_js_1 = require("./net/HttpClient.js");
11
11
  const resources = require("./resources.js");
@@ -13,7 +13,7 @@ const utils_js_1 = require("./utils.js");
13
13
  const DEFAULT_HOST = 'api.stripe.com';
14
14
  const DEFAULT_PORT = '443';
15
15
  const DEFAULT_BASE_PATH = '/v1/';
16
- const DEFAULT_API_VERSION = apiVersion.ApiVersion;
16
+ const DEFAULT_API_VERSION = apiVersion_js_1.ApiVersion;
17
17
  const DEFAULT_TIMEOUT = 80000;
18
18
  const MAX_NETWORK_RETRY_DELAY_SEC = 2;
19
19
  const INITIAL_NETWORK_RETRY_DELAY_SEC = 0.5;
@@ -34,7 +34,7 @@ const ALLOWED_CONFIG_PROPERTIES = [
34
34
  ];
35
35
  const defaultRequestSenderFactory = (stripe) => new RequestSender_js_1.RequestSender(stripe, StripeResource_js_1.StripeResource.MAX_BUFFERED_REQUEST_METRICS);
36
36
  function createStripe(platformFunctions, requestSender = defaultRequestSenderFactory) {
37
- Stripe.PACKAGE_VERSION = '16.5.0';
37
+ Stripe.PACKAGE_VERSION = '16.6.0-beta.1';
38
38
  Stripe.USER_AGENT = Object.assign({ bindings_version: Stripe.PACKAGE_VERSION, lang: 'node', publisher: 'stripe', uname: null, typescript: false }, (0, utils_js_1.determineProcessUserAgentProperties)());
39
39
  Stripe.StripeResource = StripeResource_js_1.StripeResource;
40
40
  Stripe.resources = resources;
@@ -150,6 +150,9 @@ function createStripe(platformFunctions, requestSender = defaultRequestSenderFac
150
150
  _enableTelemetry: null,
151
151
  _requestSender: null,
152
152
  _platformFunctions: null,
153
+ rawRequest(method, path, params, options) {
154
+ return this._requestSender._rawRequest(method, path, params, options);
155
+ },
153
156
  /**
154
157
  * @private
155
158
  */
package/cjs/utils.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.concat = exports.determineProcessUserAgentProperties = exports.validateInteger = exports.flattenAndStringify = exports.isObject = exports.emitWarning = exports.pascalToCamelCase = exports.callbackifyPromiseWithTimeout = exports.normalizeHeader = exports.normalizeHeaders = exports.removeNullish = exports.protoExtend = exports.getOptionsFromArgs = exports.getDataFromArgs = exports.extractUrlParams = exports.makeURLInterpolator = exports.stringifyRequestData = exports.isOptionsHash = void 0;
3
+ exports.jsonStringifyRequestData = exports.concat = exports.determineProcessUserAgentProperties = exports.validateInteger = exports.flattenAndStringify = exports.isObject = exports.emitWarning = exports.pascalToCamelCase = exports.callbackifyPromiseWithTimeout = exports.normalizeHeader = exports.normalizeHeaders = exports.removeNullish = exports.protoExtend = exports.getOptionsFromArgs = exports.getDataFromArgs = exports.extractUrlParams = exports.makeURLInterpolator = exports.queryStringifyRequestData = exports.isOptionsHash = void 0;
4
4
  const qs = require("qs");
5
5
  const OPTIONS_KEYS = [
6
6
  'apiKey',
@@ -10,6 +10,8 @@ const OPTIONS_KEYS = [
10
10
  'maxNetworkRetries',
11
11
  'timeout',
12
12
  'host',
13
+ 'apiMode',
14
+ 'additionalHeaders',
13
15
  ];
14
16
  function isOptionsHash(o) {
15
17
  return (o &&
@@ -21,7 +23,7 @@ exports.isOptionsHash = isOptionsHash;
21
23
  * Stringifies an Object, accommodating nested objects
22
24
  * (forming the conventional key 'parent[child]=value')
23
25
  */
24
- function stringifyRequestData(data) {
26
+ function queryStringifyRequestData(data) {
25
27
  return (qs
26
28
  .stringify(data, {
27
29
  serializeDate: (d) => Math.floor(d.getTime() / 1000).toString(),
@@ -32,7 +34,7 @@ function stringifyRequestData(data) {
32
34
  .replace(/%5B/g, '[')
33
35
  .replace(/%5D/g, ']'));
34
36
  }
35
- exports.stringifyRequestData = stringifyRequestData;
37
+ exports.queryStringifyRequestData = queryStringifyRequestData;
36
38
  /**
37
39
  * Outputs a new function with interpolated object property values.
38
40
  * Use like so:
@@ -131,6 +133,15 @@ function getOptionsFromArgs(args) {
131
133
  if (params.host) {
132
134
  opts.host = params.host;
133
135
  }
136
+ if (params.apiMode) {
137
+ if (params.apiMode !== 'standard' && params.apiMode !== 'preview') {
138
+ throw new Error(`Invalid apiMode: ${params.apiMode}. Must be one of 'standard' or 'preview'`);
139
+ }
140
+ opts.apiMode = params.apiMode;
141
+ }
142
+ if (params.additionalHeaders) {
143
+ opts.headers = params.additionalHeaders;
144
+ }
134
145
  }
135
146
  }
136
147
  return opts;
@@ -305,3 +316,19 @@ function concat(arrays) {
305
316
  return merged;
306
317
  }
307
318
  exports.concat = concat;
319
+ /**
320
+ * Replaces Date objects with Unix timestamps
321
+ */
322
+ function dateTimeReplacer(key, value) {
323
+ if (this[key] instanceof Date) {
324
+ return Math.floor(this[key].getTime() / 1000).toString();
325
+ }
326
+ return value;
327
+ }
328
+ /**
329
+ * JSON stringifies an Object, replacing Date objects with Unix timestamps
330
+ */
331
+ function jsonStringifyRequestData(data) {
332
+ return JSON.stringify(data, dateTimeReplacer);
333
+ }
334
+ exports.jsonStringifyRequestData = jsonStringifyRequestData;
@@ -1,6 +1,7 @@
1
1
  import { StripeAPIError, StripeAuthenticationError, StripeConnectionError, StripeError, StripePermissionError, StripeRateLimitError, } from './Error.js';
2
- import { emitWarning, normalizeHeaders, removeNullish, stringifyRequestData, } from './utils.js';
2
+ import { emitWarning, jsonStringifyRequestData, normalizeHeaders, removeNullish, queryStringifyRequestData, getDataFromArgs, getOptionsFromArgs, } from './utils.js';
3
3
  import { HttpClient } from './net/HttpClient.js';
4
+ import { PreviewVersion } from './apiVersion.js';
4
5
  const MAX_RETRY_AFTER_WAIT = 60;
5
6
  export class RequestSender {
6
7
  constructor(stripe, maxBufferedRequestMetric) {
@@ -198,12 +199,12 @@ export class RequestSender {
198
199
  }
199
200
  return null;
200
201
  }
201
- _makeHeaders(auth, contentLength, apiVersion, clientUserAgent, method, userSuppliedHeaders, userSuppliedSettings) {
202
+ _makeHeaders(auth, contentType, contentLength, apiVersion, clientUserAgent, method, userSuppliedHeaders, userSuppliedSettings) {
202
203
  const defaultHeaders = {
203
204
  // Use specified auth token or use default from this stripe instance:
204
205
  Authorization: auth ? `Bearer ${auth}` : this._stripe.getApiField('auth'),
205
206
  Accept: 'application/json',
206
- 'Content-Type': 'application/x-www-form-urlencoded',
207
+ 'Content-Type': contentType,
207
208
  'User-Agent': this._getUserAgentString(),
208
209
  'X-Stripe-Client-User-Agent': clientUserAgent,
209
210
  'X-Stripe-Client-Telemetry': this._getTelemetryHeader(),
@@ -271,6 +272,54 @@ export class RequestSender {
271
272
  }
272
273
  }
273
274
  }
275
+ _rawRequest(method, path, params, options) {
276
+ const requestPromise = new Promise((resolve, reject) => {
277
+ let opts;
278
+ try {
279
+ const requestMethod = method.toUpperCase();
280
+ if (requestMethod !== 'POST' &&
281
+ params &&
282
+ Object.keys(params).length !== 0) {
283
+ throw new Error('rawRequest only supports params on POST requests. Please pass null and add your parameters to path.');
284
+ }
285
+ const args = [].slice.call([params, options]);
286
+ // Pull request data and options (headers, auth) from args.
287
+ const dataFromArgs = getDataFromArgs(args);
288
+ const data = Object.assign({}, dataFromArgs);
289
+ const calculatedOptions = getOptionsFromArgs(args);
290
+ const apiMode = calculatedOptions.apiMode || 'standard';
291
+ const headers = calculatedOptions.headers;
292
+ opts = {
293
+ requestMethod,
294
+ requestPath: path,
295
+ bodyData: data,
296
+ queryData: {},
297
+ auth: calculatedOptions.auth,
298
+ headers,
299
+ host: null,
300
+ streaming: false,
301
+ settings: {},
302
+ apiMode: apiMode,
303
+ usage: ['raw_request'],
304
+ };
305
+ }
306
+ catch (err) {
307
+ reject(err);
308
+ return;
309
+ }
310
+ function requestCallback(err, response) {
311
+ if (err) {
312
+ reject(err);
313
+ }
314
+ else {
315
+ resolve(response);
316
+ }
317
+ }
318
+ const { headers, settings } = opts;
319
+ this._request(opts.requestMethod, opts.host, path, opts.bodyData, opts.auth, { headers, settings, streaming: opts.streaming, apiMode: opts.apiMode }, opts.usage, requestCallback);
320
+ });
321
+ return requestPromise;
322
+ }
274
323
  _request(method, host, path, data, auth, options = {}, usage = [], callback, requestDataProcessor = null) {
275
324
  let requestData;
276
325
  const retryRequest = (requestFn, apiVersion, headers, requestRetries, retryAfter) => {
@@ -335,10 +384,15 @@ export class RequestSender {
335
384
  return callback(error);
336
385
  }
337
386
  requestData = data;
387
+ let contentType = 'application/x-www-form-urlencoded';
388
+ let apiVersion = this._stripe.getApiField('version');
389
+ if (options.apiMode === 'preview') {
390
+ contentType = 'application/json';
391
+ apiVersion = PreviewVersion;
392
+ }
338
393
  this._stripe.getClientUserAgent((clientUserAgent) => {
339
394
  var _a, _b;
340
- const apiVersion = this._stripe.getApiField('version');
341
- const headers = this._makeHeaders(auth, requestData.length, apiVersion, clientUserAgent, method, (_a = options.headers) !== null && _a !== void 0 ? _a : null, (_b = options.settings) !== null && _b !== void 0 ? _b : {});
395
+ const headers = this._makeHeaders(auth, contentType, requestData.length, apiVersion, clientUserAgent, method, (_a = options.headers) !== null && _a !== void 0 ? _a : null, (_b = options.settings) !== null && _b !== void 0 ? _b : {});
342
396
  makeRequest(apiVersion, headers, 0);
343
397
  });
344
398
  };
@@ -346,7 +400,14 @@ export class RequestSender {
346
400
  requestDataProcessor(method, data, options.headers, prepareAndMakeRequest);
347
401
  }
348
402
  else {
349
- prepareAndMakeRequest(null, stringifyRequestData(data || {}));
403
+ let stringifiedData;
404
+ if (options.apiMode === 'preview') {
405
+ stringifiedData = data ? jsonStringifyRequestData(data) : '';
406
+ }
407
+ else {
408
+ stringifiedData = queryStringifyRequestData(data || {});
409
+ }
410
+ prepareAndMakeRequest(null, stringifiedData);
350
411
  }
351
412
  }
352
413
  }
@@ -1,4 +1,4 @@
1
- import { getDataFromArgs, getOptionsFromArgs, makeURLInterpolator, protoExtend, stringifyRequestData, } from './utils.js';
1
+ import { getDataFromArgs, getOptionsFromArgs, makeURLInterpolator, protoExtend, queryStringifyRequestData, } from './utils.js';
2
2
  import { stripeMethod } from './StripeMethod.js';
3
3
  // Provide extension mechanism for Stripe Resource Sub-Classes
4
4
  StripeResource.extend = protoExtend;
@@ -158,7 +158,7 @@ StripeResource.prototype = {
158
158
  const path = [
159
159
  opts.requestPath,
160
160
  emptyQuery ? '' : '?',
161
- stringifyRequestData(opts.queryData),
161
+ queryStringifyRequestData(opts.queryData),
162
162
  ].join('');
163
163
  const { headers, settings } = opts;
164
164
  this._stripe._requestSender._request(opts.requestMethod, opts.host, path, opts.bodyData, opts.auth, { headers, settings, streaming: opts.streaming }, opts.usage, requestCallback, (_a = this.requestDataProcessor) === null || _a === void 0 ? void 0 : _a.bind(this));
package/esm/apiVersion.js CHANGED
@@ -1,2 +1,3 @@
1
1
  // File generated from our OpenAPI spec
2
2
  export const ApiVersion = '2024-06-20';
3
+ export const PreviewVersion = '2024-07-16.preview-v2';
package/esm/multipart.js CHANGED
@@ -1,4 +1,4 @@
1
- import { flattenAndStringify, stringifyRequestData } from './utils.js';
1
+ import { flattenAndStringify, queryStringifyRequestData } from './utils.js';
2
2
  // Method for formatting HTTP body for the multipart/form-data specification
3
3
  // Mostly taken from Fermata.js
4
4
  // https://github.com/natevw/fermata/blob/5d9732a33d776ce925013a265935facd1626cc88/fermata.js#L315-L343
@@ -45,7 +45,7 @@ const multipartDataGenerator = (method, data, headers) => {
45
45
  export function multipartRequestDataProcessor(method, data, headers, callback) {
46
46
  data = data || {};
47
47
  if (method !== 'POST') {
48
- return callback(null, stringifyRequestData(data));
48
+ return callback(null, queryStringifyRequestData(data));
49
49
  }
50
50
  this._stripe._platformFunctions
51
51
  .tryBufferData(data)
@@ -0,0 +1,18 @@
1
+ // File generated from our OpenAPI spec
2
+ import { StripeResource } from '../StripeResource.js';
3
+ const stripeMethod = StripeResource.method;
4
+ export const AccountNotices = StripeResource.extend({
5
+ retrieve: stripeMethod({
6
+ method: 'GET',
7
+ fullPath: '/v1/account_notices/{account_notice}',
8
+ }),
9
+ update: stripeMethod({
10
+ method: 'POST',
11
+ fullPath: '/v1/account_notices/{account_notice}',
12
+ }),
13
+ list: stripeMethod({
14
+ method: 'GET',
15
+ fullPath: '/v1/account_notices',
16
+ methodType: 'list',
17
+ }),
18
+ });
@@ -0,0 +1,24 @@
1
+ // File generated from our OpenAPI spec
2
+ import { StripeResource } from '../../StripeResource.js';
3
+ const stripeMethod = StripeResource.method;
4
+ export const Alerts = StripeResource.extend({
5
+ create: stripeMethod({ method: 'POST', fullPath: '/v1/billing/alerts' }),
6
+ retrieve: stripeMethod({ method: 'GET', fullPath: '/v1/billing/alerts/{id}' }),
7
+ list: stripeMethod({
8
+ method: 'GET',
9
+ fullPath: '/v1/billing/alerts',
10
+ methodType: 'list',
11
+ }),
12
+ activate: stripeMethod({
13
+ method: 'POST',
14
+ fullPath: '/v1/billing/alerts/{id}/activate',
15
+ }),
16
+ archive: stripeMethod({
17
+ method: 'POST',
18
+ fullPath: '/v1/billing/alerts/{id}/archive',
19
+ }),
20
+ deactivate: stripeMethod({
21
+ method: 'POST',
22
+ fullPath: '/v1/billing/alerts/{id}/deactivate',
23
+ }),
24
+ });
@@ -0,0 +1,18 @@
1
+ // File generated from our OpenAPI spec
2
+ import { StripeResource } from '../../StripeResource.js';
3
+ const stripeMethod = StripeResource.method;
4
+ export const FinancingOffers = StripeResource.extend({
5
+ retrieve: stripeMethod({
6
+ method: 'GET',
7
+ fullPath: '/v1/capital/financing_offers/{financing_offer}',
8
+ }),
9
+ list: stripeMethod({
10
+ method: 'GET',
11
+ fullPath: '/v1/capital/financing_offers',
12
+ methodType: 'list',
13
+ }),
14
+ markDelivered: stripeMethod({
15
+ method: 'POST',
16
+ fullPath: '/v1/capital/financing_offers/{financing_offer}/mark_delivered',
17
+ }),
18
+ });
@@ -0,0 +1,9 @@
1
+ // File generated from our OpenAPI spec
2
+ import { StripeResource } from '../../StripeResource.js';
3
+ const stripeMethod = StripeResource.method;
4
+ export const FinancingSummary = StripeResource.extend({
5
+ retrieve: stripeMethod({
6
+ method: 'GET',
7
+ fullPath: '/v1/capital/financing_summary',
8
+ }),
9
+ });
@@ -0,0 +1,14 @@
1
+ // File generated from our OpenAPI spec
2
+ import { StripeResource } from '../../StripeResource.js';
3
+ const stripeMethod = StripeResource.method;
4
+ export const FinancingTransactions = StripeResource.extend({
5
+ retrieve: stripeMethod({
6
+ method: 'GET',
7
+ fullPath: '/v1/capital/financing_transactions/{financing_transaction}',
8
+ }),
9
+ list: stripeMethod({
10
+ method: 'GET',
11
+ fullPath: '/v1/capital/financing_transactions',
12
+ methodType: 'list',
13
+ }),
14
+ });
@@ -15,6 +15,11 @@ export const Accounts = StripeResource.extend({
15
15
  method: 'POST',
16
16
  fullPath: '/v1/financial_connections/accounts/{account}/disconnect',
17
17
  }),
18
+ listInferredBalances: stripeMethod({
19
+ method: 'GET',
20
+ fullPath: '/v1/financial_connections/accounts/{account}/inferred_balances',
21
+ methodType: 'list',
22
+ }),
18
23
  listOwners: stripeMethod({
19
24
  method: 'GET',
20
25
  fullPath: '/v1/financial_connections/accounts/{account}/owners',
@@ -0,0 +1,14 @@
1
+ // File generated from our OpenAPI spec
2
+ import { StripeResource } from '../../StripeResource.js';
3
+ const stripeMethod = StripeResource.method;
4
+ export const Institutions = StripeResource.extend({
5
+ retrieve: stripeMethod({
6
+ method: 'GET',
7
+ fullPath: '/v1/financial_connections/institutions/{institution}',
8
+ }),
9
+ list: stripeMethod({
10
+ method: 'GET',
11
+ fullPath: '/v1/financial_connections/institutions',
12
+ methodType: 'list',
13
+ }),
14
+ });
@@ -0,0 +1,20 @@
1
+ // File generated from our OpenAPI spec
2
+ import { StripeResource } from '../../StripeResource.js';
3
+ const stripeMethod = StripeResource.method;
4
+ export const Cards = StripeResource.extend({
5
+ create: stripeMethod({ method: 'POST', fullPath: '/v1/gift_cards/cards' }),
6
+ retrieve: stripeMethod({
7
+ method: 'GET',
8
+ fullPath: '/v1/gift_cards/cards/{id}',
9
+ }),
10
+ update: stripeMethod({ method: 'POST', fullPath: '/v1/gift_cards/cards/{id}' }),
11
+ list: stripeMethod({
12
+ method: 'GET',
13
+ fullPath: '/v1/gift_cards/cards',
14
+ methodType: 'list',
15
+ }),
16
+ validate: stripeMethod({
17
+ method: 'POST',
18
+ fullPath: '/v1/gift_cards/cards/validate',
19
+ }),
20
+ });
@@ -0,0 +1,30 @@
1
+ // File generated from our OpenAPI spec
2
+ import { StripeResource } from '../../StripeResource.js';
3
+ const stripeMethod = StripeResource.method;
4
+ export const Transactions = StripeResource.extend({
5
+ create: stripeMethod({
6
+ method: 'POST',
7
+ fullPath: '/v1/gift_cards/transactions',
8
+ }),
9
+ retrieve: stripeMethod({
10
+ method: 'GET',
11
+ fullPath: '/v1/gift_cards/transactions/{id}',
12
+ }),
13
+ update: stripeMethod({
14
+ method: 'POST',
15
+ fullPath: '/v1/gift_cards/transactions/{id}',
16
+ }),
17
+ list: stripeMethod({
18
+ method: 'GET',
19
+ fullPath: '/v1/gift_cards/transactions',
20
+ methodType: 'list',
21
+ }),
22
+ cancel: stripeMethod({
23
+ method: 'POST',
24
+ fullPath: '/v1/gift_cards/transactions/{id}/cancel',
25
+ }),
26
+ confirm: stripeMethod({
27
+ method: 'POST',
28
+ fullPath: '/v1/gift_cards/transactions/{id}/confirm',
29
+ }),
30
+ });
@@ -15,6 +15,10 @@ export const Invoices = StripeResource.extend({
15
15
  method: 'POST',
16
16
  fullPath: '/v1/invoices/{invoice}/add_lines',
17
17
  }),
18
+ attachPaymentIntent: stripeMethod({
19
+ method: 'POST',
20
+ fullPath: '/v1/invoices/{invoice}/attach_payment_intent',
21
+ }),
18
22
  createPreview: stripeMethod({
19
23
  method: 'POST',
20
24
  fullPath: '/v1/invoices/create_preview',
@@ -28,6 +32,11 @@ export const Invoices = StripeResource.extend({
28
32
  fullPath: '/v1/invoices/{invoice}/lines',
29
33
  methodType: 'list',
30
34
  }),
35
+ listPayments: stripeMethod({
36
+ method: 'GET',
37
+ fullPath: '/v1/invoices/{invoice}/payments',
38
+ methodType: 'list',
39
+ }),
31
40
  listUpcomingLines: stripeMethod({
32
41
  method: 'GET',
33
42
  fullPath: '/v1/invoices/upcoming/lines',
@@ -42,6 +51,10 @@ export const Invoices = StripeResource.extend({
42
51
  method: 'POST',
43
52
  fullPath: '/v1/invoices/{invoice}/remove_lines',
44
53
  }),
54
+ retrievePayment: stripeMethod({
55
+ method: 'GET',
56
+ fullPath: '/v1/invoices/{invoice}/payments/{invoice_payment}',
57
+ }),
45
58
  retrieveUpcoming: stripeMethod({
46
59
  method: 'GET',
47
60
  fullPath: '/v1/invoices/upcoming',