Skip to content

Commit

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

* Update generated code for v833

* Update generated code for v835

* Update generated code for v836

* Update generated code for v837

* Update generated code for v838

* Update generated code for v839

* Update generated code for v840

* Update generated code for v840

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] committed Feb 22, 2024
1 parent 70f690c commit c14d20a
Show file tree
Hide file tree
Showing 34 changed files with 306 additions and 64 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v829
v840
6 changes: 4 additions & 2 deletions account.go
Original file line number Diff line number Diff line change
Expand Up @@ -902,8 +902,10 @@ type AccountTOSAcceptanceParams struct {

// Returns a list of accounts connected to your platform via [Connect](https://stripe.com/docs/connect). If you're not a platform, the list is empty.
type AccountListParams struct {
ListParams `form:"*"`
Created *int64 `form:"created"`
ListParams `form:"*"`
// Only return connected accounts that were created during the given date interval.
Created *int64 `form:"created"`
// Only return connected accounts that were created during the given date interval.
CreatedRange *RangeQueryParams `form:"created"`
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
Expand Down
6 changes: 4 additions & 2 deletions applicationfee.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ import "encoding/json"
type ApplicationFeeListParams struct {
ListParams `form:"*"`
// Only return application fees for the charge specified by this charge ID.
Charge *string `form:"charge"`
Created *int64 `form:"created"`
Charge *string `form:"charge"`
// Only return applications fees that were created during the given date interval.
Created *int64 `form:"created"`
// Only return applications fees that were created during the given date interval.
CreatedRange *RangeQueryParams `form:"created"`
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
Expand Down
8 changes: 5 additions & 3 deletions balancetransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,10 @@ const (
//
// Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.
type BalanceTransactionListParams struct {
ListParams `form:"*"`
Created *int64 `form:"created"`
ListParams `form:"*"`
// Only return transactions that were created during the given date interval.
Created *int64 `form:"created"`
// Only return transactions that were created during the given date interval.
CreatedRange *RangeQueryParams `form:"created"`
// Only return transactions in a certain currency. 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 *string `form:"currency"`
Expand Down Expand Up @@ -172,7 +174,7 @@ type BalanceTransactionFeeDetail struct {
Currency Currency `json:"currency"`
// An arbitrary string attached to the object. Often useful for displaying to users.
Description string `json:"description"`
// Type of the fee, one of: `application_fee`, `stripe_fee` or `tax`.
// Type of the fee, one of: `application_fee`, `payment_method_passthrough_fee`, `stripe_fee` or `tax`.
Type string `json:"type"`
}

Expand Down
4 changes: 2 additions & 2 deletions billingportal_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const (
BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdateQuantity BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdate = "quantity"
)

// Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`.
// Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. Defaults to a value of `none` if you don't set it during creation.
type BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehavior string

// List of values that BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehavior can take
Expand Down Expand Up @@ -280,7 +280,7 @@ type BillingPortalConfigurationFeaturesSubscriptionUpdate struct {
Enabled bool `json:"enabled"`
// The list of up to 10 products that support subscription updates.
Products []*BillingPortalConfigurationFeaturesSubscriptionUpdateProduct `json:"products"`
// Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`.
// Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. Defaults to a value of `none` if you don't set it during creation.
ProrationBehavior BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehavior `json:"proration_behavior"`
}
type BillingPortalConfigurationFeatures struct {
Expand Down
6 changes: 4 additions & 2 deletions charge.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,10 @@ const (

// Returns a list of charges you've previously created. The charges are returned in sorted order, with the most recent charges appearing first.
type ChargeListParams struct {
ListParams `form:"*"`
Created *int64 `form:"created"`
ListParams `form:"*"`
// Only return charges that were created during the given date interval.
Created *int64 `form:"created"`
// Only return charges that were created during the given date interval.
CreatedRange *RangeQueryParams `form:"created"`
// Only return charges for the customer specified by this customer ID.
Customer *string `form:"customer"`
Expand Down
4 changes: 2 additions & 2 deletions checkout_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -768,9 +768,9 @@ type CheckoutSessionListCustomerDetailsParams struct {
// Returns a list of Checkout Sessions.
type CheckoutSessionListParams struct {
ListParams `form:"*"`
// Only return the Checkout Sessions that were created during the given date interval.
// Only return Checkout Sessions that were created during the given date interval.
Created *int64 `form:"created"`
// Only return the Checkout Sessions that were created during the given date interval.
// Only return Checkout Sessions that were created during the given date interval.
CreatedRange *RangeQueryParams `form:"created"`
// Only return the Checkout Sessions for the Customer specified.
Customer *string `form:"customer"`
Expand Down
4 changes: 4 additions & 0 deletions client/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,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 @@ -206,6 +207,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 @@ -414,6 +417,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
6 changes: 4 additions & 2 deletions customer.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,10 @@ type CustomerDeleteDiscountParams struct {

// Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.
type CustomerListParams struct {
ListParams `form:"*"`
Created *int64 `form:"created"`
ListParams `form:"*"`
// Only return customers that were created during the given date interval.
Created *int64 `form:"created"`
// Only return customers that were created during the given date interval.
CreatedRange *RangeQueryParams `form:"created"`
// A case-sensitive filter on the list based on the customer's `email` field. The value must be a string.
Email *string `form:"email"`
Expand Down
6 changes: 4 additions & 2 deletions event.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,10 @@ const (

// List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://stripe.com/docs/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header).
type EventListParams struct {
ListParams `form:"*"`
Created *int64 `form:"created"`
ListParams `form:"*"`
// Only return events that were created during the given date interval.
Created *int64 `form:"created"`
// Only return events that were created during the given date interval.
CreatedRange *RangeQueryParams `form:"created"`
// Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned.
DeliverySuccess *bool `form:"delivery_success"`
Expand Down
6 changes: 4 additions & 2 deletions file.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ const (

// Returns a list of the files that your account has access to. Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top.
type FileListParams struct {
ListParams `form:"*"`
Created *int64 `form:"created"`
ListParams `form:"*"`
// Only return files that were created during the given date interval.
Created *int64 `form:"created"`
// Only return files that were created during the given date interval.
CreatedRange *RangeQueryParams `form:"created"`
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
Expand Down
6 changes: 4 additions & 2 deletions filelink.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ import "github.com/stripe/stripe-go/v76/form"

// Returns a list of file links.
type FileLinkListParams struct {
ListParams `form:"*"`
Created *int64 `form:"created"`
ListParams `form:"*"`
// Only return links that were created during the given date interval.
Created *int64 `form:"created"`
// Only return links that were created during the given date interval.
CreatedRange *RangeQueryParams `form:"created"`
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
Expand Down
10 changes: 8 additions & 2 deletions identity_verificationreport.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,12 @@ const (

// List all verification reports.
type IdentityVerificationReportListParams struct {
ListParams `form:"*"`
Created *int64 `form:"created"`
ListParams `form:"*"`
// A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
ClientReferenceID *string `form:"client_reference_id"`
// Only return VerificationReports that were created during the given date interval.
Created *int64 `form:"created"`
// Only return VerificationReports that were created during the given date interval.
CreatedRange *RangeQueryParams `form:"created"`
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
Expand Down Expand Up @@ -285,6 +289,8 @@ type IdentityVerificationReportSelfie struct {
// Related guides: [Accessing verification results](https://stripe.com/docs/identity/verification-sessions#results).
type IdentityVerificationReport struct {
APIResource
// A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
ClientReferenceID string `json:"client_reference_id"`
// Time at which the object was created. Measured in seconds since the Unix epoch.
Created int64 `json:"created"`
// Result from a document check
Expand Down
12 changes: 10 additions & 2 deletions identity_verificationsession.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,12 @@ const (

// Returns a list of VerificationSessions
type IdentityVerificationSessionListParams struct {
ListParams `form:"*"`
Created *int64 `form:"created"`
ListParams `form:"*"`
// A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
ClientReferenceID *string `form:"client_reference_id"`
// Only return VerificationSessions that were created during the given date interval.
Created *int64 `form:"created"`
// Only return VerificationSessions that were created during the given date interval.
CreatedRange *RangeQueryParams `form:"created"`
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
Expand Down Expand Up @@ -120,6 +124,8 @@ type IdentityVerificationSessionOptionsParams struct {
// Related guide: [Verify your users' identity documents](https://stripe.com/docs/identity/verify-identity-documents)
type IdentityVerificationSessionParams struct {
Params `form:"*"`
// A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
ClientReferenceID *string `form:"client_reference_id"`
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
// 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`.
Expand Down Expand Up @@ -260,6 +266,8 @@ type IdentityVerificationSessionVerifiedOutputs struct {
// Related guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions)
type IdentityVerificationSession struct {
APIResource
// A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
ClientReferenceID string `json:"client_reference_id"`
// The short-lived client secret used by Stripe.js to [show a verification modal](https://stripe.com/docs/js/identity/modal) inside your app. This client secret expires after 24 hours and can only be used once. Don't store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on [passing the client secret to the frontend](https://stripe.com/docs/identity/verification-sessions#client-secret) to learn more.
ClientSecret string `json:"client_secret"`
// Time at which the object was created. Measured in seconds since the Unix epoch.
Expand Down
14 changes: 8 additions & 6 deletions invoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ type InvoiceParams struct {
OnBehalfOf *string `form:"on_behalf_of"`
// Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
PaymentSettings *InvoicePaymentSettingsParams `form:"payment_settings"`
// How to handle pending invoice items on invoice creation. One of `include` or `exclude`. `include` will include any pending invoice items, and will create an empty draft invoice if no pending invoice items exist. `exclude` will always create an empty invoice draft regardless if there are pending invoice items or not. Defaults to `exclude` if the parameter is omitted.
// How to handle pending invoice items on invoice creation. Defaults to `exclude` if the parameter is omitted.
PendingInvoiceItemsBehavior *string `form:"pending_invoice_items_behavior"`
// The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
Rendering *InvoiceRenderingParams `form:"rendering"`
Expand Down Expand Up @@ -600,9 +600,11 @@ type InvoiceTransferDataParams struct {
type InvoiceListParams struct {
ListParams `form:"*"`
// The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`.
CollectionMethod *string `form:"collection_method"`
Created *int64 `form:"created"`
CreatedRange *RangeQueryParams `form:"created"`
CollectionMethod *string `form:"collection_method"`
// Only return invoices that were created during the given date interval.
Created *int64 `form:"created"`
// Only return invoices that were created during the given date interval.
CreatedRange *RangeQueryParams `form:"created"`
// Only return invoices for the customer specified by this customer ID.
Customer *string `form:"customer"`
DueDate *int64 `form:"due_date"`
Expand Down Expand Up @@ -793,7 +795,7 @@ type InvoiceUpcomingParams struct {
SubscriptionDefaultTaxRates []*string `form:"subscription_default_tax_rates"`
// A list of up to 20 subscription items, each with an attached price.
SubscriptionItems []*SubscriptionItemsParams `form:"subscription_items"`
// Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
// Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
SubscriptionProrationBehavior *string `form:"subscription_proration_behavior"`
// If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'.
SubscriptionProrationDate *int64 `form:"subscription_proration_date"`
Expand Down Expand Up @@ -1079,7 +1081,7 @@ type InvoiceUpcomingLinesParams struct {
SubscriptionDefaultTaxRates []*string `form:"subscription_default_tax_rates"`
// A list of up to 20 subscription items, each with an attached price.
SubscriptionItems []*InvoiceUpcomingLinesSubscriptionItemParams `form:"subscription_items"`
// Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
// Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
SubscriptionProrationBehavior *string `form:"subscription_proration_behavior"`
// If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'.
SubscriptionProrationDate *int64 `form:"subscription_proration_date"`
Expand Down
6 changes: 4 additions & 2 deletions invoiceitem.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,10 @@ type InvoiceItemPriceDataParams struct {

// Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first.
type InvoiceItemListParams struct {
ListParams `form:"*"`
Created *int64 `form:"created"`
ListParams `form:"*"`
// Only return invoice items that were created during the given date interval.
Created *int64 `form:"created"`
// Only return invoice items that were created during the given date interval.
CreatedRange *RangeQueryParams `form:"created"`
// The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned.
Customer *string `form:"customer"`
Expand Down

0 comments on commit c14d20a

Please sign in to comment.