Skip to content

Commit

Permalink
Update generated code (#1767)
Browse files Browse the repository at this point in the history
* Update generated code for v657

* Update generated code for v658

* Update generated code for v659

* Update generated code for v660

* Update generated code for v661

* Update generated code for v662

* Update generated code for v666

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] authored Nov 16, 2023
1 parent ea2313a commit b4cd6b9
Show file tree
Hide file tree
Showing 11 changed files with 280 additions and 10 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v655
v666
14 changes: 10 additions & 4 deletions account.go
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,12 @@ type AccountDocumentsParams struct {
ProofOfRegistration *AccountDocumentsProofOfRegistrationParams `form:"proof_of_registration"`
}

// Settings specific to Bacs Direct Debit payments.
type AccountSettingsBACSDebitPaymentsParams struct {
// The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free.
DisplayName *string `form:"display_name"`
}

// 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 @@ -794,12 +800,10 @@ type AccountSettingsTreasuryParams struct {
// Details on the account's acceptance of the Stripe Treasury Services Agreement.
TOSAcceptance *AccountSettingsTreasuryTOSAcceptanceParams `form:"tos_acceptance"`
}
type AccountSettingsBACSDebitPaymentsParams struct {
DisplayName *string `form:"display_name"`
}

// Options for customizing how the account functions within Stripe.
type AccountSettingsParams struct {
// Settings specific to Bacs Direct Debit payments.
BACSDebitPayments *AccountSettingsBACSDebitPaymentsParams `form:"bacs_debit_payments"`
// Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products.
Branding *AccountSettingsBrandingParams `form:"branding"`
Expand Down Expand Up @@ -1162,8 +1166,10 @@ type AccountRequirements struct {
PendingVerification []string `json:"pending_verification"`
}
type AccountSettingsBACSDebitPayments struct {
// The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this will appear on the mandate, and as the statement descriptor.
// The Bacs Direct Debit display name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. The fee appears 5 business days after requesting Bacs. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free.
DisplayName string `json:"display_name"`
// 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 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.
Expand Down
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 ChargePaymentMethodDetailsCard struct {
AmountAuthorized int64 `json:"amount_authorized"`
// Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
Brand PaymentMethodCardBrand `json:"brand"`
// When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured.
CaptureBefore int64 `json:"capture_before"`
// Check results by Card networks on Card address and CVC at time of payment.
Checks *ChargePaymentMethodDetailsCardChecks `json:"checks"`
// Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
Expand Down
36 changes: 36 additions & 0 deletions checkout_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,27 @@ const (
CheckoutSessionPaymentMethodOptionsPayNowSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsPayNowSetupFutureUsage = "none"
)

// Controls when the funds will be captured from the customer's account.
type CheckoutSessionPaymentMethodOptionsPaypalCaptureMethod string

// List of values that CheckoutSessionPaymentMethodOptionsPaypalCaptureMethod can take
const (
CheckoutSessionPaymentMethodOptionsPaypalCaptureMethodManual CheckoutSessionPaymentMethodOptionsPaypalCaptureMethod = "manual"
)

// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
type CheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage string

// List of values that CheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage can take
const (
CheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage = "none"
CheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage = "off_session"
)

// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
Expand Down Expand Up @@ -2292,6 +2313,20 @@ type CheckoutSessionPaymentMethodOptionsPayNow struct {
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
SetupFutureUsage CheckoutSessionPaymentMethodOptionsPayNowSetupFutureUsage `json:"setup_future_usage"`
}
type CheckoutSessionPaymentMethodOptionsPaypal struct {
// Controls when the funds will be captured from the customer's account.
CaptureMethod CheckoutSessionPaymentMethodOptionsPaypalCaptureMethod `json:"capture_method"`
// Preferred locale of the PayPal checkout page that the customer is redirected to.
PreferredLocale string `json:"preferred_locale"`
// A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
Reference string `json:"reference"`
// Indicates that you intend to make future payments with this PaymentIntent's payment method.
//
// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
//
// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
SetupFutureUsage CheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage `json:"setup_future_usage"`
}
type CheckoutSessionPaymentMethodOptionsPix struct {
// The number of seconds after which Pix payment will expire.
ExpiresAfterSeconds int64 `json:"expires_after_seconds"`
Expand Down Expand Up @@ -2357,6 +2392,7 @@ type CheckoutSessionPaymentMethodOptions struct {
OXXO *CheckoutSessionPaymentMethodOptionsOXXO `json:"oxxo"`
P24 *CheckoutSessionPaymentMethodOptionsP24 `json:"p24"`
PayNow *CheckoutSessionPaymentMethodOptionsPayNow `json:"paynow"`
Paypal *CheckoutSessionPaymentMethodOptionsPaypal `json:"paypal"`
Pix *CheckoutSessionPaymentMethodOptionsPix `json:"pix"`
RevolutPay *CheckoutSessionPaymentMethodOptionsRevolutPay `json:"revolut_pay"`
SEPADebit *CheckoutSessionPaymentMethodOptionsSEPADebit `json:"sepa_debit"`
Expand Down
4 changes: 4 additions & 0 deletions client/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import (
identityverificationsession "github.com/stripe/stripe-go/v76/identity/verificationsession"
"github.com/stripe/stripe-go/v76/invoice"
"github.com/stripe/stripe-go/v76/invoiceitem"
"github.com/stripe/stripe-go/v76/invoicelineitem"
issuingauthorization "github.com/stripe/stripe-go/v76/issuing/authorization"
issuingcard "github.com/stripe/stripe-go/v76/issuing/card"
issuingcardholder "github.com/stripe/stripe-go/v76/issuing/cardholder"
Expand Down Expand Up @@ -191,6 +192,8 @@ type API struct {
IdentityVerificationSessions *identityverificationsession.Client
// InvoiceItems is the client used to invoke /invoiceitems APIs.
InvoiceItems *invoiceitem.Client
// InvoiceLineItems is the client used to invoke /invoices/{invoice}/lines APIs.
InvoiceLineItems *invoicelineitem.Client
// Invoices is the client used to invoke /invoices APIs.
Invoices *invoice.Client
// IssuingAuthorizations is the client used to invoke /issuing/authorizations APIs.
Expand Down Expand Up @@ -394,6 +397,7 @@ func (a *API) Init(key string, backends *stripe.Backends) {
a.IdentityVerificationReports = &identityverificationreport.Client{B: backends.API, Key: key}
a.IdentityVerificationSessions = &identityverificationsession.Client{B: backends.API, Key: key}
a.InvoiceItems = &invoiceitem.Client{B: backends.API, Key: key}
a.InvoiceLineItems = &invoicelineitem.Client{B: backends.API, Key: key}
a.Invoices = &invoice.Client{B: backends.API, Key: key}
a.IssuingAuthorizations = &issuingauthorization.Client{B: backends.API, Key: key}
a.IssuingCardholders = &issuingcardholder.Client{B: backends.API, Key: key}
Expand Down
42 changes: 39 additions & 3 deletions creditnote.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,16 @@ const (
CreditNoteTypePrePayment CreditNoteType = "pre_payment"
)

// A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`.
type CreditNoteLineTaxAmountParams struct {
// The amount, in cents (or local equivalent), of the tax.
Amount *int64 `form:"amount"`
// The amount on which tax is calculated, in cents (or local equivalent).
TaxableAmount *int64 `form:"taxable_amount"`
// The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe.
TaxRate *string `form:"tax_rate"`
}

// Line items that make up the credit note.
type CreditNoteLineParams struct {
// The line item amount to credit. Only valid when `type` is `invoice_line_item`.
Expand All @@ -91,7 +101,9 @@ type CreditNoteLineParams struct {
InvoiceLineItem *string `form:"invoice_line_item"`
// The line item quantity to credit.
Quantity *int64 `form:"quantity"`
// The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item`.
// A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`.
TaxAmounts []*CreditNoteLineTaxAmountParams `form:"tax_amounts"`
// The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`.
TaxRates []*string `form:"tax_rates"`
// Type of the credit note line item, one of `invoice_line_item` or `custom_line_item`
Type *string `form:"type"`
Expand Down Expand Up @@ -179,6 +191,16 @@ func (p *CreditNoteListParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}

// A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`.
type CreditNotePreviewLineTaxAmountParams struct {
// The amount, in cents (or local equivalent), of the tax.
Amount *int64 `form:"amount"`
// The amount on which tax is calculated, in cents (or local equivalent).
TaxableAmount *int64 `form:"taxable_amount"`
// The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe.
TaxRate *string `form:"tax_rate"`
}

// Line items that make up the credit note.
type CreditNotePreviewLineParams struct {
// The line item amount to credit. Only valid when `type` is `invoice_line_item`.
Expand All @@ -189,7 +211,9 @@ type CreditNotePreviewLineParams struct {
InvoiceLineItem *string `form:"invoice_line_item"`
// The line item quantity to credit.
Quantity *int64 `form:"quantity"`
// The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item`.
// A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`.
TaxAmounts []*CreditNotePreviewLineTaxAmountParams `form:"tax_amounts"`
// The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`.
TaxRates []*string `form:"tax_rates"`
// Type of the credit note line item, one of `invoice_line_item` or `custom_line_item`
Type *string `form:"type"`
Expand Down Expand Up @@ -262,6 +286,16 @@ func (p *CreditNoteVoidCreditNoteParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}

// A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`.
type CreditNotePreviewLinesLineTaxAmountParams struct {
// The amount, in cents (or local equivalent), of the tax.
Amount *int64 `form:"amount"`
// The amount on which tax is calculated, in cents (or local equivalent).
TaxableAmount *int64 `form:"taxable_amount"`
// The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe.
TaxRate *string `form:"tax_rate"`
}

// Line items that make up the credit note.
type CreditNotePreviewLinesLineParams struct {
// The line item amount to credit. Only valid when `type` is `invoice_line_item`.
Expand All @@ -272,7 +306,9 @@ type CreditNotePreviewLinesLineParams struct {
InvoiceLineItem *string `form:"invoice_line_item"`
// The line item quantity to credit.
Quantity *int64 `form:"quantity"`
// The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item`.
// A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`.
TaxAmounts []*CreditNotePreviewLinesLineTaxAmountParams `form:"tax_amounts"`
// The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`.
TaxRates []*string `form:"tax_rates"`
// Type of the credit note line item, one of `invoice_line_item` or `custom_line_item`
Type *string `form:"type"`
Expand Down
Loading

0 comments on commit b4cd6b9

Please sign in to comment.