Skip to content

Commit

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

* Update generated code for v1025

* Update generated code for v1027

* Update generated code for v1028

* Update generated code for v1029

* Update generated code for v1030

* Update generated code for v1032

* Update generated code for v1033

* Update generated code for v1034

* Update generated code for v1035

* Update generated code for v1036

* Update generated code for v1038

* Update generated code for v1039

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] authored May 16, 2024
1 parent 5b38da8 commit 82422c3
Show file tree
Hide file tree
Showing 16 changed files with 152 additions and 11 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1020
v1039
20 changes: 20 additions & 0 deletions applicationfee.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ package stripe

import "encoding/json"

// Type of object that created the application fee, either `charge` or `payout`.
type ApplicationFeeFeeSourceType string

// List of values that ApplicationFeeFeeSourceType can take
const (
ApplicationFeeFeeSourceTypeCharge ApplicationFeeFeeSourceType = "charge"
ApplicationFeeFeeSourceTypePayout ApplicationFeeFeeSourceType = "payout"
)

// Returns a list of application fees you've previously collected. The application fees are returned in sorted order, with the most recent fees appearing first.
type ApplicationFeeListParams struct {
ListParams `form:"*"`
Expand Down Expand Up @@ -38,6 +47,15 @@ func (p *ApplicationFeeParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}

// Polymorphic source of the application fee. Includes the ID of the object the application fee was created from.
type ApplicationFeeFeeSource struct {
// Charge ID that created this application fee.
Charge string `json:"charge"`
// Payout ID that created this application fee.
Payout string `json:"payout"`
// Type of object that created the application fee, either `charge` or `payout`.
Type ApplicationFeeFeeSourceType `json:"type"`
}
type ApplicationFee struct {
APIResource
// ID of the Stripe account this fee was taken from.
Expand All @@ -56,6 +74,8 @@ type ApplicationFee struct {
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).
Currency Currency `json:"currency"`
// Polymorphic source of the application fee. Includes the ID of the object the application fee was created from.
FeeSource *ApplicationFeeFeeSource `json:"fee_source"`
// 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.
Expand Down
23 changes: 21 additions & 2 deletions balance.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,27 @@ type Amount struct {
// Balance amount.
Amount int64 `json:"amount"`
// 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"`
SourceTypes map[BalanceSourceType]int64 `json:"source_types"`
Currency Currency `json:"currency"`
// Breakdown of balance by destination.
NetAvailable []*BalanceInstantAvailableNetAvailable `json:"net_available"`
SourceTypes map[BalanceSourceType]int64 `json:"source_types"`
}
type BalanceInstantAvailableNetAvailableSourceTypes struct {
// Amount for bank account.
BankAccount int64 `json:"bank_account"`
// Amount for card.
Card int64 `json:"card"`
// Amount for FPX.
FPX int64 `json:"fpx"`
}

// Breakdown of balance by destination.
type BalanceInstantAvailableNetAvailable struct {
// Net balance amount, subtracting fees from platform-set pricing.
Amount int64 `json:"amount"`
// ID of the external account for this net balance (not expandable).
Destination string `json:"destination"`
SourceTypes *BalanceInstantAvailableNetAvailableSourceTypes `json:"source_types"`
}
type BalanceIssuing struct {
// Funds that are available for use.
Expand Down
2 changes: 2 additions & 0 deletions charge.go
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,8 @@ type ChargePaymentMethodDetailsCardPresent struct {
Offline *ChargePaymentMethodDetailsCardPresentOffline `json:"offline"`
// Defines whether the authorized amount can be over-captured or not
OvercaptureSupported bool `json:"overcapture_supported"`
// EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
PreferredLocales []string `json:"preferred_locales"`
// How card details were read in this transaction.
ReadMethod string `json:"read_method"`
// A collection of fields required to be displayed on receipts. Only required for EMV transactions.
Expand Down
6 changes: 3 additions & 3 deletions checkout_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ const (
CheckoutSessionRedirectOnCompletionNever CheckoutSessionRedirectOnCompletion = "never"
)

// Controls which payment methods are eligible to be redisplayed to returning customers. Corresponds to `allow_redisplay` on the payment method.
// Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with 'allow_redisplay: ‘always' are shown in Checkout.
type CheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilter string

// List of values that CheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilter can take
Expand Down Expand Up @@ -1729,7 +1729,7 @@ type CheckoutSessionPhoneNumberCollectionParams struct {

// Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode.
type CheckoutSessionSavedPaymentMethodOptionsParams struct {
// Controls which payment methods are eligible to be redisplayed to returning customers. Corresponds to `allow_redisplay` on the payment method.
// Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with 'allow_redisplay: ‘always' are shown in Checkout.
AllowRedisplayFilters []*string `form:"allow_redisplay_filters"`
// Enable customers to choose if they wish to save their payment method for future use. Disabled by default.
PaymentMethodSave *string `form:"payment_method_save"`
Expand Down Expand Up @@ -2688,7 +2688,7 @@ type CheckoutSessionPhoneNumberCollection struct {

// Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode.
type CheckoutSessionSavedPaymentMethodOptions struct {
// Controls which payment methods are eligible to be redisplayed to returning customers. Corresponds to `allow_redisplay` on the payment method.
// Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with 'allow_redisplay: ‘always' are shown in Checkout.
AllowRedisplayFilters []CheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilter `json:"allow_redisplay_filters"`
// Enable customers to choose if they wish to save their payment method for future use. Disabled by default.
PaymentMethodSave CheckoutSessionSavedPaymentMethodOptionsPaymentMethodSave `json:"payment_method_save"`
Expand Down
2 changes: 2 additions & 0 deletions confirmationtoken.go
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,8 @@ type ConfirmationTokenPaymentMethodPreviewCardPresent struct {
Last4 string `json:"last4"`
// Contains information about card networks that can be used to process the payment.
Networks *ConfirmationTokenPaymentMethodPreviewCardPresentNetworks `json:"networks"`
// EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
PreferredLocales []string `json:"preferred_locales"`
// How card details were read in this transaction.
ReadMethod ConfirmationTokenPaymentMethodPreviewCardPresentReadMethod `json:"read_method"`
}
Expand Down
6 changes: 6 additions & 0 deletions dispute.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ type DisputePaymentMethodDetailsType string
// List of values that DisputePaymentMethodDetailsType can take
const (
DisputePaymentMethodDetailsTypeCard DisputePaymentMethodDetailsType = "card"
DisputePaymentMethodDetailsTypeKlarna DisputePaymentMethodDetailsType = "klarna"
DisputePaymentMethodDetailsTypePaypal DisputePaymentMethodDetailsType = "paypal"
)

Expand Down Expand Up @@ -226,6 +227,10 @@ type DisputePaymentMethodDetailsCard struct {
// The card network's specific dispute reason code, which maps to one of Stripe's primary dispute categories to simplify response guidance. The [Network code map](https://stripe.com/docs/disputes/categories#network-code-map) lists all available dispute reason codes by network.
NetworkReasonCode string `json:"network_reason_code"`
}
type DisputePaymentMethodDetailsKlarna struct {
// The reason for the dispute as defined by Klarna
ReasonCode string `json:"reason_code"`
}
type DisputePaymentMethodDetailsPaypal struct {
// The ID of the dispute in PayPal.
CaseID string `json:"case_id"`
Expand All @@ -234,6 +239,7 @@ type DisputePaymentMethodDetailsPaypal struct {
}
type DisputePaymentMethodDetails struct {
Card *DisputePaymentMethodDetailsCard `json:"card"`
Klarna *DisputePaymentMethodDetailsKlarna `json:"klarna"`
Paypal *DisputePaymentMethodDetailsPaypal `json:"paypal"`
// Payment method type.
Type DisputePaymentMethodDetailsType `json:"type"`
Expand Down
4 changes: 4 additions & 0 deletions entitlements_feature.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ import "encoding/json"
// Retrieve a list of features
type EntitlementsFeatureListParams struct {
ListParams `form:"*"`
// If set, filter results to only include features with the given archive status.
Archived *bool `form:"archived"`
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
// If set, filter results to only include features with the given lookup_key.
LookupKey *string `form:"lookup_key"`
}

// AddExpand appends a new field to expand.
Expand Down
2 changes: 1 addition & 1 deletion invoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -2828,7 +2828,7 @@ type Invoice struct {
Application *Application `json:"application"`
// The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid.
ApplicationFeeAmount int64 `json:"application_fee_amount"`
// Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule.
// Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained.
AttemptCount int64 `json:"attempt_count"`
// Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users.
Attempted bool `json:"attempted"`
Expand Down
47 changes: 47 additions & 0 deletions issuing_dispute.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,39 @@ const (
IssuingDisputeEvidenceReasonDuplicate IssuingDisputeEvidenceReason = "duplicate"
IssuingDisputeEvidenceReasonFraudulent IssuingDisputeEvidenceReason = "fraudulent"
IssuingDisputeEvidenceReasonMerchandiseNotAsDescribed IssuingDisputeEvidenceReason = "merchandise_not_as_described"
IssuingDisputeEvidenceReasonNoValidAuthorization IssuingDisputeEvidenceReason = "no_valid_authorization"
IssuingDisputeEvidenceReasonNotReceived IssuingDisputeEvidenceReason = "not_received"
IssuingDisputeEvidenceReasonOther IssuingDisputeEvidenceReason = "other"
IssuingDisputeEvidenceReasonServiceNotAsDescribed IssuingDisputeEvidenceReason = "service_not_as_described"
)

// The enum that describes the dispute loss outcome. If the dispute is not lost, this field will be absent. New enum values may be added in the future, so be sure to handle unknown values.
type IssuingDisputeLossReason string

// List of values that IssuingDisputeLossReason can take
const (
IssuingDisputeLossReasonCardholderAuthenticationIssuerLiability IssuingDisputeLossReason = "cardholder_authentication_issuer_liability"
IssuingDisputeLossReasonEci5TokenTransactionWithTavv IssuingDisputeLossReason = "eci5_token_transaction_with_tavv"
IssuingDisputeLossReasonExcessDisputesInTimeframe IssuingDisputeLossReason = "excess_disputes_in_timeframe"
IssuingDisputeLossReasonHasNotMetTheMinimumDisputeAmountRequirements IssuingDisputeLossReason = "has_not_met_the_minimum_dispute_amount_requirements"
IssuingDisputeLossReasonInvalidDuplicateDispute IssuingDisputeLossReason = "invalid_duplicate_dispute"
IssuingDisputeLossReasonInvalidIncorrectAmountDispute IssuingDisputeLossReason = "invalid_incorrect_amount_dispute"
IssuingDisputeLossReasonInvalidNoAuthorization IssuingDisputeLossReason = "invalid_no_authorization"
IssuingDisputeLossReasonInvalidUseOfDisputes IssuingDisputeLossReason = "invalid_use_of_disputes"
IssuingDisputeLossReasonMerchandiseDeliveredOrShipped IssuingDisputeLossReason = "merchandise_delivered_or_shipped"
IssuingDisputeLossReasonMerchandiseOrServiceAsDescribed IssuingDisputeLossReason = "merchandise_or_service_as_described"
IssuingDisputeLossReasonNotCancelled IssuingDisputeLossReason = "not_cancelled"
IssuingDisputeLossReasonOther IssuingDisputeLossReason = "other"
IssuingDisputeLossReasonRefundIssued IssuingDisputeLossReason = "refund_issued"
IssuingDisputeLossReasonSubmittedBeyondAllowableTimeLimit IssuingDisputeLossReason = "submitted_beyond_allowable_time_limit"
IssuingDisputeLossReasonTransaction3dsRequired IssuingDisputeLossReason = "transaction_3ds_required"
IssuingDisputeLossReasonTransactionApprovedAfterPriorFraudDispute IssuingDisputeLossReason = "transaction_approved_after_prior_fraud_dispute"
IssuingDisputeLossReasonTransactionAuthorized IssuingDisputeLossReason = "transaction_authorized"
IssuingDisputeLossReasonTransactionElectronicallyRead IssuingDisputeLossReason = "transaction_electronically_read"
IssuingDisputeLossReasonTransactionQualifiesForVisaEasyPaymentService IssuingDisputeLossReason = "transaction_qualifies_for_visa_easy_payment_service"
IssuingDisputeLossReasonTransactionUnattended IssuingDisputeLossReason = "transaction_unattended"
)

// Current status of the dispute.
type IssuingDisputeStatus string

Expand Down Expand Up @@ -163,6 +191,14 @@ type IssuingDisputeEvidenceMerchandiseNotAsDescribedParams struct {
ReturnStatus *string `form:"return_status"`
}

// Evidence provided when `reason` is 'no_valid_authorization'.
type IssuingDisputeEvidenceNoValidAuthorizationParams struct {
// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
AdditionalDocumentation *string `form:"additional_documentation"`
// Explanation of why the cardholder is disputing this transaction.
Explanation *string `form:"explanation"`
}

// Evidence provided when `reason` is 'not_received'.
type IssuingDisputeEvidenceNotReceivedParams struct {
// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
Expand Down Expand Up @@ -215,6 +251,8 @@ type IssuingDisputeEvidenceParams struct {
MerchandiseNotAsDescribed *IssuingDisputeEvidenceMerchandiseNotAsDescribedParams `form:"merchandise_not_as_described"`
// Evidence provided when `reason` is 'not_received'.
NotReceived *IssuingDisputeEvidenceNotReceivedParams `form:"not_received"`
// Evidence provided when `reason` is 'no_valid_authorization'.
NoValidAuthorization *IssuingDisputeEvidenceNoValidAuthorizationParams `form:"no_valid_authorization"`
// Evidence provided when `reason` is 'other'.
Other *IssuingDisputeEvidenceOtherParams `form:"other"`
// The reason for filing the dispute. The evidence should be submitted in the field of the same name.
Expand Down Expand Up @@ -339,6 +377,12 @@ type IssuingDisputeEvidenceMerchandiseNotAsDescribed struct {
// Result of cardholder's attempt to return the product.
ReturnStatus IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatus `json:"return_status"`
}
type IssuingDisputeEvidenceNoValidAuthorization struct {
// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
AdditionalDocumentation *File `json:"additional_documentation"`
// Explanation of why the cardholder is disputing this transaction.
Explanation string `json:"explanation"`
}
type IssuingDisputeEvidenceNotReceived struct {
// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
AdditionalDocumentation *File `json:"additional_documentation"`
Expand Down Expand Up @@ -379,6 +423,7 @@ type IssuingDisputeEvidence struct {
Fraudulent *IssuingDisputeEvidenceFraudulent `json:"fraudulent"`
MerchandiseNotAsDescribed *IssuingDisputeEvidenceMerchandiseNotAsDescribed `json:"merchandise_not_as_described"`
NotReceived *IssuingDisputeEvidenceNotReceived `json:"not_received"`
NoValidAuthorization *IssuingDisputeEvidenceNoValidAuthorization `json:"no_valid_authorization"`
Other *IssuingDisputeEvidenceOther `json:"other"`
// The reason for filing the dispute. Its value will match the field containing the evidence.
Reason IssuingDisputeEvidenceReason `json:"reason"`
Expand Down Expand Up @@ -411,6 +456,8 @@ type IssuingDispute struct {
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 enum that describes the dispute loss outcome. If the dispute is not lost, this field will be absent. New enum values may be added in the future, so be sure to handle unknown values.
LossReason IssuingDisputeLossReason `json:"loss_reason"`
// 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"`
// String representing the object's type. Objects of the same type share the same value.
Expand Down
Loading

0 comments on commit 82422c3

Please sign in to comment.