Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated code #2109

Merged
merged 6 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1077
v1083
2 changes: 1 addition & 1 deletion types/AccountsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3661,7 +3661,7 @@ declare module 'stripe' {
/**
* To request a new capability for an account, pass true. There can be a delay before the requested capability becomes active. If the capability has any activation requirements, the response includes them in the `requirements` arrays.
*
* If a capability isn't permanent, you can remove it from the account by passing false. Most capabilities are permanent after they've been requested. Attempting to remove a permanent capability returns an error.
* If a capability isn't permanent, you can remove it from the account by passing false. Some capabilities are permanent after they've been requested. Attempting to remove a permanent capability returns an error.
*/
requested?: boolean;
}
Expand Down
50 changes: 6 additions & 44 deletions types/PaymentIntentsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4871,10 +4871,7 @@ declare module 'stripe' {
*/
mandate?: string;

mandate_data?: Stripe.Emptyable<
| PaymentIntentConfirmParams.MandateData1
| PaymentIntentConfirmParams.MandateData2
>;
mandate_data?: Stripe.Emptyable<PaymentIntentConfirmParams.MandateData>;

/**
* Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards).
Expand Down Expand Up @@ -4947,14 +4944,14 @@ declare module 'stripe' {
namespace PaymentIntentConfirmParams {
type CaptureMethod = 'automatic' | 'automatic_async' | 'manual';

interface MandateData1 {
interface MandateData {
/**
* This hash contains details about the customer acceptance of the Mandate.
*/
customer_acceptance: MandateData1.CustomerAcceptance;
customer_acceptance?: MandateData.CustomerAcceptance;
}

namespace MandateData1 {
namespace MandateData {
interface CustomerAcceptance {
/**
* The time at which the customer accepted the Mandate.
Expand All @@ -4980,43 +4977,6 @@ declare module 'stripe' {
namespace CustomerAcceptance {
interface Offline {}

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

/**
* The user agent of the browser from which the Mandate was accepted by the customer.
*/
user_agent: string;
}

type Type = 'offline' | 'online';
}
}

interface MandateData2 {
/**
* This hash contains details about the customer acceptance of the Mandate.
*/
customer_acceptance: MandateData2.CustomerAcceptance;
}

namespace MandateData2 {
interface CustomerAcceptance {
/**
* If this is a Mandate accepted online, this hash contains details about the online acceptance.
*/
online: CustomerAcceptance.Online;

/**
* The type of customer acceptance information included with the Mandate.
*/
type: 'online';
}

namespace CustomerAcceptance {
interface Online {
/**
* The IP address from which the Mandate was accepted by the customer.
Expand All @@ -5028,6 +4988,8 @@ declare module 'stripe' {
*/
user_agent?: string;
}

type Type = 'offline' | 'online';
}
}

