stripe 14.10.0 → 14.11.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,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 14.11.0 - 2024-01-04
4
+ * [#1985](https://github.com/stripe/stripe-node/pull/1985) Update generated code
5
+ * Add support for `retrieve` method on resource `Tax.Registration`
6
+ * Change `AccountSession.components.payment_details.features`, `AccountSession.components.payment_details`, `AccountSession.components.payments.features`, `AccountSession.components.payments`, `AccountSession.components.payouts.features`, `AccountSession.components.payouts`, `PaymentLink.inactive_message`, and `PaymentLink.restrictions` to be required
7
+ * Change type of `SubscriptionSchedule.default_settings.invoice_settings` from `InvoiceSettingSubscriptionScheduleSetting | null` to `InvoiceSettingSubscriptionScheduleSetting`
8
+ * [#1987](https://github.com/stripe/stripe-node/pull/1987) Update docstrings to indicate removal of deprecated event types
9
+
3
10
  ## 14.10.0 - 2023-12-22
4
11
  * [#1979](https://github.com/stripe/stripe-node/pull/1979) Update generated code
5
12
  * Add support for `collection_method` on `Mandate.payment_method_details.us_bank_account`
package/VERSION CHANGED
@@ -1 +1 @@
1
- 14.10.0
1
+ 14.11.0
@@ -6,6 +6,10 @@ const StripeResource_js_1 = require("../../StripeResource.js");
6
6
  const stripeMethod = StripeResource_js_1.StripeResource.method;
7
7
  exports.Registrations = StripeResource_js_1.StripeResource.extend({
8
8
  create: stripeMethod({ method: 'POST', fullPath: '/v1/tax/registrations' }),
9
+ retrieve: stripeMethod({
10
+ method: 'GET',
11
+ fullPath: '/v1/tax/registrations/{id}',
12
+ }),
9
13
  update: stripeMethod({
10
14
  method: 'POST',
11
15
  fullPath: '/v1/tax/registrations/{id}',
@@ -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 = '14.10.0';
37
+ Stripe.PACKAGE_VERSION = '14.11.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;
@@ -3,6 +3,10 @@ import { StripeResource } from '../../StripeResource.js';
3
3
  const stripeMethod = StripeResource.method;
4
4
  export const Registrations = StripeResource.extend({
5
5
  create: stripeMethod({ method: 'POST', fullPath: '/v1/tax/registrations' }),
6
+ retrieve: stripeMethod({
7
+ method: 'GET',
8
+ fullPath: '/v1/tax/registrations/{id}',
9
+ }),
6
10
  update: stripeMethod({
7
11
  method: 'POST',
8
12
  fullPath: '/v1/tax/registrations/{id}',
@@ -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 = '14.10.0';
34
+ Stripe.PACKAGE_VERSION = '14.11.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": "14.10.0",
3
+ "version": "14.11.0",
4
4
  "description": "Stripe API wrapper",
5
5
  "keywords": [
6
6
  "stripe",
@@ -48,11 +48,11 @@ declare module 'stripe' {
48
48
  interface Components {
49
49
  account_onboarding: Components.AccountOnboarding;
50
50
 
51
- payment_details?: Components.PaymentDetails;
51
+ payment_details: Components.PaymentDetails;
52
52
 
53
- payments?: Components.Payments;
53
+ payments: Components.Payments;
54
54
 
55
- payouts?: Components.Payouts;
55
+ payouts: Components.Payouts;
56
56
  }
57
57
 
58
58
  namespace Components {
@@ -75,7 +75,7 @@ declare module 'stripe' {
75
75
  */
76
76
  enabled: boolean;
77
77
 
78
- features?: PaymentDetails.Features;
78
+ features: PaymentDetails.Features;
79
79
  }
80
80
 
81
81
  namespace PaymentDetails {
@@ -103,7 +103,7 @@ declare module 'stripe' {
103
103
  */
104
104
  enabled: boolean;
105
105
 
106
- features?: Payments.Features;
106
+ features: Payments.Features;
107
107
  }
108
108
 
109
109
  namespace Payments {
@@ -131,7 +131,7 @@ declare module 'stripe' {
131
131
  */
132
132
  enabled: boolean;
133
133
 
134
- features?: Payouts.Features;
134
+ features: Payouts.Features;
135
135
  }
136
136
 
137
137
  namespace Payouts {
@@ -3393,8 +3393,7 @@ declare module 'stripe' {
3393
3393
  }
3394
3394
 
3395
3395
  /**
3396
- * The "invoiceitem.updated" event type.
3397
- * See https://stripe.com/docs/api/events/types#event_types-invoiceitem.updated for details.
3396
+ * The "invoiceitem.updated" event is deprecated and will be removed in the next major version
3398
3397
  */
3399
3398
  interface InvoiceitemUpdatedEvent extends EventBase {
3400
3399
  type: 'invoiceitem.updated';
@@ -3406,8 +3405,7 @@ declare module 'stripe' {
3406
3405
  }
3407
3406
 
3408
3407
  /**
3409
- * The "order.created" event type.
3410
- * See https://stripe.com/docs/api/events/types#event_types-order.created for details.
3408
+ * The "order.created" event is deprecated and will be removed in the next major version
3411
3409
  */
3412
3410
  interface OrderCreatedEvent extends EventBase {
3413
3411
  type: 'order.created';
@@ -3419,8 +3417,7 @@ declare module 'stripe' {
3419
3417
  }
3420
3418
 
3421
3419
  /**
3422
- * The "recipient.created" event type.
3423
- * See https://stripe.com/docs/api/events/types#event_types-recipient.created for details.
3420
+ * The "recipient.created" event is deprecated and will be removed in the next major version
3424
3421
  */
3425
3422
  interface RecipientCreatedEvent extends EventBase {
3426
3423
  type: 'recipient.created';
@@ -3432,8 +3429,7 @@ declare module 'stripe' {
3432
3429
  }
3433
3430
 
3434
3431
  /**
3435
- * The "recipient.deleted" event type.
3436
- * See https://stripe.com/docs/api/events/types#event_types-recipient.deleted for details.
3432
+ * The "recipient.deleted" event is deprecated and will be removed in the next major version
3437
3433
  */
3438
3434
  interface RecipientDeletedEvent extends EventBase {
3439
3435
  type: 'recipient.deleted';
@@ -3445,8 +3441,7 @@ declare module 'stripe' {
3445
3441
  }
3446
3442
 
3447
3443
  /**
3448
- * The "recipient.updated" event type.
3449
- * See https://stripe.com/docs/api/events/types#event_types-recipient.updated for details.
3444
+ * The "recipient.updated" event is deprecated and will be removed in the next major version
3450
3445
  */
3451
3446
  interface RecipientUpdatedEvent extends EventBase {
3452
3447
  type: 'recipient.updated';
@@ -3458,8 +3453,7 @@ declare module 'stripe' {
3458
3453
  }
3459
3454
 
3460
3455
  /**
3461
- * The "sku.created" event type.
3462
- * See https://stripe.com/docs/api/events/types#event_types-sku.created for details.
3456
+ * The "sku.created" event is deprecated and will be removed in the next major version
3463
3457
  */
3464
3458
  interface SkuCreatedEvent extends EventBase {
3465
3459
  type: 'sku.created';
@@ -3471,8 +3465,7 @@ declare module 'stripe' {
3471
3465
  }
3472
3466
 
3473
3467
  /**
3474
- * The "sku.deleted" event type.
3475
- * See https://stripe.com/docs/api/events/types#event_types-sku.deleted for details.
3468
+ * The "sku.deleted" event is deprecated and will be removed in the next major version
3476
3469
  */
3477
3470
  interface SkuDeletedEvent extends EventBase {
3478
3471
  type: 'sku.deleted';
@@ -3484,8 +3477,7 @@ declare module 'stripe' {
3484
3477
  }
3485
3478
 
3486
3479
  /**
3487
- * The "sku.updated" event type.
3488
- * See https://stripe.com/docs/api/events/types#event_types-sku.updated for details.
3480
+ * The "sku.updated" event is deprecated and will be removed in the next major version
3489
3481
  */
3490
3482
  interface SkuUpdatedEvent extends EventBase {
3491
3483
  type: 'sku.updated';
@@ -83,7 +83,7 @@ declare module 'stripe' {
83
83
  /**
84
84
  * The custom message to be displayed to a customer when a payment link is no longer active.
85
85
  */
86
- inactive_message?: string | null;
86
+ inactive_message: string | null;
87
87
 
88
88
  /**
89
89
  * Configuration for creating invoice for payment mode payment links.
@@ -130,7 +130,7 @@ declare module 'stripe' {
130
130
  /**
131
131
  * Settings that restrict the usage of a payment link.
132
132
  */
133
- restrictions?: PaymentLink.Restrictions | null;
133
+ restrictions: PaymentLink.Restrictions | null;
134
134
 
135
135
  /**
136
136
  * Configuration for collecting the customer's shipping address.
@@ -146,10 +146,7 @@ declare module 'stripe' {
146
146
  */
147
147
  description: string | null;
148
148
 
149
- /**
150
- * The subscription schedule's default invoice settings.
151
- */
152
- invoice_settings: DefaultSettings.InvoiceSettings | null;
149
+ invoice_settings: DefaultSettings.InvoiceSettings;
153
150
 
154
151
  /**
155
152
  * The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details.
@@ -35,7 +35,7 @@ declare module 'stripe' {
35
35
  automatic_tax: Subscription.AutomaticTax;
36
36
 
37
37
  /**
38
- * Determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format.
38
+ * The reference point that aligns future [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle) dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. The timestamp is in UTC format.
39
39
  */
40
40
  billing_cycle_anchor: number;
41
41
 
@@ -29,7 +29,7 @@ declare module 'stripe' {
29
29
  backdate_start_date?: number;
30
30
 
31
31
  /**
32
- * A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format.
32
+ * A future timestamp in UTC format to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). The anchor is the reference point that aligns future billing cycle dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals.
33
33
  */
34
34
  billing_cycle_anchor?: number;
35
35
 
@@ -1217,6 +1217,13 @@ declare module 'stripe' {
1217
1217
  }
1218
1218
  }
1219
1219
 
1220
+ interface RegistrationRetrieveParams {
1221
+ /**
1222
+ * Specifies which fields in the response should be expanded.
1223
+ */
1224
+ expand?: Array<string>;
1225
+ }
1226
+
1220
1227
  interface RegistrationUpdateParams {
1221
1228
  /**
1222
1229
  * Time at which the registration becomes active. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch.
@@ -1259,6 +1266,19 @@ declare module 'stripe' {
1259
1266
  options?: RequestOptions
1260
1267
  ): Promise<Stripe.Response<Stripe.Tax.Registration>>;
1261
1268
 
1269
+ /**
1270
+ * Returns a Tax Registration object.
1271
+ */
1272
+ retrieve(
1273
+ id: string,
1274
+ params?: RegistrationRetrieveParams,
1275
+ options?: RequestOptions
1276
+ ): Promise<Stripe.Response<Stripe.Tax.Registration>>;
1277
+ retrieve(
1278
+ id: string,
1279
+ options?: RequestOptions
1280
+ ): Promise<Stripe.Response<Stripe.Tax.Registration>>;
1281
+
1262
1282
  /**
1263
1283
  * Updates an existing Tax Registration object.
1264
1284
  *