Skip to content

Commit

Permalink
Update generated code for v1341
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Nov 12, 2024
1 parent 931c0e3 commit 18306a5
Show file tree
Hide file tree
Showing 49 changed files with 457 additions and 94 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1328
v1341
5 changes: 5 additions & 0 deletions src/resources/TestHelpers/Issuing/Authorizations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ export const Authorizations = StripeResource.extend({
fullPath:
'/v1/test_helpers/issuing/authorizations/{authorization}/increment',
}),
respond: stripeMethod({
method: 'POST',
fullPath:
'/v1/test_helpers/issuing/authorizations/{authorization}/fraud_challenges/respond',
}),
reverse: stripeMethod({
method: 'POST',
fullPath: '/v1/test_helpers/issuing/authorizations/{authorization}/reverse',
Expand Down
2 changes: 1 addition & 1 deletion test/resources/generated_examples_test.spec.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions types/AccountSessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ declare module 'stripe' {
/**
* Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise.
*/
disable_stripe_user_authentication?: boolean;
disable_stripe_user_authentication: boolean;

/**
* Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
Expand All @@ -107,7 +107,7 @@ declare module 'stripe' {
/**
* Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise.
*/
disable_stripe_user_authentication?: boolean;
disable_stripe_user_authentication: boolean;

/**
* Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
Expand All @@ -130,7 +130,7 @@ declare module 'stripe' {
/**
* Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise.
*/
disable_stripe_user_authentication?: boolean;
disable_stripe_user_authentication: boolean;

/**
* Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
Expand Down Expand Up @@ -181,7 +181,7 @@ declare module 'stripe' {
/**
* Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise.
*/
disable_stripe_user_authentication?: boolean;
disable_stripe_user_authentication: boolean;

/**
* Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
Expand Down Expand Up @@ -270,7 +270,7 @@ declare module 'stripe' {
/**
* Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise.
*/
disable_stripe_user_authentication?: boolean;
disable_stripe_user_authentication: boolean;

/**
* Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
Expand Down
42 changes: 38 additions & 4 deletions types/Accounts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -909,9 +909,9 @@ declare module 'stripe' {
currently_due: Array<string> | null;

/**
* This is typed as a string for consistency with `requirements.disabled_reason`.
* This is typed as an enum for consistency with `requirements.disabled_reason`.
*/
disabled_reason: string | null;
disabled_reason: FutureRequirements.DisabledReason | null;

/**
* Fields that are `currently_due` and need to be collected again because validation or verification failed.
Expand Down Expand Up @@ -947,6 +947,23 @@ declare module 'stripe' {
original_fields_due: Array<string>;
}

type DisabledReason =
| 'action_required.requested_capabilities'
| 'listed'
| 'other'
| 'platform_paused'
| 'rejected.fraud'
| 'rejected.incomplete_verification'
| 'rejected.listed'
| 'rejected.other'
| 'rejected.platform_fraud'
| 'rejected.platform_other'
| 'rejected.platform_terms_of_service'
| 'rejected.terms_of_service'
| 'requirements.past_due'
| 'requirements.pending_verification'
| 'under_review';

interface Error {
/**
* The code for the type of error.
Expand Down Expand Up @@ -1083,9 +1100,9 @@ declare module 'stripe' {
currently_due: Array<string> | null;

/**
* If the account is disabled, this string describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). Can be `action_required.requested_capabilities`, `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.incomplete_verification`, `rejected.listed`, `rejected.other`, `rejected.terms_of_service`, `under_review`, or `other`.
* If the account is disabled, this enum describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification).
*/
disabled_reason: string | null;
disabled_reason: Requirements.DisabledReason | null;

/**
* Fields that are `currently_due` and need to be collected again because validation or verification failed.
Expand Down Expand Up @@ -1121,6 +1138,23 @@ declare module 'stripe' {
original_fields_due: Array<string>;
}

type DisabledReason =
| 'action_required.requested_capabilities'
| 'listed'
| 'other'
| 'platform_paused'
| 'rejected.fraud'
| 'rejected.incomplete_verification'
| 'rejected.listed'
| 'rejected.other'
| 'rejected.platform_fraud'
| 'rejected.platform_other'
| 'rejected.platform_terms_of_service'
| 'rejected.terms_of_service'
| 'requirements.past_due'
| 'requirements.pending_verification'
| 'under_review';

interface Error {
/**
* The code for the type of error.
Expand Down
2 changes: 1 addition & 1 deletion types/Billing/CreditBalanceSummaryResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ declare module 'stripe' {
namespace Filter {
interface ApplicabilityScope {
/**
* The price type to which credit grants can apply to. We currently only support `metered` price type.
* The price type for which credit grants can apply. We currently only support the `metered` price type.
*/
price_type: 'metered';
}
Expand Down
11 changes: 5 additions & 6 deletions types/Billing/CreditGrants.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ declare module 'stripe' {
* A credit grant is an API resource that documents the allocation of some billing credits to a customer.
*
* Related guide: [Billing credits](https://docs.stripe.com/billing/subscriptions/usage-based/billing-credits)
* end
*/
interface CreditGrant {
/**
Expand All @@ -25,7 +24,7 @@ declare module 'stripe' {
applicability_config: CreditGrant.ApplicabilityConfig;

/**
* The category of this credit grant. This is for tracking purposes and will not be displayed to the customer.
* The category of this credit grant. This is for tracking purposes and isn't displayed to the customer.
*/
category: CreditGrant.Category;

Expand All @@ -35,17 +34,17 @@ declare module 'stripe' {
created: number;

/**
* ID of the customer to whom the billing credits are granted.
* ID of the customer receiving the billing credits.
*/
customer: string | Stripe.Customer | Stripe.DeletedCustomer;

/**
* The time when the billing credits become effective i.e when they are eligible to be used.
* The time when the billing credits become effectivewhen they're eligible for use.
*/
effective_at: number | null;

/**
* The time when the billing credits will expire. If not present, the billing credits will never expire.
* The time when the billing credits expire. If not present, the billing credits don't expire.
*/
expires_at: number | null;

Expand Down Expand Up @@ -114,7 +113,7 @@ declare module 'stripe' {
namespace ApplicabilityConfig {
interface Scope {
/**
* The price type to which credit grants can apply to. We currently only support `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them.
* The price type for which credit grants can apply. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them.
*/
price_type: 'metered';
}
Expand Down
22 changes: 11 additions & 11 deletions types/Billing/CreditGrantsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ declare module 'stripe' {
category: CreditGrantCreateParams.Category;

/**
* ID of the customer to whom the billing credits should be granted.
* ID of the customer to receive the billing credits.
*/
customer: string;

/**
* The time when the billing credits become effective i.e when they are eligible to be used. Defaults to the current timestamp if not specified.
* The time when the billing credits become effectivewhen they're eligible for use. Defaults to the current timestamp if not specified.
*/
effective_at?: number;

Expand All @@ -35,17 +35,17 @@ declare module 'stripe' {
expand?: Array<string>;

/**
* The time when the billing credits will expire. If not specified, the billing credits will never expire.
* The time when the billing credits will expire. If not specified, the billing credits don't expire.
*/
expires_at?: number;

/**
* Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object (ex: cost basis) in a structured format.
* Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object (for example, cost basis) in a structured format.
*/
metadata?: Stripe.MetadataParam;

/**
* A descriptive name shown in dashboard.
* A descriptive name shown in the Dashboard.
*/
name?: string;
}
Expand Down Expand Up @@ -87,7 +87,7 @@ declare module 'stripe' {
namespace ApplicabilityConfig {
interface Scope {
/**
* The price type to which credit grants can apply to. We currently only support `metered` price type.
* The price type for which credit grants can apply. We currently only support the `metered` price type.
*/
price_type: 'metered';
}
Expand All @@ -110,12 +110,12 @@ declare module 'stripe' {
expand?: Array<string>;

/**
* The time when the billing credits created by this credit grant will expire. If set to empty, the billing credits will never expire.
* The time when the billing credits created by this credit grant expire. If set to empty, the billing credits never expire.
*/
expires_at?: Stripe.Emptyable<number>;

/**
* Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object (ex: cost basis) in a structured format.
* Set of key-value pairs you can attach to an object. This can be useful for storing additional information about the object (for example, cost basis) in a structured format.
*/
metadata?: Stripe.MetadataParam;
}
Expand Down Expand Up @@ -178,7 +178,7 @@ declare module 'stripe' {
): Promise<Stripe.Response<Stripe.Billing.CreditGrant>>;

/**
* Retrieve a list of credit grants
* Retrieve a list of credit grants.
*/
list(
params?: CreditGrantListParams,
Expand All @@ -189,7 +189,7 @@ declare module 'stripe' {
): ApiListPromise<Stripe.Billing.CreditGrant>;

/**
* Expires a credit grant
* Expires a credit grant.
*/
expire(
id: string,
Expand All @@ -202,7 +202,7 @@ declare module 'stripe' {
): Promise<Stripe.Response<Stripe.Billing.CreditGrant>>;

/**
* Voids a credit grant
* Voids a credit grant.
*/
voidGrant(
id: string,
Expand Down
2 changes: 1 addition & 1 deletion types/Billing/MeterEventsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ declare module 'stripe' {
expand?: Array<string>;

/**
* A unique identifier for the event. If not provided, one will be generated. We recommend using a globally unique identifier for this. We'll enforce uniqueness within a rolling 24 hour period.
* A unique identifier for the event. If not provided, one will be generated. We strongly advise using UUID-like identifiers. We will enforce uniqueness within a rolling period of at least 24 hours. The enforcement of uniqueness primarily addresses issues arising from accidental retries or other problems occurring within extremely brief time intervals. This approach helps prevent duplicate entries and ensures data integrity in high-frequency operations.
*/
identifier?: string;

Expand Down
10 changes: 5 additions & 5 deletions types/Charges.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ declare module 'stripe' {
authorization_code: string | null;

/**
* Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
* Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
*/
brand: string | null;

Expand Down Expand Up @@ -810,7 +810,7 @@ declare module 'stripe' {
multicapture?: Card.Multicapture;

/**
* Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
* Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
*/
network: string | null;

Expand Down Expand Up @@ -1106,7 +1106,7 @@ declare module 'stripe' {
amount_authorized: number | null;

/**
* Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
* Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
*/
brand: string | null;

Expand Down Expand Up @@ -1188,7 +1188,7 @@ declare module 'stripe' {
last4: string | null;

/**
* Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
* Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
*/
network: string | null;

Expand Down Expand Up @@ -1585,7 +1585,7 @@ declare module 'stripe' {
last4: string | null;

/**
* Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
* Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
*/
network: string | null;

Expand Down
Loading

0 comments on commit 18306a5

Please sign in to comment.