Skip to content

Commit

Permalink
Update generated code for beta (#1694)
Browse files Browse the repository at this point in the history
* Update generated code for v432

* Update generated code for v433

* Update generated code for v434

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] authored Jul 28, 2023
1 parent 806fb11 commit addcc8f
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 18 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v431
v434
4 changes: 2 additions & 2 deletions client/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ func (a *API) Init(key string, backends *stripe.Backends) {
a.Events = &event.Client{B: backends.API, Key: key}
a.FeeRefunds = &feerefund.Client{B: backends.API, Key: key}
a.FileLinks = &filelink.Client{B: backends.API, Key: key}
a.Files = &file.Client{B: backends.API, BUploads: backends.Uploads, Key: key}
a.Files = &file.Client{B: backends.Uploads, BUploads: backends.Uploads, Key: key}
a.FinancialConnectionsAccounts = &financialconnectionsaccount.Client{B: backends.API, Key: key}
a.FinancialConnectionsInferredBalances = &financialconnectionsinferredbalance.Client{B: backends.API, Key: key}
a.FinancialConnectionsSessions = &financialconnectionssession.Client{B: backends.API, Key: key}
Expand Down Expand Up @@ -475,7 +475,7 @@ func (a *API) Init(key string, backends *stripe.Backends) {
a.SubscriptionSchedules = &subscriptionschedule.Client{B: backends.API, Key: key}
a.TaxCalculations = &taxcalculation.Client{B: backends.API, Key: key}
a.TaxCodes = &taxcode.Client{B: backends.API, Key: key}
a.TaxForms = &taxform.Client{B: backends.API, Key: key}
a.TaxForms = &taxform.Client{B: backends.API, BUploads: backends.Uploads, Key: key}
a.TaxIDs = &taxid.Client{B: backends.API, Key: key}
a.TaxRates = &taxrate.Client{B: backends.API, Key: key}
a.TaxRegistrations = &taxregistration.Client{B: backends.API, Key: key}
Expand Down
8 changes: 6 additions & 2 deletions file/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (c Client) New(params *stripe.FileParams) (*stripe.File, error) {
}

file := &stripe.File{}
err = c.BUploads.CallMultipart(http.MethodPost, "/v1/files", c.Key, boundary, bodyBuffer, &params.Params, file)
err = c.B.CallMultipart(http.MethodPost, "/v1/files", c.Key, boundary, bodyBuffer, &params.Params, file)

return file, err
}
Expand Down Expand Up @@ -99,5 +99,9 @@ func (i *Iter) FileList() *stripe.FileList {
}

func getC() Client {
return Client{stripe.GetBackend(stripe.APIBackend), stripe.GetBackend(stripe.UploadsBackend), stripe.Key}
return Client{
stripe.GetBackend(stripe.UploadsBackend),
stripe.GetBackend(stripe.UploadsBackend),
stripe.Key,
}
}
2 changes: 1 addition & 1 deletion invoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -1283,7 +1283,7 @@ type InvoiceSubscriptionDetailsPauseCollection struct {

// Details about the subscription that created this invoice.
type InvoiceSubscriptionDetails struct {
// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will reflect the metadata of the subscription at the time of invoice creation. *Note: This attribute is populated only for invoices created on or after June 28, 2023.*
// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will reflect the metadata of the subscription at the time of invoice creation. *Note: This attribute is populated only for invoices created on or after June 29, 2023.*
Metadata map[string]string `json:"metadata"`
// If specified, payment collection for this subscription will be paused.
PauseCollection *InvoiceSubscriptionDetailsPauseCollection `json:"pause_collection"`
Expand Down
4 changes: 2 additions & 2 deletions order.go
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ type OrderPaymentSettingsPaymentMethodOptionsLinkParams struct {
//
// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type.
CaptureMethod *string `form:"capture_method"`
// Token used for persistent Link logins.
// [Deprecated] This is a legacy parameter that no longer has any function.
PersistentToken *string `form:"persistent_token"`
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
Expand Down Expand Up @@ -1346,7 +1346,7 @@ type OrderPaymentSettingsPaymentMethodOptionsKlarna struct {
type OrderPaymentSettingsPaymentMethodOptionsLink struct {
// Controls when the funds will be captured from the customer's account.
CaptureMethod OrderPaymentSettingsPaymentMethodOptionsLinkCaptureMethod `json:"capture_method"`
// Token used for persistent Link logins.
// [Deprecated] This is a legacy parameter that no longer has any function.
PersistentToken string `json:"persistent_token"`
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
Expand Down
4 changes: 2 additions & 2 deletions paymentintent.go
Original file line number Diff line number Diff line change
Expand Up @@ -1514,7 +1514,7 @@ type PaymentIntentPaymentMethodOptionsLinkParams struct {
//
// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type.
CaptureMethod *string `form:"capture_method"`
// Token used for persistent Link logins.
// [Deprecated] This is a legacy parameter that no longer has any function.
PersistentToken *string `form:"persistent_token"`
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
Expand Down Expand Up @@ -2937,7 +2937,7 @@ type PaymentIntentPaymentMethodOptionsKonbini struct {
type PaymentIntentPaymentMethodOptionsLink struct {
// Controls when the funds will be captured from the customer's account.
CaptureMethod PaymentIntentPaymentMethodOptionsLinkCaptureMethod `json:"capture_method"`
// Token used for persistent Link logins.
// [Deprecated] This is a legacy parameter that no longer has any function.
PersistentToken string `json:"persistent_token"`
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
Expand Down
2 changes: 1 addition & 1 deletion paymentmethod.go
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ type PaymentMethodLink struct {
Country string `json:"country"`
// Account owner's email address.
Email string `json:"email"`
// Token used for persistent Link logins.
// [Deprecated] This is a legacy parameter that no longer has any function.
PersistentToken string `json:"persistent_token"`
}
type PaymentMethodOXXO struct{}
Expand Down
6 changes: 5 additions & 1 deletion quote/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ func PDF(id string, params *stripe.QuotePDFParams) (*stripe.APIStream, error) {
func (c Client) PDF(id string, params *stripe.QuotePDFParams) (*stripe.APIStream, error) {
path := stripe.FormatURLPath("/v1/quotes/%s/pdf", id)
stream := &stripe.APIStream{}
err := c.BUploads.CallStreaming(http.MethodGet, path, c.Key, params, stream)
backend := c.PDFBackend
if backend == nil {
backend = c.BUploads
}
err := backend.CallStreaming(http.MethodGet, path, c.Key, params, stream)
return stream, err
}

Expand Down
4 changes: 2 additions & 2 deletions setupintent.go
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ type SetupIntentPaymentMethodOptionsCardParams struct {

// If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
type SetupIntentPaymentMethodOptionsLinkParams struct {
// Token used for persistent Link logins.
// [Deprecated] This is a legacy parameter that no longer has any function.
PersistentToken *string `form:"persistent_token"`
}

Expand Down Expand Up @@ -1192,7 +1192,7 @@ type SetupIntentPaymentMethodOptionsCard struct {
RequestThreeDSecure SetupIntentPaymentMethodOptionsCardRequestThreeDSecure `json:"request_three_d_secure"`
}
type SetupIntentPaymentMethodOptionsLink struct {
// Token used for persistent Link logins.
// [Deprecated] This is a legacy parameter that no longer has any function.
PersistentToken string `json:"persistent_token"`
}
type SetupIntentPaymentMethodOptionsPaypal struct {
Expand Down
9 changes: 5 additions & 4 deletions tax/form/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ import (

// Client is used to invoke /tax/forms APIs.
type Client struct {
B stripe.Backend
Key string
B stripe.Backend
BUploads stripe.Backend
Key string
}

// Get returns the details of a tax form.
Expand All @@ -42,7 +43,7 @@ func PDF(id string, params *stripe.TaxFormPDFParams) (*stripe.APIStream, error)
func (c Client) PDF(id string, params *stripe.TaxFormPDFParams) (*stripe.APIStream, error) {
path := stripe.FormatURLPath("/v1/tax/forms/%s/pdf", id)
stream := &stripe.APIStream{}
err := c.B.CallStreaming(http.MethodGet, path, c.Key, params, stream)
err := c.BUploads.CallStreaming(http.MethodGet, path, c.Key, params, stream)
return stream, err
}

Expand Down Expand Up @@ -86,5 +87,5 @@ func (i *Iter) TaxFormList() *stripe.TaxFormList {
}

func getC() Client {
return Client{stripe.GetBackend(stripe.APIBackend), stripe.Key}
return Client{stripe.GetBackend(stripe.APIBackend), stripe.GetBackend(stripe.UploadsBackend), stripe.Key}
}

0 comments on commit addcc8f

Please sign in to comment.