Skip to content

Commit

Permalink
Merge pull request #2073 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
Update generated code for beta
  • Loading branch information
stripe-openapi[bot] committed May 2, 2024
2 parents cfa17fc + 8df525b commit 819167b
Show file tree
Hide file tree
Showing 45 changed files with 702 additions and 48 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
v1008
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 test/resources/generated_examples_test.spec.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions types/Accounts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,11 @@ declare module 'stripe' {
*/
promptpay_payments?: Capabilities.PromptpayPayments;

/**
* The status of the Rechnung capability of the account, or whether the account can directly process Rechnung payments.
*/
rechnung_payments?: Capabilities.RechnungPayments;

/**
* The status of the RevolutPay capability of the account, or whether the account can directly process RevolutPay payments.
*/
Expand Down Expand Up @@ -495,6 +500,8 @@ declare module 'stripe' {

type PromptpayPayments = 'active' | 'inactive' | 'pending';

type RechnungPayments = 'active' | 'inactive' | 'pending';

type RevolutPayPayments = 'active' | 'inactive' | 'pending';

type SepaDebitPayments = 'active' | 'inactive' | 'pending';
Expand Down
24 changes: 24 additions & 0 deletions types/AccountsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,11 @@ declare module 'stripe' {
*/
promptpay_payments?: Capabilities.PromptpayPayments;

/**
* The rechnung_payments capability.
*/
rechnung_payments?: Capabilities.RechnungPayments;

/**
* The revolut_pay_payments capability.
*/
Expand Down Expand Up @@ -640,6 +645,13 @@ declare module 'stripe' {
requested?: boolean;
}

interface RechnungPayments {
/**
* Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
*/
requested?: boolean;
}

interface RevolutPayPayments {
/**
* Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
Expand Down Expand Up @@ -1991,6 +2003,11 @@ declare module 'stripe' {
*/
promptpay_payments?: Capabilities.PromptpayPayments;

/**
* The rechnung_payments capability.
*/
rechnung_payments?: Capabilities.RechnungPayments;

/**
* The revolut_pay_payments capability.
*/
Expand Down Expand Up @@ -2272,6 +2289,13 @@ declare module 'stripe' {
requested?: boolean;
}

interface RechnungPayments {
/**
* Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
*/
requested?: boolean;
}

interface RevolutPayPayments {
/**
* Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
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
9 changes: 8 additions & 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 Expand Up @@ -434,6 +434,8 @@ declare module 'stripe' {

promptpay?: PaymentMethodDetails.Promptpay;

rechnung?: PaymentMethodDetails.Rechnung;

revolut_pay?: PaymentMethodDetails.RevolutPay;

sepa_credit_transfer?: PaymentMethodDetails.SepaCreditTransfer;
Expand Down Expand Up @@ -1659,6 +1661,9 @@ declare module 'stripe' {
}

interface Mobilepay {
/**
* Internal card details
*/
card: Mobilepay.Card | null;
}

Expand Down Expand Up @@ -1877,6 +1882,8 @@ declare module 'stripe' {
reference: string | null;
}

interface Rechnung {}

interface RevolutPay {}

interface SepaCreditTransfer {
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
29 changes: 28 additions & 1 deletion types/ConfirmationTokens.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ declare module 'stripe' {

promptpay?: PaymentMethodPreview.Promptpay;

rechnung?: PaymentMethodPreview.Rechnung;

revolut_pay?: PaymentMethodPreview.RevolutPay;

sepa_debit?: PaymentMethodPreview.SepaDebit;
Expand Down Expand Up @@ -874,7 +876,7 @@ declare module 'stripe' {
/**
* The customer's date of birth, if provided.
*/
dob: Klarna.Dob | null;
dob?: Klarna.Dob | null;
}

namespace Klarna {
Expand Down Expand Up @@ -906,6 +908,7 @@ declare module 'stripe' {

/**
* [Deprecated] This is a legacy parameter that no longer has any function.
* @deprecated
*/
persistent_token?: string;
}
Expand Down Expand Up @@ -1000,6 +1003,29 @@ declare module 'stripe' {

interface Promptpay {}

interface Rechnung {
dob?: Rechnung.Dob;
}

namespace Rechnung {
interface Dob {
/**
* The day of birth, between 1 and 31.
*/
day: number;

/**
* The month of birth, between 1 and 12.
*/
month: number;

/**
* The four-digit year of birth.
*/
year: number;
}
}

interface RevolutPay {}

interface SepaDebit {
Expand Down Expand Up @@ -1092,6 +1118,7 @@ declare module 'stripe' {
| 'payto'
| 'pix'
| 'promptpay'
| 'rechnung'
| 'revolut_pay'
| 'sepa_debit'
| 'sofort'
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
1 change: 1 addition & 0 deletions types/CustomersResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,7 @@ declare module 'stripe' {
| 'payto'
| 'pix'
| 'promptpay'
| 'rechnung'
| 'revolut_pay'
| 'sepa_debit'
| 'sofort'
Expand Down
18 changes: 17 additions & 1 deletion types/Disputes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -417,10 +417,12 @@ declare module 'stripe' {
interface PaymentMethodDetails {
card?: PaymentMethodDetails.Card;

paypal?: PaymentMethodDetails.Paypal;

/**
* Payment method type.
*/
type: 'card';
type: PaymentMethodDetails.Type;
}

namespace PaymentMethodDetails {
Expand All @@ -435,6 +437,20 @@ declare module 'stripe' {
*/
network_reason_code: string | null;
}

interface Paypal {
/**
* The ID of the dispute in PayPal.
*/
case_id: string | null;

/**
* The reason for the dispute as defined by PayPal
*/
reason_code: string | null;
}

type Type = 'card' | 'paypal';
}

type Status =
Expand Down
Loading

0 comments on commit 819167b

Please sign in to comment.