Skip to content

Commit

Permalink
Codegen for openapi 3e77877 (#1139)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardm-stripe authored Apr 12, 2021
1 parent 3b54e67 commit 4157ab5
Show file tree
Hide file tree
Showing 8 changed files with 762 additions and 8 deletions.
31 changes: 31 additions & 0 deletions types/2020-08-27/Accounts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ declare module 'stripe' {
| 'non_profit';

interface Capabilities {
/**
* The status of the ACSS Direct Debits payments capability of the account, or whether the account can directly process ACSS Direct Debits charges.
*/
acss_debit_payments?: Capabilities.AcssDebitPayments;

/**
* The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges.
*/
Expand Down Expand Up @@ -259,6 +264,8 @@ declare module 'stripe' {
}

namespace Capabilities {
type AcssDebitPayments = 'active' | 'inactive' | 'pending';

type AfterpayClearpayPayments = 'active' | 'inactive' | 'pending';

type AuBecsDebitPayments = 'active' | 'inactive' | 'pending';
Expand Down Expand Up @@ -984,6 +991,11 @@ declare module 'stripe' {
| 'non_profit';

interface Capabilities {
/**
* The acss_debit_payments capability.
*/
acss_debit_payments?: Capabilities.AcssDebitPayments;

/**
* The afterpay_clearpay_payments capability.
*/
Expand Down Expand Up @@ -1091,6 +1103,13 @@ declare module 'stripe' {
}

namespace Capabilities {
interface AcssDebitPayments {
/**
* Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
*/
requested?: boolean;
}

interface AfterpayClearpayPayments {
/**
* Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
Expand Down Expand Up @@ -2028,6 +2047,11 @@ declare module 'stripe' {
| 'non_profit';

interface Capabilities {
/**
* The acss_debit_payments capability.
*/
acss_debit_payments?: Capabilities.AcssDebitPayments;

/**
* The afterpay_clearpay_payments capability.
*/
Expand Down Expand Up @@ -2135,6 +2159,13 @@ declare module 'stripe' {
}

namespace Capabilities {
interface AcssDebitPayments {
/**
* Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
*/
requested?: boolean;
}

interface AfterpayClearpayPayments {
/**
* Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
Expand Down
137 changes: 130 additions & 7 deletions types/2020-08-27/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ declare module 'stripe' {
*/
payment_intent: string | Stripe.PaymentIntent | null;

/**
* Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.
*/
payment_method_options: Session.PaymentMethodOptions | null;

/**
* A list of the types of payment methods (e.g. card) this Checkout
* Session is allowed to accept.
Expand Down Expand Up @@ -275,6 +280,53 @@ declare module 'stripe' {

type Mode = 'payment' | 'setup' | 'subscription';

interface PaymentMethodOptions {
acss_debit?: PaymentMethodOptions.AcssDebit;
}

namespace PaymentMethodOptions {
interface AcssDebit {
mandate_options?: AcssDebit.MandateOptions;

/**
* Bank account verification method.
*/
verification_method?: AcssDebit.VerificationMethod;
}

namespace AcssDebit {
interface MandateOptions {
/**
* A URL for custom mandate text
*/
custom_mandate_url?: string;

/**
* Description of the interval. Only required if 'payment_schedule' parmeter is 'interval' or 'combined'.
*/
interval_description: string | null;

/**
* Payment schedule for the mandate.
*/
payment_schedule: MandateOptions.PaymentSchedule | null;

/**
* Transaction type of the mandate.
*/
transaction_type: MandateOptions.TransactionType | null;
}

namespace MandateOptions {
type PaymentSchedule = 'combined' | 'interval' | 'sporadic';

type TransactionType = 'business' | 'personal';
}

type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
}
}

type PaymentStatus = 'no_payment_required' | 'paid' | 'unpaid';

interface Shipping {
Expand Down Expand Up @@ -662,13 +714,16 @@ declare module 'stripe' {
client_reference_id?: string;

/**
* ID of an existing customer, if one exists. The email stored on the
* customer will be used to prefill the email field on the Checkout page.
* If the customer changes their email on the Checkout page, the Customer
* object will be updated with the new email.
* If blank for Checkout Sessions in `payment` or `subscription` mode,
* Checkout will create a new customer object based on information
* provided during the payment flow.
* ID of an existing Customer, if one exists. In `payment` mode, the customer's most recent card
* payment method will be used to prefill the email, name, card details, and billing address
* on the Checkout page. In `subscription` mode, the customer's [default payment method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method)
* will be used if it's a card, and otherwise the most recent card will be used. A valid billing address is required for Checkout to prefill the customer's card details.
*
* If the customer changes their email on the Checkout page, the Customer object will be updated with the new email.
*
* If blank for Checkout Sessions in `payment` or `subscription` mode, Checkout will create a new Customer object based on information provided during the payment flow.
*
* You can set [`payment_intent_data.setup_future_usage`](https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage) to have Checkout automatically attach the payment method to the Customer you pass in for future reuse.
*/
customer?: string;

Expand Down Expand Up @@ -720,6 +775,11 @@ declare module 'stripe' {
*/
payment_intent_data?: SessionCreateParams.PaymentIntentData;

/**
* Payment-method-specific configuration.
*/
payment_method_options?: SessionCreateParams.PaymentMethodOptions;

/**
* A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode.
*/
Expand Down Expand Up @@ -1091,7 +1151,70 @@ declare module 'stripe' {
}
}

interface PaymentMethodOptions {
/**
* contains details about the ACSS Debit payment method options.
*/
acss_debit?: PaymentMethodOptions.AcssDebit;
}

namespace PaymentMethodOptions {
interface AcssDebit {
/**
* 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?: AcssDebit.Currency;

/**
* Additional fields for Mandate creation
*/
mandate_options?: AcssDebit.MandateOptions;

/**
* Verification method for the intent
*/
verification_method?: AcssDebit.VerificationMethod;
}

namespace AcssDebit {
type Currency = 'cad' | 'usd';

interface MandateOptions {
/**
* A URL for custom mandate text to render during confirmation step.
* The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
* or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
*/
custom_mandate_url?: Stripe.Emptyable<string>;

/**
* Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
*/
interval_description?: string;

/**
* Payment schedule for the mandate.
*/
payment_schedule?: MandateOptions.PaymentSchedule;

/**
* Transaction type of the mandate.
*/
transaction_type?: MandateOptions.TransactionType;
}

namespace MandateOptions {
type PaymentSchedule = 'combined' | 'interval' | 'sporadic';

type TransactionType = 'business' | 'personal';
}

type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
}
}

type PaymentMethodType =
| 'acss_debit'
| 'afterpay_clearpay'
| 'alipay'
| 'bacs_debit'
Expand Down
2 changes: 1 addition & 1 deletion types/2020-08-27/Invoices.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ declare module 'stripe' {
/**
* The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
*/
account_tax_ids?: Array<
account_tax_ids: Array<
string | Stripe.TaxId | Stripe.DeletedTaxId
> | null;

Expand Down
25 changes: 25 additions & 0 deletions types/2020-08-27/Mandates.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ declare module 'stripe' {
interface MultiUse {}

interface PaymentMethodDetails {
acss_debit?: PaymentMethodDetails.AcssDebit;

au_becs_debit?: PaymentMethodDetails.AuBecsDebit;

bacs_debit?: PaymentMethodDetails.BacsDebit;
Expand All @@ -98,6 +100,29 @@ declare module 'stripe' {
}

namespace PaymentMethodDetails {
interface AcssDebit {
/**
* Description of the interval. Only required if 'payment_schedule' parmeter is 'interval' or 'combined'.
*/
interval_description: string | null;

/**
* Payment schedule for the mandate.
*/
payment_schedule: AcssDebit.PaymentSchedule;

/**
* Transaction type of the mandate.
*/
transaction_type: AcssDebit.TransactionType;
}

namespace AcssDebit {
type PaymentSchedule = 'combined' | 'interval' | 'sporadic';

type TransactionType = 'business' | 'personal';
}

interface AuBecsDebit {
/**
* The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively.
Expand Down
Loading

0 comments on commit 4157ab5

Please sign in to comment.