Skip to content

Commit

Permalink
Merge pull request #1744 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 5, 2023
2 parents d40b541 + 5ee37e6 commit 36bdc47
Show file tree
Hide file tree
Showing 24 changed files with 1,080 additions and 467 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v569
v582
6 changes: 3 additions & 3 deletions balancetransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ type BalanceTransactionFeeDetail struct {
// Related guide: [Balance transaction types](https://stripe.com/docs/reports/balance-transaction-types)
type BalanceTransaction struct {
APIResource
// Gross amount of the transaction (in cents (or local equivalent)).
// Gross amount of this transaction (in cents (or local equivalent)). A positive value represents funds charged to another party, and a negative value represents funds sent to another party.
Amount int64 `json:"amount"`
// The date that the transaction's net funds become available in the Stripe balance.
AvailableOn int64 `json:"available_on"`
Expand All @@ -189,13 +189,13 @@ type BalanceTransaction struct {
Description string `json:"description"`
// If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the `amount` in currency A, multipled by the `exchange_rate`, equals the `amount` in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's `amount` is `1000` and `currency` is `eur`. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction's `amount` is `1234`, its `currency` is `usd`, and the `exchange_rate` is `1.234`.
ExchangeRate float64 `json:"exchange_rate"`
// Fees (in cents (or local equivalent)) paid for this transaction.
// Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed.
Fee int64 `json:"fee"`
// Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction.
FeeDetails []*BalanceTransactionFeeDetail `json:"fee_details"`
// Unique identifier for the object.
ID string `json:"id"`
// Net amount of the transaction (in cents (or local equivalent)).
// Net impact to a Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by `amount` - `fee`
Net int64 `json:"net"`
// String representing the object's type. Objects of the same type share the same value.
Object string `json:"object"`
Expand Down
66 changes: 63 additions & 3 deletions charge.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,33 @@ const (
ChargePaymentMethodDetailsCardChecksCVCCheckUnchecked ChargePaymentMethodDetailsCardChecksCVCCheck = "unchecked"
)

// Indicates whether or not the capture window is extended beyond the standard authorization.
type ChargePaymentMethodDetailsCardExtendedAuthorizationStatus string

// List of values that ChargePaymentMethodDetailsCardExtendedAuthorizationStatus can take
const (
ChargePaymentMethodDetailsCardExtendedAuthorizationStatusDisabled ChargePaymentMethodDetailsCardExtendedAuthorizationStatus = "disabled"
ChargePaymentMethodDetailsCardExtendedAuthorizationStatusEnabled ChargePaymentMethodDetailsCardExtendedAuthorizationStatus = "enabled"
)

// Indicates whether or not the incremental authorization feature is supported.
type ChargePaymentMethodDetailsCardIncrementalAuthorizationStatus string

// List of values that ChargePaymentMethodDetailsCardIncrementalAuthorizationStatus can take
const (
ChargePaymentMethodDetailsCardIncrementalAuthorizationStatusAvailable ChargePaymentMethodDetailsCardIncrementalAuthorizationStatus = "available"
ChargePaymentMethodDetailsCardIncrementalAuthorizationStatusUnavailable ChargePaymentMethodDetailsCardIncrementalAuthorizationStatus = "unavailable"
)

// Indicates whether or not multiple captures are supported.
type ChargePaymentMethodDetailsCardMulticaptureStatus string

// List of values that ChargePaymentMethodDetailsCardMulticaptureStatus can take
const (
ChargePaymentMethodDetailsCardMulticaptureStatusAvailable ChargePaymentMethodDetailsCardMulticaptureStatus = "available"
ChargePaymentMethodDetailsCardMulticaptureStatusUnavailable ChargePaymentMethodDetailsCardMulticaptureStatus = "unavailable"
)

// Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
type ChargePaymentMethodDetailsCardNetwork string

Expand All @@ -75,6 +102,15 @@ const (
ChargePaymentMethodDetailsCardNetworkUnknown ChargePaymentMethodDetailsCardNetwork = "unknown"
)

// Indicates whether or not the authorized amount can be over-captured.
type ChargePaymentMethodDetailsCardOvercaptureStatus string

// List of values that ChargePaymentMethodDetailsCardOvercaptureStatus can take
const (
ChargePaymentMethodDetailsCardOvercaptureStatusAvailable ChargePaymentMethodDetailsCardOvercaptureStatus = "available"
ChargePaymentMethodDetailsCardOvercaptureStatusUnavailable ChargePaymentMethodDetailsCardOvercaptureStatus = "unavailable"
)

// For authenticated transactions: how the customer was authenticated by
// the issuing bank.
type ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow string
Expand Down Expand Up @@ -854,6 +890,14 @@ type ChargePaymentMethodDetailsCardChecks struct {
// If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
CVCCheck ChargePaymentMethodDetailsCardChecksCVCCheck `json:"cvc_check"`
}
type ChargePaymentMethodDetailsCardExtendedAuthorization struct {
// Indicates whether or not the capture window is extended beyond the standard authorization.
Status ChargePaymentMethodDetailsCardExtendedAuthorizationStatus `json:"status"`
}
type ChargePaymentMethodDetailsCardIncrementalAuthorization struct {
// Indicates whether or not the incremental authorization feature is supported.
Status ChargePaymentMethodDetailsCardIncrementalAuthorizationStatus `json:"status"`
}

// Installment details for this payment (Mexico only).
//
Expand All @@ -862,12 +906,22 @@ type ChargePaymentMethodDetailsCardInstallments struct {
// Installment plan selected for the payment.
Plan *PaymentIntentPaymentMethodOptionsCardInstallmentsPlan `json:"plan"`
}
type ChargePaymentMethodDetailsCardMulticapture struct {
// Indicates whether or not multiple captures are supported.
Status ChargePaymentMethodDetailsCardMulticaptureStatus `json:"status"`
}

// If this card has network token credentials, this contains the details of the network token credentials.
type ChargePaymentMethodDetailsCardNetworkToken struct {
// Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction.
Used bool `json:"used"`
}
type ChargePaymentMethodDetailsCardOvercapture struct {
// The maximum amount that can be captured.
MaximumAmountCapturable int64 `json:"maximum_amount_capturable"`
// Indicates whether or not the authorized amount can be over-captured.
Status ChargePaymentMethodDetailsCardOvercaptureStatus `json:"status"`
}

// Populated if this transaction used 3D Secure authentication.
type ChargePaymentMethodDetailsCardThreeDSecure struct {
Expand Down Expand Up @@ -923,6 +977,8 @@ type ChargePaymentMethodDetailsCardWallet struct {
VisaCheckout *ChargePaymentMethodDetailsCardWalletVisaCheckout `json:"visa_checkout"`
}
type ChargePaymentMethodDetailsCard struct {
// The authorized amount.
AmountAuthorized int64 `json:"amount_authorized"`
// Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
Brand PaymentMethodCardBrand `json:"brand"`
// Check results by Card networks on Card address and CVC at time of payment.
Expand All @@ -932,13 +988,15 @@ type ChargePaymentMethodDetailsCard struct {
// Two-digit number representing the card's expiration month.
ExpMonth int64 `json:"exp_month"`
// Four-digit number representing the card's expiration year.
ExpYear int64 `json:"exp_year"`
ExpYear int64 `json:"exp_year"`
ExtendedAuthorization *ChargePaymentMethodDetailsCardExtendedAuthorization `json:"extended_authorization"`
// Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
//
// *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
Fingerprint string `json:"fingerprint"`
// Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
Funding CardFunding `json:"funding"`
Funding CardFunding `json:"funding"`
IncrementalAuthorization *ChargePaymentMethodDetailsCardIncrementalAuthorization `json:"incremental_authorization"`
// Installment details for this payment (Mexico only).
//
// For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
Expand All @@ -948,11 +1006,13 @@ type ChargePaymentMethodDetailsCard struct {
// ID of the mandate used to make this payment or created by it.
Mandate string `json:"mandate"`
// True if this payment was marked as MOTO and out of scope for SCA.
MOTO bool `json:"moto"`
MOTO bool `json:"moto"`
Multicapture *ChargePaymentMethodDetailsCardMulticapture `json:"multicapture"`
// Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
Network ChargePaymentMethodDetailsCardNetwork `json:"network"`
// If this card has network token credentials, this contains the details of the network token credentials.
NetworkToken *ChargePaymentMethodDetailsCardNetworkToken `json:"network_token"`
Overcapture *ChargePaymentMethodDetailsCardOvercapture `json:"overcapture"`
// Populated if this transaction used 3D Secure authentication.
ThreeDSecure *ChargePaymentMethodDetailsCardThreeDSecure `json:"three_d_secure"`
// If this Card is part of a card wallet, this contains the details of the card wallet.
Expand Down
74 changes: 74 additions & 0 deletions checkout_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@

package stripe

// Type of the account referenced.
type CheckoutSessionAutomaticTaxLiabilityType string

// List of values that CheckoutSessionAutomaticTaxLiabilityType can take
const (
CheckoutSessionAutomaticTaxLiabilityTypeAccount CheckoutSessionAutomaticTaxLiabilityType = "account"
CheckoutSessionAutomaticTaxLiabilityTypeSelf CheckoutSessionAutomaticTaxLiabilityType = "self"
)

// The status of the most recent automated tax calculation for this session.
type CheckoutSessionAutomaticTaxStatus string

Expand Down Expand Up @@ -174,6 +183,15 @@ const (
CheckoutSessionCustomerDetailsTaxIDTypeZAVAT CheckoutSessionCustomerDetailsTaxIDType = "za_vat"
)

// Type of the account referenced.
type CheckoutSessionInvoiceCreationInvoiceDataIssuerType string

// List of values that CheckoutSessionInvoiceCreationInvoiceDataIssuerType can take
const (
CheckoutSessionInvoiceCreationInvoiceDataIssuerTypeAccount CheckoutSessionInvoiceCreationInvoiceDataIssuerType = "account"
CheckoutSessionInvoiceCreationInvoiceDataIssuerTypeSelf CheckoutSessionInvoiceCreationInvoiceDataIssuerType = "self"
)

// The mode of the Checkout Session.
type CheckoutSessionMode string

Expand Down Expand Up @@ -745,10 +763,20 @@ type CheckoutSessionAfterExpirationParams struct {
Recovery *CheckoutSessionAfterExpirationRecoveryParams `form:"recovery"`
}

// The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
type CheckoutSessionAutomaticTaxLiabilityParams struct {
// The connected account being referenced when `type` is `account`.
Account *string `form:"account"`
// Type of the account referenced in the request.
Type *string `form:"type"`
}

// Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions.
type CheckoutSessionAutomaticTaxParams struct {
// Set to true to enable automatic taxes.
Enabled *bool `form:"enabled"`
// The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
Liability *CheckoutSessionAutomaticTaxLiabilityParams `form:"liability"`
}

// Configure fields for the Checkout Session to gather active consent from customers.
Expand Down Expand Up @@ -874,6 +902,14 @@ type CheckoutSessionInvoiceCreationInvoiceDataCustomFieldParams struct {
Value *string `form:"value"`
}

// The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
type CheckoutSessionInvoiceCreationInvoiceDataIssuerParams struct {
// The connected account being referenced when `type` is `account`.
Account *string `form:"account"`
// Type of the account referenced in the request.
Type *string `form:"type"`
}

// Default options for invoice PDF rendering for this customer.
type CheckoutSessionInvoiceCreationInvoiceDataRenderingOptionsParams struct {
// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
Expand All @@ -890,6 +926,8 @@ type CheckoutSessionInvoiceCreationInvoiceDataParams struct {
Description *string `form:"description"`
// Default footer to be displayed on invoices for this customer.
Footer *string `form:"footer"`
// The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
Issuer *CheckoutSessionInvoiceCreationInvoiceDataIssuerParams `form:"issuer"`
// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
Metadata map[string]string `form:"metadata"`
// Default options for invoice PDF rendering for this customer.
Expand Down Expand Up @@ -1607,6 +1645,20 @@ type CheckoutSessionShippingOptionParams struct {
ShippingRateData *CheckoutSessionShippingOptionShippingRateDataParams `form:"shipping_rate_data"`
}

// The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
type CheckoutSessionSubscriptionDataInvoiceSettingsIssuerParams struct {
// The connected account being referenced when `type` is `account`.
Account *string `form:"account"`
// Type of the account referenced in the request.
Type *string `form:"type"`
}

// All invoices will be billed using the specified settings.
type CheckoutSessionSubscriptionDataInvoiceSettingsParams struct {
// The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
Issuer *CheckoutSessionSubscriptionDataInvoiceSettingsIssuerParams `form:"issuer"`
}

// If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.
type CheckoutSessionSubscriptionDataTransferDataParams struct {
// A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
Expand Down Expand Up @@ -1641,6 +1693,8 @@ type CheckoutSessionSubscriptionDataParams struct {
// Use this field to optionally store an explanation of the subscription
// for rendering in the [customer portal](https://stripe.com/docs/customer-management).
Description *string `form:"description"`
// All invoices will be billed using the specified settings.
InvoiceSettings *CheckoutSessionSubscriptionDataInvoiceSettingsParams `form:"invoice_settings"`
// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
Metadata map[string]string `form:"metadata"`
// The account on behalf of which to charge, for each of the subscription's invoices.
Expand Down Expand Up @@ -1862,9 +1916,19 @@ type CheckoutSessionAfterExpiration struct {
// When set, configuration used to recover the Checkout Session on expiry.
Recovery *CheckoutSessionAfterExpirationRecovery `json:"recovery"`
}

// The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
type CheckoutSessionAutomaticTaxLiability struct {
// The connected account being referenced when `type` is `account`.
Account *Account `json:"account"`
// Type of the account referenced.
Type CheckoutSessionAutomaticTaxLiabilityType `json:"type"`
}
type CheckoutSessionAutomaticTax struct {
// Indicates whether automatic tax is enabled for the session
Enabled bool `json:"enabled"`
// The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
Liability *CheckoutSessionAutomaticTaxLiability `json:"liability"`
// The status of the most recent automated tax calculation for this session.
Status CheckoutSessionAutomaticTaxStatus `json:"status"`
}
Expand Down Expand Up @@ -2018,6 +2082,14 @@ type CheckoutSessionInvoiceCreationInvoiceDataCustomField struct {
Value string `json:"value"`
}

// The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
type CheckoutSessionInvoiceCreationInvoiceDataIssuer struct {
// The connected account being referenced when `type` is `account`.
Account *Account `json:"account"`
// Type of the account referenced.
Type CheckoutSessionInvoiceCreationInvoiceDataIssuerType `json:"type"`
}

// Options for invoice PDF rendering.
type CheckoutSessionInvoiceCreationInvoiceDataRenderingOptions struct {
// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
Expand All @@ -2032,6 +2104,8 @@ type CheckoutSessionInvoiceCreationInvoiceData struct {
Description string `json:"description"`
// Footer displayed on the invoice.
Footer string `json:"footer"`
// The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
Issuer *CheckoutSessionInvoiceCreationInvoiceDataIssuer `json:"issuer"`
// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
Metadata map[string]string `json:"metadata"`
// Options for invoice PDF rendering.
Expand Down
Loading

0 comments on commit 36bdc47

Please sign in to comment.