Skip to content

Commit

Permalink
Codegen for openapi cee0955
Browse files Browse the repository at this point in the history
  • Loading branch information
richardm-stripe committed Jan 14, 2021
1 parent db2f627 commit db36427
Show file tree
Hide file tree
Showing 5 changed files with 126 additions and 2 deletions.
3 changes: 3 additions & 0 deletions types/2020-08-27/Accounts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ declare module 'stripe' {
/**
* This is an object representing a person associated with a Stripe account.
*
* A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account.
* See the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform pre-filling and account onboarding steps.
*
* Related guide: [Handling Identity Verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information).
*/
individual?: Stripe.Person;
Expand Down
84 changes: 83 additions & 1 deletion types/2020-08-27/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ declare module 'stripe' {
*/
customer: string | Stripe.Customer | Stripe.DeletedCustomer | null;

/**
* The customer details including the customer's tax exempt status and the customer's tax IDs.
*/
customer_details: Session.CustomerDetails | null;

/**
* If provided, this value will be used when the Customer object is created.
* If not provided, customers will be asked to enter their email address.
Expand Down Expand Up @@ -158,6 +163,76 @@ declare module 'stripe' {
namespace Session {
type BillingAddressCollection = 'auto' | 'required';

interface CustomerDetails {
/**
* The customer's email at time of checkout.
*/
email: string | null;

/**
* The customer's tax exempt status at time of checkout.
*/
tax_exempt: CustomerDetails.TaxExempt | null;

/**
* The customer's tax IDs at time of checkout.
*/
tax_ids: Array<CustomerDetails.TaxId> | null;
}

namespace CustomerDetails {
type TaxExempt = 'exempt' | 'none' | 'reverse';

interface TaxId {
/**
* The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `nz_gst`, `au_abn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, or `unknown`
*/
type: TaxId.Type;

/**
* The value of the tax ID.
*/
value: string | null;
}

namespace TaxId {
type Type =
| 'ae_trn'
| 'au_abn'
| 'br_cnpj'
| 'br_cpf'
| 'ca_bn'
| 'ca_qst'
| 'ch_vat'
| 'cl_tin'
| 'es_cif'
| 'eu_vat'
| 'hk_br'
| 'id_npwp'
| 'in_gst'
| 'jp_cn'
| 'jp_rn'
| 'kr_brn'
| 'li_uid'
| 'mx_rfc'
| 'my_frp'
| 'my_itn'
| 'my_sst'
| 'no_vat'
| 'nz_gst'
| 'ru_inn'
| 'ru_kpp'
| 'sa_vat'
| 'sg_gst'
| 'sg_uen'
| 'th_vat'
| 'tw_vat'
| 'unknown'
| 'us_ein'
| 'za_vat';
}
}

type Locale =
| 'auto'
| 'bg'
Expand Down Expand Up @@ -721,7 +796,7 @@ declare module 'stripe' {
quantity: number;

/**
* The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item. This is only allowed in subscription mode.
* The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item.
*/
tax_rates?: Array<string>;
}
Expand Down Expand Up @@ -881,10 +956,17 @@ declare module 'stripe' {
* Indicates that you intend to make future payments with the payment
* method collected by this Checkout Session.
*
* When setting this to `on_session`, Checkout will show a notice to the
* customer that their payment details will be saved.
*
* When setting this to `off_session`, Checkout will show a notice to the
* customer that their payment details will be saved and used for future
* payments.
*
* For both values, Checkout will attach the payment method to either the
* provided Customer for the session, or a new Customer created by Checkout
* if one has not been provided.
*
* When processing card payments, Checkout also uses `setup_future_usage`
* to dynamically optimize your payment flow and comply with regional
* legislation and network rules, such as SCA.
Expand Down
9 changes: 9 additions & 0 deletions types/2020-08-27/Issuing/Transactions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,15 @@ declare module 'stripe' {
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;

/**
* Only return transactions that have the given type. One of `capture` or `refund`.
*/
type?: TransactionListParams.Type;
}

namespace TransactionListParams {
type Type = 'capture' | 'refund';
}

class TransactionsResource {
Expand Down
2 changes: 1 addition & 1 deletion types/2020-08-27/SubscriptionSchedules.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ declare module 'stripe' {
end_date: number;

/**
* The subscription schedule's default invoice settings.
* The invoice settings applicable during this phase.
*/
invoice_settings: Phase.InvoiceSettings | null;

Expand Down
30 changes: 30 additions & 0 deletions types/2020-08-27/TaxRates.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ declare module 'stripe' {
*/
active: boolean;

/**
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
*/
country: string | null;

/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
Expand Down Expand Up @@ -60,6 +65,11 @@ declare module 'stripe' {
* This represents the tax rate percent out of 100.
*/
percentage: number;

/**
* [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States.
*/
state: string | null;
}

interface TaxRateCreateParams {
Expand All @@ -83,6 +93,11 @@ declare module 'stripe' {
*/
active?: boolean;

/**
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
*/
country?: string;

/**
* An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
*/
Expand All @@ -102,6 +117,11 @@ declare module 'stripe' {
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
*/
metadata?: Stripe.MetadataParam;

/**
* [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States.
*/
state?: string;
}

interface TaxRateRetrieveParams {
Expand All @@ -117,6 +137,11 @@ declare module 'stripe' {
*/
active?: boolean;

/**
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
*/
country?: string;

/**
* An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
*/
Expand All @@ -141,6 +166,11 @@ declare module 'stripe' {
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
*/
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;

/**
* [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States.
*/
state?: string;
}

interface TaxRateListParams extends PaginationParams {
Expand Down

0 comments on commit db36427

Please sign in to comment.