Skip to content

Commit

Permalink
Codegen for openapi v177
Browse files Browse the repository at this point in the history
  • Loading branch information
yejia-stripe committed Aug 9, 2022
1 parent cc0ae34 commit 4dd00f6
Show file tree
Hide file tree
Showing 15 changed files with 198 additions and 48 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v176
v177
36 changes: 28 additions & 8 deletions types/2022-08-01/Accounts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,7 @@ declare module 'stripe' {
/**
* A publicly available mailing address for sending support issues to.
*/
support_address?: Stripe.AddressParam;
support_address?: BusinessProfile.SupportAddress;

/**
* A publicly available email address for sending support issues to.
Expand All @@ -1260,6 +1260,10 @@ declare module 'stripe' {
url?: string;
}

namespace BusinessProfile {
type SupportAddress = Stripe.AddressParam;
}

type BusinessType =
| 'company'
| 'government_entity'
Expand Down Expand Up @@ -1670,7 +1674,7 @@ declare module 'stripe' {
/**
* The company's primary address.
*/
address?: Stripe.AddressParam;
address?: Company.Address;

/**
* The Kana variation of the company's primary address (Japan only).
Expand Down Expand Up @@ -1754,6 +1758,8 @@ declare module 'stripe' {
}

namespace Company {
type Address = Stripe.AddressParam;

interface OwnershipDeclaration {
/**
* The Unix timestamp marking when the beneficial owner attestation was made.
Expand Down Expand Up @@ -1944,7 +1950,7 @@ declare module 'stripe' {
/**
* The individual's primary address.
*/
address?: Stripe.AddressParam;
address?: Individual.Address;

/**
* The Kana variation of the the individual's primary address (Japan only).
Expand Down Expand Up @@ -2039,7 +2045,7 @@ declare module 'stripe' {
/**
* The individual's registered address.
*/
registered_address?: Stripe.AddressParam;
registered_address?: Individual.RegisteredAddress;

/**
* The last four digits of the individual's Social Security Number (U.S. only).
Expand All @@ -2053,6 +2059,8 @@ declare module 'stripe' {
}

namespace Individual {
type Address = Stripe.AddressParam;

interface Dob {
/**
* The day of birth, between 1 and 31.
Expand All @@ -2072,6 +2080,8 @@ declare module 'stripe' {

type PoliticalExposure = 'existing' | 'none';

type RegisteredAddress = Stripe.AddressParam;

interface Verification {
/**
* A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
Expand Down Expand Up @@ -2452,7 +2462,7 @@ declare module 'stripe' {
/**
* A publicly available mailing address for sending support issues to.
*/
support_address?: Stripe.AddressParam;
support_address?: BusinessProfile.SupportAddress;

/**
* A publicly available email address for sending support issues to.
Expand All @@ -2475,6 +2485,10 @@ declare module 'stripe' {
url?: string;
}

namespace BusinessProfile {
type SupportAddress = Stripe.AddressParam;
}

type BusinessType =
| 'company'
| 'government_entity'
Expand Down Expand Up @@ -2885,7 +2899,7 @@ declare module 'stripe' {
/**
* The company's primary address.
*/
address?: Stripe.AddressParam;
address?: Company.Address;

/**
* The Kana variation of the company's primary address (Japan only).
Expand Down Expand Up @@ -2969,6 +2983,8 @@ declare module 'stripe' {
}

namespace Company {
type Address = Stripe.AddressParam;

interface OwnershipDeclaration {
/**
* The Unix timestamp marking when the beneficial owner attestation was made.
Expand Down Expand Up @@ -3122,7 +3138,7 @@ declare module 'stripe' {
/**
* The individual's primary address.
*/
address?: Stripe.AddressParam;
address?: Individual.Address;

/**
* The Kana variation of the the individual's primary address (Japan only).
Expand Down Expand Up @@ -3217,7 +3233,7 @@ declare module 'stripe' {
/**
* The individual's registered address.
*/
registered_address?: Stripe.AddressParam;
registered_address?: Individual.RegisteredAddress;

/**
* The last four digits of the individual's Social Security Number (U.S. only).
Expand All @@ -3231,6 +3247,8 @@ declare module 'stripe' {
}

namespace Individual {
type Address = Stripe.AddressParam;

interface Dob {
/**
* The day of birth, between 1 and 31.
Expand All @@ -3250,6 +3268,8 @@ declare module 'stripe' {

type PoliticalExposure = 'existing' | 'none';

type RegisteredAddress = Stripe.AddressParam;

interface Verification {
/**
* A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
Expand Down
12 changes: 10 additions & 2 deletions types/2022-08-01/Charges.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1895,7 +1895,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 @@ -1918,6 +1918,10 @@ declare module 'stripe' {
tracking_number?: string;
}

namespace Shipping {
type Address = Stripe.AddressParam;
}

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 @@ -1996,7 +2000,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 @@ -2018,6 +2022,10 @@ declare module 'stripe' {
*/
tracking_number?: string;
}

