Skip to content

Commit

Permalink
Merge upstream and update generated code for v1201
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Aug 15, 2024
2 parents 5d8c961 + 67ff4ec commit b8c73e1
Show file tree
Hide file tree
Showing 14 changed files with 217 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

- name: lint
run: |
go install honnef.co/go/tools/cmd/staticcheck@latest &&
go install honnef.co/go/tools/cmd/staticcheck@v0.4.7 &&
go install golang.org/x/tools/cmd/goimports@latest &&
$HOME/go/bin/staticcheck &&
make vet &&
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1196
v1201
4 changes: 2 additions & 2 deletions account.go
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ type AccountCompanyParams struct {
Verification *AccountCompanyVerificationParams `form:"verification"`
}

// One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a voided check.
// One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a check.
type AccountDocumentsBankAccountOwnershipVerificationParams struct {
// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
Files []*string `form:"files"`
Expand Down Expand Up @@ -869,7 +869,7 @@ type AccountDocumentsProofOfRegistrationParams struct {

// Documents that may be submitted to satisfy various informational requests.
type AccountDocumentsParams struct {
// One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a voided check.
// One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a check.
BankAccountOwnershipVerification *AccountDocumentsBankAccountOwnershipVerificationParams `form:"bank_account_ownership_verification"`
// One or more documents that demonstrate proof of a company's license to operate.
CompanyLicense *AccountDocumentsCompanyLicenseParams `form:"company_license"`
Expand Down
31 changes: 30 additions & 1 deletion accountsession.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,32 @@ type AccountSessionComponentsBalancesParams struct {
Features *AccountSessionComponentsBalancesFeaturesParams `form:"features"`
}

// The list of features enabled in the embedded component.
type AccountSessionComponentsCapitalFinancingFeaturesParams struct{}

// Configuration for the capital financing embedded component.
type AccountSessionComponentsCapitalFinancingParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsCapitalFinancingFeaturesParams `form:"features"`
}

// The list of features enabled in the embedded component.
type AccountSessionComponentsCapitalFinancingApplicationFeaturesParams struct{}

// Configuration for the capital financing application embedded component.
type AccountSessionComponentsCapitalFinancingApplicationParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsCapitalFinancingApplicationFeaturesParams `form:"features"`
}

// The list of features enabled in the embedded component.
type AccountSessionComponentsCapitalFinancingPromotionFeaturesParams struct{}

// Configuration for the capital financing promotion embedded component.
type AccountSessionComponentsCapitalFinancingPromotionParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
Expand Down Expand Up @@ -293,7 +317,12 @@ type AccountSessionComponentsParams struct {
// Configuration for the app viewport component.
AppViewport *AccountSessionComponentsAppViewportParams `form:"app_viewport"`
// Configuration for the balances embedded component.
Balances *AccountSessionComponentsBalancesParams `form:"balances"`
Balances *AccountSessionComponentsBalancesParams `form:"balances"`
// Configuration for the capital financing embedded component.
CapitalFinancing *AccountSessionComponentsCapitalFinancingParams `form:"capital_financing"`
// Configuration for the capital financing application embedded component.
CapitalFinancingApplication *AccountSessionComponentsCapitalFinancingApplicationParams `form:"capital_financing_application"`
// Configuration for the capital financing promotion embedded component.
CapitalFinancingPromotion *AccountSessionComponentsCapitalFinancingPromotionParams `form:"capital_financing_promotion"`
// Configuration for the capital overview embedded component.
CapitalOverview *AccountSessionComponentsCapitalOverviewParams `form:"capital_overview"`
Expand Down
4 changes: 2 additions & 2 deletions bankaccount.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,15 +368,15 @@ func (p *BankAccountParams) AddMetadata(key string, value string) {
p.Metadata[key] = value
}

// One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a voided check.
// One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a check.
type BankAccountDocumentsBankAccountOwnershipVerificationParams struct {
// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
Files []*string `form:"files"`
}

// Documents that may be submitted to satisfy various informational requests.
type BankAccountDocumentsParams struct {
// One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a voided check.
// One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a check.
BankAccountOwnershipVerification *BankAccountDocumentsBankAccountOwnershipVerificationParams `form:"bank_account_ownership_verification"`
}
type BankAccountListParams struct {
Expand Down
34 changes: 22 additions & 12 deletions charge.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,17 @@ const (
ChargePaymentMethodDetailsCardPresentReceiptAccountTypeUnknown ChargePaymentMethodDetailsCardPresentReceiptAccountType = "unknown"
)

// The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`.
type ChargePaymentMethodDetailsCardPresentWalletType string

// List of values that ChargePaymentMethodDetailsCardPresentWalletType can take
const (
ChargePaymentMethodDetailsCardPresentWalletTypeApplePay ChargePaymentMethodDetailsCardPresentWalletType = "apple_pay"
ChargePaymentMethodDetailsCardPresentWalletTypeGooglePay ChargePaymentMethodDetailsCardPresentWalletType = "google_pay"
ChargePaymentMethodDetailsCardPresentWalletTypeSamsungPay ChargePaymentMethodDetailsCardPresentWalletType = "samsung_pay"
ChargePaymentMethodDetailsCardPresentWalletTypeUnknown ChargePaymentMethodDetailsCardPresentWalletType = "unknown"
)

// The Klarna payment method used for this transaction.
// Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments`
type ChargePaymentMethodDetailsKlarnaPaymentMethodCategory string
Expand Down Expand Up @@ -418,7 +429,7 @@ type ChargeParams struct {
Source *PaymentSourceSourceParams `form:"*"` // PaymentSourceSourceParams has custom encoding so brought to top level with "*"
// For a non-card charge, text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors). This value overrides the account's default statement descriptor. For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
StatementDescriptor *string `form:"statement_descriptor"`
// Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor.
// Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor.
StatementDescriptorSuffix *string `form:"statement_descriptor_suffix"`
// An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.
TransferData *ChargeTransferDataParams `form:"transfer_data"`
Expand Down Expand Up @@ -1119,7 +1130,7 @@ type ChargeCaptureParams struct {
ReceiptEmail *string `form:"receipt_email"`
// For a non-card charge, text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors). This value overrides the account's default statement descriptor. For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
StatementDescriptor *string `form:"statement_descriptor"`
// Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor.
// Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor.
StatementDescriptorSuffix *string `form:"statement_descriptor_suffix"`
// An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.
TransferData *ChargeCaptureTransferDataParams `form:"transfer_data"`
Expand Down Expand Up @@ -1513,6 +1524,10 @@ type ChargePaymentMethodDetailsCardPresentReceipt struct {
// An indication of various EMV functions performed during the transaction.
TransactionStatusInformation string `json:"transaction_status_information"`
}
type ChargePaymentMethodDetailsCardPresentWallet struct {
// The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`.
Type ChargePaymentMethodDetailsCardPresentWalletType `json:"type"`
}
type ChargePaymentMethodDetailsCardPresent struct {
// The authorized amount
AmountAuthorized int64 `json:"amount_authorized"`
Expand Down Expand Up @@ -1546,10 +1561,7 @@ 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.
// 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"`
Expand All @@ -1561,6 +1573,7 @@ type ChargePaymentMethodDetailsCardPresent struct {
ReadMethod string `json:"read_method"`
// A collection of fields required to be displayed on receipts. Only required for EMV transactions.
Receipt *ChargePaymentMethodDetailsCardPresentReceipt `json:"receipt"`
Wallet *ChargePaymentMethodDetailsCardPresentWallet `json:"wallet"`
// Please note that the fields below are for internal use only and are not returned
// as part of standard API requests.
// A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
Expand Down Expand Up @@ -1671,10 +1684,7 @@ 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.
// 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"`
Expand Down Expand Up @@ -2047,11 +2057,11 @@ type Charge struct {
Shipping *ShippingDetails `json:"shipping"`
// 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 *PaymentSource `json:"source"`
// 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.
// The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://docs.stripe.com/connect/destination-charges) for details.
SourceTransfer *Transfer `json:"source_transfer"`
// For a non-card charge, text that appears on the customer's statement as the [statement descriptor](https://docs.stripe.com/get-started/account/statement-descriptors). This value overrides the account's default statement descriptor. For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
StatementDescriptor string `json:"statement_descriptor"`
// Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.corp.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor.
// Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor.
StatementDescriptorSuffix string `json:"statement_descriptor_suffix"`
// The status of the payment is either `succeeded`, `pending`, or `failed`.
Status ChargeStatus `json:"status"`
Expand Down
Loading

0 comments on commit b8c73e1

Please sign in to comment.