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 #1769

Merged
merged 9 commits into from
Nov 21, 2023
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v669
v680
41 changes: 41 additions & 0 deletions charge.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,28 @@ const (
ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlowFrictionless ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow = "frictionless"
)

// The Electronic Commerce Indicator (ECI). A protocol-level field
// indicating what degree of authentication was performed.
type ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator string

// List of values that ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator can take
const (
ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator01 ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator = "01"
ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator02 ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator = "02"
ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator05 ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator = "05"
ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator06 ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator = "06"
ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator07 ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator = "07"
)

// The exemption requested via 3DS and accepted by the issuer at authentication time.
type ChargePaymentMethodDetailsCardThreeDSecureExemptionIndicator string

// List of values that ChargePaymentMethodDetailsCardThreeDSecureExemptionIndicator can take
const (
ChargePaymentMethodDetailsCardThreeDSecureExemptionIndicatorLowRisk ChargePaymentMethodDetailsCardThreeDSecureExemptionIndicator = "low_risk"
ChargePaymentMethodDetailsCardThreeDSecureExemptionIndicatorNone ChargePaymentMethodDetailsCardThreeDSecureExemptionIndicator = "none"
)

// Indicates the outcome of 3D Secure authentication.
type ChargePaymentMethodDetailsCardThreeDSecureResult string

Expand Down Expand Up @@ -692,11 +714,22 @@ type ChargePaymentMethodDetailsCardThreeDSecure struct {
// For authenticated transactions: how the customer was authenticated by
// the issuing bank.
AuthenticationFlow ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow `json:"authentication_flow"`
// The Electronic Commerce Indicator (ECI). A protocol-level field
// indicating what degree of authentication was performed.
ElectronicCommerceIndicator ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator `json:"electronic_commerce_indicator"`
// The exemption requested via 3DS and accepted by the issuer at authentication time.
ExemptionIndicator ChargePaymentMethodDetailsCardThreeDSecureExemptionIndicator `json:"exemption_indicator"`
// Whether Stripe requested the value of `exemption_indicator` in the transaction. This will depend on
// the outcome of Stripe's internal risk assessment.
ExemptionIndicatorApplied bool `json:"exemption_indicator_applied"`
// Indicates the outcome of 3D Secure authentication.
Result ChargePaymentMethodDetailsCardThreeDSecureResult `json:"result"`
// Additional information about why 3D Secure succeeded or failed based
// on the `result`.
ResultReason ChargePaymentMethodDetailsCardThreeDSecureResultReason `json:"result_reason"`
// The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID
// (dsTransId) for this payment.
TransactionID string `json:"transaction_id"`
// The version of 3D Secure that was used.
Version string `json:"version"`
}
Expand Down Expand Up @@ -793,6 +826,12 @@ type ChargePaymentMethodDetailsCard struct {
Issuer string `json:"issuer"`
}

// Details about payments collected offline.
type ChargePaymentMethodDetailsCardPresentOffline struct {
// Time at which the payment was collected while offline
StoredAt int64 `json:"stored_at"`
}

