Skip to content

Commit

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

* Update generated code for v600

* Update generated code for v601

* Update generated code for v602

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Co-authored-by: pakrym-stripe <[email protected]>
  • Loading branch information
stripe-openapi[bot] and pakrym-stripe authored Oct 16, 2023
1 parent df184f1 commit 3902ea2
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 25 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v596
v602
4 changes: 3 additions & 1 deletion customer.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,11 @@ type Customer struct {
// If you use payment methods created through the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead.
DefaultSource *PaymentSource `json:"default_source"`
Deleted bool `json:"deleted"`
// If Stripe bills the customer's latest invoice by automatically charging and the latest charge fails, it sets `delinquent`` to `true``. If Stripe bills the invoice by sending it, and the invoice isn't paid by the due date, it also sets `delinquent`` to `true`.
// Tracks the most recent state change on any invoice belonging to the customer. Paying an invoice or marking it uncollectible via the API will set this field to false. An automatic payment failure or passing the `invoice.due_date` will set this field to `true`.
//
// If an invoice becomes uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't reset to `false`.
//
// If you care whether the customer has paid their most recent subscription invoice, use `subscription.status` instead. Paying or marking uncollectible any customer invoice regardless of whether it is the latest invoice for a subscription will always set this field to `false`.
Delinquent bool `json:"delinquent"`
// An arbitrary string attached to the object. Often useful for displaying to users.
Description string `json:"description"`
Expand Down
2 changes: 2 additions & 0 deletions event.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ const (
EventTypeIssuingDisputeFundsReinstated EventType = "issuing_dispute.funds_reinstated"
EventTypeIssuingDisputeSubmitted EventType = "issuing_dispute.submitted"
EventTypeIssuingDisputeUpdated EventType = "issuing_dispute.updated"
EventTypeIssuingTokenCreated EventType = "issuing_token.created"
EventTypeIssuingTokenUpdated EventType = "issuing_token.updated"
EventTypeIssuingTransactionCreated EventType = "issuing_transaction.created"
EventTypeIssuingTransactionUpdated EventType = "issuing_transaction.updated"
EventTypeMandateUpdated EventType = "mandate.updated"
Expand Down
2 changes: 1 addition & 1 deletion issuing_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ type IssuingTokenNetworkData struct {
WalletProvider *IssuingTokenNetworkDataWalletProvider `json:"wallet_provider"`
}

// An issuing token object is created when an issued card is added to a digital wallet. As a [card issuer](https://stripe.com/docs/issuing), you can view and manage these tokens through Stripe.
// An issuing token object is created when an issued card is added to a digital wallet. As a [card issuer](https://stripe.com/docs/issuing), you can [view and manage these tokens](https://stripe.com/docs/issuing/controls/token-management) through Stripe.
type IssuingToken struct {
APIResource
// Card associated with this token.
Expand Down
2 changes: 1 addition & 1 deletion paymentmethodconfiguration.go
Original file line number Diff line number Diff line change
Expand Up @@ -1697,7 +1697,7 @@ type PaymentMethodConfigurationWeChatPay struct {
//
// Related guides:
// - [Payment Method Configurations API](https://stripe.com/docs/connect/payment-method-configurations)
// - [Multiple payment method configurations on dynamic payment methods](https://stripe.com/docs/payments/multiple-payment-method-configs)
// - [Multiple configurations on dynamic payment methods](https://stripe.com/docs/payments/multiple-payment-method-configs)
// - [Multiple configurations for your Connect accounts](https://stripe.com/docs/connect/multiple-payment-method-configurations)
type PaymentMethodConfiguration struct {
APIResource
Expand Down
21 changes: 0 additions & 21 deletions source.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

package stripe

import "encoding/json"

// The status of the code verification, either `pending` (awaiting verification, `attempts_remaining` should be greater than 0), `succeeded` (successful verification) or `failed` (failed verification, cannot be verified anymore as `attempts_remaining` should be 0).
type SourceCodeVerificationStatus string

Expand Down Expand Up @@ -614,22 +612,3 @@ type Source struct {
Usage SourceUsage `json:"usage"`
WeChat *SourceWeChat `json:"wechat"`
}

// UnmarshalJSON handles deserialization of a Source.
// This custom unmarshaling is needed because the resulting
// property may be an id or the full struct if it was expanded.
func (s *Source) UnmarshalJSON(data []byte) error {
if id, ok := ParseID(data); ok {
s.ID = id
return nil
}

type source Source
var v source
if err := json.Unmarshal(data, &v); err != nil {
return err
}

*s = Source(v)
return nil
}

0 comments on commit 3902ea2

Please sign in to comment.