Skip to content

Commit

Permalink
Merge a2a1b85 into cfa17fc
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Apr 29, 2024
2 parents cfa17fc + a2a1b85 commit 58e173d
Show file tree
Hide file tree
Showing 29 changed files with 95 additions and 45 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@
* Add support for `payment_method_settings` on `AccountSessionCreateParams.components`
* Add support for `cancel_subscription_schedule` on `QuoteCreateParams.lines[]`, `QuoteLine`, and `QuoteUpdateParams.lines[]`

## 15.4.0 - 2024-04-25
* [#2071](https://github.com/stripe/stripe-node/pull/2071) Update generated code
* Add support for `setup_future_usage` on `Checkout.Session.payment_method_options.amazon_pay`, `Checkout.Session.payment_method_options.revolut_pay`, `PaymentIntent.payment_method_options.amazon_pay`, and `PaymentIntent.payment_method_options.revolut_pay`
* Change type of `Entitlements.ActiveEntitlement.feature` from `string` to `expandable(Entitlements.Feature)`
* Remove support for inadvertently released identity verification features `email` and `phone` on `Identity.VerificationSessionCreateParams.options` and `Identity.VerificationSessionUpdateParams.options`
* Change `Identity.VerificationSession.provided_details`, `Identity.VerificationSession.verified_outputs.email`, and `Identity.VerificationSession.verified_outputs.phone` to be required
* Add support for new values `amazon_pay` and `revolut_pay` on enums `Invoice.payment_settings.payment_method_types[]`, `InvoiceCreateParams.payment_settings.payment_method_types[]`, `InvoiceUpdateParams.payment_settings.payment_method_types[]`, `Subscription.payment_settings.payment_method_types[]`, `SubscriptionCreateParams.payment_settings.payment_method_types[]`, and `SubscriptionUpdateParams.payment_settings.payment_method_types[]`
* Add support for `amazon_pay` and `revolut_pay` on `Mandate.payment_method_details` and `SetupAttempt.payment_method_details`
* Add support for `ending_before`, `limit`, and `starting_after` on `PaymentMethodConfigurationListParams`
* Add support for `mobilepay` on `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationUpdateParams`, and `PaymentMethodConfiguration`
* [#2061](https://github.com/stripe/stripe-node/pull/2061) Make cloudflare package export

## 15.4.0-beta.1 - 2024-04-18
* [#2065](https://github.com/stripe/stripe-node/pull/2065) Update generated code for beta
* Add support for `capital_overview`, `tax_registrations`, and `tax_settings` on `AccountSessionCreateParams.components`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v993
v1001
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -467,14 +467,15 @@ stripe.customers

This is a convenience for cases where you expect the number of items
to be relatively small; accordingly, you must pass a `limit` option
to prevent runaway list growth from consuming too much memory.
to prevent runaway list growth from consuming too much memory. Once the
`limit` number of items have been fetched, auto-pagination will stop.

Returns a promise of an array of all items across pages for a list request.

```js
const allNewCustomers = await stripe.customers
.list({created: {gt: lastMonth}})
.autoPagingToArray({limit: 10000});
.list({created: {gt: lastMonth}, limit: 100}) // 100 items per page
.autoPagingToArray({limit: 10000}); // Stop after 10000 items total
```

### Telemetry
Expand Down
2 changes: 1 addition & 1 deletion types/Apps/Secrets.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ declare module 'stripe' {
/**
* The plaintext secret value to be stored.
*/
payload: string | null;
payload?: string | null;

scope: Secret.Scope;
}
Expand Down
2 changes: 1 addition & 1 deletion types/BillingPortal/Configurations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ declare module 'stripe' {
/**
* The list of up to 10 products that support subscription updates.
*/
products: Array<SubscriptionUpdate.Product> | null;
products?: Array<SubscriptionUpdate.Product> | null;

/**
* Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. Defaults to a value of `none` if you don't set it during creation.
Expand Down
2 changes: 1 addition & 1 deletion types/Charges.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ declare module 'stripe' {
/**
* A list of refunds that have been applied to the charge.
*/
refunds: ApiList<Stripe.Refund> | null;
refunds?: ApiList<Stripe.Refund> | null;

/**
* ID of the review associated with this charge if one exists.
Expand Down
13 changes: 13 additions & 0 deletions types/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,8 @@ declare module 'stripe' {

mobilepay?: PaymentMethodOptions.Mobilepay;

multibanco?: PaymentMethodOptions.Multibanco;

oxxo?: PaymentMethodOptions.Oxxo;

p24?: PaymentMethodOptions.P24;
Expand Down Expand Up @@ -1343,6 +1345,17 @@ declare module 'stripe' {
setup_future_usage?: 'none';
}

interface Multibanco {
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
* Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
*
* When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
*/
setup_future_usage?: 'none';
}

interface Oxxo {
/**
* The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
Expand Down
17 changes: 17 additions & 0 deletions types/Checkout/SessionsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,11 @@ declare module 'stripe' {
*/
mobilepay?: PaymentMethodOptions.Mobilepay;

/**
* contains details about the Multibanco payment method options.
*/
multibanco?: PaymentMethodOptions.Multibanco;

/**
* contains details about the OXXO payment method options.
*/
Expand Down Expand Up @@ -1544,6 +1549,17 @@ declare module 'stripe' {
setup_future_usage?: 'none';
}

interface Multibanco {
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
* Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
*
* When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
*/
setup_future_usage?: 'none';
}

interface Oxxo {
/**
* The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
Expand Down Expand Up @@ -1814,6 +1830,7 @@ declare module 'stripe' {
| 'konbini'
| 'link'
| 'mobilepay'
| 'multibanco'
| 'oxxo'
| 'p24'
| 'paynow'
Expand Down
2 changes: 1 addition & 1 deletion types/ConfirmationTokens.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ declare module 'stripe' {
/**
* The customer's date of birth, if provided.
*/
dob: Klarna.Dob | null;
dob?: Klarna.Dob | null;
}

namespace Klarna {
Expand Down
8 changes: 4 additions & 4 deletions types/CustomerSessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,22 +86,22 @@ declare module 'stripe' {
namespace PaymentElement {
interface Features {
/**
* Controls whether the Payment Element allows the removal of a saved payment method.
* Controls whether the Payment Element displays the option to remove a saved payment method.
*/
payment_method_remove: Features.PaymentMethodRemove;

/**
* Controls whether the Payment Element offers to save a new payment method.
* Controls whether the Payment Element displays a checkbox offering to save a new payment method.
*/
payment_method_save: Features.PaymentMethodSave;

/**
* Controls whether the Payment Element offers to set a payment method as the default.
* Controls whether the Payment Element displays a checkbox offering to set a saved payment method as the default.
*/
payment_method_set_as_default: Features.PaymentMethodSetAsDefault;

/**
* Controls whether the Payment Element allows the updating of a saved payment method.
* Controls whether the Payment Element displays the option to update a saved payment method.
*/
payment_method_update: Features.PaymentMethodUpdate;
}
Expand Down
8 changes: 4 additions & 4 deletions types/CustomerSessionsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,22 @@ declare module 'stripe' {
namespace PaymentElement {
interface Features {
/**
* Controls whether the Payment Element allows the removal of a saved payment method.
* Controls whether the Payment Element displays the option to remove a saved payment method.
*/
payment_method_remove?: Features.PaymentMethodRemove;

/**
* Controls whether the Payment Element offers to save a new payment method.
* Controls whether the Payment Element displays a checkbox offering to save a new payment method.
*/
payment_method_save?: Features.PaymentMethodSave;

/**
* Controls whether the Payment Element offers to set a payment method as the default.
* Controls whether the Payment Element displays a checkbox offering to set a saved payment method as the default.
*/
payment_method_set_as_default?: Features.PaymentMethodSetAsDefault;

/**
* Controls whether the Payment Element allows the updating of a saved payment method.
* Controls whether the Payment Element displays the option to update a saved payment method.
*/
payment_method_update?: Features.PaymentMethodUpdate;
}
Expand Down
4 changes: 2 additions & 2 deletions types/GiftCards/Cards.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ declare module 'stripe' {
/**
* Code used to redeem this gift card.
*/
code: string | null;
code?: string | null;

/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
Expand All @@ -61,7 +61,7 @@ declare module 'stripe' {
/**
* Transactions on this gift card.
*/
transactions: ApiList<Stripe.GiftCards.Transaction>;
transactions?: ApiList<Stripe.GiftCards.Transaction>;
}

namespace Card {
Expand Down
10 changes: 5 additions & 5 deletions types/Identity/VerificationReports.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ declare module 'stripe' {
/**
* Date of birth as it appears in the document.
*/
dob: Document.Dob | null;
dob?: Document.Dob | null;

/**
* Details on the verification error. Present when status is `unverified`.
Expand All @@ -105,7 +105,7 @@ declare module 'stripe' {
/**
* Expiration date of the document.
*/
expiration_date: Document.ExpirationDate | null;
expiration_date?: Document.ExpirationDate | null;

/**
* Array of [File](https://stripe.com/docs/api/files) ids containing images for this document.
Expand Down Expand Up @@ -135,7 +135,7 @@ declare module 'stripe' {
/**
* Document ID number.
*/
number: string | null;
number?: string | null;

/**
* Status of this `document` check.
Expand Down Expand Up @@ -267,7 +267,7 @@ declare module 'stripe' {
/**
* Date of birth.
*/
dob: IdNumber.Dob | null;
dob?: IdNumber.Dob | null;

/**
* Details on the verification error. Present when status is `unverified`.
Expand All @@ -282,7 +282,7 @@ declare module 'stripe' {
/**
* ID number. When `id_number_type` is `us_ssn`, only the last 4 digits are present.
*/
id_number: string | null;
id_number?: string | null;

/**
* Type of ID number.
Expand Down
8 changes: 4 additions & 4 deletions types/Identity/VerificationSessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ declare module 'stripe' {
/**
* Details provided about the user being verified. These details may be shown to the user.
*/
provided_details: VerificationSession.ProvidedDetails | null;
provided_details?: VerificationSession.ProvidedDetails | null;

/**
* Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null.
Expand Down Expand Up @@ -103,7 +103,7 @@ declare module 'stripe' {
/**
* The user's verified data.
*/
verified_outputs: VerificationSession.VerifiedOutputs | null;
verified_outputs?: VerificationSession.VerifiedOutputs | null;
}

namespace VerificationSession {
Expand Down Expand Up @@ -232,7 +232,7 @@ declare module 'stripe' {
/**
* The user's verified date of birth.
*/
dob: VerifiedOutputs.Dob | null;
dob?: VerifiedOutputs.Dob | null;

/**
* The user's verified email address
Expand All @@ -247,7 +247,7 @@ declare module 'stripe' {
/**
* The user's verified id number.
*/
id_number: string | null;
id_number?: string | null;

/**
* The user's verified id number type.
Expand Down
4 changes: 2 additions & 2 deletions types/Invoices.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,12 +358,12 @@ declare module 'stripe' {
payments?: ApiList<Stripe.InvoicePayment>;

/**
* End of the usage period during which invoice items were added to this invoice.
* End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](https://stripe.com/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price.
*/
period_end: number;

/**
* Start of the usage period during which invoice items were added to this invoice.
* Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](https://stripe.com/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price.
*/
period_start: number;

Expand Down
2 changes: 1 addition & 1 deletion types/Issuing/Disputes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ declare module 'stripe' {
/**
* List of balance transactions associated with the dispute.
*/
balance_transactions: Array<Stripe.BalanceTransaction> | null;
balance_transactions?: Array<Stripe.BalanceTransaction> | null;

/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
Expand Down
2 changes: 1 addition & 1 deletion types/Issuing/Transactions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ declare module 'stripe' {
/**
* Additional purchase information that is optionally provided by the merchant.
*/
purchase_details: Transaction.PurchaseDetails | null;
purchase_details?: Transaction.PurchaseDetails | null;

/**
* [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this transaction. If a network token was not used for this transaction, this field will be null.
Expand Down
5 changes: 5 additions & 0 deletions types/PaymentIntentsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7150,6 +7150,11 @@ declare module 'stripe' {
*/
payment_method_options?: PaymentIntentConfirmParams.PaymentMethodOptions;

/**
* The list of payment method types (for example, a card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
*/
payment_method_types?: Array<string>;

/**
* Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session).
*/
Expand Down
2 changes: 2 additions & 0 deletions types/PaymentMethodConfigurations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ declare module 'stripe' {
*
* Child configurations have a `parent` that sets default values and controls which settings connected accounts may override. You can specify a parent ID at payment time, and Stripe will automatically resolve the connected account's associated child configuration. Parent configurations are [managed in the dashboard](https://dashboard.stripe.com/settings/payment_methods/connected_accounts) and are not available in this API.
*
* **Note:** The ability to turn off cards is in limited preview. Please [contact us](https://support.stripe.com/contact) if you require this functionality.
*
* Related guides:
* - [Payment Method Configurations API](https://stripe.com/docs/connect/payment-method-configurations)
* - [Multiple configurations on dynamic payment methods](https://stripe.com/docs/payments/multiple-payment-method-configs)
Expand Down
2 changes: 1 addition & 1 deletion types/PaymentMethods.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ declare module 'stripe' {
/**
* The customer's date of birth, if provided.
*/
dob: Klarna.Dob | null;
dob?: Klarna.Dob | null;
}

namespace Klarna {
Expand Down
4 changes: 2 additions & 2 deletions types/QuotePreviewInvoices.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,12 @@ declare module 'stripe' {
payments?: ApiList<Stripe.InvoicePayment>;

/**
* End of the usage period during which invoice items were added to this invoice.
* End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](https://stripe.com/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price.
*/
period_end: number;

/**
* Start of the usage period during which invoice items were added to this invoice.
* Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](https://stripe.com/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price.
*/
period_start: number;

Expand Down
2 changes: 1 addition & 1 deletion types/Tax/CalculationLineItems.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ declare module 'stripe' {
/**
* Detailed account of taxes relevant to this line item.
*/
tax_breakdown: Array<CalculationLineItem.TaxBreakdown> | null;
tax_breakdown?: Array<CalculationLineItem.TaxBreakdown> | null;

/**
* The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource.
Expand Down

0 comments on commit 58e173d

Please sign in to comment.