Skip to content

Commit

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

* Update generated code for v548

* Update generated code for v549

* Update generated code for v550

* Update generated code for v550

* Update generated code for v551

* Update generated code for v552

* Update generated code for v556

* Update generated code for v557

* Update generated code for v559

* Update generated code for v560

* Update generated code for v561

* Update generated code for v563

* Update generated code for v565

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] authored Sep 28, 2023
1 parent 6096014 commit c13ef38
Show file tree
Hide file tree
Showing 19 changed files with 284 additions and 162 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v545
v565
5 changes: 5 additions & 0 deletions test/resources/generated_examples_test.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2944,6 +2944,11 @@ describe('Subscriptions', function() {
});
expect(subscriptions).not.to.be.null;
});

it('deleteDiscount method', async function() {
const deleted = await stripe.subscriptions.deleteDiscount('sub_xyz');
expect(deleted).not.to.be.null;
});
});

describe('TaxCodes', function() {
Expand Down
2 changes: 1 addition & 1 deletion types/BillingPortal/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ declare module 'stripe' {
id: string | null;

/**
* The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products).
* The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products).
*/
price: string | null;

Expand Down
2 changes: 1 addition & 1 deletion types/CustomerCashBalanceTransactions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ declare module 'stripe' {
namespace CustomerCashBalanceTransaction {
interface AdjustedForOverdraft {
/**
* The [Balance Transaction](docs/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance.
* The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance.
*/
balance_transaction: string | Stripe.BalanceTransaction;

Expand Down
16 changes: 8 additions & 8 deletions types/Events.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ declare module 'stripe' {
| 'issuing_transaction.created'
| 'issuing_transaction.updated'
| 'mandate.updated'
| 'order.created'
| 'payment_intent.amount_capturable_updated'
| 'payment_intent.canceled'
| 'payment_intent.created'
Expand Down Expand Up @@ -258,9 +257,6 @@ declare module 'stripe' {
| 'quote.finalized'
| 'radar.early_fraud_warning.created'
| 'radar.early_fraud_warning.updated'
| 'recipient.created'
| 'recipient.deleted'
| 'recipient.updated'
| 'refund.created'
| 'refund.updated'
| 'reporting.report_run.failed'
Expand All @@ -274,9 +270,6 @@ declare module 'stripe' {
| 'setup_intent.setup_failed'
| 'setup_intent.succeeded'
| 'sigma.scheduled_query_run.created'
| 'sku.created'
| 'sku.deleted'
| 'sku.updated'
| 'source.canceled'
| 'source.chargeable'
| 'source.failed'
Expand Down Expand Up @@ -337,7 +330,14 @@ declare module 'stripe' {
| 'treasury.received_credit.failed'
| 'treasury.received_credit.succeeded'
| 'treasury.received_debit.created'
| 'invoiceitem.updated';
| 'invoiceitem.updated'
| 'order.created'
| 'recipient.created'
| 'recipient.deleted'
| 'recipient.updated'
| 'sku.created'
| 'sku.deleted'
| 'sku.updated';
}
}
}
32 changes: 31 additions & 1 deletion types/Invoices.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,12 @@ declare module 'stripe' {
receipt_number: string | null;

/**
* Options for invoice PDF rendering.
* The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
*/
rendering: Invoice.Rendering | null;

/**
* This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering.
*/
rendering_options: Invoice.RenderingOptions | null;

Expand Down Expand Up @@ -1079,6 +1084,31 @@ declare module 'stripe' {
| 'wechat_pay';
}

interface Rendering {
/**
* How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
*/
amount_tax_display: string | null;

/**
* Invoice pdf rendering options
*/
pdf: Rendering.Pdf | null;
}

namespace Rendering {
interface Pdf {
/**
* Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale.
*/
page_size: Pdf.PageSize | null;
}

namespace Pdf {
type PageSize = 'a4' | 'auto' | 'letter';
}
}

interface RenderingOptions {
/**
* How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
Expand Down
70 changes: 68 additions & 2 deletions types/InvoicesResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,12 @@ declare module 'stripe' {
pending_invoice_items_behavior?: InvoiceCreateParams.PendingInvoiceItemsBehavior;

/**
* Options for invoice PDF rendering.
* The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
*/
rendering?: InvoiceCreateParams.Rendering;

/**
* This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering.
*/
rendering_options?: Stripe.Emptyable<
InvoiceCreateParams.RenderingOptions
Expand Down Expand Up @@ -449,6 +454,34 @@ declare module 'stripe' {
| 'include'
| 'include_and_require';

interface Rendering {
/**
* How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
*/
amount_tax_display?: Stripe.Emptyable<Rendering.AmountTaxDisplay>;

/**
* Invoice pdf rendering options
*/
pdf?: Rendering.Pdf;
}

namespace Rendering {
type AmountTaxDisplay = 'exclude_tax' | 'include_inclusive_tax';

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?: Pdf.PageSize;
}

namespace Pdf {
type PageSize = 'a4' | 'auto' | 'letter';
}
}

interface RenderingOptions {
/**
* How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
Expand Down Expand Up @@ -734,7 +767,12 @@ declare module 'stripe' {
payment_settings?: InvoiceUpdateParams.PaymentSettings;

/**
* Options for invoice PDF rendering.
* The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
*/
rendering?: InvoiceUpdateParams.Rendering;

/**
* This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering.
*/
rendering_options?: Stripe.Emptyable<
InvoiceUpdateParams.RenderingOptions
Expand Down Expand Up @@ -1042,6 +1080,34 @@ declare module 'stripe' {
| 'wechat_pay';
}

interface Rendering {
/**
* How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
*/
amount_tax_display?: Stripe.Emptyable<Rendering.AmountTaxDisplay>;

/**
* Invoice pdf rendering options
*/
pdf?: Rendering.Pdf;
}

namespace Rendering {
type AmountTaxDisplay = 'exclude_tax' | 'include_inclusive_tax';

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?: Pdf.PageSize;
}

namespace Pdf {
type PageSize = 'a4' | 'auto' | 'letter';
}
}

interface RenderingOptions {
/**
* How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
Expand Down
20 changes: 10 additions & 10 deletions types/Mandates.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare module 'stripe' {
namespace Stripe {
/**
* A Mandate is a record of the permission a customer has given you to debit their payment method.
* A Mandate is a record of the permission that your customer gives you to debit their payment method.
*/
interface Mandate {
/**
Expand All @@ -26,7 +26,7 @@ declare module 'stripe' {
multi_use?: Mandate.MultiUse;

/**
* The account (if any) for which the mandate is intended.
* The account (if any) that the mandate is intended for.
*/
on_behalf_of?: string;

Expand All @@ -40,7 +40,7 @@ declare module 'stripe' {
single_use?: Mandate.SingleUse;

/**
* The status of the mandate, which indicates whether it can be used to initiate a payment.
* The mandate status indicates whether or not you can use it to initiate a payment.
*/
status: Mandate.Status;

Expand All @@ -53,7 +53,7 @@ declare module 'stripe' {
namespace Mandate {
interface CustomerAcceptance {
/**
* The time at which the customer accepted the Mandate.
* The time that the customer accepts the mandate.
*/
accepted_at: number | null;

Expand All @@ -62,7 +62,7 @@ declare module 'stripe' {
online?: CustomerAcceptance.Online;

/**
* The type of customer acceptance information included with the Mandate. One of `online` or `offline`.
* The mandate includes the type of customer acceptance information, such as: `online` or `offline`.
*/
type: CustomerAcceptance.Type;
}
Expand All @@ -72,12 +72,12 @@ declare module 'stripe' {

interface Online {
/**
* The IP address from which the Mandate was accepted by the customer.
* The customer accepts the mandate from this IP address.
*/
ip_address: string | null;

/**
* The user agent of the browser from which the Mandate was accepted by the customer.
* The customer accepts the mandate using the user agent of the browser.
*/
user_agent: string | null;
}
Expand Down Expand Up @@ -105,7 +105,7 @@ declare module 'stripe' {
sepa_debit?: PaymentMethodDetails.SepaDebit;

/**
* The type of the payment method associated with this mandate. An additional hash is included on `payment_method_details` with a name matching this value. It contains mandate information specific to the payment method.
* This mandate corresponds with a specific payment method type. The `payment_method_details` includes an additional hash with the same name and contains mandate information that's specific to that payment method.
*/
type: string;

Expand Down Expand Up @@ -206,12 +206,12 @@ declare module 'stripe' {

interface SingleUse {
/**
* On a single use mandate, the amount of the payment.
* The amount of the payment on a single use mandate.
*/
amount: number;

/**
* On a single use mandate, the currency of the payment.
* The currency of the payment on a single use mandate.
*/
currency: string;
}
Expand Down
18 changes: 9 additions & 9 deletions types/PaymentIntents.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ declare module 'stripe' {
amount_details?: PaymentIntent.AmountDetails;

/**
* Amount that was collected by this PaymentIntent.
* Amount that this PaymentIntent collects.
*/
amount_received: number;

Expand Down Expand Up @@ -119,7 +119,7 @@ declare module 'stripe' {
last_payment_error: PaymentIntent.LastPaymentError | null;

/**
* The latest charge created by this payment intent.
* The latest charge created by this PaymentIntent.
*/
latest_charge?: string | Stripe.Charge | null;

Expand All @@ -129,7 +129,7 @@ declare module 'stripe' {
livemode: boolean;

/**
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. For more information, see the [documentation](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata).
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Learn more about [storing information in metadata](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata).
*/
metadata: Stripe.Metadata;

Expand Down Expand Up @@ -218,12 +218,12 @@ declare module 'stripe' {
status: PaymentIntent.Status;

/**
* The data with which to automatically create a Transfer when the payment is finalized. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.
* The data that automatically creates a Transfer after the payment finalizes. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
*/
transfer_data: PaymentIntent.TransferData | null;

/**
* A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details.
* A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers).
*/
transfer_group: string | null;
}
Expand Down Expand Up @@ -1289,8 +1289,8 @@ declare module 'stripe' {
capture_method?: 'manual';

/**
* Order identifier shown to the customer in Afterpay's online portal. We recommend using a value that helps you answer any questions a customer might have about
* the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes.
* An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes.
* This field differs from the statement descriptor and item name.
*/
reference: string | null;

Expand Down Expand Up @@ -2115,8 +2115,8 @@ declare module 'stripe' {
amount?: number;

/**
* The account (if any) the payment will be attributed to for tax
* reporting, and where funds from the payment will be transferred to upon
* The account (if any) that the payment is attributed to for tax
* reporting, and where funds from the payment are transferred to after
* payment success.
*/
destination: string | Stripe.Account;
Expand Down
Loading

0 comments on commit c13ef38

Please sign in to comment.