Skip to content

Commit

Permalink
Update generated code (#1920)
Browse files Browse the repository at this point in the history
* Update generated code for v584

* Update generated code for v585

* Update generated code for v587

* Update generated code for v588

* Update generated code for v589

* Update generated code for v592

* Update generated code for v595

* Update generated code for v596

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] committed Oct 11, 2023
1 parent 4870336 commit 5f78b16
Show file tree
Hide file tree
Showing 28 changed files with 437 additions and 350 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v581
v596
2 changes: 1 addition & 1 deletion types/BalanceTransactions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ declare module 'stripe' {
net: number;

/**
* Learn more about how [reporting categories] (https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective.
* Learn more about how [reporting categories](https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective.
*/
reporting_category: string;

Expand Down
39 changes: 27 additions & 12 deletions types/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ declare module 'stripe' {
*/
client_reference_id: string | null;

/**
* Client secret to be used when initializing Stripe.js embedded checkout.
*/
client_secret?: string | null;

/**
* Results of `consent_collection` for this session.
*/
Expand Down Expand Up @@ -213,6 +218,16 @@ declare module 'stripe' {
*/
recovered_from: string | null;

/**
* Applies to Checkout Sessions with `ui_mode: embedded`. By default, Stripe will always redirect to your return_url after a successful confirmation. If you set `redirect_on_completion: 'if_required'`, then we will only redirect if your user chooses a redirect-based payment method.
*/
redirect_on_completion?: Session.RedirectOnCompletion;

/**
* Applies to Checkout Sessions with `ui_mode: embedded`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site.
*/
return_url?: string;

/**
* The ID of the SetupIntent for Checkout Sessions in `setup` mode.
*/
Expand Down Expand Up @@ -269,6 +284,11 @@ declare module 'stripe' {
*/
total_details: Session.TotalDetails | null;

/**
* The UI mode of the Session. Can be `hosted` (default) or `embedded`.
*/
ui_mode?: Session.UiMode | null;

/**
* The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you're using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it'll use `checkout.stripe.com.`
* This value is only present when the session is active.
Expand Down Expand Up @@ -510,10 +530,7 @@ declare module 'stripe' {
}

interface CustomField {
/**
* Configuration for `type=dropdown` fields.
*/
dropdown: CustomField.Dropdown | null;
dropdown?: CustomField.Dropdown;

/**
* String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters.
Expand All @@ -522,20 +539,14 @@ declare module 'stripe' {

label: CustomField.Label;

/**
* Configuration for `type=numeric` fields.
*/
numeric: CustomField.Numeric | null;
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 | null;
text?: CustomField.Text;

/**
* The type of the field.
Expand Down Expand Up @@ -1338,6 +1349,8 @@ declare module 'stripe' {
enabled: boolean;
}

type RedirectOnCompletion = 'always' | 'if_required' | 'never';

interface ShippingAddressCollection {
/**
* An array of two-letter ISO country codes representing which countries Checkout should provide as options for
Expand Down Expand Up @@ -1798,6 +1811,8 @@ declare module 'stripe' {
}
}
}

type UiMode = 'embedded' | 'hosted';
}
}
}
Expand Down
42 changes: 33 additions & 9 deletions types/Checkout/SessionsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@ declare module 'stripe' {
namespace Stripe {
namespace Checkout {
interface SessionCreateParams {
/**
* The URL to which Stripe should send customers when payment or setup
* is complete.
* If you'd like to use information from the successful Checkout Session on your page,
* read the guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page).
*/
success_url: string;

/**
* Configure actions after a Checkout Session has expired.
*/
Expand Down Expand Up @@ -198,6 +190,18 @@ declare module 'stripe' {
*/
phone_number_collection?: SessionCreateParams.PhoneNumberCollection;

/**
* This parameter applies to `ui_mode: embedded`. By default, Stripe will always redirect to your return_url after a successful confirmation. If you set `redirect_on_completion: 'if_required'`, then we will only redirect if your user chooses a redirect-based payment method.
*/
redirect_on_completion?: SessionCreateParams.RedirectOnCompletion;

/**
* The URL to redirect your customer back to after they authenticate or cancel their payment on the
* payment method's app or site. This parameter is required if ui_mode is `embedded`
* and redirect-based payment methods are enabled on the session.
*/
return_url?: string;

/**
* A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode.
*/
Expand Down Expand Up @@ -226,10 +230,23 @@ declare module 'stripe' {
*/
subscription_data?: SessionCreateParams.SubscriptionData;

/**
* The URL to which Stripe should send customers when payment or setup
* is complete.
* If you'd like to use information from the successful Checkout Session on your page,
* read the guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page).
*/
success_url?: string;

/**
* Controls tax ID collection settings for the session.
*/
tax_id_collection?: SessionCreateParams.TaxIdCollection;

/**
* `ui_mode` can be `hosted` or `embedded`. The default is `hosted`.
*/
ui_mode?: SessionCreateParams.UiMode;
}

namespace SessionCreateParams {
Expand Down Expand Up @@ -1629,6 +1646,8 @@ declare module 'stripe' {
enabled: boolean;
}

type RedirectOnCompletion = 'always' | 'if_required' | 'never';

interface SetupIntentData {
/**
* An arbitrary string attached to the object. Often useful for displaying to users.
Expand Down Expand Up @@ -2141,6 +2160,8 @@ declare module 'stripe' {
*/
enabled: boolean;
}

type UiMode = 'embedded' | 'hosted';
}

interface SessionRetrieveParams {
Expand Down Expand Up @@ -2210,7 +2231,10 @@ declare module 'stripe' {
* Creates a Session object.
*/
create(
params: SessionCreateParams,
params?: SessionCreateParams,
options?: RequestOptions
): Promise<Stripe.Response<Stripe.Checkout.Session>>;
create(
options?: RequestOptions
): Promise<Stripe.Response<Stripe.Checkout.Session>>;

Expand Down
28 changes: 14 additions & 14 deletions types/Discounts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
declare module 'stripe' {
namespace Stripe {
/**
* A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
* It contains information about when the discount began, when it will end, and what it is applied to.
*
* Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
* The DeletedDiscount object.
*/
interface Discount {
interface DeletedDiscount {
/**
* The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array.
*/
Expand Down Expand Up @@ -39,12 +36,7 @@ declare module 'stripe' {
/**
* Always true for a deleted object
*/
deleted?: void;

/**
* If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null.
*/
end: number | null;
deleted: true;

/**
* The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.
Expand Down Expand Up @@ -73,9 +65,12 @@ declare module 'stripe' {
}

/**
* The DeletedDiscount object.
* A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
* It contains information about when the discount began, when it will end, and what it is applied to.
*
* Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
*/
interface DeletedDiscount {
interface Discount {
/**
* The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array.
*/
Expand Down Expand Up @@ -106,7 +101,12 @@ declare module 'stripe' {
/**
* Always true for a deleted object
*/
deleted: true;
deleted?: void;

/**
* If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null.
*/
end: number | null;

/**
* The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.
Expand Down
40 changes: 20 additions & 20 deletions types/InvoiceItems.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@

declare module 'stripe' {
namespace Stripe {
/**
* The DeletedInvoiceItem object.
*/
interface DeletedInvoiceItem {
/**
* Unique identifier for the object.
*/
id: string;

/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'invoiceitem';

/**
* Always true for a deleted object
*/
deleted: true;
}

/**
* Invoice Items represent the component lines of an [invoice](https://stripe.com/docs/api/invoices). An invoice item is added to an
* invoice by creating or updating it with an `invoice` field, at which point it will be included as
Expand Down Expand Up @@ -147,25 +167,5 @@ declare module 'stripe' {
start: number;
}
}

/**
* The DeletedInvoiceItem object.
*/
interface DeletedInvoiceItem {
/**
* Unique identifier for the object.
*/
id: string;

/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'invoiceitem';

/**
* Always true for a deleted object
*/
deleted: true;
}
}
}
40 changes: 20 additions & 20 deletions types/Invoices.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@

declare module 'stripe' {
namespace Stripe {
/**
* The DeletedInvoice object.
*/
interface DeletedInvoice {
/**
* Unique identifier for the object.
*/
id: string;

/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'invoice';

/**
* Always true for a deleted object
*/
deleted: true;
}

/**
* Invoices are statements of amounts owed by a customer, and are either
* generated one-off, or generated periodically from a subscription.
Expand Down Expand Up @@ -1338,25 +1358,5 @@ declare module 'stripe' {
destination: string | Stripe.Account;
}
}

/**
* The DeletedInvoice object.
*/
interface DeletedInvoice {
/**
* Unique identifier for the object.
*/
id: string;

/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'invoice';

/**
* Always true for a deleted object
*/
deleted: true;
}
}
}
10 changes: 6 additions & 4 deletions types/InvoicesResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,9 @@ declare module 'stripe' {

interface Pdf {
/**
* Page size for invoice PDF. Can be set to a4, letter, or auto.
* If set to auto, page size will be switched to a4 or letter based on customer locale.
* Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`.
* If set to `auto`, invoice PDF page size defaults to `a4` for customers with
* Japanese locale and `letter` for customers with other locales.
*/
page_size?: Pdf.PageSize;
}
Expand Down Expand Up @@ -1097,8 +1098,9 @@ declare module 'stripe' {

interface Pdf {
/**
* Page size for invoice PDF. Can be set to a4, letter, or auto.
* If set to auto, page size will be switched to a4 or letter based on customer locale.
* Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`.
* If set to `auto`, invoice PDF page size defaults to `a4` for customers with
* Japanese locale and `letter` for customers with other locales.
*/
page_size?: Pdf.PageSize;
}
Expand Down
5 changes: 5 additions & 0 deletions types/Issuing/Authorizations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,11 @@ declare module 'stripe' {
* Whether the cardholder provided an expiry date and if it matched Stripe's record.
*/
expiry_check: VerificationData.ExpiryCheck;

/**
* The postal code submitted as part of the authorization used for postal code verification.
*/
postal_code: string | null;
}

namespace VerificationData {
Expand Down
Loading

0 comments on commit 5f78b16

Please sign in to comment.