Skip to content

Commit

Permalink
Merge pull request #1945 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 Oct 29, 2024
2 parents 8b4ba60 + 318d345 commit 48b57eb
Show file tree
Hide file tree
Showing 24 changed files with 724 additions and 57 deletions.
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# Changelog

## 81.0.0 - 2024-10-29
* [#1931](https://github.com/stripe/stripe-go/pull/1931) This release changes the pinned API version to `2024-10-28.acacia`.
* Add support for new resource `V2.EventDestinations`
* Add support for `New`, `Retrieve`, `Update`, `List`, `Delete`, `Disable`, `Enable` and `Ping` methods on resource `V2.EventDestinations`
* Add support for `SubmitCard` test helper method on resource `Issuing.Card`
* Add support for `Groups` on `AccountParams` and `Account`
* Add support for `AlmaPayments`, `KakaoPayPayments`, `KrCardPayments`, `NaverPayPayments`, `PaycoPayments`, and `SamsungPayPayments` on `AccountCapabilitiesParams` and `AccountCapabilities`
* Add support for `DisableStripeUserAuthentication` on `AccountSessionComponentsAccountManagementFeaturesParams`, `AccountSessionComponentsAccountManagementFeatures`, `AccountSessionComponentsAccountOnboardingFeaturesParams`, `AccountSessionComponentsAccountOnboardingFeatures`, `AccountSessionComponentsBalancesFeaturesParams`, `AccountSessionComponentsBalancesFeatures`, `AccountSessionComponentsNotificationBannerFeaturesParams`, `AccountSessionComponentsNotificationBannerFeatures`, `AccountSessionComponentsPayoutsFeaturesParams`, and `AccountSessionComponentsPayoutsFeatures`
* Add support for `ScheduleAtPeriodEnd` on `BillingPortalConfigurationFeaturesSubscriptionUpdateParams` and `BillingPortalConfigurationFeaturesSubscriptionUpdate`
* Add support for `Alma` on `ChargePaymentMethodDetails`, `ConfirmationTokenPaymentMethodDataParams`, `ConfirmationTokenPaymentMethodPreview`, `PaymentIntentConfirmPaymentMethodDataParams`, `PaymentIntentConfirmPaymentMethodOptionsParams`, `PaymentIntentPaymentMethodDataParams`, `PaymentIntentPaymentMethodOptionsParams`, `PaymentIntentPaymentMethodOptions`, `PaymentMethodConfigurationParams`, `PaymentMethodConfiguration`, `PaymentMethodParams`, `PaymentMethod`, `RefundDestinationDetails`, `SetupIntentConfirmPaymentMethodDataParams`, and `SetupIntentPaymentMethodDataParams`
* Add support for `KakaoPay` and `KrCard` on `ChargePaymentMethodDetails`, `CheckoutSessionPaymentMethodOptionsParams`, `CheckoutSessionPaymentMethodOptions`, `ConfirmationTokenPaymentMethodDataParams`, `ConfirmationTokenPaymentMethodPreview`, `MandatePaymentMethodDetails`, `PaymentIntentConfirmPaymentMethodDataParams`, `PaymentIntentConfirmPaymentMethodOptionsParams`, `PaymentIntentPaymentMethodDataParams`, `PaymentIntentPaymentMethodOptionsParams`, `PaymentIntentPaymentMethodOptions`, `PaymentMethodParams`, `PaymentMethod`, `SetupAttemptPaymentMethodDetails`, `SetupIntentConfirmPaymentMethodDataParams`, and `SetupIntentPaymentMethodDataParams`
* Add support for `NaverPay` on `ChargePaymentMethodDetails`, `CheckoutSessionPaymentMethodOptionsParams`, `CheckoutSessionPaymentMethodOptions`, `ConfirmationTokenPaymentMethodDataParams`, `ConfirmationTokenPaymentMethodPreview`, `PaymentIntentConfirmPaymentMethodDataParams`, `PaymentIntentConfirmPaymentMethodOptionsParams`, `PaymentIntentPaymentMethodDataParams`, `PaymentIntentPaymentMethodOptionsParams`, `PaymentIntentPaymentMethodOptions`, `PaymentMethodParams`, `PaymentMethod`, `SetupIntentConfirmPaymentMethodDataParams`, and `SetupIntentPaymentMethodDataParams`
* Add support for `Payco` and `SamsungPay` on `ChargePaymentMethodDetails`, `CheckoutSessionPaymentMethodOptionsParams`, `CheckoutSessionPaymentMethodOptions`, `ConfirmationTokenPaymentMethodDataParams`, `ConfirmationTokenPaymentMethodPreview`, `PaymentIntentConfirmPaymentMethodDataParams`, `PaymentIntentConfirmPaymentMethodOptionsParams`, `PaymentIntentPaymentMethodDataParams`, `PaymentIntentPaymentMethodOptionsParams`, `PaymentIntentPaymentMethodOptions`, `PaymentMethodParams`, `PaymentMethod`, `SetupIntentConfirmPaymentMethodDataParams`, and `SetupIntentPaymentMethodDataParams`
* Add support for new values `by_tin`, `ma_vat`, `md_vat`, `tz_vat`, `uz_tin`, and `uz_vat` on enums `CheckoutSessionCustomerDetailsTaxIdsType`, `InvoiceCustomerTaxIdsType`, `TaxCalculationCustomerDetailsTaxIdsType`, `TaxIdType`, and `TaxTransactionCustomerDetailsTaxIdsType`
* Add support for new values `alma`, `kakao_pay`, `kr_card`, `naver_pay`, `payco`, and `samsung_pay` on enums `ConfirmationTokenPaymentMethodPreviewType` and `PaymentMethodType`
* Add support for `EnhancedEvidence` on `DisputeEvidenceParams` and `DisputeEvidence`
* Add support for `EnhancedEligibilityTypes` on `Dispute`
* Add support for `EnhancedEligibility` on `DisputeEvidenceDetails`
* Add support for new values `issuing_transaction.purchase_details_receipt_updated` and `refund.failed` on enum `EventType`
* Add support for `Metadata` on `ForwardingRequestParams` and `ForwardingRequest`
* Add support for `AutomaticallyFinalizesAt` on `InvoiceParams`
* Add support for new values `jp_credit_transfer`, `kakao_pay`, `kr_card`, `naver_pay`, and `payco` on enums `InvoicePaymentSettingsPaymentMethodTypes` and `SubscriptionPaymentSettingsPaymentMethodTypes`
* Add support for new value `alma` on enum `PaymentLinkPaymentMethodTypes`
* Add support for `AmazonPay` on `PaymentMethodDomain`
* Change type of `RefundNextActionDisplayDetails` from `nullable(RefundNextActionDisplayDetails)` to `RefundNextActionDisplayDetails`
* Add support for new value `retail_delivery_fee` on enums `TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxType`, `TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxType`, `TaxCalculationTaxBreakdownTaxRateDetailsTaxType`, `TaxRateTaxType`, and `TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxType`
* Add support for `FlatAmount` and `RateType` on `TaxCalculationTaxBreakdownTaxRateDetails` and `TaxRate`
* Add support for `By`, `Cr`, `Ec`, `Ma`, `Md`, `RU`, `Rs`, `Tz`, and `Uz` on `TaxRegistrationCountryOptionsParams` and `TaxRegistrationCountryOptions`
* Add support for new value `state_retail_delivery_fee` on enum `TaxRegistrationCountryOptionsUsType`
* Add support for `Pln` on `TerminalConfigurationTippingParams` and `TerminalConfigurationTipping`

## 80.3.0-beta.1 - 2024-10-18
* [#1934](https://github.com/stripe/stripe-go/pull/1934) Update generated code for beta
* Add support for `AlmaPayments`, `GopayPayments`, `KakaoPayPayments`, `KrCardPayments`, `NaverPayPayments`, `PaycoPayments`, `QrisPayments`, `SamsungPayPayments`, `ShopeepayPayments`, `TreasuryEvolve`, `TreasuryFifthThird`, and `TreasuryGoldmanSachs` on `AccountCapabilitiesParams` and `AccountCapabilities`
Expand All @@ -19,6 +50,10 @@
* Add support for `Pln` on `TerminalConfigurationTippingParams` and `TerminalConfigurationTipping`
* Add support for `Bank` on `TreasuryFinancialAccountFeaturesFinancialAddressesAbaParams`, `TreasuryFinancialAccountFeaturesFinancialAddressesAba`, and `TreasuryFinancialAccountUpdateFeaturesFinancialAddressesAbaParams`

## 80.2.1 - 2024-10-29
* [#1940](https://github.com/stripe/stripe-go/pull/1940) Update webhook API version validation
- Update webhook event processing to accept events from any API version within the supported major release

## 80.2.0 - 2024-10-09
* [#1929](https://github.com/stripe/stripe-go/pull/1929), [#1933](https://github.com/stripe/stripe-go/pull/1933) Remove rawrequests Post, Get, and Delete in favor of rawrequests.Client
* The individual `rawrequests` functions for Post, Get, and Delete methods are removed in favor of the client model which allows local configuration of backend and api key, which enables more flexible calls to new/preview/unsupported APIs.
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1314
v1319
42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Go Stripe

[![Go Reference](https://pkg.go.dev/badge/github.com/stripe/stripe-go)](https://pkg.go.dev/github.com/stripe/stripe-go/v80)
[![Go Reference](https://pkg.go.dev/badge/github.com/stripe/stripe-go)](https://pkg.go.dev/github.com/stripe/stripe-go/v81)
[![Build Status](https://github.com/stripe/stripe-go/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/stripe/stripe-go/actions/workflows/ci.yml?query=branch%3Amaster)
[![Coverage Status](https://coveralls.io/repos/github/stripe/stripe-go/badge.svg?branch=master)](https://coveralls.io/github/stripe/stripe-go?branch=master)

Expand All @@ -23,8 +23,8 @@ Then, reference stripe-go in a Go program with `import`:

```go
import (
"github.com/stripe/stripe-go/v80"
"github.com/stripe/stripe-go/v80/customer"
"github.com/stripe/stripe-go/v81"
"github.com/stripe/stripe-go/v81/customer"
)
```

Expand All @@ -34,7 +34,7 @@ toolchain will resolve and fetch the stripe-go module automatically.
Alternatively, you can also explicitly `go get` the package into a project:

```bash
go get -u github.com/stripe/stripe-go/v80
go get -u github.com/stripe/stripe-go/v81
```

## Documentation
Expand Down Expand Up @@ -123,8 +123,8 @@ To use a key, pass it to `API`'s `Init` function:
```go

import (
"github.com/stripe/stripe-go/v80"
"github.com/stripe/stripe-go/v80/client"
"github.com/stripe/stripe-go/v81"
"github.com/stripe/stripe-go/v81/client"
)

stripe := &client.API{}
Expand All @@ -145,8 +145,8 @@ import (
"google.golang.org/appengine"
"google.golang.org/appengine/urlfetch"

"github.com/stripe/stripe-go/v80"
"github.com/stripe/stripe-go/v80/client"
"github.com/stripe/stripe-go/v81"
"github.com/stripe/stripe-go/v81/client"
)

func handler(w http.ResponseWriter, r *http.Request) {
Expand Down Expand Up @@ -180,8 +180,8 @@ client.

```go
import (
"github.com/stripe/stripe-go/v80"
"github.com/stripe/stripe-go/v80/$resource$"
"github.com/stripe/stripe-go/v81"
"github.com/stripe/stripe-go/v81/$resource$"
)

// Setup
Expand Down Expand Up @@ -221,8 +221,8 @@ individual key.

```go
import (
"github.com/stripe/stripe-go/v80"
"github.com/stripe/stripe-go/v80/client"
"github.com/stripe/stripe-go/v81"
"github.com/stripe/stripe-go/v81/client"
)

// Setup
Expand Down Expand Up @@ -293,8 +293,8 @@ with `MaxNetworkRetries`:

```go
import (
"github.com/stripe/stripe-go/v80"
"github.com/stripe/stripe-go/v80/client"
"github.com/stripe/stripe-go/v81"
"github.com/stripe/stripe-go/v81/client"
)

config := &stripe.BackendConfig{
Expand Down Expand Up @@ -483,7 +483,7 @@ To mock a Stripe client for a unit tests using [GoMock](https://github.com/golan
1. Generate a `Backend` type mock.

```
mockgen -destination=mocks/backend.go -package=mocks github.com/stripe/stripe-go/v80 Backend
mockgen -destination=mocks/backend.go -package=mocks github.com/stripe/stripe-go/v81 Backend
```

2. Use the `Backend` mock to initialize and call methods on the client.
Expand All @@ -496,8 +496,8 @@ import (

"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
"github.com/stripe/stripe-go/v80"
"github.com/stripe/stripe-go/v80/account"
"github.com/stripe/stripe-go/v81"
"github.com/stripe/stripe-go/v81/account"
)

func UseMockedStripeClient(t *testing.T) {
Expand Down Expand Up @@ -534,7 +534,7 @@ We would love for you to try these and share feedback with us before these featu
To install a beta version of stripe-go use the commit notation of the `go get` command to point to a beta tag:

```
go get -u github.com/stripe/stripe-go/v80@beta
go get -u github.com/stripe/stripe-go/v81@beta
```

> **Note**
Expand Down Expand Up @@ -566,9 +566,9 @@ import (
"encoding/json"
"fmt"

"github.com/stripe/stripe-go/v80"
"github.com/stripe/stripe-go/v80/form"
"github.com/stripe/stripe-go/v80/rawrequest"
"github.com/stripe/stripe-go/v81"
"github.com/stripe/stripe-go/v81/form"
"github.com/stripe/stripe-go/v81/rawrequest"
)

func make_raw_request() error {
Expand Down
37 changes: 37 additions & 0 deletions account.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,18 @@ type AccountCapabilitiesGrabpayPaymentsParams struct {
Requested *bool `form:"requested"`
}

// The id_bank_transfer_payments capability.
type AccountCapabilitiesIDBankTransferPaymentsParams 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 id_bank_transfer_payments_bca capability.
type AccountCapabilitiesIDBankTransferPaymentsBcaParams 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 ideal_payments capability.
type AccountCapabilitiesIDEALPaymentsParams 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 @@ -741,6 +753,10 @@ type AccountCapabilitiesParams struct {
GopayPayments *AccountCapabilitiesGopayPaymentsParams `form:"gopay_payments"`
// The grabpay_payments capability.
GrabpayPayments *AccountCapabilitiesGrabpayPaymentsParams `form:"grabpay_payments"`
// The id_bank_transfer_payments capability.
IDBankTransferPayments *AccountCapabilitiesIDBankTransferPaymentsParams `form:"id_bank_transfer_payments"`
// The id_bank_transfer_payments_bca capability.
IDBankTransferPaymentsBca *AccountCapabilitiesIDBankTransferPaymentsBcaParams `form:"id_bank_transfer_payments_bca"`
// The ideal_payments capability.
IDEALPayments *AccountCapabilitiesIDEALPaymentsParams `form:"ideal_payments"`
// The india_international_payments capability.
Expand Down Expand Up @@ -1059,6 +1075,14 @@ type AccountSettingsBACSDebitPaymentsParams struct {
DisplayName *string `form:"display_name"`
}

// Settings specific to bank BCA onboarding for Indonesia bank transfers payments method.
type AccountSettingsBankBcaOnboardingParams struct {
// Bank BCA business account holder name
AccountHolderName *string `form:"account_holder_name"`
// Bank BCA business account number
BusinessAccountNumber *string `form:"business_account_number"`
}

// Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products.
type AccountSettingsBrandingParams struct {
// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px.
Expand Down Expand Up @@ -1187,6 +1211,8 @@ type AccountSettingsTreasuryParams struct {
type AccountSettingsParams struct {
// Settings specific to Bacs Direct Debit payments.
BACSDebitPayments *AccountSettingsBACSDebitPaymentsParams `form:"bacs_debit_payments"`
// Settings specific to bank BCA onboarding for Indonesia bank transfers payments method.
BankBcaOnboarding *AccountSettingsBankBcaOnboardingParams `form:"bank_bca_onboarding"`
// Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products.
Branding *AccountSettingsBrandingParams `form:"branding"`
// Settings specific to the account's use of the Capital product.
Expand Down Expand Up @@ -1384,6 +1410,10 @@ type AccountCapabilities struct {
GopayPayments AccountCapabilityStatus `json:"gopay_payments"`
// The status of the GrabPay payments capability of the account, or whether the account can directly process GrabPay charges.
GrabpayPayments AccountCapabilityStatus `json:"grabpay_payments"`
// The status of the Indonesia Bank Transfer payments capability of the account, or whether the account can directly process Indonesia Bank Transfer charges.
IDBankTransferPayments AccountCapabilityStatus `json:"id_bank_transfer_payments"`
// The status of Bank BCA onboarding of the account.
IDBankTransferPaymentsBca AccountCapabilityStatus `json:"id_bank_transfer_payments_bca"`
// The status of the iDEAL payments capability of the account, or whether the account can directly process iDEAL charges.
IDEALPayments AccountCapabilityStatus `json:"ideal_payments"`
// The status of the india_international_payments capability of the account, or whether the account can process international charges (non INR) in India.
Expand Down Expand Up @@ -1700,6 +1730,12 @@ type AccountSettingsBACSDebitPayments struct {
// The Bacs Direct Debit Service user number for this account. For payments made with Bacs Direct Debit, this number is a unique identifier of the account with our banking partners.
ServiceUserNumber string `json:"service_user_number"`
}
type AccountSettingsBankBcaOnboarding struct {
// Bank BCA business account holder name.
AccountHolderName string `json:"account_holder_name"`
// Bank BCA business account number.
BusinessAccountNumber string `json:"business_account_number"`
}
type AccountSettingsBranding struct {
// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px.
Icon *File `json:"icon"`
Expand Down Expand Up @@ -1804,6 +1840,7 @@ type AccountSettingsTreasury struct {
// Options for customizing how the account functions within Stripe.
type AccountSettings struct {
BACSDebitPayments *AccountSettingsBACSDebitPayments `json:"bacs_debit_payments"`
BankBcaOnboarding *AccountSettingsBankBcaOnboarding `json:"bank_bca_onboarding"`
Branding *AccountSettingsBranding `json:"branding"`
Capital *AccountSettingsCapital `json:"capital"`
CardIssuing *AccountSettingsCardIssuing `json:"card_issuing"`
Expand Down
18 changes: 12 additions & 6 deletions accountsession.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ type AccountSessionComponentsDocumentsParams struct {
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsDocumentsFeaturesParams `form:"features"`
}

// The list of features enabled in the embedded component.
type AccountSessionComponentsFinancialAccountFeaturesParams struct {
// Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise.
DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"`
Expand All @@ -158,7 +160,8 @@ type AccountSessionComponentsFinancialAccountFeaturesParams struct {
// Configuration for the financial account component.
type AccountSessionComponentsFinancialAccountParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsFinancialAccountFeaturesParams `form:"features"`
}
type AccountSessionComponentsFinancialAccountTransactionsFeaturesParams struct {
Expand Down Expand Up @@ -303,13 +306,15 @@ type AccountSessionComponentsPayoutsListParams struct {
// The list of features enabled in the embedded component.
Features *AccountSessionComponentsPayoutsListFeaturesParams `form:"features"`
}
type AccountSessionComponentsRecipientsFeaturesParams struct {
// Whether to allow sending money.
SendMoney *bool `form:"send_money"`
}

// The list of features enabled in the embedded component.
type AccountSessionComponentsRecipientsFeaturesParams struct{}
// Configuration for the recipients component.
type AccountSessionComponentsRecipientsParams struct {
// Whether the embedded component is enabled.
Enabled *bool `form:"enabled"`
// The list of features enabled in the embedded component.
Enabled *bool `form:"enabled"`
Features *AccountSessionComponentsRecipientsFeaturesParams `form:"features"`
}

Expand Down Expand Up @@ -388,7 +393,8 @@ type AccountSessionComponentsParams struct {
Payouts *AccountSessionComponentsPayoutsParams `form:"payouts"`
// Configuration for the payouts list embedded component.
PayoutsList *AccountSessionComponentsPayoutsListParams `form:"payouts_list"`
Recipients *AccountSessionComponentsRecipientsParams `form:"recipients"`
// Configuration for the recipients component.
Recipients *AccountSessionComponentsRecipientsParams `form:"recipients"`
// Configuration for the reporting chart embedded component.
ReportingChart *AccountSessionComponentsReportingChartParams `form:"reporting_chart"`
// Configuration for the tax registrations embedded component.
Expand Down
2 changes: 1 addition & 1 deletion api_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
package stripe

const (
apiVersion string = "2024-09-30.acacia"
apiVersion string = "2024-10-28.acacia"
)
Loading

0 comments on commit 48b57eb

Please sign in to comment.