stripe 16.11.0 → 16.12.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,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 16.12.0 - 2024-09-18
4
+ * [#2177](https://github.com/stripe/stripe-node/pull/2177) Update generated code
5
+ * Add support for new value `international_transaction` on enum `Treasury.ReceivedDebit.failure_code`
6
+ * [#2175](https://github.com/stripe/stripe-node/pull/2175) Update generated code
7
+ * Add support for new value `verification_supportability` on enums `Account.future_requirements.errors[].code`, `Account.requirements.errors[].code`, `BankAccount.future_requirements.errors[].code`, and `BankAccount.requirements.errors[].code`
8
+ * Add support for new value `terminal_reader_invalid_location_for_activation` on enums `Invoice.last_finalization_error.code`, `PaymentIntent.last_payment_error.code`, `SetupAttempt.setup_error.code`, `SetupIntent.last_setup_error.code`, and `StripeError.code`
9
+ * Add support for `payer_details` on `Charge.payment_method_details.klarna`
10
+ * Add support for `amazon_pay` on `Dispute.payment_method_details`
11
+ * Add support for new value `amazon_pay` on enum `Dispute.payment_method_details.type`
12
+ * Add support for `automatically_finalizes_at` on `Invoice`
13
+ * Add support for `state_sales_tax` on `Tax.Registration.country_options.us` and `Tax.RegistrationCreateParams.country_options.us`
14
+
3
15
  ## 16.11.0 - 2024-09-12
4
16
  * [#2171](https://github.com/stripe/stripe-node/pull/2171) Update generated code
5
17
  * Add support for new resource `InvoiceRenderingTemplate`
@@ -9,7 +21,6 @@
9
21
  * Add support for `template_version` on `Invoice.rendering`, `InvoiceCreateParams.rendering`, and `InvoiceUpdateParams.rendering`
10
22
  * Add support for new value `submitted` on enum `Issuing.Card.shipping.status`
11
23
  * Change `TestHelpers.TestClock.status_details` to be required
12
- * [#2172](https://github.com/stripe/stripe-node/pull/2172) Null out empty data sent to GET/DELETE APIs
13
24
 
14
25
  ## 16.10.0 - 2024-09-05
15
26
  * [#2158](https://github.com/stripe/stripe-node/pull/2158) Update generated code
package/VERSION CHANGED
@@ -1 +1 @@
1
- 16.11.0
1
+ 16.12.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 = '16.11.0';
37
+ Stripe.PACKAGE_VERSION = '16.12.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 = '16.11.0';
34
+ Stripe.PACKAGE_VERSION = '16.12.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": "16.11.0",
3
+ "version": "16.12.0",
4
4
  "description": "Stripe API wrapper",
5
5
  "keywords": [
6
6
  "stripe",
@@ -1007,7 +1007,8 @@ declare module 'stripe' {
1007
1007
  | 'verification_missing_executives'
1008
1008
  | 'verification_missing_owners'
1009
1009
  | 'verification_requires_additional_memorandum_of_associations'
1010
- | 'verification_requires_additional_proof_of_registration';
1010
+ | 'verification_requires_additional_proof_of_registration'
1011
+ | 'verification_supportability';
1011
1012
  }
1012
1013
  }
1013
1014
 
@@ -1173,7 +1174,8 @@ declare module 'stripe' {
1173
1174
  | 'verification_missing_executives'
1174
1175
  | 'verification_missing_owners'
1175
1176
  | 'verification_requires_additional_memorandum_of_associations'
1176
- | 'verification_requires_additional_proof_of_registration';
1177
+ | 'verification_requires_additional_proof_of_registration'
1178
+ | 'verification_supportability';
1177
1179
  }
1178
1180
  }
1179
1181
 
@@ -250,7 +250,8 @@ declare module 'stripe' {
250
250
  | 'verification_missing_executives'
251
251
  | 'verification_missing_owners'
252
252
  | 'verification_requires_additional_memorandum_of_associations'
253
- | 'verification_requires_additional_proof_of_registration';
253
+ | 'verification_requires_additional_proof_of_registration'
254
+ | 'verification_supportability';
254
255
  }
255
256
  }
256
257
 
@@ -384,7 +385,8 @@ declare module 'stripe' {
384
385
  | 'verification_missing_executives'
385
386
  | 'verification_missing_owners'
386
387
  | 'verification_requires_additional_memorandum_of_associations'
387
- | 'verification_requires_additional_proof_of_registration';
388
+ | 'verification_requires_additional_proof_of_registration'
389
+ | 'verification_supportability';
388
390
  }
389
391
  }
390
392
  }
@@ -218,7 +218,8 @@ declare module 'stripe' {
218
218
  | 'verification_missing_executives'
219
219
  | 'verification_missing_owners'
220
220
  | 'verification_requires_additional_memorandum_of_associations'
221
- | 'verification_requires_additional_proof_of_registration';
221
+ | 'verification_requires_additional_proof_of_registration'
222
+ | 'verification_supportability';
222
223
  }
223
224
  }
