Skip to content

Commit

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

* Update generated code for v1138

* Update generated code for v1140

* Update generated code for v1141

* Update generated code for v1142

* Update generated code for v1144

* Update generated code for v1145

* Update generated code for v1146

* Update generated code for v1147

* Update generated code for v1149

* Update generated code for v1153

* Update generated code for v1154

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] authored Jul 25, 2024
1 parent 124246a commit aab7ae6
Show file tree
Hide file tree
Showing 14 changed files with 137 additions and 28 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1135
v1154
32 changes: 16 additions & 16 deletions account.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ func (p *AccountParams) AddMetadata(key string, value string) {

// 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://docs.stripe.com/currencies#zero-decimal).
// A non-negative integer representing the amount in the [smallest currency unit](https://stripe.com/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"`
Expand All @@ -265,7 +265,7 @@ type AccountBusinessProfileAnnualRevenueParams struct {

// 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://docs.stripe.com/currencies#zero-decimal).
// A non-negative integer representing how much to charge in the [smallest currency unit](https://stripe.com/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"`
Expand All @@ -277,7 +277,7 @@ type AccountBusinessProfileParams struct {
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://docs.stripe.com/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.
// [The merchant category code for the account](https://stripe.com/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.
MonthlyEstimatedRevenue *AccountBusinessProfileMonthlyEstimatedRevenueParams `form:"monthly_estimated_revenue"`
Expand Down Expand Up @@ -752,9 +752,9 @@ type AccountCompanyParams struct {
AddressKana *AccountCompanyAddressKanaParams `form:"address_kana"`
// The Kanji variation of the company's primary address (Japan only).
AddressKanji *AccountCompanyAddressKanjiParams `form:"address_kanji"`
// 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://docs.stripe.com/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.
// 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/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.
DirectorsProvided *bool `form:"directors_provided"`
// Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.executive` requirement.
// Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://stripe.com/api/persons) for accounts with a `relationship.executive` requirement.
ExecutivesProvided *bool `form:"executives_provided"`
// The export license ID number of the company, also referred as Import Export Code (India only).
ExportLicenseID *string `form:"export_license_id"`
Expand All @@ -770,13 +770,13 @@ type AccountCompanyParams struct {
OwnershipDeclaration *AccountCompanyOwnershipDeclarationParams `form:"ownership_declaration"`
// This parameter can only be used on Token creation.
OwnershipDeclarationShownAndSigned *bool `form:"ownership_declaration_shown_and_signed"`
// Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.owner` requirement.
// Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://stripe.com/api/persons) for accounts with a `relationship.owner` requirement.
OwnersProvided *bool `form:"owners_provided"`
// The company's phone number (used for verification).
Phone *string `form:"phone"`
// The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong).
RegistrationNumber *string `form:"registration_number"`
// The category identifying the legal structure of the company or legal entity. See [Business structure](https://docs.stripe.com/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value.
// The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value.
Structure *string `form:"structure"`
// 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.)
TaxID *string `form:"tax_id"`
Expand Down Expand Up @@ -900,7 +900,7 @@ type AccountSettingsBrandingParams struct {
SecondaryColor *string `form:"secondary_color"`
}

// Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://docs.stripe.com/issuing/connect/tos_acceptance).
// Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://stripe.com/issuing/connect/tos_acceptance).
type AccountSettingsCardIssuingTOSAcceptanceParams struct {
// The Unix timestamp marking when the account representative accepted the service agreement.
Date *int64 `form:"date"`
Expand All @@ -912,7 +912,7 @@ type AccountSettingsCardIssuingTOSAcceptanceParams struct {

// Settings specific to the account's use of the Card Issuing product.
type AccountSettingsCardIssuingParams struct {
// Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://docs.stripe.com/issuing/connect/tos_acceptance).
// Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://stripe.com/issuing/connect/tos_acceptance).
TOSAcceptance *AccountSettingsCardIssuingTOSAcceptanceParams `form:"tos_acceptance"`
}

Expand Down Expand Up @@ -952,9 +952,9 @@ type AccountSettingsPaymentsParams struct {
StatementDescriptorKanji *string `form:"statement_descriptor_kanji"`
}

// Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](https://docs.stripe.com/connect/bank-transfers#payout-information) documentation.
// Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](https://stripe.com/connect/bank-transfers#payout-information) documentation.
type AccountSettingsPayoutsScheduleParams struct {
// The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](https://docs.stripe.com/connect/manage-payout-schedule).
// The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](https://stripe.com/connect/manage-payout-schedule).
DelayDays *int64 `form:"delay_days"`
DelayDaysMinimum *bool `form:"-"` // See custom AppendTo
// How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`.
Expand All @@ -974,9 +974,9 @@ func (p *AccountSettingsPayoutsScheduleParams) AppendTo(body *form.Values, keyPa

// Settings specific to the account's payouts.
type AccountSettingsPayoutsParams struct {
// A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](https://docs.stripe.com/connect/account-balances).
// A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](https://stripe.com/connect/account-balances).
DebitNegativeBalances *bool `form:"debit_negative_balances"`
// Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](https://docs.stripe.com/connect/bank-transfers#payout-information) documentation.
// Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](https://stripe.com/connect/bank-transfers#payout-information) documentation.
Schedule *AccountSettingsPayoutsScheduleParams `form:"schedule"`
// The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard.
StatementDescriptor *string `form:"statement_descriptor"`
Expand Down Expand Up @@ -1094,15 +1094,15 @@ func (p *AccountRejectParams) AddExpand(f string) {

// 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://docs.stripe.com/currencies#zero-decimal).
// A non-negative integer representing the amount in the [smallest currency unit](https://stripe.com/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://docs.stripe.com/currencies#zero-decimal).
// A non-negative integer representing how much to charge in the [smallest currency unit](https://stripe.com/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"`
Expand All @@ -1114,7 +1114,7 @@ type AccountBusinessProfile struct {
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.
// [The merchant category code for the account](https://stripe.com/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"`
// The customer-facing business name.
Expand Down
24 changes: 22 additions & 2 deletions charge.go
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,10 @@ type ChargePaymentMethodDetailsACSSDebit struct {
// Transit number of the bank account.
TransitNumber string `json:"transit_number"`
}
type ChargePaymentMethodDetailsAffirm struct{}
type ChargePaymentMethodDetailsAffirm struct {
// The Affirm transaction ID associated with this payment.
TransactionID string `json:"transaction_id"`
}
type ChargePaymentMethodDetailsAfterpayClearpay struct {
// The Afterpay order ID associated with this payment intent.
OrderID string `json:"order_id"`
Expand Down Expand Up @@ -665,7 +668,10 @@ type ChargePaymentMethodDetailsBancontact struct {
// (if supported) at the time of authorization or settlement. They cannot be set or mutated.
VerifiedName string `json:"verified_name"`
}
type ChargePaymentMethodDetailsBLIK struct{}
type ChargePaymentMethodDetailsBLIK struct {
// A unique and immutable identifier assigned by BLIK to every buyer.
BuyerID string `json:"buyer_id"`
}
type ChargePaymentMethodDetailsBoleto struct {
// The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers)
TaxID string `json:"tax_id"`
Expand Down Expand Up @@ -780,6 +786,8 @@ type ChargePaymentMethodDetailsCardWallet struct {
type ChargePaymentMethodDetailsCard struct {
// The authorized amount.
AmountAuthorized int64 `json:"amount_authorized"`
// Authorization code on the charge.
AuthorizationCode string `json:"authorization_code"`
// Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
Brand PaymentMethodCardBrand `json:"brand"`
// When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured.
Expand Down Expand Up @@ -862,6 +870,8 @@ type ChargePaymentMethodDetailsCardPresent struct {
AmountAuthorized int64 `json:"amount_authorized"`
// Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
Brand PaymentMethodCardBrand `json:"brand"`
// The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
BrandProduct string `json:"brand_product"`
// When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured.
CaptureBefore int64 `json:"capture_before"`
// The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.
Expand All @@ -888,6 +898,11 @@ type ChargePaymentMethodDetailsCardPresent struct {
Last4 string `json:"last4"`
// Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
Network ChargePaymentMethodDetailsCardPresentNetwork `json:"network"`
// This is used by the financial networks to identify a transaction.
// Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data.
// The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD).
// This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands.
NetworkTransactionID string `json:"network_transaction_id"`
// Details about payments collected offline.
Offline *ChargePaymentMethodDetailsCardPresentOffline `json:"offline"`
// Defines whether the authorized amount can be over-captured or not
Expand Down Expand Up @@ -1008,6 +1023,11 @@ type ChargePaymentMethodDetailsInteracPresent struct {
Last4 string `json:"last4"`
// Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
Network string `json:"network"`
// This is used by the financial networks to identify a transaction.
// Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data.
// The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD).
// This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands.
NetworkTransactionID string `json:"network_transaction_id"`
// EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
PreferredLocales []string `json:"preferred_locales"`
// How card details were read in this transaction.
Expand Down
13 changes: 13 additions & 0 deletions checkout/session/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,19 @@ func (c Client) Get(id string, params *stripe.CheckoutSessionParams) (*stripe.Ch
return session, err
}

// Updates a Session object.
func Update(id string, params *stripe.CheckoutSessionParams) (*stripe.CheckoutSession, error) {
return getC().Update(id, params)
}

// Updates a Session object.
func (c Client) Update(id string, params *stripe.CheckoutSessionParams) (*stripe.CheckoutSession, error) {
path := stripe.FormatURLPath("/v1/checkout/sessions/%s", id)
session := &stripe.CheckoutSession{}
err := c.B.Call(http.MethodPost, path, c.Key, params, session)
return session, err
}

// A Session can be expired when it is in one of these statuses: open
//
// After it expires, a customer can't complete a Session and customers loading the Session see a message saying the Session is expired.
Expand Down
Loading

0 comments on commit aab7ae6

Please sign in to comment.