stripe 15.11.0 → 15.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,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 15.12.0 - 2024-06-17
4
+ * [#2109](https://github.com/stripe/stripe-node/pull/2109) Update generated code
5
+ * Add support for new value `mobilepay` on enums `PaymentLink.payment_method_types[]`, `PaymentLinkCreateParams.payment_method_types[]`, and `PaymentLinkUpdateParams.payment_method_types[]`
6
+ * Add support for `tax_id_collection` on `PaymentLinkUpdateParams`
7
+ * [#2111](https://github.com/stripe/stripe-node/pull/2111) Where params are union of types, merge the types instead of having numbered suffixes in type names
8
+ * Change type of `PaymentIntentConfirmParams.mandate_data` from `Stripe.Emptyable<PaymentIntentConfirmParams.MandateData1 | PaymentIntentConfirmParams.MandateData2>` to `Stripe.Emptyable<PaymentIntentConfirmParams.MandateData>` where the new MandateData is a union of all the properties of MandateData1 and MandateData2
9
+ * Change type of `PaymentMethodCreateParams.card` from `PaymentMethodCreateParams.Card1 | PaymentMethodCreateParams.Card2` to `PaymentMethodCreateParams.Card` where the new Card is a union of all the properties of Card1 and Card2
10
+ * Change type of `SetupIntentConfirmParams.mandate_data` from `Stripe.Emptyable<SetupIntentConfirmParams.MandateData1 | SetupIntentConfirmParams.MandateData2>` to `Stripe.Emptyable<SetupIntentConfirmParams.MandateData>` where the new MandateData is a union of all the properties of MandateData1 and MandateData2
11
+
3
12
  ## 15.11.0 - 2024-06-13
4
13
  * [#2102](https://github.com/stripe/stripe-node/pull/2102) Update generated code
5
14
  * Add support for `multibanco_payments` and `twint_payments` on `Account.capabilities`, `AccountCreateParams.capabilities`, and `AccountUpdateParams.capabilities`
package/VERSION CHANGED
@@ -1 +1 @@
1
- 15.11.0
1
+ 15.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 = '15.11.0';
37
+ Stripe.PACKAGE_VERSION = '15.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 = '15.11.0';
34
+ Stripe.PACKAGE_VERSION = '15.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": "15.11.0",
3
+ "version": "15.12.0",
4
4
  "description": "Stripe API wrapper",
5
5
  "keywords": [
6
6
  "stripe",
@@ -3661,7 +3661,7 @@ declare module 'stripe' {
3661
3661
  /**
3662
3662
  * To request a new capability for an account, pass true. There can be a delay before the requested capability becomes active. If the capability has any activation requirements, the response includes them in the `requirements` arrays.
3663
3663
  *
3664
- * If a capability isn't permanent, you can remove it from the account by passing false. Most capabilities are permanent after they've been requested. Attempting to remove a permanent capability returns an error.
3664
+ * If a capability isn't permanent, you can remove it from the account by passing false. Some capabilities are permanent after they've been requested. Attempting to remove a permanent capability returns an error.
3665
3665
  */
3666
3666
  requested?: boolean;
3667
3667
  }
@@ -4871,10 +4871,7 @@ declare module 'stripe' {
4871
4871
  */
4872
4872
  mandate?: string;
4873
4873
 
4874
- mandate_data?: Stripe.Emptyable<
4875
- | PaymentIntentConfirmParams.MandateData1
4876
- | PaymentIntentConfirmParams.MandateData2
4877
- >;
4874
+ mandate_data?: Stripe.Emptyable<PaymentIntentConfirmParams.MandateData>;
4878
4875
 
4879
4876
  /**
4880
4877
  * Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards).
@@ -4947,14 +4944,14 @@ declare module 'stripe' {
4947
4944
  namespace PaymentIntentConfirmParams {
4948
4945
  type CaptureMethod = 'automatic' | 'automatic_async' | 'manual';
4949
4946
 
4950
- interface MandateData1 {
4947
+ interface MandateData {
4951
4948
  /**
4952
4949
  * This hash contains details about the customer acceptance of the Mandate.
4953
4950
  */
4954
- customer_acceptance: MandateData1.CustomerAcceptance;
4951
+ customer_acceptance?: MandateData.CustomerAcceptance;
4955
4952
  }
4956
4953
 
4957
- namespace MandateData1 {
4954
+ namespace MandateData {
4958
4955
  interface CustomerAcceptance {
4959
4956
  /**
4960
4957
  * The time at which the customer accepted the Mandate.
@@ -4980,43 +4977,6 @@ declare module 'stripe' {
4980
4977
  namespace CustomerAcceptance {
4981
4978
  interface Offline {}
4982
4979
 
4983
- interface Online {
4984
- /**
4985
- * The IP address from which the Mandate was accepted by the customer.
4986
- */
4987
- ip_address: string;
4988
-
4989
- /**
4990
- * The user agent of the browser from which the Mandate was accepted by the customer.
4991
- */
4992
- user_agent: string;
4993
- }
4994
-
4995
- type Type = 'offline' | 'online';
4996
- }
4997
- }
4998
-
4999
- interface MandateData2 {
5000
- /**
5001
- * This hash contains details about the customer acceptance of the Mandate.
5002
- */
5003
- customer_acceptance: MandateData2.CustomerAcceptance;
5004
- }
5005
-
5006
- namespace MandateData2 {
5007
- interface CustomerAcceptance {
5008
- /**
5009
- * If this is a Mandate accepted online, this hash contains details about the online acceptance.
5010
- */
5011
- online: CustomerAcceptance.Online;
5012
-
5013
- /**
5014
- * The type of customer acceptance information included with the Mandate.
5015
- */
5016
- type: 'online';
5017
- }
5018
-
5019
- namespace CustomerAcceptance {
5020
4980
  interface Online {
5021
4981
  /**
5022
4982
  * The IP address from which the Mandate was accepted by the customer.
@@ -5028,6 +4988,8 @@ declare module 'stripe' {
5028
4988
  */
5029
4989
  user_agent?: string;
5030
4990
  }
4991
+
4992
+ type Type = 'offline' | 'online';
5031
4993
  }
5032
4994
  }
5033
4995
 
@@ -557,6 +557,7 @@ declare module 'stripe' {
557
557
  | 'klarna'
558
558
  | 'konbini'
559
559
  | 'link'
560
+ | 'mobilepay'
560
561
  | 'oxxo'
561
562
  | 'p24'
562
563
  | 'paynow'
@@ -614,6 +614,7 @@ declare module 'stripe' {
614
614
  | 'klarna'
615
615
  | 'konbini'
616
616
  | 'link'
617
+ | 'mobilepay'
617
618
  | 'oxxo'
618
619
  | 'p24'
619
620
  | 'paynow'
@@ -1116,6 +1117,11 @@ declare module 'stripe' {
1116
1117
  * When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`.
1117
1118
  */
1118
1119
  subscription_data?: PaymentLinkUpdateParams.SubscriptionData;
1120
+
1121
+ /**
1122
+ * Controls tax ID collection during checkout.
1123
+ */
1124
+ tax_id_collection?: PaymentLinkUpdateParams.TaxIdCollection;
1119
1125
  }
1120
1126
 
1121
1127
  namespace PaymentLinkUpdateParams {
@@ -1518,6 +1524,7 @@ declare module 'stripe' {
1518
1524
  | 'klarna'
1519
1525
  | 'konbini'
1520
1526
  | 'link'
1527
+ | 'mobilepay'
1521
1528
  | 'oxxo'
1522
1529
  | 'p24'
1523
1530
  | 'paynow'
@@ -1858,6 +1865,13 @@ declare module 'stripe' {
1858
1865
  }
1859
1866
  }
1860
1867
  }
1868
+
1869
+ interface TaxIdCollection {
1870
+ /**
1871
+ * Set to `true` to enable tax ID collection.
1872
+ */
1873
+ enabled: boolean;
1874
+ }
1861
1875
  }
1862
1876
 
1863
1877
  interface PaymentLinkListParams extends PaginationParams {
@@ -66,7 +66,7 @@ declare module 'stripe' {
66
66
  /**
67
67
  * If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly.
68
68
  */
69
- card?: PaymentMethodCreateParams.Card1 | PaymentMethodCreateParams.Card2;
69
+ card?: PaymentMethodCreateParams.Card;
70
70
 
71
71
  /**
72
72
  * If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
@@ -319,7 +319,7 @@ declare module 'stripe' {
319
319
  tax_id: string;
320
320
  }
321
321
 
322
- interface Card1 {
322
+ interface Card {
323
323
  /**
324
324
  * The card's CVC. It is highly recommended to always include this value.
325
325
  */
@@ -328,25 +328,30 @@ declare module 'stripe' {
328
328
  /**
329
329
  * Two-digit number representing the card's expiration month.
330
330
  */
331
- exp_month: number;
331
+ exp_month?: number;
332
332
 
333
333
  /**
334
334
  * Four-digit number representing the card's expiration year.
335
335
  */
336
- exp_year: number;
336
+ exp_year?: number;
337
337
 
338
338
  /**
339
339
  * Contains information about card networks used to process the payment.
340
340
  */
341
- networks?: Card1.Networks;
341
+ networks?: Card.Networks;
342
342
 
343
343
  /**
344
344
  * The card number, as a string without any separators.
345
345
  */
346
- number: string;
346
+ number?: string;
347
+
348
+ /**
349
+ * For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card: {token: "tok_visa"}.
350
+ */
351
+ token?: string;
347
352
  }
348
353
 
349
- namespace Card1 {
354
+ namespace Card {
350
355
  interface Networks {
351
356
  /**
352
357
  * The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card.
@@ -359,13 +364,6 @@ declare module 'stripe' {
359
364
  }
360
365
  }
361
366
 
362
- interface Card2 {
363
- /**
364
- * For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card: {token: "tok_visa"}.
365
- */
366
- token: string;
367
- }
368
-
369
367
  interface Cashapp {}
370
368
 
371
369
  interface CustomerBalance {}
@@ -2339,10 +2339,7 @@ declare module 'stripe' {
2339
2339
  */
2340
2340
  expand?: Array<string>;
2341
2341
 
2342
- mandate_data?: Stripe.Emptyable<
2343
- | SetupIntentConfirmParams.MandateData1
2344
- | SetupIntentConfirmParams.MandateData2
2345
- >;
2342
+ mandate_data?: Stripe.Emptyable<SetupIntentConfirmParams.MandateData>;
2346
2343
 
2347
2344
  /**
2348
2345
  * ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.
@@ -2374,14 +2371,14 @@ declare module 'stripe' {
2374
2371
  }
2375
2372
 
2376
2373
  namespace SetupIntentConfirmParams {
2377
- interface MandateData1 {
2374
+ interface MandateData {
2378
2375
  /**
2379
2376
  * This hash contains details about the customer acceptance of the Mandate.
2380
2377
  */
2381
- customer_acceptance: MandateData1.CustomerAcceptance;
2378
+ customer_acceptance?: MandateData.CustomerAcceptance;
2382
2379
  }
2383
2380
 
2384
- namespace MandateData1 {
2381
+ namespace MandateData {
2385
2382
  interface CustomerAcceptance {
2386
2383
  /**
2387
2384
  * The time at which the customer accepted the Mandate.
@@ -2407,43 +2404,6 @@ declare module 'stripe' {
2407
2404
  namespace CustomerAcceptance {
2408
2405
  interface Offline {}
2409
2406
 
2410
- interface Online {
2411
- /**
2412
- * The IP address from which the Mandate was accepted by the customer.
2413
- */
2414
- ip_address: string;
2415
-
2416
- /**
2417
- * The user agent of the browser from which the Mandate was accepted by the customer.
2418
- */
2419
- user_agent: string;
2420
- }
2421
-
2422
- type Type = 'offline' | 'online';
2423
- }
2424
- }
2425
-
2426
- interface MandateData2 {
2427
- /**
2428
- * This hash contains details about the customer acceptance of the Mandate.
2429
- */
2430
- customer_acceptance: MandateData2.CustomerAcceptance;
2431
- }
2432
-
2433
- namespace MandateData2 {
2434
- interface CustomerAcceptance {
2435
- /**
2436
- * If this is a Mandate accepted online, this hash contains details about the online acceptance.
2437
- */
2438
- online: CustomerAcceptance.Online;
2439
-
2440
- /**
2441
- * The type of customer acceptance information included with the Mandate.
2442
- */
2443
- type: 'online';
2444
- }
2445
-
2446
- namespace CustomerAcceptance {
2447
2407
  interface Online {
2448
2408
  /**
2449
2409
  * The IP address from which the Mandate was accepted by the customer.
@@ -2455,6 +2415,8 @@ declare module 'stripe' {
2455
2415
  */
2456
2416
  user_agent?: string;
2457
2417
  }
2418
+
2419
+ type Type = 'offline' | 'online';
2458
2420
  }
2459
2421
  }
2460
2422
 
@@ -326,7 +326,7 @@ declare module 'stripe' {
326
326
  ): Promise<Stripe.Response<Stripe.Tax.Calculation>>;
327
327
 
328
328
  /**
329
- * Retrieves the line items of a persisted tax calculation as a collection.
329
+ * Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired.
330
330
  */
331
331
  listLineItems(
332
332
  id: string,
@@ -15,7 +15,7 @@ declare module 'stripe' {
15
15
  object: 'terminal.connection_token';
16
16
 
17
17
  /**
18
- * The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens).
18
+ * The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens).
19
19
  */
20
20
  location?: string;
21
21
 
@@ -10,7 +10,7 @@ declare module 'stripe' {
10
10
  expand?: Array<string>;
11
11
 
12
12
  /**
13
- * The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens).
13
+ * The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens).
14
14
  */
15
15
  location?: string;
16
16
  }