Skip to content

Commit

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

* Update generated code for v1011

* Update generated code for v1012

* Update generated code for v1013

* Update generated code for v1014

* Update generated code for v1015

* Update generated code for v1016

* Update generated code for v1017

* Update generated code for v1017

* Update generated code for v1019

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] committed May 9, 2024
1 parent 64b3788 commit 2812903
Show file tree
Hide file tree
Showing 23 changed files with 319 additions and 20 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
@@ -1 +1 @@
v1008
v1019
4 changes: 4 additions & 0 deletions src/resources/TestHelpers/Treasury/OutboundPayments.ts
Expand Up @@ -3,6 +3,10 @@
import {StripeResource} from '../../../StripeResource.js';
const stripeMethod = StripeResource.method;
export const OutboundPayments = StripeResource.extend({
update: stripeMethod({
method: 'POST',
fullPath: '/v1/test_helpers/treasury/outbound_payments/{id}',
}),
fail: stripeMethod({
method: 'POST',
fullPath: '/v1/test_helpers/treasury/outbound_payments/{id}/fail',
Expand Down
5 changes: 5 additions & 0 deletions src/resources/TestHelpers/Treasury/OutboundTransfers.ts
Expand Up @@ -3,6 +3,11 @@
import {StripeResource} from '../../../StripeResource.js';
const stripeMethod = StripeResource.method;
export const OutboundTransfers = StripeResource.extend({
update: stripeMethod({
method: 'POST',
fullPath:
'/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}',
}),
fail: stripeMethod({
method: 'POST',
fullPath:
Expand Down
2 changes: 1 addition & 1 deletion test/resources/generated_examples_test.spec.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion types/Accounts.d.ts
Expand Up @@ -69,7 +69,7 @@ declare module 'stripe' {
deleted?: void;

/**
* Whether account details have been submitted. Accounts with Stripe Dashboard access, which includes Standard accounts, cannot receive payouts before this is true.
* Whether account details have been submitted. Accounts with Stripe Dashboard access, which includes Standard accounts, cannot receive payouts before this is true. Accounts where this is false should be directed to [an onboarding flow](https://stripe.com/connect/onboarding) to finish submitting account details.
*/
details_submitted: boolean;

Expand Down
12 changes: 6 additions & 6 deletions types/AccountsResource.d.ts
Expand Up @@ -1030,12 +1030,12 @@ declare module 'stripe' {
address?: Stripe.AddressParam;

/**
* The Kana variation of the the individual's primary address (Japan only).
* The Kana variation of the individual's primary address (Japan only).
*/
address_kana?: Stripe.JapanAddressParam;

/**
* The Kanji variation of the the individual's primary address (Japan only).
* The Kanji variation of the individual's primary address (Japan only).
*/
address_kanji?: Stripe.JapanAddressParam;

Expand All @@ -1055,7 +1055,7 @@ declare module 'stripe' {
first_name?: string;

/**
* The Kana variation of the the individual's first name (Japan only).
* The Kana variation of the individual's first name (Japan only).
*/
first_name_kana?: string;

Expand Down Expand Up @@ -2488,12 +2488,12 @@ declare module 'stripe' {
address?: Stripe.AddressParam;

/**
* The Kana variation of the the individual's primary address (Japan only).
* The Kana variation of the individual's primary address (Japan only).
*/
address_kana?: Stripe.JapanAddressParam;

/**
* The Kanji variation of the the individual's primary address (Japan only).
* The Kanji variation of the individual's primary address (Japan only).
*/
address_kanji?: Stripe.JapanAddressParam;

Expand All @@ -2513,7 +2513,7 @@ declare module 'stripe' {
first_name?: string;

/**
* The Kana variation of the the individual's first name (Japan only).
* The Kana variation of the individual's first name (Japan only).
*/
first_name_kana?: string;

Expand Down
4 changes: 1 addition & 3 deletions types/Capabilities.d.ts
Expand Up @@ -226,13 +226,11 @@ declare module 'stripe' {
currently_due: Array<string>;

/**
* If the capability is disabled, this string describes why. Can be `requirements.fields_needed`, `pending.onboarding`, `pending.review`, `rejected.fraud`, `rejected.other`, `platform_paused`, `action_required.requested_capabilities`, `rejected.inactivty`, or `rejected.unsupported_business`.
* If the capability is disabled, this string describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). Can be `requirements.fields_needed`, `pending.onboarding`, `pending.review`, `rejected.other`, `platform_paused`, `rejected.inactivty`, or `rejected.unsupported_business`.
*
* `rejected.unsupported_business` means that the account's business is not supported by the capability. For example, payment methods may restrict the businesses they support in their terms of service, such as in [Afterpay Clearpay's terms of service](https://stripe.com/afterpay-clearpay/legal#restricted-businesses).
*
* `rejected.inactivity` means that the capability has been paused for inactivity. This disabled reason currently only applies to the Issuing capability. See [Issuing: Managing Inactive Connects](https://support.stripe.com/questions/issuing-managing-inactive-connect-accounts) for more details.
*
* If you believe that a rejection is in error, please contact support at https://support.stripe.com/contact/ for assistance.
*/
disabled_reason: string | null;

Expand Down
2 changes: 1 addition & 1 deletion types/Checkout/Sessions.d.ts
Expand Up @@ -1538,7 +1538,7 @@ declare module 'stripe' {
> | null;

/**
* Enable customers to choose if they wish to save their payment method for future use.
* Enable customers to choose if they wish to save their payment method for future use. Disabled by default.
*/
payment_method_save: SavedPaymentMethodOptions.PaymentMethodSave | null;
}
Expand Down
2 changes: 1 addition & 1 deletion types/Checkout/SessionsResource.d.ts
Expand Up @@ -1832,7 +1832,7 @@ declare module 'stripe' {
>;

/**
* Enable customers to choose if they wish to save their payment method for future use.
* Enable customers to choose if they wish to save their payment method for future use. Disabled by default.
*/
payment_method_save?: SavedPaymentMethodOptions.PaymentMethodSave;
}
Expand Down
7 changes: 7 additions & 0 deletions types/ConfirmationTokens.d.ts
Expand Up @@ -125,6 +125,11 @@ declare module 'stripe' {

alipay?: PaymentMethodPreview.Alipay;

/**
* This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”.
*/
allow_redisplay?: PaymentMethodPreview.AllowRedisplay;

amazon_pay?: PaymentMethodPreview.AmazonPay;

au_becs_debit?: PaymentMethodPreview.AuBecsDebit;
Expand Down Expand Up @@ -233,6 +238,8 @@ declare module 'stripe' {

interface Alipay {}

type AllowRedisplay = 'always' | 'limited' | 'unspecified';

interface AmazonPay {}

interface AuBecsDebit {
Expand Down
2 changes: 1 addition & 1 deletion types/CreditNotesResource.d.ts
Expand Up @@ -566,7 +566,7 @@ declare module 'stripe' {
list(options?: RequestOptions): ApiListPromise<Stripe.CreditNote>;

/**
* When retrieving a credit note, you'll get a lines property containing the the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
* When retrieving a credit note, you'll get a lines property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
*/
listLineItems(
id: string,
Expand Down
36 changes: 36 additions & 0 deletions types/EventTypes.d.ts
Expand Up @@ -220,12 +220,14 @@ declare module 'stripe' {
| TreasuryOutboundPaymentFailedEvent
| TreasuryOutboundPaymentPostedEvent
| TreasuryOutboundPaymentReturnedEvent
| TreasuryOutboundPaymentTrackingDetailsUpdatedEvent
| TreasuryOutboundTransferCanceledEvent
| TreasuryOutboundTransferCreatedEvent
| TreasuryOutboundTransferExpectedArrivalDateUpdatedEvent
| TreasuryOutboundTransferFailedEvent
| TreasuryOutboundTransferPostedEvent
| TreasuryOutboundTransferReturnedEvent
| TreasuryOutboundTransferTrackingDetailsUpdatedEvent
| TreasuryReceivedCreditCreatedEvent
| TreasuryReceivedCreditFailedEvent
| TreasuryReceivedCreditSucceededEvent
Expand Down Expand Up @@ -3711,6 +3713,23 @@ declare module 'stripe' {
}
}

/**
* Occurs whenever tracking_details on an OutboundPayment is updated.
*/
interface TreasuryOutboundPaymentTrackingDetailsUpdatedEvent
extends EventBase {
type: 'treasury.outbound_payment.tracking_details_updated';
data: TreasuryOutboundPaymentTrackingDetailsUpdatedEvent.Data;
}

namespace TreasuryOutboundPaymentTrackingDetailsUpdatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Treasury.OutboundPayment;

previous_attributes?: Partial<Stripe.Treasury.OutboundPayment>;
}
}

/**
* Occurs whenever an OutboundTransfer is canceled.
*/
Expand Down Expand Up @@ -3808,6 +3827,23 @@ declare module 'stripe' {
}
}

/**
* Occurs whenever tracking_details on an OutboundTransfer is updated.
*/
interface TreasuryOutboundTransferTrackingDetailsUpdatedEvent
extends EventBase {
type: 'treasury.outbound_transfer.tracking_details_updated';
data: TreasuryOutboundTransferTrackingDetailsUpdatedEvent.Data;
}

namespace TreasuryOutboundTransferTrackingDetailsUpdatedEvent {
interface Data extends Stripe.Event.Data {
object: Stripe.Treasury.OutboundTransfer;

previous_attributes?: Partial<Stripe.Treasury.OutboundTransfer>;
}
}

/**
* Occurs whenever a received_credit is created as a result of funds being pushed by another account.
*/
Expand Down
2 changes: 2 additions & 0 deletions types/Events.d.ts
Expand Up @@ -251,12 +251,14 @@ declare module 'stripe' {
| 'treasury.outbound_payment.failed'
| 'treasury.outbound_payment.posted'
| 'treasury.outbound_payment.returned'
| 'treasury.outbound_payment.tracking_details_updated'
| 'treasury.outbound_transfer.canceled'
| 'treasury.outbound_transfer.created'
| 'treasury.outbound_transfer.expected_arrival_date_updated'
| 'treasury.outbound_transfer.failed'
| 'treasury.outbound_transfer.posted'
| 'treasury.outbound_transfer.returned'
| 'treasury.outbound_transfer.tracking_details_updated'
| 'treasury.received_credit.created'
| 'treasury.received_credit.failed'
| 'treasury.received_credit.succeeded'
Expand Down
2 changes: 1 addition & 1 deletion types/InvoiceItemsResource.d.ts
Expand Up @@ -69,7 +69,7 @@ declare module 'stripe' {
quantity?: number;

/**
* The ID of a subscription to add this invoice item to. When left blank, the invoice item will be be added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription.
* The ID of a subscription to add this invoice item to. When left blank, the invoice item is added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription.
*/
subscription?: string;

Expand Down
21 changes: 21 additions & 0 deletions types/InvoicesResource.d.ts
Expand Up @@ -1475,6 +1475,11 @@ declare module 'stripe' {
*/
on_behalf_of?: Stripe.Emptyable<string>;

/**
* Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified.
*/
preview_mode?: InvoiceCreatePreviewParams.PreviewMode;

/**
* The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.
*/
Expand Down Expand Up @@ -1848,6 +1853,8 @@ declare module 'stripe' {
type Type = 'account' | 'self';
}

type PreviewMode = 'next' | 'recurring';

interface ScheduleDetails {
/**
* Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
Expand Down Expand Up @@ -2579,6 +2586,11 @@ declare module 'stripe' {
*/
on_behalf_of?: Stripe.Emptyable<string>;

/**
* Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified.
*/
preview_mode?: InvoiceListUpcomingLinesParams.PreviewMode;

/**
* The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.
*/
Expand Down Expand Up @@ -3016,6 +3028,8 @@ declare module 'stripe' {
type Type = 'account' | 'self';
}

type PreviewMode = 'next' | 'recurring';

interface ScheduleDetails {
/**
* Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
Expand Down Expand Up @@ -3918,6 +3932,11 @@ declare module 'stripe' {
*/
on_behalf_of?: Stripe.Emptyable<string>;

/**
* Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified.
*/
preview_mode?: InvoiceRetrieveUpcomingParams.PreviewMode;

/**
* The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.
*/
Expand Down Expand Up @@ -4355,6 +4374,8 @@ declare module 'stripe' {
type Type = 'account' | 'self';
}

type PreviewMode = 'next' | 'recurring';

interface ScheduleDetails {
/**
* Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
Expand Down
7 changes: 7 additions & 0 deletions types/PaymentMethods.d.ts
Expand Up @@ -28,6 +28,11 @@ declare module 'stripe' {

alipay?: PaymentMethod.Alipay;

/**
* This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”.
*/
allow_redisplay?: PaymentMethod.AllowRedisplay;

amazon_pay?: PaymentMethod.AmazonPay;

au_becs_debit?: PaymentMethod.AuBecsDebit;
Expand Down Expand Up @@ -161,6 +166,8 @@ declare module 'stripe' {

interface Alipay {}

type AllowRedisplay = 'always' | 'limited' | 'unspecified';

interface AmazonPay {}

interface AuBecsDebit {
Expand Down
7 changes: 7 additions & 0 deletions types/SubscriptionsResource.d.ts
Expand Up @@ -157,6 +157,11 @@ declare module 'stripe' {
SubscriptionCreateParams.PendingInvoiceItemInterval
>;

/**
* How to handle a customer's pending invoice items if an invoice will be generated. Defaults to `include` if the parameter is omitted.
*/
pending_invoice_items_behavior?: SubscriptionCreateParams.PendingInvoiceItemsBehavior;

/**
* The ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.
*/
Expand Down Expand Up @@ -797,6 +802,8 @@ declare module 'stripe' {
type Interval = 'day' | 'month' | 'week' | 'year';
}

type PendingInvoiceItemsBehavior = 'exclude' | 'include';

type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';

interface TransferData {
Expand Down

0 comments on commit 2812903

Please sign in to comment.