Skip to content

Commit b3c2ff0

Browse files
authored
API Updates (#1203)
1 parent 1e3ce8f commit b3c2ff0

23 files changed

+145
-667
lines changed

lib/resources/Quotes.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@ module.exports = StripeResource.extend({
2828
listComputedUpfrontLineItems: stripeMethod({
2929
method: 'GET',
3030
path: '/{quote}/computed_upfront_line_items',
31+
methodType: 'list',
3132
}),
3233

3334
listLineItems: stripeMethod({
3435
method: 'GET',
3536
path: '/{quote}/line_items',
37+
methodType: 'list',
3638
}),
3739

3840
pdf: stripeMethod({

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

Lines changed: 6 additions & 181 deletions
Original file line numberDiff line numberDiff line change
@@ -981,36 +981,8 @@ declare module 'stripe' {
981981
}
982982

983983
namespace BusinessProfile {
984-
interface SupportAddress {
985-
/**
986-
* City, district, suburb, town, or village.
987-
*/
988-
city?: string;
989-
990-
/**
991-
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
992-
*/
993-
country?: string;
994-
995-
/**
996-
* Address line 1 (e.g., street, PO Box, or company name).
997-
*/
984+
interface SupportAddress extends Omit<Stripe.AddressParam, 'line1'> {
998985
line1?: string;
999-
1000-
/**
1001-
* Address line 2 (e.g., apartment, suite, unit, or building).
1002-
*/
1003-
line2?: string;
1004-
1005-
/**
1006-
* ZIP or postal code.
1007-
*/
1008-
postal_code?: string;
1009-
1010-
/**
1011-
* State, county, province, or region.
1012-
*/
1013-
state?: string;
1014986
}
1015987
}
1016988

@@ -1383,36 +1355,8 @@ declare module 'stripe' {
13831355
}
13841356

13851357
namespace Company {
1386-
interface Address {
1387-
/**
1388-
* City, district, suburb, town, or village.
1389-
*/
1390-
city?: string;
1391-
1392-
/**
1393-
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
1394-
*/
1395-
country?: string;
1396-
1397-
/**
1398-
* Address line 1 (e.g., street, PO Box, or company name).
1399-
*/
1358+
interface Address extends Omit<Stripe.AddressParam, 'line1'> {
14001359
line1?: string;
1401-
1402-
/**
1403-
* Address line 2 (e.g., apartment, suite, unit, or building).
1404-
*/
1405-
line2?: string;
1406-
1407-
/**
1408-
* ZIP or postal code.
1409-
*/
1410-
postal_code?: string;
1411-
1412-
/**
1413-
* State, county, province, or region.
1414-
*/
1415-
state?: string;
14161360
}
14171361

14181362
type Structure =
@@ -1670,36 +1614,8 @@ declare module 'stripe' {
16701614
}
16711615

16721616
namespace Individual {
1673-
interface Address {
1674-
/**
1675-
* City, district, suburb, town, or village.
1676-
*/
1677-
city?: string;
1678-
1679-
/**
1680-
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
1681-
*/
1682-
country?: string;
1683-
1684-
/**
1685-
* Address line 1 (e.g., street, PO Box, or company name).
1686-
*/
1617+
interface Address extends Omit<Stripe.AddressParam, 'line1'> {
16871618
line1?: string;
1688-
1689-
/**
1690-
* Address line 2 (e.g., apartment, suite, unit, or building).
1691-
*/
1692-
line2?: string;
1693-
1694-
/**
1695-
* ZIP or postal code.
1696-
*/
1697-
postal_code?: string;
1698-
1699-
/**
1700-
* State, county, province, or region.
1701-
*/
1702-
state?: string;
17031619
}
17041620

17051621
interface Dob {
@@ -1966,13 +1882,6 @@ declare module 'stripe' {
19661882
expand?: Array<string>;
19671883
}
19681884

1969-
interface AccountRetrieveParams {
1970-
/**
1971-
* Specifies which fields in the response should be expanded.
1972-
*/
1973-
expand?: Array<string>;
1974-
}
1975-
19761885
interface AccountUpdateParams {
19771886
/**
19781887
* An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account.
@@ -2091,36 +2000,8 @@ declare module 'stripe' {
20912000
}
20922001

20932002
namespace BusinessProfile {
2094-
interface SupportAddress {
2095-
/**
2096-
* City, district, suburb, town, or village.
2097-
*/
2098-
city?: string;
2099-
2100-
/**
2101-
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
2102-
*/
2103-
country?: string;
2104-
2105-
/**
2106-
* Address line 1 (e.g., street, PO Box, or company name).
2107-
*/
2003+
interface SupportAddress extends Omit<Stripe.AddressParam, 'line1'> {
21082004
line1?: string;
2109-
2110-
/**
2111-
* Address line 2 (e.g., apartment, suite, unit, or building).
2112-
*/
2113-
line2?: string;
2114-
2115-
/**
2116-
* ZIP or postal code.
2117-
*/
2118-
postal_code?: string;
2119-
2120-
/**
2121-
* State, county, province, or region.
2122-
*/
2123-
state?: string;
21242005
}
21252006
}
21262007

@@ -2493,36 +2374,8 @@ declare module 'stripe' {
24932374
}
24942375

24952376
namespace Company {
2496-
interface Address {
2497-
/**
2498-
* City, district, suburb, town, or village.
2499-
*/
2500-
city?: string;
2501-
2502-
/**
2503-
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
2504-
*/
2505-
country?: string;
2506-
2507-
/**
2508-
* Address line 1 (e.g., street, PO Box, or company name).
2509-
*/
2377+
interface Address extends Omit<Stripe.AddressParam, 'line1'> {
25102378
line1?: string;
2511-
2512-
/**
2513-
* Address line 2 (e.g., apartment, suite, unit, or building).
2514-
*/
2515-
line2?: string;
2516-
2517-
/**
2518-
* ZIP or postal code.
2519-
*/
2520-
postal_code?: string;
2521-
2522-
/**
2523-
* State, county, province, or region.
2524-
*/
2525-
state?: string;
25262379
}
25272380

25282381
type Structure =
@@ -2743,36 +2596,8 @@ declare module 'stripe' {
27432596
}
27442597

27452598
namespace Individual {
2746-
interface Address {
2747-
/**
2748-
* City, district, suburb, town, or village.
2749-
*/
2750-
city?: string;
2751-
2752-
/**
2753-
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
2754-
*/
2755-
country?: string;
2756-
2757-
/**
2758-
* Address line 1 (e.g., street, PO Box, or company name).
2759-
*/
2599+
interface Address extends Omit<Stripe.AddressParam, 'line1'> {
27602600
line1?: string;
2761-
2762-
/**
2763-
* Address line 2 (e.g., apartment, suite, unit, or building).
2764-
*/
2765-
line2?: string;
2766-
2767-
/**
2768-
* ZIP or postal code.
2769-
*/
2770-
postal_code?: string;
2771-
2772-
/**
2773-
* State, county, province, or region.
2774-
*/
2775-
state?: string;
27762601
}
27772602

27782603
interface Dob {

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ declare module 'stripe' {
3131
*/
3232
account_holder_type: string | null;
3333

34+
/**
35+
* The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`.
36+
*/
37+
account_type: string | null;
38+
3439
/**
3540
* A set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout.
3641
*/

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1729,7 +1729,7 @@ declare module 'stripe' {
17291729
/**
17301730
* Shipping address.
17311731
*/
1732-
address: Stripe.AddressParam;
1732+
address: Shipping.Address;
17331733

17341734
/**
17351735
* The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
@@ -1752,6 +1752,12 @@ declare module 'stripe' {
17521752
tracking_number?: string;
17531753
}
17541754

1755+
namespace Shipping {
1756+
interface Address extends Omit<Stripe.AddressParam, 'line1'> {
1757+
line1?: string;
1758+
}
1759+
}
1760+
17551761
interface TransferData {
17561762
/**
17571763
* The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.
@@ -1830,7 +1836,7 @@ declare module 'stripe' {
18301836
/**
18311837
* Shipping address.
18321838
*/
1833-
address: Stripe.AddressParam;
1839+
address: Shipping.Address;
18341840

18351841
/**
18361842
* The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
@@ -1852,6 +1858,12 @@ declare module 'stripe' {
18521858
*/
18531859
tracking_number?: string;
18541860
}
1861+
1862+
namespace Shipping {
1863+
interface Address extends Omit<Stripe.AddressParam, 'line1'> {
1864+
line1?: string;
1865+
}
1866+
}
18551867
}
18561868

18571869
interface ChargeListParams extends PaginationParams {

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

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -121,36 +121,8 @@ declare module 'stripe' {
121121
}
122122

123123
namespace Owner {
124-
interface Address {
125-
/**
126-
* City, district, suburb, town, or village.
127-
*/
128-
city?: string;
129-
130-
/**
131-
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
132-
*/
133-
country?: string;
134-
135-
/**
136-
* Address line 1 (e.g., street, PO Box, or company name).
137-
*/
124+
interface Address extends Omit<Stripe.AddressParam, 'line1'> {
138125
line1?: string;
139-
140-
/**
141-
* Address line 2 (e.g., apartment, suite, unit, or building).
142-
*/
143-
line2?: string;
144-
145-
/**
146-
* ZIP or postal code.
147-
*/
148-
postal_code?: string;
149-
150-
/**
151-
* State, county, province, or region.
152-
*/
153-
state?: string;
154126
}
155127
}
156128
}

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ declare module 'stripe' {
390390
/**
391391
* Customer shipping address.
392392
*/
393-
address: Stripe.AddressParam;
393+
address: Shipping.Address;
394394

395395
/**
396396
* Customer name.
@@ -403,6 +403,12 @@ declare module 'stripe' {
403403
phone?: string;
404404
}
405405

406+
namespace Shipping {
407+
interface Address extends Omit<Stripe.AddressParam, 'line1'> {
408+
line1?: string;
409+
}
410+
}
411+
406412
interface Tax {
407413
/**
408414
* A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes.
@@ -610,7 +616,7 @@ declare module 'stripe' {
610616
/**
611617
* Customer shipping address.
612618
*/
613-
address: Stripe.AddressParam;
619+
address: Shipping.Address;
614620

615621
/**
616622
* Customer name.
@@ -623,6 +629,12 @@ declare module 'stripe' {
623629
phone?: string;
624630
}
625631

632+
namespace Shipping {
633+
interface Address extends Omit<Stripe.AddressParam, 'line1'> {
634+
line1?: string;
635+
}
636+
}
637+
626638
interface Tax {
627639
/**
628640
* A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes.

0 commit comments

Comments
 (0)