Skip to content

Commit

Permalink
generated code
Browse files Browse the repository at this point in the history
  • Loading branch information
pakrym-stripe committed Aug 17, 2023
1 parent 67b4ca1 commit 4a61309
Show file tree
Hide file tree
Showing 66 changed files with 1,001 additions and 311 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -548,8 +548,8 @@ If you would like to send a request to an undocumented API (for example you are

```go
import (
"github.com/stripe/stripe-go/v74"
"github.com/stripe/stripe-go/v74/form"
"github.com/stripe/stripe-go/v75"
"github.com/stripe/stripe-go/v75/form"
)

// Form-encode request params
Expand Down
7 changes: 7 additions & 0 deletions accountsession.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ type AccountSessionParams struct {
Params `form:"*"`
// The identifier of the account to create an Account Session for.
Account *string `form:"account"`
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
}

// AddExpand appends a new field to expand.
func (p *AccountSessionParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}

// An AccountSession allows a Connect platform to grant access to a connected account in Connect embedded components.
Expand Down
2 changes: 1 addition & 1 deletion accountsession/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package accountsession
import (
"net/http"

stripe "github.com/stripe/stripe-go/v74"
stripe "github.com/stripe/stripe-go/v75"
)

// Client is used to invoke /account_sessions APIs.
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 = "2022-11-15"
previewVersion string = "2023-07-13.preview-v2"
previewVersion string = "2023-08-11.preview-v2"
)
10 changes: 7 additions & 3 deletions balancetransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,13 @@ 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"`
CreatedRange *RangeQueryParams `form:"created"`
ListParams `form:"*"`
// This parameter is deprecated and we recommend listing by created and filtering in memory instead.
AvailableOn *int64 `form:"available_on"`
// This parameter is deprecated and we recommend listing by created and filtering in memory instead.
AvailableOnRange *RangeQueryParams `form:"available_on"`
Created *int64 `form:"created"`
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"`
// Specifies which fields in the response should be expanded.
Expand Down
8 changes: 0 additions & 8 deletions bankaccount.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,10 @@ const (
BankAccountFutureRequirementsErrorCodeInvalidStreetAddress BankAccountFutureRequirementsErrorCode = "invalid_street_address"
BankAccountFutureRequirementsErrorCodeInvalidTOSAcceptance BankAccountFutureRequirementsErrorCode = "invalid_tos_acceptance"
BankAccountFutureRequirementsErrorCodeInvalidValueOther BankAccountFutureRequirementsErrorCode = "invalid_value_other"
BankAccountFutureRequirementsErrorCodeVerificationDirectorsMismatch BankAccountFutureRequirementsErrorCode = "verification_directors_mismatch"
BankAccountFutureRequirementsErrorCodeVerificationDocumentAddressMismatch BankAccountFutureRequirementsErrorCode = "verification_document_address_mismatch"
BankAccountFutureRequirementsErrorCodeVerificationDocumentAddressMissing BankAccountFutureRequirementsErrorCode = "verification_document_address_missing"
BankAccountFutureRequirementsErrorCodeVerificationDocumentCorrupt BankAccountFutureRequirementsErrorCode = "verification_document_corrupt"
BankAccountFutureRequirementsErrorCodeVerificationDocumentCountryNotSupported BankAccountFutureRequirementsErrorCode = "verification_document_country_not_supported"
BankAccountFutureRequirementsErrorCodeVerificationDocumentDirectorsMismatch BankAccountFutureRequirementsErrorCode = "verification_document_directors_mismatch"
BankAccountFutureRequirementsErrorCodeVerificationDocumentDOBMismatch BankAccountFutureRequirementsErrorCode = "verification_document_dob_mismatch"
BankAccountFutureRequirementsErrorCodeVerificationDocumentDuplicateType BankAccountFutureRequirementsErrorCode = "verification_document_duplicate_type"
BankAccountFutureRequirementsErrorCodeVerificationDocumentExpired BankAccountFutureRequirementsErrorCode = "verification_document_expired"
Expand All @@ -72,7 +70,6 @@ const (
BankAccountFutureRequirementsErrorCodeVerificationDocumentPhotoMismatch BankAccountFutureRequirementsErrorCode = "verification_document_photo_mismatch"
BankAccountFutureRequirementsErrorCodeVerificationDocumentTooLarge BankAccountFutureRequirementsErrorCode = "verification_document_too_large"
BankAccountFutureRequirementsErrorCodeVerificationDocumentTypeNotSupported BankAccountFutureRequirementsErrorCode = "verification_document_type_not_supported"
BankAccountFutureRequirementsErrorCodeVerificationExtraneousDirectors BankAccountFutureRequirementsErrorCode = "verification_extraneous_directors"
BankAccountFutureRequirementsErrorCodeVerificationFailedAddressMatch BankAccountFutureRequirementsErrorCode = "verification_failed_address_match"
BankAccountFutureRequirementsErrorCodeVerificationFailedBusinessIecNumber BankAccountFutureRequirementsErrorCode = "verification_failed_business_iec_number"
BankAccountFutureRequirementsErrorCodeVerificationFailedDocumentMatch BankAccountFutureRequirementsErrorCode = "verification_failed_document_match"
Expand All @@ -84,7 +81,6 @@ const (
BankAccountFutureRequirementsErrorCodeVerificationFailedResidentialAddress BankAccountFutureRequirementsErrorCode = "verification_failed_residential_address"
BankAccountFutureRequirementsErrorCodeVerificationFailedTaxIDMatch BankAccountFutureRequirementsErrorCode = "verification_failed_tax_id_match"
BankAccountFutureRequirementsErrorCodeVerificationFailedTaxIDNotIssued BankAccountFutureRequirementsErrorCode = "verification_failed_tax_id_not_issued"
BankAccountFutureRequirementsErrorCodeVerificationMissingDirectors BankAccountFutureRequirementsErrorCode = "verification_missing_directors"
BankAccountFutureRequirementsErrorCodeVerificationMissingExecutives BankAccountFutureRequirementsErrorCode = "verification_missing_executives"
BankAccountFutureRequirementsErrorCodeVerificationMissingOwners BankAccountFutureRequirementsErrorCode = "verification_missing_owners"
BankAccountFutureRequirementsErrorCodeVerificationRequiresAdditionalMemorandumOfAssociations BankAccountFutureRequirementsErrorCode = "verification_requires_additional_memorandum_of_associations"
Expand All @@ -101,12 +97,10 @@ const (
BankAccountRequirementsErrorCodeInvalidStreetAddress BankAccountRequirementsErrorCode = "invalid_street_address"
BankAccountRequirementsErrorCodeInvalidTOSAcceptance BankAccountRequirementsErrorCode = "invalid_tos_acceptance"
BankAccountRequirementsErrorCodeInvalidValueOther BankAccountRequirementsErrorCode = "invalid_value_other"
BankAccountRequirementsErrorCodeVerificationDirectorsMismatch BankAccountRequirementsErrorCode = "verification_directors_mismatch"
BankAccountRequirementsErrorCodeVerificationDocumentAddressMismatch BankAccountRequirementsErrorCode = "verification_document_address_mismatch"
BankAccountRequirementsErrorCodeVerificationDocumentAddressMissing BankAccountRequirementsErrorCode = "verification_document_address_missing"
BankAccountRequirementsErrorCodeVerificationDocumentCorrupt BankAccountRequirementsErrorCode = "verification_document_corrupt"
BankAccountRequirementsErrorCodeVerificationDocumentCountryNotSupported BankAccountRequirementsErrorCode = "verification_document_country_not_supported"
BankAccountRequirementsErrorCodeVerificationDocumentDirectorsMismatch BankAccountRequirementsErrorCode = "verification_document_directors_mismatch"
BankAccountRequirementsErrorCodeVerificationDocumentDOBMismatch BankAccountRequirementsErrorCode = "verification_document_dob_mismatch"
BankAccountRequirementsErrorCodeVerificationDocumentDuplicateType BankAccountRequirementsErrorCode = "verification_document_duplicate_type"
BankAccountRequirementsErrorCodeVerificationDocumentExpired BankAccountRequirementsErrorCode = "verification_document_expired"
Expand All @@ -132,7 +126,6 @@ const (
BankAccountRequirementsErrorCodeVerificationDocumentPhotoMismatch BankAccountRequirementsErrorCode = "verification_document_photo_mismatch"
BankAccountRequirementsErrorCodeVerificationDocumentTooLarge BankAccountRequirementsErrorCode = "verification_document_too_large"
BankAccountRequirementsErrorCodeVerificationDocumentTypeNotSupported BankAccountRequirementsErrorCode = "verification_document_type_not_supported"
BankAccountRequirementsErrorCodeVerificationExtraneousDirectors BankAccountRequirementsErrorCode = "verification_extraneous_directors"
BankAccountRequirementsErrorCodeVerificationFailedAddressMatch BankAccountRequirementsErrorCode = "verification_failed_address_match"
BankAccountRequirementsErrorCodeVerificationFailedBusinessIecNumber BankAccountRequirementsErrorCode = "verification_failed_business_iec_number"
BankAccountRequirementsErrorCodeVerificationFailedDocumentMatch BankAccountRequirementsErrorCode = "verification_failed_document_match"
Expand All @@ -144,7 +137,6 @@ const (
BankAccountRequirementsErrorCodeVerificationFailedResidentialAddress BankAccountRequirementsErrorCode = "verification_failed_residential_address"
BankAccountRequirementsErrorCodeVerificationFailedTaxIDMatch BankAccountRequirementsErrorCode = "verification_failed_tax_id_match"
BankAccountRequirementsErrorCodeVerificationFailedTaxIDNotIssued BankAccountRequirementsErrorCode = "verification_failed_tax_id_not_issued"
BankAccountRequirementsErrorCodeVerificationMissingDirectors BankAccountRequirementsErrorCode = "verification_missing_directors"
BankAccountRequirementsErrorCodeVerificationMissingExecutives BankAccountRequirementsErrorCode = "verification_missing_executives"
BankAccountRequirementsErrorCodeVerificationMissingOwners BankAccountRequirementsErrorCode = "verification_missing_owners"
BankAccountRequirementsErrorCodeVerificationRequiresAdditionalMemorandumOfAssociations BankAccountRequirementsErrorCode = "verification_requires_additional_memorandum_of_associations"
Expand Down
4 changes: 2 additions & 2 deletions capital/financingoffer/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ package financingoffer
import (
"net/http"

stripe "github.com/stripe/stripe-go/v74"
"github.com/stripe/stripe-go/v74/form"
stripe "github.com/stripe/stripe-go/v75"
"github.com/stripe/stripe-go/v75/form"
)

// Client is used to invoke /capital/financing_offers APIs.
Expand Down
2 changes: 1 addition & 1 deletion capital/financingsummary/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package financingsummary
import (
"net/http"

stripe "github.com/stripe/stripe-go/v74"
stripe "github.com/stripe/stripe-go/v75"
)

// Client is used to invoke /capital/financing_summary APIs.
Expand Down
4 changes: 2 additions & 2 deletions capital/financingtransaction/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ package financingtransaction
import (
"net/http"

stripe "github.com/stripe/stripe-go/v74"
"github.com/stripe/stripe-go/v74/form"
stripe "github.com/stripe/stripe-go/v75"
"github.com/stripe/stripe-go/v75/form"
)

// Client is used to invoke /capital/financing_transactions APIs.
Expand Down
21 changes: 21 additions & 0 deletions capital_financingoffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,40 @@ type CapitalFinancingOfferListParams struct {
ConnectedAccount *string `form:"connected_account"`
Created *int64 `form:"created"`
CreatedRange *RangeQueryParams `form:"created"`
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
// limit list to offers with given status
Status *string `form:"status"`
}

// AddExpand appends a new field to expand.
func (p *CapitalFinancingOfferListParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}

// Get the details of the financing offer
type CapitalFinancingOfferParams struct {
Params `form:"*"`
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
}

// AddExpand appends a new field to expand.
func (p *CapitalFinancingOfferParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}

// Acknowledges that platform has received and delivered the financing_offer to
// the intended merchant recipient.
type CapitalFinancingOfferMarkDeliveredParams struct {
Params `form:"*"`
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
}

// AddExpand appends a new field to expand.
func (p *CapitalFinancingOfferMarkDeliveredParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}

// This is an object representing the terms of an offer of financing from
Expand Down
7 changes: 7 additions & 0 deletions capital_financingsummary.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ const (
// Retrieve the financing state for the account that was authenticated in the request.
type CapitalFinancingSummaryParams struct {
Params `form:"*"`
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
}

// AddExpand appends a new field to expand.
func (p *CapitalFinancingSummaryParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}

// The chronologically current repayment interval for the financing offer.
Expand Down
14 changes: 14 additions & 0 deletions capital_financingtransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ const (
// Retrieves a financing transaction for a financing offer.
type CapitalFinancingTransactionParams struct {
Params `form:"*"`
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
}

// AddExpand appends a new field to expand.
func (p *CapitalFinancingTransactionParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}

// Returns a list of financing transactions. The transactions are returned in sorted order,
Expand All @@ -42,6 +49,8 @@ type CapitalFinancingTransactionListParams struct {
ListParams `form:"*"`
// For transactions of type `paydown` and reason `automatic_withholding` only, only returns transactions that were created as a result of this charge.
Charge *string `form:"charge"`
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
// Returns transactions that were created that apply to this financing offer ID.
FinancingOffer *string `form:"financing_offer"`
// Only returns transactions that are responsible for reversing this financing transaction ID.
Expand All @@ -50,6 +59,11 @@ type CapitalFinancingTransactionListParams struct {
TreasuryTransaction *string `form:"treasury_transaction"`
}

// AddExpand appends a new field to expand.
func (p *CapitalFinancingTransactionListParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}

// This is an object representing a linked transaction on a Capital Financing Transaction.
type CapitalFinancingTransactionDetailsTransaction struct {
// The linked payment ID.
Expand Down
6 changes: 6 additions & 0 deletions charge.go
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,8 @@ type ChargeCaptureParams struct {
// An application fee amount to add on to this charge, which must be less than or equal to the original amount.
ApplicationFeeAmount *int64 `form:"application_fee_amount"`
ExchangeRate *float64 `form:"exchange_rate"`
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
// Provides industry-specific information about the charge.
PaymentDetails *ChargeCapturePaymentDetailsParams `form:"payment_details"`
// The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode.
Expand Down Expand Up @@ -1403,6 +1405,10 @@ type Charge struct {
Customer *Customer `json:"customer"`
// An arbitrary string attached to the object. Often useful for displaying to users.
Description string `json:"description"`
// ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request.
Destination *Account `json:"destination"`
// Details about the dispute if the charge has been disputed.
Dispute *Dispute `json:"dispute"`
// Whether the charge has been disputed.
Disputed bool `json:"disputed"`
// ID of the balance transaction that describes the reversal of the balance on your account due to payment failure.
Expand Down
6 changes: 6 additions & 0 deletions checkout_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -1625,6 +1625,8 @@ type CheckoutSessionSubscriptionDataParams struct {
ApplicationFeePercent *float64 `form:"application_fee_percent"`
// A future timestamp to anchor the subscription's billing cycle for new subscriptions.
BillingCycleAnchor *int64 `form:"billing_cycle_anchor"`
// The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription.
Coupon *string `form:"coupon"`
// The tax rates that will apply to any subscription item that does not have
// `tax_rates` set. Invoices created will have their `default_tax_rates` populated
// from the subscription.
Expand All @@ -1645,6 +1647,8 @@ type CheckoutSessionSubscriptionDataParams struct {
// will get before being charged for the first time. Has to be at least
// 48 hours in the future.
TrialEnd *int64 `form:"trial_end"`
// Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` on `subscription_data` is preferred. Defaults to `false`.
TrialFromPlan *bool `form:"trial_from_plan"`
// Integer representing the number of trial period days before the
// customer is charged for the first time. Has to be at least 1.
TrialPeriodDays *int64 `form:"trial_period_days"`
Expand Down Expand Up @@ -1778,6 +1782,8 @@ type CheckoutSessionParams struct {
ShippingAddressCollection *CheckoutSessionShippingAddressCollectionParams `form:"shipping_address_collection"`
// The shipping rate options to apply to this Session.
ShippingOptions []*CheckoutSessionShippingOptionParams `form:"shipping_options"`
// [Deprecated] The shipping rate to apply to this Session. Only up to one may be specified.
ShippingRates []*string `form:"shipping_rates"`
// Describes the type of transaction being performed by Checkout in order to customize
// relevant text on the page, such as the submit button. `submit_type` can only be
// specified on Checkout Sessions in `payment` mode, but not Checkout Sessions
Expand Down
Loading

0 comments on commit 4a61309

Please sign in to comment.