Skip to content

Commit

Permalink
More consistent namespacing for shared types (#1073)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardm-stripe committed Nov 19, 2020
1 parent 6007066 commit 8a9c2d4
Show file tree
Hide file tree
Showing 62 changed files with 315 additions and 312 deletions.
32 changes: 16 additions & 16 deletions types/2020-08-27/Accounts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ 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.
*/
metadata?: Metadata;
metadata?: Stripe.Metadata;

/**
* Whether Stripe can send payouts to this account.
Expand Down Expand Up @@ -118,7 +118,7 @@ declare module 'stripe' {
/**
* A publicly available mailing address for sending support issues to.
*/
support_address: Address | null;
support_address: Stripe.Address | null;

/**
* A publicly available email address for sending support issues to.
Expand Down Expand Up @@ -285,7 +285,7 @@ declare module 'stripe' {
}

interface Company {
address?: Address;
address?: Stripe.Address;

/**
* The Kana variation of the company's primary address (Japan only).
Expand Down Expand Up @@ -831,7 +831,7 @@ 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<MetadataParam>;
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;

/**
* Options for customizing how the account functions within Stripe.
Expand Down Expand Up @@ -1173,12 +1173,12 @@ declare module 'stripe' {
/**
* The Kana variation of the company's primary address (Japan only).
*/
address_kana?: JapanAddressParam;
address_kana?: Stripe.JapanAddressParam;

/**
* The Kanji variation of the company's primary address (Japan only).
*/
address_kanji?: JapanAddressParam;
address_kanji?: Stripe.JapanAddressParam;

/**
* Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided.
Expand Down Expand Up @@ -1327,12 +1327,12 @@ declare module 'stripe' {
/**
* The Kana variation of the the individual's primary address (Japan only).
*/
address_kana?: JapanAddressParam;
address_kana?: Stripe.JapanAddressParam;

/**
* The Kanji variation of the the individual's primary address (Japan only).
*/
address_kanji?: JapanAddressParam;
address_kanji?: Stripe.JapanAddressParam;

/**
* The individual's date of birth.
Expand Down Expand Up @@ -1392,7 +1392,7 @@ 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<MetadataParam>;
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;

/**
* The individual's phone number.
Expand Down Expand Up @@ -1744,7 +1744,7 @@ 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<MetadataParam>;
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;

/**
* Options for customizing how the account functions within Stripe.
Expand Down Expand Up @@ -2081,12 +2081,12 @@ declare module 'stripe' {
/**
* The Kana variation of the company's primary address (Japan only).
*/
address_kana?: JapanAddressParam;
address_kana?: Stripe.JapanAddressParam;

/**
* The Kanji variation of the company's primary address (Japan only).
*/
address_kanji?: JapanAddressParam;
address_kanji?: Stripe.JapanAddressParam;

/**
* Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided.
Expand Down Expand Up @@ -2235,12 +2235,12 @@ declare module 'stripe' {
/**
* The Kana variation of the the individual's primary address (Japan only).
*/
address_kana?: JapanAddressParam;
address_kana?: Stripe.JapanAddressParam;

/**
* The Kanji variation of the the individual's primary address (Japan only).
*/
address_kanji?: JapanAddressParam;
address_kanji?: Stripe.JapanAddressParam;

/**
* The individual's date of birth.
Expand Down Expand Up @@ -2300,7 +2300,7 @@ 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<MetadataParam>;
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;

/**
* The individual's phone number.
Expand Down Expand Up @@ -2581,7 +2581,7 @@ declare module 'stripe' {
}

interface AccountListParams extends PaginationParams {
created?: RangeQueryParam | number;
created?: Stripe.RangeQueryParam | number;

/**
* Specifies which fields in the response should be expanded.
Expand Down
4 changes: 2 additions & 2 deletions types/2020-08-27/AlipayAccounts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ declare module 'stripe' {
/**
* The ID of the customer associated with this Alipay Account.
*/
customer?: string | Stripe.Customer | Stripe.DeletedCustomer | null;
customer?: string | Stripe.Customer | DeletedCustomer | null;

deleted?: void;

Expand All @@ -40,7 +40,7 @@ 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.
*/
metadata?: Metadata;
metadata?: Stripe.Metadata;

/**
* If the Alipay account object is not reusable, the exact amount that you can create a charge for.
Expand Down
2 changes: 1 addition & 1 deletion types/2020-08-27/ApplicationFees.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ declare module 'stripe' {
*/
charge?: string;

created?: RangeQueryParam | number;
created?: Stripe.RangeQueryParam | number;

/**
* Specifies which fields in the response should be expanded.
Expand Down
4 changes: 2 additions & 2 deletions types/2020-08-27/BalanceTransactions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ declare module 'stripe' {
}

interface BalanceTransactionListParams extends PaginationParams {
available_on?: RangeQueryParam | number;
available_on?: Stripe.RangeQueryParam | number;

created?: RangeQueryParam | number;
created?: Stripe.RangeQueryParam | number;

/**
* Only return transactions in a certain currency. 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).
Expand Down
4 changes: 2 additions & 2 deletions types/2020-08-27/BankAccounts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ declare module 'stripe' {
/**
* The ID of the customer that the bank account is associated with.
*/
customer?: string | Stripe.Customer | Stripe.DeletedCustomer | null;
customer?: string | Stripe.Customer | DeletedCustomer | null;

/**
* Whether this bank account is the default external account for its currency.
Expand All @@ -77,7 +77,7 @@ 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.
*/
metadata?: Metadata | null;
metadata?: Stripe.Metadata | null;

/**
* The routing transit number for the bank account.
Expand Down
2 changes: 1 addition & 1 deletion types/2020-08-27/BitcoinReceivers.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ 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.
*/
metadata: Metadata | null;
metadata: Stripe.Metadata | null;

/**
* The ID of the payment created from the receiver, if any. Hidden when viewing the receiver with a publishable key.
Expand Down
4 changes: 2 additions & 2 deletions types/2020-08-27/Cards.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ declare module 'stripe' {
/**
* The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead.
*/
customer?: string | Stripe.Customer | Stripe.DeletedCustomer | null;
customer?: string | Stripe.Customer | DeletedCustomer | null;

/**
* If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge).
Expand Down Expand Up @@ -145,7 +145,7 @@ 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.
*/
metadata: Metadata | null;
metadata: Stripe.Metadata | null;

/**
* Cardholder name.
Expand Down
28 changes: 14 additions & 14 deletions types/2020-08-27/Charges.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ declare module 'stripe' {
/**
* ID of the customer this charge is for if one exists.
*/
customer: string | Stripe.Customer | Stripe.DeletedCustomer | null;
customer: string | Stripe.Customer | DeletedCustomer | null;

/**
* An arbitrary string attached to the object. Often useful for displaying to users.
Expand Down Expand Up @@ -134,7 +134,7 @@ 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.
*/
metadata: Metadata;
metadata: Stripe.Metadata;

/**
* The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers) for details.
Expand Down Expand Up @@ -209,7 +209,7 @@ declare module 'stripe' {
/**
* This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to `payment_method` or `payment_method_details` instead.
*/
source: CustomerSource | null;
source: Stripe.CustomerSource | null;

/**
* The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.
Expand Down Expand Up @@ -264,7 +264,7 @@ declare module 'stripe' {
/**
* Billing address.
*/
address: Address | null;
address: Stripe.Address | null;

/**
* Email address.
Expand Down Expand Up @@ -842,7 +842,7 @@ declare module 'stripe' {
/**
* Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
*/
billing_address: Address | null;
billing_address: Stripe.Address | null;

/**
* Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
Expand All @@ -857,7 +857,7 @@ declare module 'stripe' {
/**
* Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
*/
shipping_address: Address | null;
shipping_address: Stripe.Address | null;
}

