Skip to content

Commit

Permalink
Merge pull request #1815 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 Feb 22, 2024
2 parents 9f3f6cc + f0f7260 commit 33114bb
Show file tree
Hide file tree
Showing 37 changed files with 344 additions and 72 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 76.18.0 - 2024-02-22
* [#1814](https://github.com/stripe/stripe-go/pull/1814) Update generated code
* Add support for `ClientReferenceID` on `IdentityVerificationReportListParams`, `IdentityVerificationReport`, `IdentityVerificationSessionListParams`, `IdentityVerificationSessionParams`, and `IdentityVerificationSession`
* Remove support for value `service_tax` from enum `TaxRateTaxType`
* Add support for `Created` on `TreasuryOutboundPaymentListParams`

## 76.18.0-beta.1 - 2024-02-16
* [#1813](https://github.com/stripe/stripe-go/pull/1813) Update generated code for beta
* Add support for `DecrementAuthorization` method on resource `PaymentIntent`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v831
v840
6 changes: 4 additions & 2 deletions account.go
Original file line number Diff line number Diff line change
Expand Up @@ -946,8 +946,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
2 changes: 1 addition & 1 deletion api_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ package stripe

const (
apiVersion string = "2023-10-16"
previewVersion string = "2023-12-11.preview-v2"
previewVersion string = "2024-02-15.preview-v2"
)
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
8 changes: 5 additions & 3 deletions capital_financingoffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ const (
type CapitalFinancingOfferListParams struct {
ListParams `form:"*"`
// limit list to offers belonging to given connected account
ConnectedAccount *string `form:"connected_account"`
Created *int64 `form:"created"`
CreatedRange *RangeQueryParams `form:"created"`
ConnectedAccount *string `form:"connected_account"`
// Only return offers that were created during the given date interval.
Created *int64 `form:"created"`
// Only return offers 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"`
// limit list to offers with given status
Expand Down
6 changes: 4 additions & 2 deletions charge.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,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 @@ -779,9 +779,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 @@ -60,6 +60,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"
"github.com/stripe/stripe-go/v76/invoicepayment"
issuingauthorization "github.com/stripe/stripe-go/v76/issuing/authorization"
issuingcard "github.com/stripe/stripe-go/v76/issuing/card"
Expand Down Expand Up @@ -253,6 +254,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
// InvoicePayments is the client used to invoke /invoices/{invoice}/payments APIs.
InvoicePayments *invoicepayment.Client
// Invoices is the client used to invoke /invoices APIs.
Expand Down Expand Up @@ -495,6 +498,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.InvoicePayments = &invoicepayment.Client{B: backends.API, Key: key}
a.Invoices = &invoice.Client{B: backends.API, Key: key}
a.IssuingAuthorizations = &issuingauthorization.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 @@ -302,8 +302,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
Loading

0 comments on commit 33114bb

Please sign in to comment.