Skip to content

Commit

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

* Update generated code for v548

* Update generated code for v549

* Update generated code for v550

* Update generated code for v550

* Update generated code for v551

* Update generated code for v552

* Update generated code for v557

* Update generated code for v560

* Update generated code for v561

* Update generated code for v562

* Update generated code for v563

* Update generated code for v565

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Co-authored-by: Richard Marmorstein <[email protected]>
  • Loading branch information
stripe-openapi[bot] and richardm-stripe authored Sep 28, 2023
1 parent 6b2afac commit 6a4de61
Show file tree
Hide file tree
Showing 12 changed files with 221 additions and 156 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v545
v565
2 changes: 1 addition & 1 deletion billingportal_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ type BillingPortalSessionFlowSubscriptionUpdateConfirmDiscount struct {
type BillingPortalSessionFlowSubscriptionUpdateConfirmItem struct {
// The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated.
ID string `json:"id"`
// The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products).
// The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products).
Price string `json:"price"`
// [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow.
Quantity int64 `json:"quantity"`
Expand Down
2 changes: 1 addition & 1 deletion customercashbalancetransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (p *CustomerCashBalanceTransactionListParams) AddExpand(f string) {
}

type CustomerCashBalanceTransactionAdjustedForOverdraft struct {
// The [Balance Transaction](docs/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance.
// The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance.
BalanceTransaction *BalanceTransaction `json:"balance_transaction"`
// The [Cash Balance Transaction](https://stripe.com/docs/api/cash_balance_transactions/object) that brought the customer balance negative, triggering the clawback of funds.
LinkedTransaction *CustomerCashBalanceTransaction `json:"linked_transaction"`
Expand Down
14 changes: 7 additions & 7 deletions event.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ const (
EventTypeIssuingTransactionCreated EventType = "issuing_transaction.created"
EventTypeIssuingTransactionUpdated EventType = "issuing_transaction.updated"
EventTypeMandateUpdated EventType = "mandate.updated"
EventTypeOrderCreated EventType = "order.created"
EventTypePaymentIntentAmountCapturableUpdated EventType = "payment_intent.amount_capturable_updated"
EventTypePaymentIntentCanceled EventType = "payment_intent.canceled"
EventTypePaymentIntentCreated EventType = "payment_intent.created"
Expand Down Expand Up @@ -160,9 +159,6 @@ const (
EventTypeQuoteFinalized EventType = "quote.finalized"
EventTypeRadarEarlyFraudWarningCreated EventType = "radar.early_fraud_warning.created"
EventTypeRadarEarlyFraudWarningUpdated EventType = "radar.early_fraud_warning.updated"
EventTypeRecipientCreated EventType = "recipient.created"
EventTypeRecipientDeleted EventType = "recipient.deleted"
EventTypeRecipientUpdated EventType = "recipient.updated"
EventTypeRefundCreated EventType = "refund.created"
EventTypeRefundUpdated EventType = "refund.updated"
EventTypeReportingReportRunFailed EventType = "reporting.report_run.failed"
Expand All @@ -176,9 +172,6 @@ const (
EventTypeSetupIntentSetupFailed EventType = "setup_intent.setup_failed"
EventTypeSetupIntentSucceeded EventType = "setup_intent.succeeded"
EventTypeSigmaScheduledQueryRunCreated EventType = "sigma.scheduled_query_run.created"
EventTypeSKUCreated EventType = "sku.created"
EventTypeSKUDeleted EventType = "sku.deleted"
EventTypeSKUUpdated EventType = "sku.updated"
EventTypeSourceCanceled EventType = "source.canceled"
EventTypeSourceChargeable EventType = "source.chargeable"
EventTypeSourceFailed EventType = "source.failed"
Expand Down Expand Up @@ -240,6 +233,13 @@ const (
EventTypeTreasuryReceivedCreditSucceeded EventType = "treasury.received_credit.succeeded"
EventTypeTreasuryReceivedDebitCreated EventType = "treasury.received_debit.created"
EventTypeInvoiceItemUpdated EventType = "invoiceitem.updated"
EventTypeOrderCreated EventType = "order.created"
EventTypeRecipientCreated EventType = "recipient.created"
EventTypeRecipientDeleted EventType = "recipient.deleted"
EventTypeRecipientUpdated EventType = "recipient.updated"
EventTypeSKUCreated EventType = "sku.created"
EventTypeSKUDeleted EventType = "sku.deleted"
EventTypeSKUUpdated EventType = "sku.updated"
)

// 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).
Expand Down
7 changes: 7 additions & 0 deletions example/generated_examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3563,3 +3563,10 @@ func TestTestHelpersIssuingTransactionRefund(t *testing.T) {
assert.NotNil(t, result)
assert.Nil(t, err)
}

func TestSubscriptionDeleteDiscount(t *testing.T) {
params := &stripe.SubscriptionDeleteDiscountParams{}
result, err := subscription.DeleteDiscount("sub_xyz", params)
assert.NotNil(t, result)
assert.Nil(t, err)
}
51 changes: 47 additions & 4 deletions invoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,16 @@ const (
InvoicePaymentSettingsPaymentMethodTypeWeChatPay InvoicePaymentSettingsPaymentMethodType = "wechat_pay"
)

// Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale.
type InvoiceRenderingPDFPageSize string

// List of values that InvoiceRenderingPDFPageSize can take
const (
InvoiceRenderingPDFPageSizeA4 InvoiceRenderingPDFPageSize = "a4"
InvoiceRenderingPDFPageSizeAuto InvoiceRenderingPDFPageSize = "auto"
InvoiceRenderingPDFPageSizeLetter InvoiceRenderingPDFPageSize = "letter"
)

// The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
type InvoiceShippingCostTaxTaxabilityReason string

Expand Down Expand Up @@ -531,7 +541,22 @@ type InvoicePaymentSettingsParams struct {
PaymentMethodTypes []*string `form:"payment_method_types"`
}

// Options for invoice PDF rendering.
// Invoice pdf rendering options
type InvoiceRenderingPDFParams struct {
// Page size for invoice PDF. Can be set to a4, letter, or auto.
// If set to auto, page size will be switched to a4 or letter based on customer locale.
PageSize *string `form:"page_size"`
}

// The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
type InvoiceRenderingParams struct {
// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
AmountTaxDisplay *string `form:"amount_tax_display"`
// Invoice pdf rendering options
PDF *InvoiceRenderingPDFParams `form:"pdf"`
}

// This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering.
type InvoiceRenderingOptionsParams struct {
// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
AmountTaxDisplay *string `form:"amount_tax_display"`
Expand Down Expand Up @@ -686,7 +711,9 @@ type InvoiceParams struct {
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.
PendingInvoiceItemsBehavior *string `form:"pending_invoice_items_behavior"`
// Options for invoice PDF rendering.
// 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"`
// This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering.
RenderingOptions *InvoiceRenderingOptionsParams `form:"rendering_options"`
// Settings for the cost of shipping for this invoice.
ShippingCost *InvoiceShippingCostParams `form:"shipping_cost"`
Expand Down Expand Up @@ -1212,7 +1239,21 @@ type InvoicePaymentSettings struct {
PaymentMethodTypes []InvoicePaymentSettingsPaymentMethodType `json:"payment_method_types"`
}

// Options for invoice PDF rendering.
// Invoice pdf rendering options
type InvoiceRenderingPDF struct {
// Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale.
PageSize InvoiceRenderingPDFPageSize `json:"page_size"`
}

// The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
type InvoiceRendering struct {
// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
AmountTaxDisplay string `json:"amount_tax_display"`
// Invoice pdf rendering options
PDF *InvoiceRenderingPDF `json:"pdf"`
}

// This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering.
type InvoiceRenderingOptions struct {
// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
AmountTaxDisplay string `json:"amount_tax_display"`
Expand Down Expand Up @@ -1467,7 +1508,9 @@ type Invoice struct {
Quote *Quote `json:"quote"`
// This is the transaction number that appears on email receipts sent for this invoice.
ReceiptNumber string `json:"receipt_number"`
// Options for invoice PDF rendering.
// The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
Rendering *InvoiceRendering `json:"rendering"`
// This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering.
RenderingOptions *InvoiceRenderingOptions `json:"rendering_options"`
// The details of the cost of shipping, including the ShippingRate applied on the invoice.
ShippingCost *InvoiceShippingCost `json:"shipping_cost"`
Expand Down
26 changes: 13 additions & 13 deletions mandate.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package stripe

import "encoding/json"

// The type of customer acceptance information included with the Mandate. One of `online` or `offline`.
// The mandate includes the type of customer acceptance information, such as: `online` or `offline`.
type MandateCustomerAcceptanceType string

// List of values that MandateCustomerAcceptanceType can take
Expand Down Expand Up @@ -56,7 +56,7 @@ const (
MandatePaymentMethodDetailsBACSDebitNetworkStatusRevoked MandatePaymentMethodDetailsBACSDebitNetworkStatus = "revoked"
)

// The type of the payment method associated with this mandate. An additional hash is included on `payment_method_details` with a name matching this value. It contains mandate information specific to the payment method.
// This mandate corresponds with a specific payment method type. The `payment_method_details` includes an additional hash with the same name and contains mandate information that's specific to that payment method.
type MandatePaymentMethodDetailsType string

// List of values that MandatePaymentMethodDetailsType can take
Expand All @@ -71,7 +71,7 @@ const (
MandatePaymentMethodDetailsTypeUSBankAccount MandatePaymentMethodDetailsType = "us_bank_account"
)

// The status of the mandate, which indicates whether it can be used to initiate a payment.
// The mandate status indicates whether or not you can use it to initiate a payment.
type MandateStatus string

// List of values that MandateStatus can take
Expand Down Expand Up @@ -104,17 +104,17 @@ func (p *MandateParams) AddExpand(f string) {

type MandateCustomerAcceptanceOffline struct{}
type MandateCustomerAcceptanceOnline struct {
// The IP address from which the Mandate was accepted by the customer.
// The customer accepts the mandate from this IP address.
IPAddress string `json:"ip_address"`
// The user agent of the browser from which the Mandate was accepted by the customer.
// The customer accepts the mandate using the user agent of the browser.
UserAgent string `json:"user_agent"`
}
type MandateCustomerAcceptance struct {
// The time at which the customer accepted the Mandate.
// The time that the customer accepts the mandate.
AcceptedAt int64 `json:"accepted_at"`
Offline *MandateCustomerAcceptanceOffline `json:"offline"`
Online *MandateCustomerAcceptanceOnline `json:"online"`
// The type of customer acceptance information included with the Mandate. One of `online` or `offline`.
// The mandate includes the type of customer acceptance information, such as: `online` or `offline`.
Type MandateCustomerAcceptanceType `json:"type"`
}
type MandateMultiUse struct{}
Expand Down Expand Up @@ -165,18 +165,18 @@ type MandatePaymentMethodDetails struct {
Link *MandatePaymentMethodDetailsLink `json:"link"`
Paypal *MandatePaymentMethodDetailsPaypal `json:"paypal"`
SEPADebit *MandatePaymentMethodDetailsSEPADebit `json:"sepa_debit"`
// The type of the payment method associated with this mandate. An additional hash is included on `payment_method_details` with a name matching this value. It contains mandate information specific to the payment method.
// This mandate corresponds with a specific payment method type. The `payment_method_details` includes an additional hash with the same name and contains mandate information that's specific to that payment method.
Type MandatePaymentMethodDetailsType `json:"type"`
USBankAccount *MandatePaymentMethodDetailsUSBankAccount `json:"us_bank_account"`
}
type MandateSingleUse struct {
// On a single use mandate, the amount of the payment.
// The amount of the payment on a single use mandate.
Amount int64 `json:"amount"`
// On a single use mandate, the currency of the payment.
// The currency of the payment on a single use mandate.
Currency Currency `json:"currency"`
}

// A Mandate is a record of the permission a customer has given you to debit their payment method.
// A Mandate is a record of the permission that your customer gives you to debit their payment method.
type Mandate struct {
APIResource
CustomerAcceptance *MandateCustomerAcceptance `json:"customer_acceptance"`
Expand All @@ -187,13 +187,13 @@ type Mandate struct {
MultiUse *MandateMultiUse `json:"multi_use"`
// String representing the object's type. Objects of the same type share the same value.
Object string `json:"object"`
// The account (if any) for which the mandate is intended.
// The account (if any) that the mandate is intended for.
OnBehalfOf string `json:"on_behalf_of"`
// ID of the payment method associated with this mandate.
PaymentMethod *PaymentMethod `json:"payment_method"`
PaymentMethodDetails *MandatePaymentMethodDetails `json:"payment_method_details"`
SingleUse *MandateSingleUse `json:"single_use"`
// The status of the mandate, which indicates whether it can be used to initiate a payment.
// The mandate status indicates whether or not you can use it to initiate a payment.
Status MandateStatus `json:"status"`
// The type of the mandate.
Type MandateType `json:"type"`
Expand Down
Loading

0 comments on commit 6a4de61

Please sign in to comment.