Expand Down
1 change: 1 addition & 0 deletions types/PaymentLinks.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,7 @@ declare module 'stripe' {
| 'klarna'
| 'konbini'
| 'link'
| 'mobilepay'
| 'oxxo'
| 'p24'
| 'paynow'
Expand Down
14 changes: 14 additions & 0 deletions types/PaymentLinksResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,7 @@ declare module 'stripe' {
| 'klarna'
| 'konbini'
| 'link'
| 'mobilepay'
| 'oxxo'
| 'p24'
| 'paynow'
Expand Down Expand Up @@ -1116,6 +1117,11 @@ declare module 'stripe' {
* When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`.
*/
subscription_data?: PaymentLinkUpdateParams.SubscriptionData;

/**
* Controls tax ID collection during checkout.
*/
tax_id_collection?: PaymentLinkUpdateParams.TaxIdCollection;
}

namespace PaymentLinkUpdateParams {
Expand Down Expand Up @@ -1518,6 +1524,7 @@ declare module 'stripe' {
| 'klarna'
| 'konbini'
| 'link'
| 'mobilepay'
| 'oxxo'
| 'p24'
| 'paynow'
Expand Down Expand Up @@ -1858,6 +1865,13 @@ declare module 'stripe' {
}
}
}

interface TaxIdCollection {
/**
* Set to `true` to enable tax ID collection.
*/
enabled: boolean;
}
}

interface PaymentLinkListParams extends PaginationParams {
Expand Down
26 changes: 12 additions & 14 deletions types/PaymentMethodsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ declare module 'stripe' {
/**
* If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly.
*/
card?: PaymentMethodCreateParams.Card1 | PaymentMethodCreateParams.Card2;
card?: PaymentMethodCreateParams.Card;

/**
* If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
Expand Down Expand Up @@ -319,7 +319,7 @@ declare module 'stripe' {
tax_id: string;
}

interface Card1 {
interface Card {
/**
* The card's CVC. It is highly recommended to always include this value.
*/
Expand All @@ -328,25 +328,30 @@ declare module 'stripe' {
/**
* Two-digit number representing the card's expiration month.
*/
exp_month: number;
exp_month?: number;

/**
* Four-digit number representing the card's expiration year.
*/
exp_year: number;
exp_year?: number;

/**
* Contains information about card networks used to process the payment.
*/
networks?: Card1.Networks;
networks?: Card.Networks;

/**
* The card number, as a string without any separators.
*/
number: string;
number?: string;

/**
* For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card: {token: "tok_visa"}.
*/
token?: string;
}

namespace Card1 {
namespace Card {
interface Networks {
/**
* The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card.
Expand All @@ -359,13 +364,6 @@ declare module 'stripe' {
}
}

interface Card2 {
/**
* For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card: {token: "tok_visa"}.
*/
token: string;
}

interface Cashapp {}

interface CustomerBalance {}
Expand Down
50 changes: 6 additions & 44 deletions types/SetupIntentsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2339,10 +2339,7 @@ declare module 'stripe' {
*/
expand?: Array<string>;

mandate_data?: Stripe.Emptyable<
| SetupIntentConfirmParams.MandateData1
| SetupIntentConfirmParams.MandateData2
>;
mandate_data?: Stripe.Emptyable<SetupIntentConfirmParams.MandateData>;

/**
* ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.
Expand Down Expand Up @@ -2374,14 +2371,14 @@ declare module 'stripe' {
}

namespace SetupIntentConfirmParams {
interface MandateData1 {
interface MandateData {
/**
* This hash contains details about the customer acceptance of the Mandate.
*/
customer_acceptance: MandateData1.CustomerAcceptance;
customer_acceptance?: MandateData.CustomerAcceptance;
}

namespace MandateData1 {
namespace MandateData {
interface CustomerAcceptance {
/**
* The time at which the customer accepted the Mandate.
Expand All @@ -2407,43 +2404,6 @@ declare module 'stripe' {
namespace CustomerAcceptance {
interface Offline {}

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

/**
* The user agent of the browser from which the Mandate was accepted by the customer.
*/
user_agent: string;
}

type Type = 'offline' | 'online';
}
}

interface MandateData2 {
/**
* This hash contains details about the customer acceptance of the Mandate.
*/
customer_acceptance: MandateData2.CustomerAcceptance;
}

namespace MandateData2 {
interface CustomerAcceptance {
/**
* If this is a Mandate accepted online, this hash contains details about the online acceptance.
*/
online: CustomerAcceptance.Online;

/**
* The type of customer acceptance information included with the Mandate.
*/
type: 'online';
}

namespace CustomerAcceptance {
interface Online {
/**
* The IP address from which the Mandate was accepted by the customer.
Expand All @@ -2455,6 +2415,8 @@ declare module 'stripe' {
*/
user_agent?: string;
}

type Type = 'offline' | 'online';
}
}

Expand Down
2 changes: 1 addition & 1 deletion types/Tax/CalculationsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ declare module 'stripe' {
): Promise<Stripe.Response<Stripe.Tax.Calculation>>;

/**
* Retrieves the line items of a persisted tax calculation as a collection.
* Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired.
*/
listLineItems(
id: string,
Expand Down
2 changes: 1 addition & 1 deletion types/Terminal/ConnectionTokens.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ declare module 'stripe' {
object: 'terminal.connection_token';

/**
* The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens).
* The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens).
*/
location?: string;

Expand Down
2 changes: 1 addition & 1 deletion types/Terminal/ConnectionTokensResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ declare module 'stripe' {
expand?: Array<string>;

/**
* The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens).
* The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens).
*/
location?: string;
}
Expand Down
Loading