Skip to content

Commit

Permalink
Merge pull request #1737 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 Sep 21, 2023
2 parents 5126919 + 4dd1f4b commit d253dcd
Show file tree
Hide file tree
Showing 21 changed files with 465 additions and 49 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
* Add support for `CashbackAmount` on `IssuingAuthorizationAmountDetails`, `IssuingAuthorizationPendingRequestAmountDetails`, `IssuingAuthorizationRequestHistoryAmountDetails`, and `IssuingTransactionAmountDetails`
* Add support for `SerialNumber` on `TerminalReaderListParams`


## 75.5.0 - 2023-09-13
* [#1735](https://github.com/stripe/stripe-go/pull/1735) Bugfix: point files.New back to files.stripe.com
* [#1731](https://github.com/stripe/stripe-go/pull/1731) Delay calculation of Stripe-User-Agent
Expand Down
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 @@ -1378,7 +1378,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
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-08-16"
previewVersion string = "2023-08-11.preview-v2"
previewVersion string = "2023-09-15.preview-v2"
)
24 changes: 20 additions & 4 deletions checkout_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -820,13 +820,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 @@ -836,6 +842,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 @@ -1953,20 +1961,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
2 changes: 0 additions & 2 deletions confirmationtoken.go
Original file line number Diff line number Diff line change
Expand Up @@ -750,8 +750,6 @@ type ConfirmationToken struct {
APIResource
// Time at which the object was created. Measured in seconds since the Unix epoch.
Created int64 `json:"created"`
// ID of the Customer this ConfirmationToken belongs to.
Customer string `json:"customer"`
// Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent. This is set to null once this ConfirmationToken has been used.
ExpiresAt int64 `json:"expires_at"`
// Unique identifier for the object.
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
Loading

0 comments on commit d253dcd

Please sign in to comment.