// A collection of fields required to be displayed on receipts. Only required for EMV transactions.
type ChargePaymentMethodDetailsCardPresentReceipt struct {
// The type of account being debited or credited
Expand Down Expand Up @@ -845,6 +884,8 @@ type ChargePaymentMethodDetailsCardPresent struct {
Last4 string `json:"last4"`
// 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 ChargePaymentMethodDetailsCardPresentNetwork `json:"network"`
// Details about payments collected offline.
Offline *ChargePaymentMethodDetailsCardPresentOffline `json:"offline"`
// Defines whether the authorized amount can be over-captured or not
OvercaptureSupported bool `json:"overcapture_supported"`
// How card details were read in this transaction.
Expand Down
9 changes: 7 additions & 2 deletions customercashbalancetransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ type CustomerCashBalanceTransactionRefundedFromPayment struct {
// The [Refund](https://stripe.com/docs/api/refunds/object) that moved these funds into the customer's cash balance.
Refund *Refund `json:"refund"`
}
type CustomerCashBalanceTransactionTransferredToBalance struct {
// The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds transferred to your Stripe balance.
BalanceTransaction *BalanceTransaction `json:"balance_transaction"`
}
type CustomerCashBalanceTransactionUnappliedFromPayment struct {
// The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were unapplied from.
PaymentIntent *PaymentIntent `json:"payment_intent"`
Expand Down Expand Up @@ -158,8 +162,9 @@ type CustomerCashBalanceTransaction struct {
// The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance.
NetAmount int64 `json:"net_amount"`
// String representing the object's type. Objects of the same type share the same value.
Object string `json:"object"`
RefundedFromPayment *CustomerCashBalanceTransactionRefundedFromPayment `json:"refunded_from_payment"`
Object string `json:"object"`
RefundedFromPayment *CustomerCashBalanceTransactionRefundedFromPayment `json:"refunded_from_payment"`
TransferredToBalance *CustomerCashBalanceTransactionTransferredToBalance `json:"transferred_to_balance"`
// The type of the cash balance transaction. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types.
Type CustomerCashBalanceTransactionType `json:"type"`
UnappliedFromPayment *CustomerCashBalanceTransactionUnappliedFromPayment `json:"unapplied_from_payment"`
Expand Down
4 changes: 2 additions & 2 deletions event.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,8 @@ type EventRequest struct {
// `Event` objects directly to an endpoint on your server. You can manage
// webhooks in your
// [account settings](https://dashboard.stripe.com/account/webhooks). Learn how
// to [listen for events]
// (/docs/webhooks) so that your integration can automatically trigger reactions.
// to [listen for events](https://stripe.com/docs/webhooks)
// so that your integration can automatically trigger reactions.
//
// When using [Connect](https://stripe.com/docs/connect), you can also receive event notifications
// that occur in connected accounts. For these events, there's an
Expand Down
20 changes: 15 additions & 5 deletions issuing_authorization.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,10 @@ type IssuingAuthorizationMerchantData struct {
type IssuingAuthorizationNetworkData struct {
// Identifier assigned to the acquirer by the card network. Sometimes this value is not provided by the network; in this case, the value will be `null`.
AcquiringInstitutionID string `json:"acquiring_institution_id"`
// The System Trace Audit Number (STAN) is a 6-digit identifier assigned by the acquirer. Prefer `network_data.transaction_id` if present, unless you have special requirements.
SystemTraceAuditNumber string `json:"system_trace_audit_number"`
// Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions.
TransactionID string `json:"transaction_id"`
}

// The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook.
Expand All @@ -245,6 +249,8 @@ type IssuingAuthorizationPendingRequest struct {
MerchantAmount int64 `json:"merchant_amount"`
// The local currency the merchant is requesting to authorize.
MerchantCurrency Currency `json:"merchant_currency"`
// The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99.
NetworkRiskScore int64 `json:"network_risk_score"`
}

// History of every time a `pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined.
Expand All @@ -265,10 +271,14 @@ type IssuingAuthorizationRequestHistory struct {
MerchantAmount int64 `json:"merchant_amount"`
// The currency that was collected by the merchant and presented to the cardholder for the authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
MerchantCurrency Currency `json:"merchant_currency"`
// The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99.
NetworkRiskScore int64 `json:"network_risk_score"`
// When an authorization is approved or declined by you or by Stripe, this field provides additional detail on the reason for the outcome.
Reason IssuingAuthorizationRequestHistoryReason `json:"reason"`
// If approve/decline decision is directly responsed to the webhook with json payload and if the response is invalid (e.g., parsing errors), we surface the detailed message via this field.
// If the `request_history.reason` is `webhook_error` because the direct webhook response is invalid (for example, parsing errors or missing parameters), we surface a more detailed error message via this field.
ReasonMessage string `json:"reason_message"`
// Time when the card network received an authorization request from the acquirer in UTC. Referred to by networks as transmission time.
RequestedAt int64 `json:"requested_at"`
}

// [Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts).
Expand Down Expand Up @@ -318,7 +328,7 @@ type IssuingAuthorizationVerificationData struct {
// Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations)
type IssuingAuthorization struct {
APIResource
// The total amount that was authorized or rejected. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
// The total amount that was authorized or rejected. This amount is in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `amount` should be the same as `merchant_amount`, unless `currency` and `merchant_currency` are different.
Amount int64 `json:"amount"`
// Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
AmountDetails *IssuingAuthorizationAmountDetails `json:"amount_details"`
Expand All @@ -334,15 +344,15 @@ type IssuingAuthorization struct {
Cardholder *IssuingCardholder `json:"cardholder"`
// Time at which the object was created. Measured in seconds since the Unix epoch.
Created int64 `json:"created"`
// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
// The currency of the cardholder. This currency can be different from the currency presented at authorization and the `merchant_currency` field on this authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
Currency Currency `json:"currency"`
// Unique identifier for the object.
ID string `json:"id"`
// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
Livemode bool `json:"livemode"`
// The total amount that was authorized or rejected. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
// The total amount that was authorized or rejected. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `merchant_amount` should be the same as `amount`, unless `merchant_currency` and `currency` are different.
MerchantAmount int64 `json:"merchant_amount"`
// The currency that was presented to the cardholder for the authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
// The local currency that was presented to the cardholder for the authorization. This currency can be different from the cardholder currency and the `currency` field on this authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
MerchantCurrency Currency `json:"merchant_currency"`
MerchantData *IssuingAuthorizationMerchantData `json:"merchant_data"`
// 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.
Expand Down
4 changes: 4 additions & 0 deletions issuing_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,12 @@ type IssuingTransactionAmountDetails struct {

// Details about the transaction, such as processing dates, set by the card network.
type IssuingTransactionNetworkData struct {
// A code created by Stripe which is shared with the merchant to validate the authorization. This field will be populated if the authorization message was approved. The code typically starts with the letter "S", followed by a six-digit number. For example, "S498162". Please note that the code is not guaranteed to be unique across authorizations.
AuthorizationCode string `json:"authorization_code"`
// The date the transaction was processed by the card network. This can be different from the date the seller recorded the transaction depending on when the acquirer submits the transaction to the network.
ProcessingDate string `json:"processing_date"`
// Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions.
TransactionID string `json:"transaction_id"`
}

// The legs of the trip.
Expand Down
56 changes: 56 additions & 0 deletions paymentintent.go
Original file line number Diff line number Diff line change
Expand Up @@ -1207,6 +1207,59 @@ type PaymentIntentPaymentMethodOptionsCardMandateOptionsParams struct {
SupportedTypes []*string `form:"supported_types"`
}

// Cartes Bancaires-specific 3DS fields.
type PaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesParams struct {
// The cryptogram calculation algorithm used by the card Issuer's ACS
// to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
// messageExtension: CB-AVALGO
CbAvalgo *string `form:"cb_avalgo"`
// The exemption indicator returned from Cartes Bancaires in the ARes.
// message extension: CB-EXEMPTION; string (4 characters)
// This is a 3 byte bitmap (low significant byte first and most significant
// bit first) that has been Base64 encoded
CbExemption *string `form:"cb_exemption"`
// The risk score returned from Cartes Bancaires in the ARes.
// message extension: CB-SCORE; numeric value 0-99
CbScore *int64 `form:"cb_score"`
}

// Network specific 3DS fields. Network specific arguments require an
// explicit card brand choice. The parameter `payment_method_options.card.network“
// must be populated accordingly
type PaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsParams struct {
// Cartes Bancaires-specific 3DS fields.
CartesBancaires *PaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesParams `form:"cartes_bancaires"`
}

// If 3D Secure authentication was performed with a third-party provider,
// the authentication details to use for this payment.
type PaymentIntentPaymentMethodOptionsCardThreeDSecureParams struct {
// The `transStatus` returned from the card Issuer's ACS in the ARes.
AresTransStatus *string `form:"ares_trans_status"`
// The cryptogram, also known as the "authentication value" (AAV, CAVV or
// AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
// (Most 3D Secure providers will return the base64-encoded version, which
// is what you should specify here.)
Cryptogram *string `form:"cryptogram"`
// The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
// provider and indicates what degree of authentication was performed.
ElectronicCommerceIndicator *string `form:"electronic_commerce_indicator"`
// The exemption requested via 3DS and accepted by the issuer at authentication time.
ExemptionIndicator *string `form:"exemption_indicator"`
// Network specific 3DS fields. Network specific arguments require an
// explicit card brand choice. The parameter `payment_method_options.card.network``
// must be populated accordingly
NetworkOptions *PaymentIntentPaymentMethodOptionsCardThreeDSecureNetworkOptionsParams `form:"network_options"`
// The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
// AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
RequestorChallengeIndicator *string `form:"requestor_challenge_indicator"`
// For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
// Transaction ID (dsTransID).
TransactionID *string `form:"transaction_id"`
// The version of 3D Secure that was performed.
Version *string `form:"version"`
}

// Configuration for any card payments attempted on this PaymentIntent.
type PaymentIntentPaymentMethodOptionsCardParams struct {
// Controls when the funds will be captured from the customer's account.
Expand Down Expand Up @@ -1251,6 +1304,9 @@ type PaymentIntentPaymentMethodOptionsCardParams struct {
StatementDescriptorSuffixKana *string `form:"statement_descriptor_suffix_kana"`
// Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
StatementDescriptorSuffixKanji *string `form:"statement_descriptor_suffix_kanji"`
// If 3D Secure authentication was performed with a third-party provider,
// the authentication details to use for this payment.
ThreeDSecure *PaymentIntentPaymentMethodOptionsCardThreeDSecureParams `form:"three_d_secure"`
}

// If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
Expand Down
2 changes: 1 addition & 1 deletion price.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ type PriceListRecurringParams struct {
UsageType *string `form:"usage_type"`
}

// Returns a list of your active prices. For the list of inactive prices, set active to false.
// Returns a list of your active prices, excluding [inline prices](https://stripe.com/docs/products-prices/pricing-models#inline-pricing). For the list of inactive prices, set active to false.
type PriceListParams struct {
ListParams `form:"*"`
// Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices).
Expand Down
Loading
Loading