namespace Shipping {
type Address = Stripe.AddressParam;
}
}

interface ChargeListParams extends PaginationParams {
Expand Down
6 changes: 5 additions & 1 deletion types/2022-08-01/CustomerSources.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ declare module 'stripe' {
/**
* Owner's address.
*/
address?: Stripe.AddressParam;
address?: Owner.Address;

/**
* Owner's email address.
Expand All @@ -121,6 +121,10 @@ declare module 'stripe' {
*/
phone?: string;
}

namespace Owner {
type Address = Stripe.AddressParam;
}
}

interface CustomerSourceListParams extends PaginationParams {
Expand Down
20 changes: 16 additions & 4 deletions types/2022-08-01/Customers.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ declare module 'stripe' {
/**
* The customer's address.
*/
address?: Stripe.Emptyable<Stripe.AddressParam>;
address?: Stripe.Emptyable<CustomerCreateParams.Address>;

/**
* An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice.
Expand Down Expand Up @@ -396,6 +396,8 @@ declare module 'stripe' {
}

namespace CustomerCreateParams {
type Address = Stripe.AddressParam;

interface CashBalance {
/**
* Settings controlling the behavior of the customer's cash balance,
Expand Down Expand Up @@ -470,7 +472,7 @@ declare module 'stripe' {
/**
* Customer shipping address.
*/
address: Stripe.AddressParam;
address: Shipping.Address;

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

namespace Shipping {
type Address = Stripe.AddressParam;
}

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 @@ -566,7 +572,7 @@ declare module 'stripe' {
/**
* The customer's address.
*/
address?: Stripe.Emptyable<Stripe.AddressParam>;
address?: Stripe.Emptyable<CustomerUpdateParams.Address>;

/**
* An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice.
Expand Down Expand Up @@ -665,6 +671,8 @@ declare module 'stripe' {
}

namespace CustomerUpdateParams {
type Address = Stripe.AddressParam;

interface CashBalance {
/**
* Settings controlling the behavior of the customer's cash balance,
Expand Down Expand Up @@ -739,7 +747,7 @@ declare module 'stripe' {
/**
* Customer shipping address.
*/
address: Stripe.AddressParam;
address: Shipping.Address;

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

namespace Shipping {
type Address = Stripe.AddressParam;
}

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
20 changes: 16 additions & 4 deletions types/2022-08-01/Invoices.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1950,7 +1950,7 @@ declare module 'stripe' {
/**
* The customer's address.
*/
address?: Stripe.Emptyable<Stripe.AddressParam>;
address?: Stripe.Emptyable<CustomerDetails.Address>;

/**
* The customer's shipping information. Appears on invoices emailed to this customer.
Expand All @@ -1974,11 +1974,13 @@ declare module 'stripe' {
}

namespace CustomerDetails {
type Address = Stripe.AddressParam;

interface Shipping {
/**
* Customer shipping address.
*/
address: Stripe.AddressParam;
address: Shipping.Address;

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

namespace Shipping {
type Address = Stripe.AddressParam;
}

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 @@ -2498,7 +2504,7 @@ declare module 'stripe' {
/**
* The customer's address.
*/
address?: Stripe.Emptyable<Stripe.AddressParam>;
address?: Stripe.Emptyable<CustomerDetails.Address>;

/**
* The customer's shipping information. Appears on invoices emailed to this customer.
Expand All @@ -2522,11 +2528,13 @@ declare module 'stripe' {
}

namespace CustomerDetails {
type Address = Stripe.AddressParam;

interface Shipping {
/**
* Customer shipping address.
*/
address: Stripe.AddressParam;
address: Shipping.Address;

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

namespace Shipping {
type Address = Stripe.AddressParam;
}

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 4dd00f6

Please sign in to comment.