Skip to content

Commit

Permalink
Update generated code for beta (#1801)
Browse files Browse the repository at this point in the history
* Update cloudflare-pages test project build (#1800)

* Update cloudflare-pages build command

* use .gitignore instead

* Update generated code for v369

---------

Co-authored-by: anniel-stripe <97691964+anniel-stripe@users.noreply.github.com>
Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] and anniel-stripe committed Jun 1, 2023
1 parent ffdb857 commit 4c9bded
Show file tree
Hide file tree
Showing 30 changed files with 498 additions and 61 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ coverage
.idea
testProjects/**/node_modules
testProjects/**/package-lock.json
testProjects/**/_worker.*
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v358
v369
2 changes: 1 addition & 1 deletion src/apiVersion.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// File generated from our OpenAPI spec

export const ApiVersion = '2022-11-15';
export const PreviewVersion = '20230519T204128';
export const PreviewVersion = '2023-05-26.preview-v2';
2 changes: 1 addition & 1 deletion testProjects/cloudflare-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"description": "",
"scripts": {
"build": "wrangler pages functions build && rm _worker.js"
"build": "wrangler pages functions build"
},
"keywords": [],
"author": "",
Expand Down
27 changes: 25 additions & 2 deletions types/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -563,13 +563,33 @@ declare module 'stripe' {
}

interface Numeric {
/**
* The maximum character length constraint for the customer's input.
*/
maximum_length: number | null;

/**
* The minimum character length requirement for the customer's input.
*/
minimum_length: number | null;

/**
* The value entered by the customer, containing only digits.
*/
value: string | null;
}

interface Text {
/**
* The maximum character length constraint for the customer's input.
*/
maximum_length: number | null;

/**
* The minimum character length requirement for the customer's input.
*/
minimum_length: number | null;

/**
* The value entered by the customer.
*/
Expand Down Expand Up @@ -1008,7 +1028,7 @@ declare module 'stripe' {
>;

/**
* The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`.
* The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
*/
type: BankTransfer.Type | null;
}
Expand All @@ -1026,17 +1046,20 @@ declare module 'stripe' {
}

type RequestedAddressType =
| 'aba'
| 'iban'
| 'sepa'
| 'sort_code'
| 'spei'
| 'swift'
| 'zengin';

type Type =
| 'eu_bank_transfer'
| 'gb_bank_transfer'
| 'jp_bank_transfer'
| 'mx_bank_transfer';
| 'mx_bank_transfer'
| 'us_bank_transfer';
}
}

Expand Down
39 changes: 38 additions & 1 deletion types/Checkout/SessionsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,21 @@ declare module 'stripe' {
*/
label: CustomField.Label;

/**
* Configuration for `type=numeric` fields.
*/
numeric?: CustomField.Numeric;

/**
* Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
*/
optional?: boolean;

/**
* Configuration for `type=text` fields.
*/
text?: CustomField.Text;

/**
* The type of the field.
*/
Expand Down Expand Up @@ -376,6 +386,30 @@ declare module 'stripe' {
type: 'custom';
}

interface Numeric {
/**
* The maximum character length constraint for the customer's input.
*/
maximum_length?: number;

/**
* The minimum character length requirement for the customer's input.
*/
minimum_length?: number;
}

interface Text {
/**
* The maximum character length constraint for the customer's input.
*/
maximum_length?: number;

/**
* The minimum character length requirement for the customer's input.
*/
minimum_length?: number;
}

type Type = 'dropdown' | 'numeric' | 'text';
}

Expand Down Expand Up @@ -1218,17 +1252,20 @@ declare module 'stripe' {
}

type RequestedAddressType =
| 'aba'
| 'iban'
| 'sepa'
| 'sort_code'
| 'spei'
| 'swift'
| 'zengin';

type Type =
| 'eu_bank_transfer'
| 'gb_bank_transfer'
| 'jp_bank_transfer'
| 'mx_bank_transfer';
| 'mx_bank_transfer'
| 'us_bank_transfer';
}
}

Expand Down
23 changes: 21 additions & 2 deletions types/CustomerCashBalanceTransactions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,11 @@ declare module 'stripe' {
reference: string | null;

/**
* The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`.
* The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
*/
type: BankTransfer.Type;

us_bank_transfer?: BankTransfer.UsBankTransfer;
}

namespace BankTransfer {
Expand Down Expand Up @@ -150,7 +152,24 @@ declare module 'stripe' {
| 'eu_bank_transfer'
| 'gb_bank_transfer'
| 'jp_bank_transfer'
| 'mx_bank_transfer';
| 'mx_bank_transfer'
| 'us_bank_transfer';

interface UsBankTransfer {
/**
* The banking network used for this funding.
*/
network?: UsBankTransfer.Network;

/**
* The full name of the sender, as supplied by the sending bank.
*/
sender_name: string | null;
}

namespace UsBankTransfer {
type Network = 'ach' | 'domestic_wire_us' | 'swift';
}
}
}

