Skip to content

Commit 3cd9a61

Browse files
Codegen for openapi 37adbbc (#1108)
1 parent db2f627 commit 3cd9a61

File tree

5 files changed

+131
-2
lines changed

5 files changed

+131
-2
lines changed

types/2020-08-27/Accounts.d.ts

+3
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ declare module 'stripe' {
7070
/**
7171
* This is an object representing a person associated with a Stripe account.
7272
*
73+
* 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.
74+
* 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.
75+
*
7376
* Related guide: [Handling Identity Verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information).
7477
*/
7578
individual?: Stripe.Person;

types/2020-08-27/Checkout/Sessions.d.ts

+88-1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ declare module 'stripe' {
6464
*/
6565
customer: string | Stripe.Customer | Stripe.DeletedCustomer | null;
6666

67+
/**
68+
* The customer details including the customer's tax exempt status and the customer's tax IDs.
69+
*/
70+
customer_details: Session.CustomerDetails | null;
71+
6772
/**
6873
* If provided, this value will be used when the Customer object is created.
6974
* If not provided, customers will be asked to enter their email address.
@@ -158,6 +163,76 @@ declare module 'stripe' {
158163
namespace Session {
159164
type BillingAddressCollection = 'auto' | 'required';
160165

166+
interface CustomerDetails {
167+
/**
168+
* The customer's email at time of checkout.
169+
*/
170+
email: string | null;
171+
172+
/**
173+
* The customer's tax exempt status at time of checkout.
174+
*/
175+
tax_exempt: CustomerDetails.TaxExempt | null;
176+
177+
/**
178+
* The customer's tax IDs at time of checkout.
179+
*/
180+
tax_ids: Array<CustomerDetails.TaxId> | null;
181+
}
182+
183+
namespace CustomerDetails {
184+
type TaxExempt = 'exempt' | 'none' | 'reverse';
185+
186+
interface TaxId {
187+
/**
188+
* 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`
189+
*/
190+
type: TaxId.Type;
191+
192+
/**
193+
* The value of the tax ID.
194+
*/
195+
value: string | null;
196+
}
197+
198+
namespace TaxId {
199+
type Type =
200+
| 'ae_trn'
201+
| 'au_abn'
202+
| 'br_cnpj'
203+
| 'br_cpf'
204+
| 'ca_bn'
205+
| 'ca_qst'
206+
| 'ch_vat'
207+
| 'cl_tin'
208+
| 'es_cif'
209+
| 'eu_vat'
210+
| 'hk_br'
211+
| 'id_npwp'
212+
| 'in_gst'
213+
| 'jp_cn'
214+
| 'jp_rn'
215+
| 'kr_brn'
216+
| 'li_uid'
217+
| 'mx_rfc'
218+
| 'my_frp'
219+
| 'my_itn'
220+
| 'my_sst'
221+
| 'no_vat'
222+
| 'nz_gst'
223+
| 'ru_inn'
224+
| 'ru_kpp'
225+
| 'sa_vat'
226+
| 'sg_gst'
227+
| 'sg_uen'
228+
| 'th_vat'
229+
| 'tw_vat'
230+
| 'unknown'
231+
| 'us_ein'
232+
| 'za_vat';
233+
}
234+
}
235+
161236
type Locale =
162237
| 'auto'
163238
| 'bg'
@@ -695,6 +770,11 @@ declare module 'stripe' {
695770
*/
696771
description?: string;
697772

773+
/**
774+
* The [tax rates](https://stripe.com/docs/api/tax_rates) that will be applied to this line item depending on the customer's billing/shipping address. We currently support the following countries: US, GB, AU, and all countries in the EU.
775+
*/
776+
dynamic_tax_rates?: Array<string>;
777+
698778
/**
699779
* A list of image URLs representing this line item. Each image can be up to 5 MB in size. If passing `price` or `price_data`, specify images on the associated product instead.
700780
*/
@@ -721,7 +801,7 @@ declare module 'stripe' {
721801
quantity: number;
722802

723803
/**
724-
* The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item. This is only allowed in subscription mode.
804+
* The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item.
725805
*/
726806
tax_rates?: Array<string>;
727807
}
@@ -881,10 +961,17 @@ declare module 'stripe' {
881961
* Indicates that you intend to make future payments with the payment
882962
* method collected by this Checkout Session.
883963
*
964+
* When setting this to `on_session`, Checkout will show a notice to the
965+
* customer that their payment details will be saved.
966+
*
884967
* When setting this to `off_session`, Checkout will show a notice to the
885968
* customer that their payment details will be saved and used for future
886969
* payments.
887970
*
971+
* For both values, Checkout will attach the payment method to either the
972+
* provided Customer for the session, or a new Customer created by Checkout
973+
* if one has not been provided.
974+
*
888975
* When processing card payments, Checkout also uses `setup_future_usage`
889976
* to dynamically optimize your payment flow and comply with regional
890977
* legislation and network rules, such as SCA.

types/2020-08-27/Issuing/Transactions.d.ts

+9
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,15 @@ declare module 'stripe' {
328328
* Specifies which fields in the response should be expanded.
329329
*/
330330
expand?: Array<string>;
331+
332+
/**
333+
* Only return transactions that have the given type. One of `capture` or `refund`.
334+
*/
335+
type?: TransactionListParams.Type;
336+
}
337+
338+
namespace TransactionListParams {
339+
type Type = 'capture' | 'refund';
331340
}
332341

333342
class TransactionsResource {

types/2020-08-27/SubscriptionSchedules.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ declare module 'stripe' {
220220
end_date: number;
221221

222222
/**
223-
* The subscription schedule's default invoice settings.
223+
* The invoice settings applicable during this phase.
224224
*/
225225
invoice_settings: Phase.InvoiceSettings | null;
226226

types/2020-08-27/TaxRates.d.ts

+30
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ declare module 'stripe' {
2121
*/
2222
active: boolean;
2323

24+
/**
25+
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
26+
*/
27+
country: string | null;
28+
2429
/**
2530
* Time at which the object was created. Measured in seconds since the Unix epoch.
2631
*/
@@ -60,6 +65,11 @@ declare module 'stripe' {
6065
* This represents the tax rate percent out of 100.
6166
*/
6267
percentage: number;
68+
69+
/**
70+
* [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.
71+
*/
72+
state: string | null;
6373
}
6474

6575
interface TaxRateCreateParams {
@@ -83,6 +93,11 @@ declare module 'stripe' {
8393
*/
8494
active?: boolean;
8595

96+
/**
97+
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
98+
*/
99+
country?: string;
100+
86101
/**
87102
* An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
88103
*/
@@ -102,6 +117,11 @@ declare module 'stripe' {
102117
* 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`.
103118
*/
104119
metadata?: Stripe.MetadataParam;
120+
121+
/**
122+
* [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.
123+
*/
124+
state?: string;
105125
}
106126

107127
interface TaxRateRetrieveParams {
@@ -117,6 +137,11 @@ declare module 'stripe' {
117137
*/
118138
active?: boolean;
119139

140+
/**
141+
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
142+
*/
143+
country?: string;
144+
120145
/**
121146
* An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
122147
*/
@@ -141,6 +166,11 @@ declare module 'stripe' {
141166
* 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`.
142167
*/
143168
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
169+
170+
/**
171+
* [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.
172+
*/
173+
state?: string;
144174
}
145175

146176
interface TaxRateListParams extends PaginationParams {

0 commit comments

Comments
 (0)