Skip to content

Commit

Permalink
Merge pull request #1953 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
Update generated code for beta
  • Loading branch information
stripe-openapi[bot] authored Dec 5, 2024
2 parents 64de9b2 + 4d396a5 commit 71ab9f8
Show file tree
Hide file tree
Showing 26 changed files with 201 additions and 84 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 81.1.1 - 2024-12-05
* [#1955](https://github.com/stripe/stripe-go/pull/1955) Temporarily add payment_method parameter to BankAccountParams

## 81.2.0-beta.1 - 2024-11-21
* [#1952](https://github.com/stripe/stripe-go/pull/1952) Update generated code for beta
* Add support for `NetworkAdviceCode` and `NetworkDeclineCode` on `ChargeOutcome`, `InvoiceLastFinalizationError`, `PaymentIntentLastPaymentError`, `SetupAttemptSetupError`, `SetupIntentLastSetupError`, and `StripeError`
Expand All @@ -12,6 +15,7 @@
* Add support for `RequestPartialAuthorization` on `PaymentIntentConfirmPaymentMethodOptionsCardParams`, `PaymentIntentPaymentMethodOptionsCardParams`, and `PaymentIntentPaymentMethodOptionsCard`
* Add support for `PaymentMethodOptions` on `PaymentIntentIncrementAuthorizationParams`


## 81.1.0 - 2024-11-20
* [#1951](https://github.com/stripe/stripe-go/pull/1951) This release changes the pinned API version to `2024-11-20.acacia`.
* Add support for `Respond` test helper method on resource `Issuing.Authorization`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1370
v1384
14 changes: 12 additions & 2 deletions account.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ type AccountParams struct {
//
// 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/api#account_create_bank_account) or [card creation](https://stripe.com/api#account_create_card) APIs. After you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
ExternalAccount *AccountExternalAccountParams `form:"external_account"`
// A hash of account group type to tokens. These are account groups this account should be added to
// A hash of account group type to tokens. These are account groups this account should be added to.
Groups *AccountGroupsParams `form:"groups"`
// 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/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
Individual *PersonParams `form:"individual"`
Expand Down Expand Up @@ -377,6 +377,12 @@ type AccountCapabilitiesAUBECSDebitPaymentsParams struct {
Requested *bool `form:"requested"`
}

// The automatic_indirect_tax capability.
type AccountCapabilitiesAutomaticIndirectTaxParams struct {
// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
Requested *bool `form:"requested"`
}

// The bacs_debit_payments capability.
type AccountCapabilitiesBACSDebitPaymentsParams struct {
// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
Expand Down Expand Up @@ -752,6 +758,8 @@ type AccountCapabilitiesParams struct {
AmazonPayPayments *AccountCapabilitiesAmazonPayPaymentsParams `form:"amazon_pay_payments"`
// The au_becs_debit_payments capability.
AUBECSDebitPayments *AccountCapabilitiesAUBECSDebitPaymentsParams `form:"au_becs_debit_payments"`
// The automatic_indirect_tax capability.
AutomaticIndirectTax *AccountCapabilitiesAutomaticIndirectTaxParams `form:"automatic_indirect_tax"`
// The bacs_debit_payments capability.
BACSDebitPayments *AccountCapabilitiesBACSDebitPaymentsParams `form:"bacs_debit_payments"`
// The bancontact_payments capability.
Expand Down Expand Up @@ -1070,7 +1078,7 @@ func (p *AccountExternalAccountParams) AddMetadata(key string, value string) {
p.Metadata[key] = value
}

// A hash of account group type to tokens. These are account groups this account should be added to
// A hash of account group type to tokens. These are account groups this account should be added to.
type AccountGroupsParams struct {
// The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details.
PaymentsPricing *string `form:"payments_pricing"`
Expand Down Expand Up @@ -1409,6 +1417,8 @@ type AccountCapabilities struct {
AmazonPayPayments AccountCapabilityStatus `json:"amazon_pay_payments"`
// The status of the BECS Direct Debit (AU) payments capability of the account, or whether the account can directly process BECS Direct Debit (AU) charges.
AUBECSDebitPayments AccountCapabilityStatus `json:"au_becs_debit_payments"`
// The status of the automatic_indirect_tax capability of the account.
AutomaticIndirectTax AccountCapabilityStatus `json:"automatic_indirect_tax"`
// The status of the Bacs Direct Debits payments capability of the account, or whether the account can directly process Bacs Direct Debits charges.
BACSDebitPayments AccountCapabilityStatus `json:"bacs_debit_payments"`
// The status of the Bancontact payments capability of the account, or whether the account can directly process Bancontact charges.
Expand Down
8 changes: 5 additions & 3 deletions balancetransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const (
BalanceTransactionStatusPending BalanceTransactionStatus = "pending"
)

// Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead.
// Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead.
type BalanceTransactionType string

// List of values that BalanceTransactionType can take
Expand Down Expand Up @@ -104,6 +104,8 @@ const (
BalanceTransactionTypePayout BalanceTransactionType = "payout"
BalanceTransactionTypePayoutCancel BalanceTransactionType = "payout_cancel"
BalanceTransactionTypePayoutFailure BalanceTransactionType = "payout_failure"
BalanceTransactionTypePayoutMinimumBalanceHold BalanceTransactionType = "payout_minimum_balance_hold"
BalanceTransactionTypePayoutMinimumBalanceRelease BalanceTransactionType = "payout_minimum_balance_release"
BalanceTransactionTypeRefund BalanceTransactionType = "refund"
BalanceTransactionTypeRefundFailure BalanceTransactionType = "refund_failure"
BalanceTransactionTypeReserveTransaction BalanceTransactionType = "reserve_transaction"
Expand Down Expand Up @@ -136,7 +138,7 @@ type BalanceTransactionListParams struct {
Payout *string `form:"payout"`
// Only returns the original transaction.
Source *string `form:"source"`
// Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.
// Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.
Type *string `form:"type"`
}

Expand Down Expand Up @@ -207,7 +209,7 @@ type BalanceTransaction struct {
Source *BalanceTransactionSource `json:"source"`
// The transaction's net funds status in the Stripe balance, which are either `available` or `pending`.
Status BalanceTransactionStatus `json:"status"`
// Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead.
// Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead.
Type BalanceTransactionType `json:"type"`
}
type BalanceTransactionSource struct {
Expand Down
8 changes: 8 additions & 0 deletions bankaccount.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,14 @@ type BankAccountParams struct {
Metadata map[string]string `form:"metadata"`
// Cardholder name.
Name *string `form:"name"`
// The ID of a Payment Method with a `type` of `us_bank_account`. The Payment Method's bank account information will be copied and
// returned as a Bank Account Token. This parameter is exclusive with respect to all other parameters in the `bank_account` hash.
// You must include the top-level `customer` parameter if the Payment Method is attached to a `Customer` object. If the Payment
// Method is not attached to a `Customer` object, it will be consumed and cannot be used again. You may not use Payment Methods which were
// created by a Setup Intent with `attach_to_self=true`.
// This is used for TokenParams.BankAccountParams only and will be removed in the next major version.
// **DO NOT USE THIS FOR OTHER METHODS.**
PaymentMethod *string `form:"payment_method"`
// The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for `account_number`, this field is not required.
RoutingNumber *string `form:"routing_number"`
// ID is used when tokenizing a bank account for shared customers
Expand Down
4 changes: 2 additions & 2 deletions billing/creditbalancesummary/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ type Client struct {
Key string
}

// Retrieves the credit balance summary for a customer
// Retrieves the credit balance summary for a customer.
func Get(params *stripe.BillingCreditBalanceSummaryParams) (*stripe.BillingCreditBalanceSummary, error) {
return getC().Get(params)
}

// Retrieves the credit balance summary for a customer
// Retrieves the credit balance summary for a customer.
func (c Client) Get(params *stripe.BillingCreditBalanceSummaryParams) (*stripe.BillingCreditBalanceSummary, error) {
creditbalancesummary := &stripe.BillingCreditBalanceSummary{}
err := c.B.Call(
Expand Down
8 changes: 4 additions & 4 deletions billing/creditbalancetransaction/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,25 @@ type Client struct {
Key string
}

// Retrieves a credit balance transaction
// Retrieves a credit balance transaction.
func Get(id string, params *stripe.BillingCreditBalanceTransactionParams) (*stripe.BillingCreditBalanceTransaction, error) {
return getC().Get(id, params)
}

// Retrieves a credit balance transaction
// Retrieves a credit balance transaction.
func (c Client) Get(id string, params *stripe.BillingCreditBalanceTransactionParams) (*stripe.BillingCreditBalanceTransaction, error) {
path := stripe.FormatURLPath("/v1/billing/credit_balance_transactions/%s", id)
creditbalancetransaction := &stripe.BillingCreditBalanceTransaction{}
err := c.B.Call(http.MethodGet, path, c.Key, params, creditbalancetransaction)
return creditbalancetransaction, err
}

// Retrieve a list of credit balance transactions
// Retrieve a list of credit balance transactions.
func List(params *stripe.BillingCreditBalanceTransactionListParams) *Iter {
return getC().List(params)
}

// Retrieve a list of credit balance transactions
// Retrieve a list of credit balance transactions.
func (c Client) List(listParams *stripe.BillingCreditBalanceTransactionListParams) *Iter {
return &Iter{
Iter: stripe.GetIter(listParams, func(p *stripe.Params, b *form.Values) ([]interface{}, stripe.ListContainer, error) {
Expand Down
12 changes: 6 additions & 6 deletions billing/creditgrant/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ type Client struct {
Key string
}

// Creates a credit grant
// Creates a credit grant.
func New(params *stripe.BillingCreditGrantParams) (*stripe.BillingCreditGrant, error) {
return getC().New(params)
}

// Creates a credit grant
// Creates a credit grant.
func (c Client) New(params *stripe.BillingCreditGrantParams) (*stripe.BillingCreditGrant, error) {
creditgrant := &stripe.BillingCreditGrant{}
err := c.B.Call(
Expand All @@ -38,25 +38,25 @@ func (c Client) New(params *stripe.BillingCreditGrantParams) (*stripe.BillingCre
return creditgrant, err
}

// Retrieves a credit grant
// Retrieves a credit grant.
func Get(id string, params *stripe.BillingCreditGrantParams) (*stripe.BillingCreditGrant, error) {
return getC().Get(id, params)
}

// Retrieves a credit grant
// Retrieves a credit grant.
func (c Client) Get(id string, params *stripe.BillingCreditGrantParams) (*stripe.BillingCreditGrant, error) {
path := stripe.FormatURLPath("/v1/billing/credit_grants/%s", id)
creditgrant := &stripe.BillingCreditGrant{}
err := c.B.Call(http.MethodGet, path, c.Key, params, creditgrant)
return creditgrant, err
}

// Updates a credit grant
// Updates a credit grant.
func Update(id string, params *stripe.BillingCreditGrantParams) (*stripe.BillingCreditGrant, error) {
return getC().Update(id, params)
}

// Updates a credit grant
// Updates a credit grant.
func (c Client) Update(id string, params *stripe.BillingCreditGrantParams) (*stripe.BillingCreditGrant, error) {
path := stripe.FormatURLPath("/v1/billing/credit_grants/%s", id)
creditgrant := &stripe.BillingCreditGrant{}
Expand Down
Loading

0 comments on commit 71ab9f8

Please sign in to comment.