Skip to content

Commit

Permalink
Codegen for openapi v195
Browse files Browse the repository at this point in the history
  • Loading branch information
pakrym-stripe committed Sep 21, 2022
1 parent 9c0da25 commit ea2a42f
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 32 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v193
v195
51 changes: 22 additions & 29 deletions types/2022-08-01/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,11 @@ declare module 'stripe' {
* from the merchant about this Checkout Session.
*/
promotions: Consent.Promotions | null;

/**
* If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service.
*/
terms_of_service: 'accepted' | null;
}

namespace Consent {
Expand All @@ -316,10 +321,17 @@ declare module 'stripe' {
* from the merchant depending on the customer's locale. Only available to US merchants.
*/
promotions: ConsentCollection.Promotions | null;

/**
* If set to `required`, it requires customers to accept the terms of service before being able to pay.
*/
terms_of_service: ConsentCollection.TermsOfService | null;
}

namespace ConsentCollection {
type Promotions = 'auto' | 'none';

type TermsOfService = 'none' | 'required';
}

type CustomerCreation = 'always' | 'if_required';
Expand Down Expand Up @@ -1645,10 +1657,18 @@ declare module 'stripe' {
* from the merchant depending on the customer's locale. Only available to US merchants.
*/
promotions?: ConsentCollection.Promotions;

/**
* If set to `required`, it requires customers to check a terms of service checkbox before being able to pay.
* There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public).
*/
terms_of_service?: ConsentCollection.TermsOfService;
}

namespace ConsentCollection {
type Promotions = 'auto' | 'none';

type TermsOfService = 'none' | 'required';
}

type CustomerCreation = 'always' | 'if_required';
Expand Down Expand Up @@ -2352,37 +2372,10 @@ declare module 'stripe' {
namespace Card {
interface Installments {
/**
* Setting to true enables installments for this PaymentIntent.
* This will cause the response to contain a list of available installment plans.
* Setting to false will prevent any selected plan from applying to a charge.
* Setting to true enables installments for this Checkout Session.
* Setting to false will prevent any installment plan from applying to a payment.
*/
enabled?: boolean;

/**
* The selected installment plan to use for this payment attempt.
* This parameter can only be provided during confirmation.
*/
plan?: Stripe.Emptyable<Installments.Plan>;
}

namespace Installments {
interface Plan {
/**
* For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card.
*/
count: number;

/**
* For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card.
* One of `month`.
*/
interval: 'month';

/**
* Type of installment plan, one of `fixed_count`.
*/
type: 'fixed_count';
}
}

type SetupFutureUsage = 'off_session' | 'on_session';
Expand Down
2 changes: 1 addition & 1 deletion types/2022-08-01/FinancialConnections/Accounts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ declare module 'stripe' {

interface AccountRefreshParams {
/**
* The list of account features that you would like to refresh. Either: `balance` or `ownership`.
* The list of account features that you would like to refresh.
*/
features: Array<AccountRefreshParams.Feature>;

Expand Down
15 changes: 15 additions & 0 deletions types/2022-08-01/PaymentLinks.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,17 @@ declare module 'stripe' {
* If set to `auto`, enables the collection of customer consent for promotional communications.
*/
promotions: ConsentCollection.Promotions | null;

/**
* If set to `required`, it requires cutomers to accept the terms of service before being able to pay. If set to `none`, customers won't be shown a checkbox to accept the terms of service.
*/
terms_of_service: ConsentCollection.TermsOfService | null;
}

namespace ConsentCollection {
type Promotions = 'auto' | 'none';

type TermsOfService = 'none' | 'required';
}

type CustomerCreation = 'always' | 'if_required';
Expand Down Expand Up @@ -709,10 +716,18 @@ declare module 'stripe' {
* from the merchant depending on the customer's locale. Only available to US merchants.
*/
promotions?: ConsentCollection.Promotions;

/**
* If set to `required`, it requires customers to check a terms of service checkbox before being able to pay.
* There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public).
*/
terms_of_service?: ConsentCollection.TermsOfService;
}

namespace ConsentCollection {
type Promotions = 'auto' | 'none';

type TermsOfService = 'none' | 'required';
}

type CustomerCreation = 'always' | 'if_required';
Expand Down
2 changes: 1 addition & 1 deletion types/2022-08-01/SubscriptionSchedules.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ declare module 'stripe' {
/**
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
*/
currency?: string;
currency: string;

/**
* ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
Expand Down

0 comments on commit ea2a42f

Please sign in to comment.