Skip to content

Commit 0d43eef

Browse files
Merge pull request #2517 from stripe/latest-codegen-private-preview
Update generated code for private-preview
2 parents c89c3a9 + 174213f commit 0d43eef

12 files changed

Lines changed: 232 additions & 17 deletions

API_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
368be7755d15d02a1038325c7d159703b01662b0
1+
1307ab81356642fb1bf890524815d5cb6997a34d

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2129
1+
v2132

test/resources/generated_examples_test.spec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ describe('Generated tests', function() {
575575
method: 'GET',
576576
path: '/v2/core/events/ll_123',
577577
response:
578-
'{"changes":{"int_key":123,"string_key":"value","boolean_key":true,"object_key":{"object_int_key":123,"object_string_key":"value","object_boolean_key":true},"array_key":[1,2,3]},"context":"context","created":"1970-01-12T21:42:34.472Z","id":"obj_123","livemode":true,"object":"v2.core.event","reason":{"type":"request","request":{"id":"obj_123","idempotency_key":"idempotency_key"}},"type":"type"}',
578+
'{"changes":{"int_key":123,"string_key":"value","boolean_key":true,"object_key":{"object_int_key":123,"object_string_key":"value","object_boolean_key":true},"array_key":[1,2,3]},"context":"context","created":"1970-01-12T21:42:34.472Z","id":"obj_123","livemode":true,"object":"v2.core.event","reason":{"type":"request","request":{"client":{"type":"api_key","api_key":{"id":"obj_123"},"dashboard_user":{"email":"email","ip_address":"ip_address","machine_identifier":"machine_identifier"},"stripe_action":{"int_key":123,"string_key":"value","boolean_key":true,"object_key":{"object_int_key":123,"object_string_key":"value","object_boolean_key":true},"array_key":[1,2,3]}},"id":"obj_123","idempotency_key":"idempotency_key"}},"type":"type"}',
579579
},
580580
]);
581581
const event = await stripe.v2.core.events.retrieve('ll_123');
@@ -6820,7 +6820,7 @@ describe('Generated tests', function() {
68206820
method: 'GET',
68216821
path: '/v2/money_management/received_credits',
68226822
response:
6823-
'{"data":[{"amount":{},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.received_credit","status":"returned","type":"balance_transfer","livemode":true}],"next_page_url":null,"previous_page_url":null}',
6823+
'{"data":[{"amount":{},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.received_credit","status":"returned","type":"external_credit","livemode":true}],"next_page_url":null,"previous_page_url":null}',
68246824
},
68256825
]);
68266826
const receivedCredits = await stripe.v2.moneyManagement.receivedCredits.list();
@@ -6833,7 +6833,7 @@ describe('Generated tests', function() {
68336833
method: 'GET',
68346834
path: '/v2/money_management/received_credits/id_123',
68356835
response:
6836-
'{"amount":{},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.received_credit","status":"returned","type":"balance_transfer","livemode":true}',
6836+
'{"amount":{},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.received_credit","status":"returned","type":"external_credit","livemode":true}',
68376837
},
68386838
]);
68396839
const receivedCredit = await stripe.v2.moneyManagement.receivedCredits.retrieve(
@@ -6848,7 +6848,7 @@ describe('Generated tests', function() {
68486848
method: 'GET',
68496849
path: '/v2/money_management/received_debits',
68506850
response:
6851-
'{"data":[{"amount":{},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.received_debit","status":"canceled","type":"bank_transfer","livemode":true}],"next_page_url":null,"previous_page_url":null}',
6851+
'{"data":[{"amount":{},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.received_debit","status":"canceled","type":"external_debit","livemode":true}],"next_page_url":null,"previous_page_url":null}',
68526852
},
68536853
]);
68546854
const receivedDebits = await stripe.v2.moneyManagement.receivedDebits.list();
@@ -6861,7 +6861,7 @@ describe('Generated tests', function() {
68616861
method: 'GET',
68626862
path: '/v2/money_management/received_debits/id_123',
68636863
response:
6864-
'{"amount":{},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.received_debit","status":"canceled","type":"bank_transfer","livemode":true}',
6864+
'{"amount":{},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.received_debit","status":"canceled","type":"external_debit","livemode":true}',
68656865
},
68666866
]);
68676867
const receivedDebit = await stripe.v2.moneyManagement.receivedDebits.retrieve(

types/AccountSessions.d.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@ declare module 'stripe' {
8989
tax_registrations: Components.TaxRegistrations;
9090

9191
tax_settings: Components.TaxSettings;
92+
93+
/**
94+
* Configuration for the [check scanning](https://docs.stripe.com/connect/supported-embedded-components/check-scanning/) embedded component.
95+
*/
96+
check_scanning?: Components.CheckScanning | null;
9297
}
9398

9499
namespace Components {
@@ -215,6 +220,19 @@ declare module 'stripe' {
215220
interface Features {}
216221
}
217222

223+
interface CheckScanning {
224+
/**
225+
* Whether the embedded component is enabled.
226+
*/
227+
enabled: boolean;
228+
229+
features: CheckScanning.Features;
230+
}
231+
232+
namespace CheckScanning {
233+
interface Features {}
234+
}
235+
218236
interface DisputesList {
219237
/**
220238
* Whether the embedded component is enabled.

types/AccountsResource.d.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,14 +1781,26 @@ declare module 'stripe' {
17811781
}
17821782

17831783
interface SelfReportedIncome {
1784+
/**
1785+
* The amount in the minor currency unit (for example, cents for USD).
1786+
*/
17841787
amount: number;
17851788

1789+
/**
1790+
* 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).
1791+
*/
17861792
currency: string;
17871793
}
17881794

17891795
interface SelfReportedMonthlyHousingPayment {
1796+
/**
1797+
* The amount in the minor currency unit (for example, cents for USD).
1798+
*/
17901799
amount: number;
17911800

1801+
/**
1802+
* 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).
1803+
*/
17921804
currency: string;
17931805
}
17941806

@@ -3932,14 +3944,26 @@ declare module 'stripe' {
39323944
}
39333945

39343946
interface SelfReportedIncome {
3947+
/**
3948+
* The amount in the minor currency unit (for example, cents for USD).
3949+
*/
39353950
amount: number;
39363951

3952+
/**
3953+
* 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).
3954+
*/
39373955
currency: string;
39383956
}
39393957

39403958
interface SelfReportedMonthlyHousingPayment {
3959+
/**
3960+
* The amount in the minor currency unit (for example, cents for USD).
3961+
*/
39413962
amount: number;
39423963

3964+
/**
3965+
* 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).
3966+
*/
39433967
currency: string;
39443968
}
39453969

@@ -4780,14 +4804,26 @@ declare module 'stripe' {
47804804
}
47814805

47824806
interface SelfReportedIncome {
4807+
/**
4808+
* The amount in the minor currency unit (for example, cents for USD).
4809+
*/
47834810
amount: number;
47844811

4812+
/**
4813+
* 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).
4814+
*/
47854815
currency: string;
47864816
}
47874817

47884818
interface SelfReportedMonthlyHousingPayment {
4819+
/**
4820+
* The amount in the minor currency unit (for example, cents for USD).
4821+
*/
47894822
amount: number;
47904823

4824+
/**
4825+
* 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).
4826+
*/
47914827
currency: string;
47924828
}
47934829

@@ -5431,14 +5467,26 @@ declare module 'stripe' {
54315467
}
54325468

54335469
interface SelfReportedIncome {
5470+
/**
5471+
* The amount in the minor currency unit (for example, cents for USD).
5472+
*/
54345473
amount: number;
54355474

5475+
/**
5476+
* 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).
5477+
*/
54365478
currency: string;
54375479
}
54385480

54395481
interface SelfReportedMonthlyHousingPayment {
5482+
/**
5483+
* The amount in the minor currency unit (for example, cents for USD).
5484+
*/
54405485
amount: number;
54415486

5487+
/**
5488+
* 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).
5489+
*/
54425490
currency: string;
54435491
}
54445492

types/DelegatedCheckout/RequestedSessionsResource.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ declare module 'stripe' {
113113
postal_code: string;
114114

115115
/**
116-
* State, county, province, or region.
116+
* State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
117117
*/
118118
state: string;
119119
}
@@ -199,7 +199,7 @@ declare module 'stripe' {
199199
postal_code: string;
200200

201201
/**
202-
* State, county, province, or region.
202+
* State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
203203
*/
204204
state: string;
205205
}
@@ -338,7 +338,7 @@ declare module 'stripe' {
338338
postal_code: string;
339339

340340
/**
341-
* State, county, province, or region.
341+
* State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
342342
*/
343343
state: string;
344344
}
@@ -445,7 +445,7 @@ declare module 'stripe' {
445445
postal_code: string;
446446

447447
/**
448-
* State, county, province, or region.
448+
* State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
449449
*/
450450
state: string;
451451
}

types/Persons.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ declare module 'stripe' {
676676

677677
interface SelfReportedIncome {
678678
/**
679-
* Amount in the minor currency unit (e.g., cents for USD)
679+
* The amount in the minor currency unit (for example, cents for USD).
680680
*/
681681
amount: number;
682682

@@ -688,7 +688,7 @@ declare module 'stripe' {
688688

689689
interface SelfReportedMonthlyHousingPayment {
690690
/**
691-
* Amount in the minor currency unit (e.g., cents for USD)
691+
* The amount in the minor currency unit (for example, cents for USD).
692692
*/
693693
amount: number;
694694

types/TokensResource.d.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,14 +493,26 @@ declare module 'stripe' {
493493
}
494494

495495
interface SelfReportedIncome {
496+
/**
497+
* The amount in the minor currency unit (for example, cents for USD).
498+
*/
496499
amount: number;
497500

501+
/**
502+
* 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).
503+
*/
498504
currency: string;
499505
}
500506

501507
interface SelfReportedMonthlyHousingPayment {
508+
/**
509+
* The amount in the minor currency unit (for example, cents for USD).
510+
*/
502511
amount: number;
503512

513+
/**
514+
* 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).
515+
*/
504516
currency: string;
505517
}
506518

@@ -955,14 +967,26 @@ declare module 'stripe' {
955967
}
956968

957969
interface SelfReportedIncome {
970+
/**
971+
* The amount in the minor currency unit (for example, cents for USD).
972+
*/
958973
amount: number;
959974

975+
/**
976+
* 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).
977+
*/
960978
currency: string;
961979
}
962980

963981
interface SelfReportedMonthlyHousingPayment {
982+
/**
983+
* The amount in the minor currency unit (for example, cents for USD).
984+
*/
964985
amount: number;
965986

987+
/**
988+
* 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).
989+
*/
966990
currency: string;
967991
}
968992

types/V2/Core/Events.d.ts

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ declare module 'stripe' {
2323

2424
namespace Reason {
2525
interface Request {
26+
/**
27+
* The client details that made the request.
28+
*/
29+
client?: Request.Client;
30+
2631
/**
2732
* ID of the API request that caused the event.
2833
*/
@@ -33,6 +38,62 @@ declare module 'stripe' {
3338
*/
3439
idempotency_key: string;
3540
}
41+
42+
namespace Request {
43+
interface Client {
44+
/**
45+
* The type of the client.
46+
*/
47+
type: Client.Type;
48+
49+
/**
50+
* API key that triggered the event.
51+
*/
52+
api_key?: Client.ApiKey;
53+
54+
/**
55+
* Dashboard user that triggered the event.
56+
*/
57+
dashboard_user?: Client.DashboardUser;
58+
59+
/**
60+
* Stripe action that triggered the event.
61+
*/
62+
stripe_action?: Client.StripeAction;
63+
}
64+
65+
namespace Client {
66+
interface ApiKey {
67+
/**
68+
* The ID of the API key.
69+
*/
70+
id: string;
71+
}
72+
73+
interface DashboardUser {
74+
/**
75+
* The email of the dashboard user.
76+
*/
77+
email: string;
78+
79+
/**
80+
* The IP address of the user.
81+
*/
82+
ip_address: string;
83+
84+
/**
85+
* The machine identifier of the user.
86+
*/
87+
machine_identifier: string;
88+
}
89+
90+
type StripeAction = {
91+
[key: string]: unknown;
92+
};
93+
94+
type Type = 'api_key' | 'dashboard_user' | 'stripe_action';
95+
}
96+
}
3697
}
3798
}
3899

0 commit comments

Comments
 (0)