Skip to content

Commit

Permalink
API Updates (#1203)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcr-stripe authored Jul 28, 2021
1 parent 1e3ce8f commit b3c2ff0
Show file tree
Hide file tree
Showing 23 changed files with 145 additions and 667 deletions.
2 changes: 2 additions & 0 deletions lib/resources/Quotes.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ module.exports = StripeResource.extend({
listComputedUpfrontLineItems: stripeMethod({
method: 'GET',
path: '/{quote}/computed_upfront_line_items',
methodType: 'list',
}),

listLineItems: stripeMethod({
method: 'GET',
path: '/{quote}/line_items',
methodType: 'list',
}),

pdf: stripeMethod({
Expand Down
187 changes: 6 additions & 181 deletions types/2020-08-27/Accounts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -981,36 +981,8 @@ declare module 'stripe' {
}

namespace BusinessProfile {
interface SupportAddress {
/**
* City, district, suburb, town, or village.
*/
city?: string;

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

/**
* Address line 1 (e.g., street, PO Box, or company name).
*/
interface SupportAddress extends Omit<Stripe.AddressParam, 'line1'> {
line1?: string;

/**
* Address line 2 (e.g., apartment, suite, unit, or building).
*/
line2?: string;

/**
* ZIP or postal code.
*/
postal_code?: string;

/**
* State, county, province, or region.
*/
state?: string;
}
}

Expand Down Expand Up @@ -1383,36 +1355,8 @@ declare module 'stripe' {
}

namespace Company {
interface Address {
/**
* City, district, suburb, town, or village.
*/
city?: string;

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

/**
* Address line 1 (e.g., street, PO Box, or company name).
*/
interface Address extends Omit<Stripe.AddressParam, 'line1'> {
line1?: string;

/**
* Address line 2 (e.g., apartment, suite, unit, or building).
*/
line2?: string;

/**
* ZIP or postal code.
*/
postal_code?: string;

/**
* State, county, province, or region.
*/
state?: string;
}

type Structure =
Expand Down Expand Up @@ -1670,36 +1614,8 @@ declare module 'stripe' {
}

namespace Individual {
interface Address {
/**
* City, district, suburb, town, or village.
*/
city?: string;

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

/**
* Address line 1 (e.g., street, PO Box, or company name).
*/
interface Address extends Omit<Stripe.AddressParam, 'line1'> {
line1?: string;

/**
* Address line 2 (e.g., apartment, suite, unit, or building).
*/
line2?: string;

/**
* ZIP or postal code.
*/
postal_code?: string;

/**
* State, county, province, or region.
*/
state?: string;
}

interface Dob {
Expand Down Expand Up @@ -1966,13 +1882,6 @@ declare module 'stripe' {
expand?: Array<string>;
}

interface AccountRetrieveParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}

interface AccountUpdateParams {
/**
* An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account.
Expand Down Expand Up @@ -2091,36 +2000,8 @@ declare module 'stripe' {
}

namespace BusinessProfile {
interface SupportAddress {
/**
* City, district, suburb, town, or village.
*/
city?: string;

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

/**
* Address line 1 (e.g., street, PO Box, or company name).
*/
interface SupportAddress extends Omit<Stripe.AddressParam, 'line1'> {
line1?: string;

/**
* Address line 2 (e.g., apartment, suite, unit, or building).
*/
line2?: string;

/**
* ZIP or postal code.
*/
postal_code?: string;

/**
* State, county, province, or region.
*/
state?: string;
}
}

Expand Down Expand Up @@ -2493,36 +2374,8 @@ declare module 'stripe' {
}

namespace Company {
interface Address {
/**
* City, district, suburb, town, or village.
*/
city?: string;

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

/**
* Address line 1 (e.g., street, PO Box, or company name).
*/
interface Address extends Omit<Stripe.AddressParam, 'line1'> {
line1?: string;

/**
* Address line 2 (e.g., apartment, suite, unit, or building).
*/
line2?: string;

/**
* ZIP or postal code.
*/
postal_code?: string;

/**
* State, county, province, or region.
*/
state?: string;
}

type Structure =
Expand Down Expand Up @@ -2743,36 +2596,8 @@ declare module 'stripe' {
}

namespace Individual {
interface Address {
/**
* City, district, suburb, town, or village.
*/
city?: string;

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

/**
* Address line 1 (e.g., street, PO Box, or company name).
*/
interface Address extends Omit<Stripe.AddressParam, 'line1'> {
line1?: string;

/**
* Address line 2 (e.g., apartment, suite, unit, or building).
*/
line2?: string;

/**
* ZIP or postal code.
*/
postal_code?: string;

/**
* State, county, province, or region.
*/
state?: string;
}

interface Dob {
Expand Down
5 changes: 5 additions & 0 deletions types/2020-08-27/BankAccounts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ declare module 'stripe' {
*/
account_holder_type: string | null;

/**
* The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`.
*/
account_type: string | null;

/**
* 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.
*/
Expand Down
16 changes: 14 additions & 2 deletions types/2020-08-27/Charges.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1729,7 +1729,7 @@ declare module 'stripe' {
/**
* Shipping address.
*/
address: Stripe.AddressParam;
address: Shipping.Address;

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

namespace Shipping {
interface Address extends Omit<Stripe.AddressParam, 'line1'> {
line1?: string;
}
}

interface TransferData {
/**
* The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.
Expand Down Expand Up @@ -1830,7 +1836,7 @@ declare module 'stripe' {
/**
* Shipping address.
*/
address: Stripe.AddressParam;
address: Shipping.Address;

/**
* The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
Expand All @@ -1852,6 +1858,12 @@ declare module 'stripe' {
*/
tracking_number?: string;
}

namespace Shipping {
interface Address extends Omit<Stripe.AddressParam, 'line1'> {
line1?: string;
}
}
}

interface ChargeListParams extends PaginationParams {
Expand Down
30 changes: 1 addition & 29 deletions types/2020-08-27/CustomerSources.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,36 +121,8 @@ declare module 'stripe' {
}

namespace Owner {
interface Address {
/**
* City, district, suburb, town, or village.
*/
city?: string;

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

/**
* Address line 1 (e.g., street, PO Box, or company name).
*/
interface Address extends Omit<Stripe.AddressParam, 'line1'> {
line1?: string;

/**
* Address line 2 (e.g., apartment, suite, unit, or building).
*/
line2?: string;

/**
* ZIP or postal code.
*/
postal_code?: string;

/**
* State, county, province, or region.
*/
state?: string;
}
}
}
Expand Down
16 changes: 14 additions & 2 deletions types/2020-08-27/Customers.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ declare module 'stripe' {
/**
* Customer shipping address.
*/
address: Stripe.AddressParam;
address: Shipping.Address;

/**
* Customer name.
Expand All @@ -403,6 +403,12 @@ declare module 'stripe' {
phone?: string;
}

namespace Shipping {
interface Address extends Omit<Stripe.AddressParam, 'line1'> {
line1?: string;
}
}

interface Tax {
/**
* 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.
Expand Down Expand Up @@ -610,7 +616,7 @@ declare module 'stripe' {
/**
* Customer shipping address.
*/
address: Stripe.AddressParam;
address: Shipping.Address;

/**
* Customer name.
Expand All @@ -623,6 +629,12 @@ declare module 'stripe' {
phone?: string;
}

namespace Shipping {
interface Address extends Omit<Stripe.AddressParam, 'line1'> {
line1?: string;
}
}

interface Tax {
/**
* 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.
Expand Down
Loading

0 comments on commit b3c2ff0

Please sign in to comment.