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

Merged
merged 9 commits into from
Sep 21, 2023
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v532
v545
2 changes: 1 addition & 1 deletion account.go
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,7 @@ type Account struct {
// A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account.
// See the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform prefilling and account onboarding steps.
//
// Related guide: [Handling identity verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information)
// Related guide: [Handling identity verification with the API](https://stripe.com/docs/connect/handling-api-verification#person-information)
Individual *Person `json:"individual"`
// 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"`
Expand Down
24 changes: 20 additions & 4 deletions checkout_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -808,13 +808,19 @@ type CheckoutSessionCustomFieldParams struct {

// Custom text that should be displayed alongside shipping address collection.
type CheckoutSessionCustomTextShippingAddressParams struct {
// Text may be up to 1000 characters in length.
// Text may be up to 1200 characters in length.
Message *string `form:"message"`
}

// Custom text that should be displayed alongside the payment confirmation button.
type CheckoutSessionCustomTextSubmitParams struct {
// Text may be up to 1000 characters in length.
// Text may be up to 1200 characters in length.
Message *string `form:"message"`
}

// Custom text that should be displayed in place of the default terms of service agreement text.
type CheckoutSessionCustomTextTermsOfServiceAcceptanceParams struct {
// Text may be up to 1200 characters in length.
Message *string `form:"message"`
}

Expand All @@ -824,6 +830,8 @@ type CheckoutSessionCustomTextParams struct {
ShippingAddress *CheckoutSessionCustomTextShippingAddressParams `form:"shipping_address"`
// Custom text that should be displayed alongside the payment confirmation button.
Submit *CheckoutSessionCustomTextSubmitParams `form:"submit"`
// Custom text that should be displayed in place of the default terms of service agreement text.
TermsOfServiceAcceptance *CheckoutSessionCustomTextTermsOfServiceAcceptanceParams `form:"terms_of_service_acceptance"`
}

// Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided.
Expand Down Expand Up @@ -1939,20 +1947,28 @@ type CheckoutSessionCustomField struct {

// Custom text that should be displayed alongside shipping address collection.
type CheckoutSessionCustomTextShippingAddress struct {
// Text may be up to 1000 characters in length.
// Text may be up to 1200 characters in length.
Message string `json:"message"`
}

// Custom text that should be displayed alongside the payment confirmation button.
type CheckoutSessionCustomTextSubmit struct {
// Text may be up to 1000 characters in length.
// Text may be up to 1200 characters in length.
Message string `json:"message"`
}

// Custom text that should be displayed in place of the default terms of service agreement text.
type CheckoutSessionCustomTextTermsOfServiceAcceptance struct {
// Text may be up to 1200 characters in length.
Message string `json:"message"`
}
type CheckoutSessionCustomText struct {
// Custom text that should be displayed alongside shipping address collection.
ShippingAddress *CheckoutSessionCustomTextShippingAddress `json:"shipping_address"`
// Custom text that should be displayed alongside the payment confirmation button.
Submit *CheckoutSessionCustomTextSubmit `json:"submit"`
// Custom text that should be displayed in place of the default terms of service agreement text.
TermsOfServiceAcceptance *CheckoutSessionCustomTextTermsOfServiceAcceptance `json:"terms_of_service_acceptance"`
}

// The customer's tax IDs after a completed Checkout Session.
Expand Down
34 changes: 17 additions & 17 deletions file.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ const (
FilePurposeTerminalReaderSplashscreen FilePurpose = "terminal_reader_splashscreen"
)

// Returns a list of the files that your account has access to. The files are returned sorted by creation date, with the most recently created files appearing first.
// 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"`
CreatedRange *RangeQueryParams `form:"created"`
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
// The file purpose to filter queries by. If none is provided, files will not be filtered by purpose.
// Filter queries by the file purpose. If you don't provide a purpose, the queries return unfiltered files.
Purpose *string `form:"purpose"`
}

Expand All @@ -54,12 +54,12 @@ func (p *FileListParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}

// Optional parameters to automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file.
// Optional parameters that automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file.
type FileFileLinkDataParams struct {
Params `form:"*"`
// Set this to `true` to create a file link for the newly created file. Creating a link is only possible when the file's `purpose` is one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `pci_document`, `tax_document_user_upload`, or `terminal_reader_splashscreen`.
Create *bool `form:"create"`
// A future timestamp after which the link will no longer be usable.
// The link isn't available after this future timestamp.
ExpiresAt *int64 `form:"expires_at"`
// 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`.
Metadata map[string]string `form:"metadata"`
Expand All @@ -74,9 +74,9 @@ func (p *FileFileLinkDataParams) AddMetadata(key string, value string) {
p.Metadata[key] = value
}

// To upload a file to Stripe, you'll need to send a request of type multipart/form-data. The request should contain the file you would like to upload, as well as the parameters for creating a file.
// To upload a file to Stripe, you need to send a request of type multipart/form-data. Include the file you want to upload in the request, and the parameters for creating a file.
//
// All of Stripe's officially supported Client libraries should have support for sending multipart/form-data.
// All of Stripe's officially supported Client libraries support sending multipart/form-data.
type FileParams struct {
Params `form:"*"`
// Specifies which fields in the response should be expanded.
Expand All @@ -86,7 +86,7 @@ type FileParams struct {

// Filename is just the name of the file without path information.
Filename *string
// Optional parameters to automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file.
// Optional parameters that automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file.
FileLinkData *FileFileLinkDataParams `form:"file_link_data"`
// The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file.
Purpose *string `form:"purpose"`
Expand All @@ -97,20 +97,20 @@ func (p *FileParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}

// This is an object representing a file hosted on Stripe's servers. The
// file may have been uploaded by yourself using the [create file](https://stripe.com/docs/api#create_file)
// request (for example, when uploading dispute evidence) or it may have
// been created by Stripe (for example, the results of a [Sigma scheduled
// This object represents files hosted on Stripe's servers. You can upload
// files with the [create file](https://stripe.com/docs/api#create_file) request
// (for example, when uploading dispute evidence). Stripe also
// creates files independetly (for example, the results of a [Sigma scheduled
// query](https://stripe.com/docs/api#scheduled_queries)).
//
// Related guide: [File upload guide](https://stripe.com/docs/file-upload)
type File struct {
APIResource
// Time at which the object was created. Measured in seconds since the Unix epoch.
Created int64 `json:"created"`
// The time at which the file expires and is no longer available in epoch seconds.
// The file expires and isn't available at this time in epoch seconds.
ExpiresAt int64 `json:"expires_at"`
// A filename for the file, suitable for saving to a filesystem.
// The suitable name for saving the file to a filesystem.
Filename string `json:"filename"`
// Unique identifier for the object.
ID string `json:"id"`
Expand All @@ -120,13 +120,13 @@ type File struct {
Object string `json:"object"`
// The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file.
Purpose FilePurpose `json:"purpose"`
// The size in bytes of the file object.
// The size of the file object in bytes.
Size int64 `json:"size"`
// A user friendly title for the document.
// A suitable title for the document.
Title string `json:"title"`
// The type of the file returned (e.g., `csv`, `pdf`, `jpg`, or `png`).
// The returned file type (for example, `csv`, `pdf`, `jpg`, or `png`).
Type string `json:"type"`
// The URL from which the file can be downloaded using your live secret API key.
// Use your live secret API key to download the file from this URL.
URL string `json:"url"`
}

Expand Down
8 changes: 4 additions & 4 deletions filelink.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ type FileLinkListParams struct {
CreatedRange *RangeQueryParams `form:"created"`
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
// Filter links by their expiration status. By default, all links are returned.
// Filter links by their expiration status. By default, Stripe returns all links.
Expired *bool `form:"expired"`
// Only return links for the given file.
File *string `form:"file"`
Expand All @@ -62,15 +62,15 @@ func (p *FileLinkListParams) AddExpand(f string) {
}

// To share the contents of a `File` object with non-Stripe users, you can
// create a `FileLink`. `FileLink`s contain a URL that can be used to
// create a `FileLink`. `FileLink`s contain a URL that you can use to
// retrieve the contents of the file without authentication.
type FileLink struct {
APIResource
// Time at which the object was created. Measured in seconds since the Unix epoch.
Created int64 `json:"created"`
// Whether this link is already expired.
// Returns if the link is already expired.
Expired bool `json:"expired"`
// Time at which the link expires.
// Time that the link expires.
ExpiresAt int64 `json:"expires_at"`
// The file object this link points to.
File *File `json:"file"`
Expand Down
8 changes: 4 additions & 4 deletions issuing_authorization.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ func (p *IssuingAuthorizationParams) AddMetadata(key string, value string) {
p.Metadata[key] = value
}

// Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
// You can also respond directly to the webhook request to approve an authorization (preferred). More details can be found [here](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
// [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
// This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
type IssuingAuthorizationApproveParams struct {
Params `form:"*"`
// If the authorization's `pending_request.is_amount_controllable` property is `true`, you may provide this value to control how much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) to decline an authorization request).
Expand All @@ -142,8 +142,8 @@ func (p *IssuingAuthorizationApproveParams) AddMetadata(key string, value string
p.Metadata[key] = value
}

// Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
// You can also respond directly to the webhook request to decline an authorization (preferred). More details can be found [here](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
// [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
// This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
type IssuingAuthorizationDeclineParams struct {
Params `form:"*"`
// Specifies which fields in the response should be expanded.
Expand Down
5 changes: 3 additions & 2 deletions paymentintent.go
Original file line number Diff line number Diff line change
Expand Up @@ -1738,9 +1738,10 @@ type PaymentIntentParams struct {
StatementDescriptor *string `form:"statement_descriptor"`
// Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.
StatementDescriptorSuffix *string `form:"statement_descriptor_suffix"`
// The parameters used to automatically create a Transfer when the payment succeeds. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
// The parameters used to automatically create a Transfer when the payment succeeds.
// For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
TransferData *PaymentIntentTransferDataParams `form:"transfer_data"`
// A string that identifies the resulting payment as part of a group. `transfer_group` may only be provided if it has not been set. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.
// A string that identifies the resulting payment as part of a group. You can only provide `transfer_group` if it hasn't been set. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
TransferGroup *string `form:"transfer_group"`
// These parameters apply only for paymentIntent.New with `confirm=true`
// Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
Expand Down
24 changes: 20 additions & 4 deletions paymentlink.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,19 @@ type PaymentLinkCustomFieldParams struct {

// Custom text that should be displayed alongside shipping address collection.
type PaymentLinkCustomTextShippingAddressParams struct {
// Text may be up to 1000 characters in length.
// Text may be up to 1200 characters in length.
Message *string `form:"message"`
}

// Custom text that should be displayed alongside the payment confirmation button.
type PaymentLinkCustomTextSubmitParams struct {
// Text may be up to 1000 characters in length.
// Text may be up to 1200 characters in length.
Message *string `form:"message"`
}

// Custom text that should be displayed in place of the default terms of service agreement text.
type PaymentLinkCustomTextTermsOfServiceAcceptanceParams struct {
// Text may be up to 1200 characters in length.
Message *string `form:"message"`
}

Expand All @@ -272,6 +278,8 @@ type PaymentLinkCustomTextParams struct {
ShippingAddress *PaymentLinkCustomTextShippingAddressParams `form:"shipping_address"`
// Custom text that should be displayed alongside the payment confirmation button.
Submit *PaymentLinkCustomTextSubmitParams `form:"submit"`
// Custom text that should be displayed in place of the default terms of service agreement text.
TermsOfServiceAcceptance *PaymentLinkCustomTextTermsOfServiceAcceptanceParams `form:"terms_of_service_acceptance"`
}

// Default custom fields to be displayed on invoices for this customer.
Expand Down Expand Up @@ -581,20 +589,28 @@ type PaymentLinkCustomField struct {

// Custom text that should be displayed alongside shipping address collection.
type PaymentLinkCustomTextShippingAddress struct {
// Text may be up to 1000 characters in length.
// Text may be up to 1200 characters in length.
Message string `json:"message"`
}

// Custom text that should be displayed alongside the payment confirmation button.
type PaymentLinkCustomTextSubmit struct {
// Text may be up to 1000 characters in length.
// Text may be up to 1200 characters in length.
Message string `json:"message"`
}

// Custom text that should be displayed in place of the default terms of service agreement text.
type PaymentLinkCustomTextTermsOfServiceAcceptance struct {
// Text may be up to 1200 characters in length.
Message string `json:"message"`
}
type PaymentLinkCustomText struct {
// Custom text that should be displayed alongside shipping address collection.
ShippingAddress *PaymentLinkCustomTextShippingAddress `json:"shipping_address"`
// Custom text that should be displayed alongside the payment confirmation button.
Submit *PaymentLinkCustomTextSubmit `json:"submit"`
// Custom text that should be displayed in place of the default terms of service agreement text.
TermsOfServiceAcceptance *PaymentLinkCustomTextTermsOfServiceAcceptance `json:"terms_of_service_acceptance"`
}

// A list of up to 4 custom fields to be displayed on the invoice.
Expand Down
3 changes: 2 additions & 1 deletion paymentmethod.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,8 @@ type PaymentMethodCardParams struct {
ExpYear *int64 `form:"exp_year"`
// The card number, as a string without any separators.
Number *string `form:"number"`
Token *string `form:"token"`
// For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card: {token: "tok_visa"}.
Token *string `form:"token"`
}

// If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
Expand Down
Loading
Loading