stripe 13.7.0 → 13.8.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 13.8.0 - 2023-09-28
4
+ * [#1911](https://github.com/stripe/stripe-node/pull/1911) Update generated code
5
+ * Add support for `rendering` on `InvoiceCreateParams`, `InvoiceUpdateParams`, and `Invoice`
6
+ * Change `PaymentMethod.us_bank_account.financial_connections_account` and `PaymentMethod.us_bank_account.status_details` to be required
7
+
3
8
  ## 13.7.0 - 2023-09-21
4
9
  * [#1907](https://github.com/stripe/stripe-node/pull/1907) Update generated code
5
10
  * Add support for `terms_of_service_acceptance` on `Checkout.Session.custom_text`, `Checkout.SessionCreateParams.custom_text`, `PaymentLink.custom_text`, `PaymentLinkCreateParams.custom_text`, and `PaymentLinkUpdateParams.custom_text`
package/VERSION CHANGED
@@ -1 +1 @@
1
- 13.7.0
1
+ 13.8.0
@@ -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 = '13.7.0';
37
+ Stripe.PACKAGE_VERSION = '13.8.0';
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;
@@ -31,7 +31,7 @@ const ALLOWED_CONFIG_PROPERTIES = [
31
31
  ];
32
32
  const defaultRequestSenderFactory = (stripe) => new RequestSender(stripe, StripeResource.MAX_BUFFERED_REQUEST_METRICS);
33
33
  export function createStripe(platformFunctions, requestSender = defaultRequestSenderFactory) {
34
- Stripe.PACKAGE_VERSION = '13.7.0';
34
+ Stripe.PACKAGE_VERSION = '13.8.0';
35
35
  Stripe.USER_AGENT = Object.assign({ bindings_version: Stripe.PACKAGE_VERSION, lang: 'node', publisher: 'stripe', uname: null, typescript: false }, determineProcessUserAgentProperties());
36
36
  Stripe.StripeResource = StripeResource;
37
37
  Stripe.resources = resources;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stripe",
3
- "version": "13.7.0",
3
+ "version": "13.8.0",
4
4
  "description": "Stripe API wrapper",
5
5
  "keywords": [
6
6
  "stripe",
@@ -216,7 +216,7 @@ declare module 'stripe' {
216
216
  id: string | null;
217
217
 
218
218
  /**
219
- * The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products).
219
+ * The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products).
220
220
  */
221
221
  price: string | null;
222
222
 
@@ -68,7 +68,7 @@ declare module 'stripe' {
68
68
  namespace CustomerCashBalanceTransaction {
69
69
  interface AdjustedForOverdraft {
70
70
  /**
71
- * The [Balance Transaction](docs/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance.
71
+ * The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance.
72
72
  */
73
73
  balance_transaction: string | Stripe.BalanceTransaction;
74
74
 
package/types/Events.d.ts CHANGED
@@ -217,7 +217,6 @@ declare module 'stripe' {
217
217
  | 'issuing_transaction.created'
218
218
  | 'issuing_transaction.updated'
219
219
  | 'mandate.updated'
220
- | 'order.created'
221
220
  | 'payment_intent.amount_capturable_updated'
222
221
  | 'payment_intent.canceled'
223
222
  | 'payment_intent.created'
@@ -258,9 +257,6 @@ declare module 'stripe' {
258
257
  | 'quote.finalized'
259
258
  | 'radar.early_fraud_warning.created'
260
259
  | 'radar.early_fraud_warning.updated'
261
- | 'recipient.created'
262
- | 'recipient.deleted'
263
- | 'recipient.updated'
264
260
  | 'refund.created'
265
261
  | 'refund.updated'
266
262
  | 'reporting.report_run.failed'
@@ -274,9 +270,6 @@ declare module 'stripe' {
274
270
  | 'setup_intent.setup_failed'
275
271
  | 'setup_intent.succeeded'
276
272
  | 'sigma.scheduled_query_run.created'
277
- | 'sku.created'
278
- | 'sku.deleted'
279
- | 'sku.updated'
280
273
  | 'source.canceled'
281
274
  | 'source.chargeable'
282
275
  | 'source.failed'
@@ -337,7 +330,14 @@ declare module 'stripe' {
337
330
  | 'treasury.received_credit.failed'
338
331
  | 'treasury.received_credit.succeeded'
339
332
  | 'treasury.received_debit.created'
340
- | 'invoiceitem.updated';
333
+ | 'invoiceitem.updated'
334
+ | 'order.created'
335
+ | 'recipient.created'
336
+ | 'recipient.deleted'
337
+ | 'recipient.updated'
338
+ | 'sku.created'
339
+ | 'sku.deleted'
340
+ | 'sku.updated';
341
341
  }
342
342
  }
343
343
  }
@@ -353,7 +353,12 @@ declare module 'stripe' {
353
353
  receipt_number: string | null;
354
354
 
355
355
  /**
356
- * Options for invoice PDF rendering.
356
+ * The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
357
+ */
358
+ rendering: Invoice.Rendering | null;
359
+
360
+ /**
361
+ * This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering.
357
362
  */
358
363
  rendering_options: Invoice.RenderingOptions | null;
359
364
 
@@ -1079,6 +1084,31 @@ declare module 'stripe' {
1079
1084
  | 'wechat_pay';
1080
1085
  }
1081
1086
 
1087
+ interface Rendering {
1088
+ /**
1089
+ * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
1090
+ */
1091
+ amount_tax_display: string | null;
1092
+
1093
+ /**
1094
+ * Invoice pdf rendering options
1095
+ */
1096
+ pdf: Rendering.Pdf | null;
1097
+ }
1098
+
1099
+ namespace Rendering {
1100
+ interface Pdf {
1101
+ /**
1102
+ * Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale.
1103
+ */
1104
+ page_size: Pdf.PageSize | null;
1105
+ }
1106
+
1107
+ namespace Pdf {
1108
+ type PageSize = 'a4' | 'auto' | 'letter';
1109
+ }
1110
+ }
1111
+
1082
1112
  interface RenderingOptions {
1083
1113
  /**
1084
1114
  * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
@@ -119,7 +119,12 @@ declare module 'stripe' {
119
119
  pending_invoice_items_behavior?: InvoiceCreateParams.PendingInvoiceItemsBehavior;
120
120
 
121
121
  /**
122
- * Options for invoice PDF rendering.
122
+ * The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
123
+ */
124
+ rendering?: InvoiceCreateParams.Rendering;
125
+
126
+ /**
127
+ * This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering.
123
128
  */
124
129
  rendering_options?: Stripe.Emptyable<
125
130
  InvoiceCreateParams.RenderingOptions
@@ -449,6 +454,34 @@ declare module 'stripe' {
449
454
  | 'include'
450
455
  | 'include_and_require';
451
456
 
457
+ interface Rendering {
458
+ /**
459
+ * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
460
+ */
461
+ amount_tax_display?: Stripe.Emptyable<Rendering.AmountTaxDisplay>;
462
+
463
+ /**
464
+ * Invoice pdf rendering options
465
+ */
466
+ pdf?: Rendering.Pdf;
467
+ }
468
+
469
+ namespace Rendering {
470
+ type AmountTaxDisplay = 'exclude_tax' | 'include_inclusive_tax';
471
+
472
+ interface Pdf {
473
+ /**
474
+ * Page size for invoice PDF. Can be set to a4, letter, or auto.
475
+ * If set to auto, page size will be switched to a4 or letter based on customer locale.
476
+ */
477
+ page_size?: Pdf.PageSize;
478
+ }
479
+
480
+ namespace Pdf {
481
+ type PageSize = 'a4' | 'auto' | 'letter';
482
+ }
483
+ }
484
+
452
485
  interface RenderingOptions {
453
486
  /**
454
487
  * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
@@ -734,7 +767,12 @@ declare module 'stripe' {
734
767
  payment_settings?: InvoiceUpdateParams.PaymentSettings;
735
768
 
736
769
  /**
737
- * Options for invoice PDF rendering.
770
+ * The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
771
+ */
772
+ rendering?: InvoiceUpdateParams.Rendering;
773
+
774
+ /**
775
+ * This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering.
738
776
  */
739
777
  rendering_options?: Stripe.Emptyable<
740
778
  InvoiceUpdateParams.RenderingOptions
@@ -1042,6 +1080,34 @@ declare module 'stripe' {
1042
1080
  | 'wechat_pay';
1043
1081
  }
1044
1082
 
1083
+ interface Rendering {
1084
+ /**
1085
+ * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
1086
+ */
1087
+ amount_tax_display?: Stripe.Emptyable<Rendering.AmountTaxDisplay>;
1088
+
1089
+ /**
1090
+ * Invoice pdf rendering options
1091
+ */
1092
+ pdf?: Rendering.Pdf;
1093
+ }
1094
+
1095
+ namespace Rendering {
1096
+ type AmountTaxDisplay = 'exclude_tax' | 'include_inclusive_tax';
1097
+
1098
+ interface Pdf {
1099
+ /**
1100
+ * Page size for invoice PDF. Can be set to a4, letter, or auto.
1101
+ * If set to auto, page size will be switched to a4 or letter based on customer locale.
1102
+ */
1103
+ page_size?: Pdf.PageSize;
1104
+ }
1105
+
1106
+ namespace Pdf {
1107
+ type PageSize = 'a4' | 'auto' | 'letter';
1108
+ }
1109
+ }
1110
+
1045
1111
  interface RenderingOptions {
1046
1112
  /**
1047
1113
  * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
@@ -3,7 +3,7 @@
3
3
  declare module 'stripe' {
4
4
  namespace Stripe {
5
5
  /**
6
- * A Mandate is a record of the permission a customer has given you to debit their payment method.
6
+ * A Mandate is a record of the permission that your customer gives you to debit their payment method.
7
7
  */
8
8
  interface Mandate {
9
9
  /**
@@ -26,7 +26,7 @@ declare module 'stripe' {
26
26
  multi_use?: Mandate.MultiUse;
27
27
 
28
28
  /**
29
- * The account (if any) for which the mandate is intended.
29
+ * The account (if any) that the mandate is intended for.
30
30
  */
31
31
  on_behalf_of?: string;
32
32
 
@@ -40,7 +40,7 @@ declare module 'stripe' {
40
40
  single_use?: Mandate.SingleUse;
41
41
 
42
42
  /**
43
- * The status of the mandate, which indicates whether it can be used to initiate a payment.
43
+ * The mandate status indicates whether or not you can use it to initiate a payment.
44
44
  */
45
45
  status: Mandate.Status;
46
46
 
@@ -53,7 +53,7 @@ declare module 'stripe' {
53
53
  namespace Mandate {
54
54
  interface CustomerAcceptance {
55
55
  /**
56
- * The time at which the customer accepted the Mandate.
56
+ * The time that the customer accepts the mandate.
57
57
  */
58
58
  accepted_at: number | null;
59
59
 
@@ -62,7 +62,7 @@ declare module 'stripe' {
62
62
  online?: CustomerAcceptance.Online;
63
63
 
64
64
  /**
65
- * The type of customer acceptance information included with the Mandate. One of `online` or `offline`.
65
+ * The mandate includes the type of customer acceptance information, such as: `online` or `offline`.
66
66
  */
67
67
  type: CustomerAcceptance.Type;
68
68
  }
@@ -72,12 +72,12 @@ declare module 'stripe' {
72
72
 
73
73
  interface Online {
74
74
  /**
75
- * The IP address from which the Mandate was accepted by the customer.
75
+ * The customer accepts the mandate from this IP address.
76
76
  */
77
77
  ip_address: string | null;
78
78
 
79
79
  /**
80
- * The user agent of the browser from which the Mandate was accepted by the customer.
80
+ * The customer accepts the mandate using the user agent of the browser.
81
81
  */
82
82
  user_agent: string | null;
83
83
  }
@@ -105,7 +105,7 @@ declare module 'stripe' {
105
105
  sepa_debit?: PaymentMethodDetails.SepaDebit;
106
106
 
107
107
  /**
108
- * The type of the payment method associated with this mandate. An additional hash is included on `payment_method_details` with a name matching this value. It contains mandate information specific to the payment method.
108
+ * This mandate corresponds with a specific payment method type. The `payment_method_details` includes an additional hash with the same name and contains mandate information that's specific to that payment method.
109
109
  */
110
110
  type: string;
111
111
 
@@ -206,12 +206,12 @@ declare module 'stripe' {
206
206
 
207
207
  interface SingleUse {
208
208
  /**
209
- * On a single use mandate, the amount of the payment.
209
+ * The amount of the payment on a single use mandate.
210
210
  */
211
211
  amount: number;
212
212
 
213
213
  /**
214
- * On a single use mandate, the currency of the payment.
214
+ * The currency of the payment on a single use mandate.
215
215
  */
216
216
  currency: string;
217
217
  }
@@ -39,7 +39,7 @@ declare module 'stripe' {
39
39
  amount_details?: PaymentIntent.AmountDetails;
40
40
 
41
41
  /**
42
- * Amount that was collected by this PaymentIntent.
42
+ * Amount that this PaymentIntent collects.
43
43
  */
44
44
  amount_received: number;
45
45
 
@@ -119,7 +119,7 @@ declare module 'stripe' {
119
119
  last_payment_error: PaymentIntent.LastPaymentError | null;
120
120
 
121
121
  /**
122
- * The latest charge created by this payment intent.
122
+ * The latest charge created by this PaymentIntent.
123
123
  */
124
124
  latest_charge?: string | Stripe.Charge | null;
125
125
 
@@ -129,7 +129,7 @@ declare module 'stripe' {
129
129
  livemode: boolean;
130
130
 
131
131
  /**
132
- * 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. For more information, see the [documentation](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata).
132
+ * 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. Learn more about [storing information in metadata](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata).
133
133
  */
134
134
  metadata: Stripe.Metadata;
135
135
 
@@ -218,12 +218,12 @@ declare module 'stripe' {
218
218
  status: PaymentIntent.Status;
219
219
 
220
220
  /**
221
- * The data with which to automatically create a Transfer when the payment is finalized. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.
221
+ * The data that automatically creates a Transfer after the payment finalizes. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
222
222
  */
223
223
  transfer_data: PaymentIntent.TransferData | null;
224
224
 
225
225
  /**
226
- * A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details.
226
+ * A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers).
227
227
  */
228
228
  transfer_group: string | null;
229
229
  }
@@ -1289,8 +1289,8 @@ declare module 'stripe' {
1289
1289
  capture_method?: 'manual';
1290
1290
 
1291
1291
  /**
1292
- * Order identifier shown to the customer in Afterpay's online portal. We recommend using a value that helps you answer any questions a customer might have about
1293
- * the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes.
1292
+ * An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes.
1293
+ * This field differs from the statement descriptor and item name.
1294
1294
  */
1295
1295
  reference: string | null;
1296
1296
 
@@ -2115,8 +2115,8 @@ declare module 'stripe' {
2115
2115
  amount?: number;
2116
2116
 
2117
2117
  /**
2118
- * The account (if any) the payment will be attributed to for tax
2119
- * reporting, and where funds from the payment will be transferred to upon
2118
+ * The account (if any) that the payment is attributed to for tax
2119
+ * reporting, and where funds from the payment are transferred to after
2120
2120
  * payment success.
2121
2121
  */
2122
2122
  destination: string | Stripe.Account;