224
225
 
@@ -396,7 +397,8 @@ declare module 'stripe' {
396
397
  | 'verification_missing_executives'
397
398
  | 'verification_missing_owners'
398
399
  | 'verification_requires_additional_memorandum_of_associations'
399
- | 'verification_requires_additional_proof_of_registration';
400
+ | 'verification_requires_additional_proof_of_registration'
401
+ | 'verification_supportability';
400
402
  }
401
403
  }
402
404
 
@@ -1657,6 +1657,11 @@ declare module 'stripe' {
1657
1657
  }
1658
1658
 
1659
1659
  interface Klarna {
1660
+ /**
1661
+ * The payer details for this transaction.
1662
+ */
1663
+ payer_details: Klarna.PayerDetails | null;
1664
+
1660
1665
  /**
1661
1666
  * The Klarna payment method used for this transaction.
1662
1667
  * Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments`
@@ -1670,6 +1675,24 @@ declare module 'stripe' {
1670
1675
  preferred_locale: string | null;
1671
1676
  }
1672
1677
 
1678
+ namespace Klarna {
1679
+ interface PayerDetails {
1680
+ /**
1681
+ * The payer's address
1682
+ */
1683
+ address: PayerDetails.Address | null;
1684
+ }
1685
+
1686
+ namespace PayerDetails {
1687
+ interface Address {
1688
+ /**
1689
+ * The payer address country
1690
+ */
1691
+ country: string | null;
1692
+ }
1693
+ }
1694
+ }
1695
+
1673
1696
  interface Konbini {
1674
1697
  /**
1675
1698
  * If the payment succeeded, this contains the details of the convenience store where the payment was completed.
@@ -248,6 +248,8 @@ declare module 'stripe' {
248
248
  }
249
249
 
250
250
  interface PaymentMethodDetails {
251
+ amazon_pay?: PaymentMethodDetails.AmazonPay;
252
+
251
253
  card?: PaymentMethodDetails.Card;
252
254
 
253
255
  klarna?: PaymentMethodDetails.Klarna;
@@ -261,6 +263,17 @@ declare module 'stripe' {
261
263
  }
262
264
 
263
265
  namespace PaymentMethodDetails {
266
+ interface AmazonPay {
267
+ /**
268
+ * The AmazonPay dispute type, chargeback or claim
269
+ */
270
+ dispute_type: AmazonPay.DisputeType | null;
271
+ }
272
+
273
+ namespace AmazonPay {
274
+ type DisputeType = 'chargeback' | 'claim';
275
+ }
276
+
264
277
  interface Card {
265
278
  /**
266
279
  * Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
@@ -301,7 +314,7 @@ declare module 'stripe' {
301
314
  reason_code: string | null;
302
315
  }
303
316
 
304
- type Type = 'card' | 'klarna' | 'paypal';
317
+ type Type = 'amazon_pay' | 'card' | 'klarna' | 'paypal';
305
318
  }
306
319
 
307
320
  type Status =
@@ -3,7 +3,8 @@
3
3
  declare module 'stripe' {
4
4
  namespace Stripe {
5
5
  /**
6
- * The InvoiceRenderingTemplate object.
6
+ * Invoice Rendering Templates are used to configure how invoices are rendered on surfaces like the PDF. Invoice Rendering Templates
7
+ * can be created from within the Dashboard, and they can be used over the API when creating invoices.
7
8
  */
8
9
  interface InvoiceRenderingTemplate {
9
10
  /**
@@ -135,6 +135,11 @@ declare module 'stripe' {
135
135
 
136
136
  automatic_tax: Invoice.AutomaticTax;
137
137
 
138
+ /**
139
+ * The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized.
140
+ */
141
+ automatically_finalizes_at: number | null;
142
+
138
143
  /**
139
144
  * Indicates the reason why the invoice was created.
140
145
  *
@@ -940,6 +945,7 @@ declare module 'stripe' {
940
945
  | 'terminal_location_country_unsupported'
941
946
  | 'terminal_reader_busy'
942
947
  | 'terminal_reader_hardware_fault'
948
+ | 'terminal_reader_invalid_location_for_activation'
943
949
  | 'terminal_reader_invalid_location_for_payment'
944
950
  | 'terminal_reader_offline'
945
951
  | 'terminal_reader_timeout'
@@ -539,6 +539,7 @@ declare module 'stripe' {
539
539
  | 'terminal_location_country_unsupported'
540
540
  | 'terminal_reader_busy'
541
541
  | 'terminal_reader_hardware_fault'
542
+ | 'terminal_reader_invalid_location_for_activation'
542
543
  | 'terminal_reader_invalid_location_for_payment'
543
544
  | 'terminal_reader_offline'
544
545
  | 'terminal_reader_timeout'
@@ -443,7 +443,8 @@ declare module 'stripe' {
443
443
  | 'verification_missing_executives'
444
444
  | 'verification_missing_owners'
445
445
  | 'verification_requires_additional_memorandum_of_associations'
446
- | 'verification_requires_additional_proof_of_registration';
446
+ | 'verification_requires_additional_proof_of_registration'
447
+ | 'verification_supportability';
447
448
  }
448
449
  }
449
450
 
@@ -638,7 +639,8 @@ declare module 'stripe' {
638
639
  | 'verification_missing_executives'
639
640
  | 'verification_missing_owners'
640
641
  | 'verification_requires_additional_memorandum_of_associations'
641
- | 'verification_requires_additional_proof_of_registration';
642
+ | 'verification_requires_additional_proof_of_registration'
643
+ | 'verification_supportability';
642
644
  }
643
645
  }
644
646
 
@@ -783,6 +783,7 @@ declare module 'stripe' {
783
783
  | 'terminal_location_country_unsupported'
784
784
  | 'terminal_reader_busy'
785
785
  | 'terminal_reader_hardware_fault'
786
+ | 'terminal_reader_invalid_location_for_activation'
786
787
  | 'terminal_reader_invalid_location_for_payment'
787
788
  | 'terminal_reader_offline'
788
789
  | 'terminal_reader_timeout'
@@ -448,6 +448,7 @@ declare module 'stripe' {
448
448
  | 'terminal_location_country_unsupported'
449
449
  | 'terminal_reader_busy'
450
450
  | 'terminal_reader_hardware_fault'
451
+ | 'terminal_reader_invalid_location_for_activation'
451
452
  | 'terminal_reader_invalid_location_for_payment'
452
453
  | 'terminal_reader_offline'
453
454
  | 'terminal_reader_timeout'
@@ -1023,6 +1023,8 @@ declare module 'stripe' {
1023
1023
  */
1024
1024
  state: string;
1025
1025
 
1026
+ state_sales_tax?: Us.StateSalesTax;
1027
+
1026
1028
  /**
1027
1029
  * Type of registration in the US.
1028
1030
  */
@@ -1044,6 +1046,34 @@ declare module 'stripe' {
1044
1046
  jurisdiction: string;
1045
1047
  }
1046
1048
 
1049
+ interface StateSalesTax {
1050
+ /**
1051
+ * Elections for the state sales tax registration.
1052
+ */
1053
+ elections?: Array<StateSalesTax.Election>;
1054
+ }
1055
+
1056
+ namespace StateSalesTax {
1057
+ interface Election {
1058
+ /**
1059
+ * A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction.
1060
+ */
1061
+ jurisdiction?: string;
1062
+
1063
+ /**
1064
+ * The type of the election for the state sales tax registration.
1065
+ */
1066
+ type: Election.Type;
1067
+ }
1068
+
1069
+ namespace Election {
1070
+ type Type =
1071
+ | 'local_use_tax'
1072
+ | 'simplified_sellers_use_tax'
1073
+ | 'single_local_use_tax';
1074
+ }
1075
+ }
1076
+
1047
1077
  type Type =
1048
1078
  | 'local_amusement_tax'
1049
1079
  | 'local_lease_tax'
@@ -1257,6 +1257,11 @@ declare module 'stripe' {
1257
1257
  */
1258
1258
  state: string;
1259
1259
 
1260
+ /**
1261
+ * Options for the state sales tax registration.
1262
+ */
1263
+ state_sales_tax?: Us.StateSalesTax;
1264
+
1260
1265
  /**
1261
1266
  * Type of registration to be created in the US.
1262
1267
  */
@@ -1278,6 +1283,34 @@ declare module 'stripe' {
1278
1283
  jurisdiction: string;
1279
1284
  }
1280
1285
 
1286
+ interface StateSalesTax {
1287
+ /**
1288
+ * Elections for the state sales tax registration.
1289
+ */
1290
+ elections: Array<StateSalesTax.Election>;
1291
+ }
1292
+
1293
+ namespace StateSalesTax {
1294
+ interface Election {
1295
+ /**
1296
+ * A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `003` (Allegheny County) and `60000` (Philadelphia City).
1297
+ */
1298
+ jurisdiction?: string;
1299
+
1300
+ /**
1301
+ * The type of the election for the state sales tax registration.
1302
+ */
1303
+ type: Election.Type;
1304
+ }
1305
+
1306
+ namespace Election {
1307
+ type Type =
1308
+ | 'local_use_tax'
1309
+ | 'simplified_sellers_use_tax'
1310
+ | 'single_local_use_tax';
1311
+ }
1312
+ }
1313
+
1281
1314
  type Type =
1282
1315
  | 'local_amusement_tax'
1283
1316
  | 'local_lease_tax'
@@ -87,6 +87,7 @@ declare module 'stripe' {
87
87
  | 'account_closed'
88
88
  | 'account_frozen'
89
89
  | 'insufficient_funds'
90
+ | 'international_transaction'
90
91
  | 'other';
91
92
 
92
93
  interface InitiatingPaymentMethodDetails {