Expand Down
3 changes: 2 additions & 1 deletion types/CustomersResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,8 @@ declare module 'stripe' {
| 'eu_bank_transfer'
| 'gb_bank_transfer'
| 'jp_bank_transfer'
| 'mx_bank_transfer';
| 'mx_bank_transfer'
| 'us_bank_transfer';
}
}

Expand Down
32 changes: 31 additions & 1 deletion types/Invoices.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,11 @@ declare module 'stripe' {
*/
subscription: string | Stripe.Subscription | null;

/**
* Details about the subscription that created this invoice.
*/
subscription_details?: Invoice.SubscriptionDetails | null;

/**
* Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
*/
Expand Down Expand Up @@ -990,7 +995,7 @@ declare module 'stripe' {
eu_bank_transfer?: BankTransfer.EuBankTransfer;

/**
* The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`.
* The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
*/
type: string | null;
}
Expand Down Expand Up @@ -1208,6 +1213,31 @@ declare module 'stripe' {
voided_at: number | null;
}

interface SubscriptionDetails {
/**
* If specified, payment collection for this subscription will be paused.
*/
pause_collection: SubscriptionDetails.PauseCollection | null;
}

namespace SubscriptionDetails {
interface PauseCollection {
/**
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
*/
behavior: PauseCollection.Behavior;

/**
* The time after which the subscription will resume collecting payments.
*/
resumes_at: number | null;
}

namespace PauseCollection {
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
}
}

interface ThresholdReason {
/**
* The total invoice amount threshold boundary if it triggered the threshold invoice.
Expand Down
4 changes: 2 additions & 2 deletions types/InvoicesResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ declare module 'stripe' {
eu_bank_transfer?: BankTransfer.EuBankTransfer;

/**
* The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`.
* The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
*/
type?: string;
}
Expand Down Expand Up @@ -1045,7 +1045,7 @@ declare module 'stripe' {
eu_bank_transfer?: BankTransfer.EuBankTransfer;

/**
* The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`.
* The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
*/
type?: string;
}
Expand Down
8 changes: 8 additions & 0 deletions types/Issuing/Cardholders.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ declare module 'stripe' {
*/
phone_number: string | null;

/**
* The cardholder's preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`.
* This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder.
*/
preferred_locales: Array<Cardholder.PreferredLocale> | null;

requirements: Cardholder.Requirements;

/**
Expand Down Expand Up @@ -184,6 +190,8 @@ declare module 'stripe' {
}
}

type PreferredLocale = 'de' | 'en' | 'es' | 'fr' | 'it';

interface Requirements {
/**
* If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason.
Expand Down
16 changes: 16 additions & 0 deletions types/Issuing/CardholdersResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ declare module 'stripe' {
*/
phone_number?: string;

/**
* The cardholder's preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`.
* This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder.
*/
preferred_locales?: Array<CardholderCreateParams.PreferredLocale>;

/**
* Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
*/
Expand Down Expand Up @@ -203,6 +209,8 @@ declare module 'stripe' {
}
}

type PreferredLocale = 'de' | 'en' | 'es' | 'fr' | 'it';

interface SpendingControls {
/**
* Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
Expand Down Expand Up @@ -1194,6 +1202,12 @@ declare module 'stripe' {
*/
phone_number?: string;

/**
* The cardholder's preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`.
* This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder.
*/
preferred_locales?: Array<CardholderUpdateParams.PreferredLocale>;

/**
* Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
*/
Expand Down Expand Up @@ -1347,6 +1361,8 @@ declare module 'stripe' {
}
}

type PreferredLocale = 'de' | 'en' | 'es' | 'fr' | 'it';

interface SpendingControls {
/**
* Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
Expand Down
7 changes: 5 additions & 2 deletions types/Orders.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ declare module 'stripe' {
>;

/**
* The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`.
* The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
*/
type: BankTransfer.Type | null;
}
Expand All @@ -489,17 +489,20 @@ declare module 'stripe' {
}

type RequestedAddressType =
| 'aba'
| 'iban'
| 'sepa'
| 'sort_code'
| 'spei'
| 'swift'
| 'zengin';

type Type =
| 'eu_bank_transfer'
| 'gb_bank_transfer'
| 'jp_bank_transfer'
| 'mx_bank_transfer';
| 'mx_bank_transfer'
| 'us_bank_transfer';
}
}

Expand Down
Loading

0 comments on commit 4c9bded

Please sign in to comment.