Skip to content

Commit

Permalink
Merge upstream and update generated code for v458
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Aug 10, 2023
2 parents e525a23 + 7889425 commit e3d7fa3
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v457
v458
39 changes: 39 additions & 0 deletions invoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,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 @@ -564,6 +574,19 @@ type InvoicePaymentSettingsParams struct {
PaymentMethodTypes []*string `form:"payment_method_types"`
}

// 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 {
// Invoice pdf rendering options
PDF *InvoiceRenderingPDFParams `form:"pdf"`
}

// 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.
Expand Down Expand Up @@ -706,6 +729,8 @@ 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"`
// 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"`
// Options for invoice PDF rendering.
RenderingOptions *InvoiceRenderingOptionsParams `form:"rendering_options"`
// Settings for the cost of shipping for this invoice.
Expand Down Expand Up @@ -1229,6 +1254,18 @@ type InvoicePaymentSettings struct {
PaymentMethodTypes []InvoicePaymentSettingsPaymentMethodType `json:"payment_method_types"`
}

// 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 {
// Invoice pdf rendering options
PDF *InvoiceRenderingPDF `json:"pdf"`
}

// Options for invoice PDF rendering.
type InvoiceRenderingOptions struct {
// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
Expand Down Expand Up @@ -1487,6 +1524,8 @@ 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"`
// 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"`
// Options for invoice PDF rendering.
RenderingOptions *InvoiceRenderingOptions `json:"rendering_options"`
// The details of the cost of shipping, including the ShippingRate applied on the invoice.
Expand Down

0 comments on commit e3d7fa3

Please sign in to comment.