Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated code for beta #1687

Merged
merged 12 commits into from
Jul 13, 2023
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 74.25.0 - 2023-07-06
* [#1684](https://github.com/stripe/stripe-go/pull/1684) Update generated code
* Add support for `Numeric` and `Text` on `PaymentLinkCustomFields`
* Add support for `AutomaticTax` on `SubscriptionListParams`

## 74.25.0-beta.1 - 2023-06-29
* [#1683](https://github.com/stripe/stripe-go/pull/1683) Update generated code for beta
* Add support for `Metadata` on `InvoiceSubscriptionDetails`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v408
v417
2 changes: 1 addition & 1 deletion api_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ package stripe

const (
apiVersion string = "2022-11-15"
previewVersion string = "2023-06-08.preview-v2"
previewVersion string = "20230712T200515"
)
2 changes: 2 additions & 0 deletions charge.go
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,8 @@ type ChargePaymentMethodDetailsACSSDebit struct {
}
type ChargePaymentMethodDetailsAffirm struct{}
type ChargePaymentMethodDetailsAfterpayClearpay struct {
// The Afterpay order ID associated with this payment intent.
OrderID string `json:"order_id"`
// Order identifier shown to the merchant in Afterpay's online portal.
Reference string `json:"reference"`
}
Expand Down
4 changes: 4 additions & 0 deletions client/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ import (
"github.com/stripe/stripe-go/v74/paymentintent"
"github.com/stripe/stripe-go/v74/paymentlink"
"github.com/stripe/stripe-go/v74/paymentmethod"
"github.com/stripe/stripe-go/v74/paymentmethodconfiguration"
"github.com/stripe/stripe-go/v74/paymentsource"
"github.com/stripe/stripe-go/v74/payout"
"github.com/stripe/stripe-go/v74/person"
Expand Down Expand Up @@ -243,6 +244,8 @@ type API struct {
PaymentIntents *paymentintent.Client
// PaymentLinks is the client used to invoke /payment_links APIs.
PaymentLinks *paymentlink.Client
// PaymentMethodConfigurations is the client used to invoke /payment_method_configurations APIs.
PaymentMethodConfigurations *paymentmethodconfiguration.Client
// PaymentMethods is the client used to invoke /payment_methods APIs.
PaymentMethods *paymentmethod.Client
// PaymentSources is the client used to invoke /customers/{customer}/sources APIs.
Expand Down Expand Up @@ -440,6 +443,7 @@ func (a *API) Init(key string, backends *stripe.Backends) {
a.Orders = &order.Client{B: backends.API, Key: key}
a.PaymentIntents = &paymentintent.Client{B: backends.API, Key: key}
a.PaymentLinks = &paymentlink.Client{B: backends.API, Key: key}
a.PaymentMethodConfigurations = &paymentmethodconfiguration.Client{B: backends.API, Key: key}
a.PaymentMethods = &paymentmethod.Client{B: backends.API, Key: key}
a.PaymentSources = &paymentsource.Client{B: backends.API, Key: key}
a.Payouts = &payout.Client{B: backends.API, Key: key}
Expand Down
31 changes: 31 additions & 0 deletions paymentintent.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ package stripe

import "encoding/json"

// Controls whether this PaymentIntent will accept redirect-based payment methods.
//
// Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment.
type PaymentIntentAutomaticPaymentMethodsAllowRedirects string

// List of values that PaymentIntentAutomaticPaymentMethodsAllowRedirects can take
const (
PaymentIntentAutomaticPaymentMethodsAllowRedirectsAlways PaymentIntentAutomaticPaymentMethodsAllowRedirects = "always"
PaymentIntentAutomaticPaymentMethodsAllowRedirectsNever PaymentIntentAutomaticPaymentMethodsAllowRedirects = "never"
)

// Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`).
type PaymentIntentCancellationReason string

Expand Down Expand Up @@ -802,6 +813,10 @@ type PaymentIntentSearchParams struct {

// When enabled, this PaymentIntent will accept payment methods that you have enabled in the Dashboard and are compatible with this PaymentIntent's other parameters.
type PaymentIntentAutomaticPaymentMethodsParams struct {
// Controls whether this PaymentIntent will accept redirect-based payment methods.
//
// Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment.
AllowRedirects *string `form:"allow_redirects"`
// Whether this feature is enabled.
Enabled *bool `form:"enabled"`
}
Expand Down Expand Up @@ -1835,6 +1850,8 @@ type PaymentIntentParams struct {
PaymentDetails *PaymentIntentPaymentDetailsParams `form:"payment_details"`
// ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent.
PaymentMethod *string `form:"payment_method"`
// The ID of the payment method configuration to use with this PaymentIntent.
PaymentMethodConfiguration *string `form:"payment_method_configuration"`
// If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear
// in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method)
// property on the PaymentIntent.
Expand Down Expand Up @@ -2308,6 +2325,10 @@ type PaymentIntentAmountDetails struct {

// Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods)
type PaymentIntentAutomaticPaymentMethods struct {
// Controls whether this PaymentIntent will accept redirect-based payment methods.
//
// Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment.
AllowRedirects PaymentIntentAutomaticPaymentMethodsAllowRedirects `json:"allow_redirects"`
// Automatically calculates compatible payment methods
Enabled bool `json:"enabled"`
}
Expand Down Expand Up @@ -2630,6 +2651,14 @@ type PaymentIntentPaymentDetailsCarRental struct {
type PaymentIntentPaymentDetails struct {
CarRental *PaymentIntentPaymentDetailsCarRental `json:"car_rental"`
}

// Information about the payment method configuration used for this PaymentIntent.
type PaymentIntentPaymentMethodConfigurationDetails struct {
// ID of the payment method configuration used.
ID string `json:"id"`
// ID of the parent payment method configuration used.
Parent string `json:"parent"`
}
type PaymentIntentPaymentMethodOptionsACSSDebitMandateOptions struct {
// A URL for custom mandate text
CustomMandateURL string `json:"custom_mandate_url"`
Expand Down Expand Up @@ -3179,6 +3208,8 @@ type PaymentIntent struct {
PaymentDetails *PaymentIntentPaymentDetails `json:"payment_details"`
// ID of the payment method used in this PaymentIntent.
PaymentMethod *PaymentMethod `json:"payment_method"`
// Information about the payment method configuration used for this PaymentIntent.
PaymentMethodConfigurationDetails *PaymentIntentPaymentMethodConfigurationDetails `json:"payment_method_configuration_details"`
// Payment-method-specific configuration for this PaymentIntent.
PaymentMethodOptions *PaymentIntentPaymentMethodOptions `json:"payment_method_options"`
// The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.
Expand Down
Loading