Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for company.structure on Account and other docs changes #789

Merged
merged 1 commit into from
Jan 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 71 additions & 5 deletions types/2019-12-03/Accounts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ declare module 'stripe' {
url: string | null;
}

type BusinessType = 'company' | 'individual';
type BusinessType =
| 'company'
| 'government_entity'
| 'individual'
| 'non_profit';

interface Capabilities {
/**
Expand Down Expand Up @@ -217,6 +221,11 @@ declare module 'stripe' {
*/
phone?: string | null;

/**
* The category identifying the legal structure of the company or legal entity.
*/
structure?: Company.Structure | null;

/**
* Whether the company's business ID number was provided.
*/
Expand Down Expand Up @@ -313,6 +322,19 @@ declare module 'stripe' {
town: string | null;
}

type Structure =
| 'government_instrumentality'
| 'governmental_unit'
| 'incorporated_non_profit'
| 'multi_member_llc'
| 'private_corporation'
| 'private_partnership'
| 'public_corporation'
| 'public_partnership'
| 'tax_exempt_government_instrumentality'
| 'unincorporated_association'
| 'unincorporated_non_profit';

interface Verification {
document: Verification.Document;
}
Expand Down Expand Up @@ -552,7 +574,7 @@ declare module 'stripe' {
business_type?: AccountCreateParams.BusinessType;

/**
* Information about the company or business. This field is null unless `business_type` is set to `company`.
* Information about the company or business. This field is null unless `business_type` is set to `company`, `government_entity`, or `non_profit`.
*/
company?: AccountCreateParams.Company;

Expand Down Expand Up @@ -652,7 +674,11 @@ declare module 'stripe' {
url?: string;
}

type BusinessType = 'company' | 'individual';
type BusinessType =
| 'company'
| 'government_entity'
| 'individual'
| 'non_profit';

interface Company {
/**
Expand Down Expand Up @@ -705,6 +731,11 @@ declare module 'stripe' {
*/
phone?: string;

/**
* The category identifying the legal structure of the company or legal entity.
*/
structure?: Company.Structure | null;

/**
* The business ID number of the company, as appropriate for the company's country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.)
*/
Expand Down Expand Up @@ -759,6 +790,19 @@ declare module 'stripe' {
state?: string;
}

type Structure =
| 'government_instrumentality'
| 'governmental_unit'
| 'incorporated_non_profit'
| 'multi_member_llc'
| 'private_corporation'
| 'private_partnership'
| 'public_corporation'
| 'public_partnership'
| 'tax_exempt_government_instrumentality'
| 'unincorporated_association'
| 'unincorporated_non_profit';

interface Verification {
/**
* A document verifying the business.
Expand Down Expand Up @@ -1157,7 +1201,7 @@ declare module 'stripe' {
business_type?: AccountUpdateParams.BusinessType;

/**
* Information about the company or business. This field is null unless `business_type` is set to `company`.
* Information about the company or business. This field is null unless `business_type` is set to `company`, `government_entity`, or `non_profit`.
*/
company?: AccountUpdateParams.Company;

Expand Down Expand Up @@ -1247,7 +1291,11 @@ declare module 'stripe' {
url?: string;
}

type BusinessType = 'company' | 'individual';
type BusinessType =
| 'company'
| 'government_entity'
| 'individual'
| 'non_profit';

interface Company {
/**
Expand Down Expand Up @@ -1300,6 +1348,11 @@ declare module 'stripe' {
*/
phone?: string;

/**
* The category identifying the legal structure of the company or legal entity.
*/
structure?: Company.Structure | null;

/**
* The business ID number of the company, as appropriate for the company's country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.)
*/
Expand Down Expand Up @@ -1354,6 +1407,19 @@ declare module 'stripe' {
state?: string;
}

type Structure =
| 'government_instrumentality'
| 'governmental_unit'
| 'incorporated_non_profit'
| 'multi_member_llc'
| 'private_corporation'
| 'private_partnership'
| 'public_corporation'
| 'public_partnership'
| 'tax_exempt_government_instrumentality'
| 'unincorporated_association'
| 'unincorporated_non_profit';

interface Verification {
/**
* A document verifying the business.
Expand Down
12 changes: 5 additions & 7 deletions types/2019-12-03/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,12 +297,12 @@ declare module 'stripe' {
/**
* The amount to be collected per unit of the line item.
*/
amount: number;
amount?: number;

/**
* 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).
*/
currency: string;
currency?: string;

/**
* The description for the line item.
Expand All @@ -317,7 +317,7 @@ declare module 'stripe' {
/**
* The name for the line item.
*/
name: string;
name?: string;

/**
* The quantity of the line item being purchased.
Expand Down Expand Up @@ -481,11 +481,9 @@ declare module 'stripe' {
application_fee_percent?: number;

/**
* A list of items, each with an attached plan, that the customer is
* subscribing to. Use this parameter for subscriptions. To create one-time
* payments, use `line_items`.
* A list of items, each with an attached plan, that the customer is subscribing to. Use this parameter for subscriptions. To create one-time payments, use `line_items`.
*/
items: Array<SubscriptionData.Item>;
items?: Array<SubscriptionData.Item>;

/**
* Set of key-value pairs 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`.
Expand Down
4 changes: 3 additions & 1 deletion types/2019-12-03/Plans.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,9 @@ declare module 'stripe' {
name: string;

/**
* An arbitrary string to be displayed on your customer's credit card statement. This may be up to 22 characters. The statement description may not include <>"' characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. While most banks display this information consistently, some may display it incorrectly or not at all.
* An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
*
* This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
*/
statement_descriptor?: string;

Expand Down
10 changes: 8 additions & 2 deletions types/2019-12-03/Products.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,10 @@ declare module 'stripe' {
shippable?: boolean;

/**
* An arbitrary string to be displayed on your customer's credit card statement. This may be up to 22 characters. The statement description may not include <>"' characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. While most banks display this information consistently, some may display it incorrectly or not at all. It must contain at least one letter.
* An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
*
* This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
* It must contain at least one letter.
*/
statement_descriptor?: string;

Expand Down Expand Up @@ -320,7 +323,10 @@ declare module 'stripe' {
shippable?: boolean;

/**
* An arbitrary string to be displayed on your customer's credit card statement. This may be up to 22 characters. The statement description may not include <>"' characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. While most banks display this information consistently, some may display it incorrectly or not at all. It must contain at least one letter. May only be set if `type=service`.
* An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
*
* This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
* It must contain at least one letter. May only be set if `type=service`.
*/
statement_descriptor?: string;

Expand Down