interface SamsungPay {}
Expand All @@ -874,7 +874,7 @@ declare module 'stripe' {
/**
* Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
*/
billing_address: Address | null;
billing_address: Stripe.Address | null;

/**
* Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
Expand All @@ -889,7 +889,7 @@ declare module 'stripe' {
/**
* Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
*/
shipping_address: Address | null;
shipping_address: Stripe.Address | null;
}
}
}
Expand Down Expand Up @@ -1479,7 +1479,7 @@ declare module 'stripe' {
}

interface Shipping {
address?: Address;
address?: Stripe.Address;

/**
* The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
Expand Down Expand Up @@ -1558,7 +1558,7 @@ 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<MetadataParam>;
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;

/**
* The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers#on-behalf-of).
Expand Down Expand Up @@ -1618,7 +1618,7 @@ declare module 'stripe' {
/**
* Shipping address.
*/
address: AddressParam;
address: Stripe.AddressParam;

/**
* The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
Expand Down Expand Up @@ -1685,7 +1685,7 @@ 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<MetadataParam>;
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;

/**
* This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address.
Expand Down Expand Up @@ -1719,7 +1719,7 @@ declare module 'stripe' {
/**
* Shipping address.
*/
address: AddressParam;
address: Stripe.AddressParam;

/**
* The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
Expand All @@ -1744,7 +1744,7 @@ declare module 'stripe' {
}

interface ChargeListParams extends PaginationParams {
created?: RangeQueryParam | number;
created?: Stripe.RangeQueryParam | number;

/**
* Only return charges for the customer specified by this customer ID.
Expand Down
Loading

0 comments on commit 8a9c2d4

Please sign in to comment.