Skip to content

Commit

Permalink
Update generated code (#1803)
Browse files Browse the repository at this point in the history
* Update generated code for v769

* Update generated code for v770

* Update generated code for v771

* Update generated code for v773

* Update generated code for v774

* Update generated code for v775

* Update generated code for v776

* Update generated code for v778

* Update generated code for v779

* Update generated code for v780

* Update generated code for v781

* Update generated code for v782

* Update generated code for v784

* Update generated code for v785

* Update generated code for v786

* Update generated code for v789

* Update generated code for v790

* Update generated code for v791

* Update generated code for v793

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] authored Jan 25, 2024
1 parent 4360a55 commit dae4efd
Show file tree
Hide file tree
Showing 18 changed files with 377 additions and 44 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v767
v793
53 changes: 41 additions & 12 deletions account.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/stripe/stripe-go/v76/form"
)

// The business type.
// The business type. Once you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), this property is only returned for Custom accounts.
type AccountBusinessType string

// List of values that AccountBusinessType can take
Expand Down Expand Up @@ -52,6 +52,7 @@ const (
AccountCompanyStructurePublicCompany AccountCompanyStructure = "public_company"
AccountCompanyStructurePublicCorporation AccountCompanyStructure = "public_corporation"
AccountCompanyStructurePublicPartnership AccountCompanyStructure = "public_partnership"
AccountCompanyStructureRegisteredCharity AccountCompanyStructure = "registered_charity"
AccountCompanyStructureSingleMemberLLC AccountCompanyStructure = "single_member_llc"
AccountCompanyStructureSoleEstablishment AccountCompanyStructure = "sole_establishment"
AccountCompanyStructureSoleProprietorship AccountCompanyStructure = "sole_proprietorship"
Expand Down Expand Up @@ -155,11 +156,11 @@ type AccountParams struct {
AccountToken *string `form:"account_token"`
// Business information about the account.
BusinessProfile *AccountBusinessProfileParams `form:"business_profile"`
// The business type.
// The business type. Once you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), this property can only be updated for Custom accounts.
BusinessType *string `form:"business_type"`
// Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive.
Capabilities *AccountCapabilitiesParams `form:"capabilities"`
// Information about the company or business. This field is available for any `business_type`.
// Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), this property can only be updated for Custom accounts.
Company *AccountCompanyParams `form:"company"`
// The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported.
Country *string `form:"country"`
Expand All @@ -174,14 +175,16 @@ type AccountParams struct {
// A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won't be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.
//
// By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs.
//
// Once you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), this property can only be updated for Custom accounts.
ExternalAccount *AccountExternalAccountParams `form:"external_account"`
// Information about the person represented by the account. This field is null unless `business_type` is set to `individual`.
// Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), this property can only be updated for Custom accounts.
Individual *PersonParams `form:"individual"`
// 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 map[string]string `form:"metadata"`
// Options for customizing how the account functions within Stripe.
Settings *AccountSettingsParams `form:"settings"`
// Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance).
// Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance) This property can only be updated for Custom accounts.
TOSAcceptance *AccountTOSAcceptanceParams `form:"tos_acceptance"`
// The type of Stripe account to create. May be one of `custom`, `express` or `standard`.
Type *string `form:"type"`
Expand All @@ -201,6 +204,16 @@ func (p *AccountParams) AddMetadata(key string, value string) {
p.Metadata[key] = value
}

// The applicant's gross annual revenue for its preceding fiscal year.
type AccountBusinessProfileAnnualRevenueParams struct {
// A non-negative integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
Amount *int64 `form:"amount"`
// 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 `form:"currency"`
// The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023.
FiscalYearEnd *string `form:"fiscal_year_end"`
}

// An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India.
type AccountBusinessProfileMonthlyEstimatedRevenueParams struct {
// A non-negative integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
Expand All @@ -211,6 +224,10 @@ type AccountBusinessProfileMonthlyEstimatedRevenueParams struct {

// Business information about the account.
type AccountBusinessProfileParams struct {
// The applicant's gross annual revenue for its preceding fiscal year.
AnnualRevenue *AccountBusinessProfileAnnualRevenueParams `form:"annual_revenue"`
// An estimated upper bound of employees, contractors, vendors, etc. currently working for the business.
EstimatedWorkerCount *int64 `form:"estimated_worker_count"`
// [The merchant category code for the account](https://stripe.com/docs/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.
MCC *string `form:"mcc"`
// An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India.
Expand Down Expand Up @@ -591,7 +608,7 @@ type AccountCompanyVerificationParams struct {
Document *AccountCompanyVerificationDocumentParams `form:"document"`
}

// Information about the company or business. This field is available for any `business_type`.
// Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), this property can only be updated for Custom accounts.
type AccountCompanyParams struct {
// The company's primary address.
Address *AddressParams `form:"address"`
Expand Down Expand Up @@ -857,7 +874,7 @@ type AccountSettingsParams struct {
Treasury *AccountSettingsTreasuryParams `form:"treasury"`
}

// Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance).
// Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance) This property can only be updated for Custom accounts.
type AccountTOSAcceptanceParams struct {
// The Unix timestamp marking when the account representative accepted their service agreement.
Date *int64 `form:"date"`
Expand Down Expand Up @@ -899,6 +916,15 @@ func (p *AccountRejectParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}

// The applicant's gross annual revenue for its preceding fiscal year.
type AccountBusinessProfileAnnualRevenue struct {
// A non-negative integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
Amount int64 `json:"amount"`
// 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 Currency `json:"currency"`
// The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023.
FiscalYearEnd string `json:"fiscal_year_end"`
}
type AccountBusinessProfileMonthlyEstimatedRevenue struct {
// A non-negative integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
Amount int64 `json:"amount"`
Expand All @@ -908,6 +934,10 @@ type AccountBusinessProfileMonthlyEstimatedRevenue struct {

// Business information about the account.
type AccountBusinessProfile struct {
// The applicant's gross annual revenue for its preceding fiscal year.
AnnualRevenue *AccountBusinessProfileAnnualRevenue `json:"annual_revenue"`
// An estimated upper bound of employees, contractors, vendors, etc. currently working for the business.
EstimatedWorkerCount int64 `json:"estimated_worker_count"`
// [The merchant category code for the account](https://stripe.com/docs/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.
MCC string `json:"mcc"`
MonthlyEstimatedRevenue *AccountBusinessProfileMonthlyEstimatedRevenue `json:"monthly_estimated_revenue"`
Expand Down Expand Up @@ -1299,14 +1329,13 @@ type AccountTOSAcceptance struct {
// enabled to make live charges or receive payouts.
//
// For Custom accounts, the properties below are always returned. For other accounts, some properties are returned until that
// account has started to go through Connect Onboarding. Once you create an [Account Link](https://stripe.com/docs/api/account_links)
// for a Standard or Express account, some parameters are no longer returned. These are marked as **Custom Only** or **Custom and Express**
// below. Learn about the differences [between accounts](https://stripe.com/docs/connect/accounts).
// account has started to go through Connect Onboarding. Once you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions),
// some properties are only returned for Custom accounts. Learn about the differences [between accounts](https://stripe.com/docs/connect/accounts).
type Account struct {
APIResource
// Business information about the account.
BusinessProfile *AccountBusinessProfile `json:"business_profile"`
// The business type.
// The business type. Once you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), this property is only returned for Custom accounts.
BusinessType AccountBusinessType `json:"business_type"`
Capabilities *AccountCapabilities `json:"capabilities"`
// Whether the account can create live charges.
Expand All @@ -1324,7 +1353,7 @@ type Account struct {
DetailsSubmitted bool `json:"details_submitted"`
// An email address associated with the account. It's not used for authentication and Stripe doesn't market to this field without explicit approval from the platform.
Email string `json:"email"`
// External accounts (bank accounts and debit cards) currently attached to this account
// External accounts (bank accounts and debit cards) currently attached to this account. External accounts are only returned for requests where `controller[is_controller]` is true.
ExternalAccounts *AccountExternalAccountList `json:"external_accounts"`
FutureRequirements *AccountFutureRequirements `json:"future_requirements"`
// Unique identifier for the object.
Expand Down
12 changes: 11 additions & 1 deletion accountlink.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@

package stripe

// Specifies the requirements that Stripe collects from connected accounts in the Connect Onboarding flow.
type AccountLinkCollectionOptionsParams struct {
// Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). If you don't specify `collection_options`, the default value is `currently_due`.
Fields *string `form:"fields"`
// Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`.
FutureRequirements *string `form:"future_requirements"`
}

// AccountLinkType is the type of an account link.
type AccountLinkType string

Expand All @@ -29,8 +37,10 @@ type AccountLinkParams struct {
Params `form:"*"`
// The identifier of the account to create an account link for.
Account *string `form:"account"`
// Which information the platform needs to collect from the user. One of `currently_due` or `eventually_due`. Default is `currently_due`.
// The collect parameter is deprecated. Use `collection_options` instead.
Collect *string `form:"collect"`
// Specifies the requirements that Stripe collects from connected accounts in the Connect Onboarding flow.
CollectionOptions *AccountLinkCollectionOptionsParams `form:"collection_options"`
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
// The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user.
Expand Down
6 changes: 3 additions & 3 deletions charge.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,9 @@ type ChargeLevel3Params struct {
ShippingFromZip *string `form:"shipping_from_zip"`
}

// Use the [Payment Intents API](https://stripe.com/docs/api/payment_intents) to initiate a new payment instead
// of using this method. Confirmation of the PaymentIntent creates the Charge
// object used to request payment, so this method is limited to legacy integrations.
// This method is no longer recommended—use the [Payment Intents API](https://stripe.com/docs/api/payment_intents)
// to initiate a new payment instead. Confirmation of the PaymentIntent creates the Charge
// object used to request payment.
type ChargeParams struct {
Params `form:"*"`
// Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
Expand Down
Loading

0 comments on commit dae4efd

Please sign in to comment.