Skip to content

Commit

Permalink
Merge pull request #1911 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 13, 2024
2 parents 016e9b1 + 882ba9d commit 31a093a
Show file tree
Hide file tree
Showing 22 changed files with 551 additions and 83 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ jobs:
strategy:
matrix:
go:
- "1.23"
- "1.22"
- "1.21"
- "1.20"
- "1.19"
- "1.18"
- "1.17"
Expand Down
32 changes: 18 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
* Add support for new value `mb_way` on enum `PaymentLinkPaymentMethodTypes`
* Remove support for `Rechnung` on `PaymentMethodParams`

## 79.10.0 - 2024-09-05
* [#1906](https://github.com/stripe/stripe-go/pull/1906) Update generated code
* Add support for `SubscriptionItem` and `Subscription` on `BillingAlertFilterParams`

## 79.9.0 - 2024-08-29
* [#1910](https://github.com/stripe/stripe-go/pull/1910) Generate SDK for OpenAPI spec version 1230
* Add support for new value `hr_oib` on enums `CheckoutSessionCustomerDetailsTaxIdsType`, `InvoiceCustomerTaxIdsType`, `TaxCalculationCustomerDetailsTaxIdsType`, `TaxIdType`, and `TaxTransactionCustomerDetailsTaxIdsType`
* Add support for new value `issuing_regulatory_reporting` on enum `FilePurpose`
* Add support for `StatusDetails` on `TestHelpersTestClock`

## 79.9.0-beta.2 - 2024-08-22
* [#1907](https://github.com/stripe/stripe-go/pull/1907) Update generated code for beta
* Add support for `MbWayPayments` on `AccountCapabilitiesParams` and `AccountCapabilities`
Expand All @@ -29,20 +39,6 @@
* Add support for `CollectedInformation` on `CheckoutSessionParams` and `CheckoutSession`
* Add support for `ShippingOptions` on `CheckoutSessionParams`

## 79.8.0-beta.1 - 2024-08-12
* [#1900](https://github.com/stripe/stripe-go/pull/1900) Update generated code for beta
* Add support for `CapitalFinancingApplication` and `CapitalFinancing` on `AccountSessionComponents`
* Add support for `Payto` on `CheckoutSessionPaymentMethodOptionsParams` and `CheckoutSessionPaymentMethodOptions`
* Add support for new value `custom` on enum `CheckoutSessionUiMode`
* ⚠️ Remove support for `RiskCorrelationID` on `PaymentIntentConfirmPaymentMethodOptionsRechnungParams`, `PaymentIntentPaymentMethodOptionsRechnungParams`, and `PaymentIntentPaymentMethodOptionsRechnung`
* Add support for new value `payto` on enum `PaymentLinkPaymentMethodTypes`

## 79.9.0 - 2024-08-29
* [#1910](https://github.com/stripe/stripe-go/pull/1910) Generate SDK for OpenAPI spec version 1230
* Add support for new value `hr_oib` on enums `CheckoutSessionCustomerDetailsTaxIdsType`, `InvoiceCustomerTaxIdsType`, `TaxCalculationCustomerDetailsTaxIdsType`, `TaxIdType`, and `TaxTransactionCustomerDetailsTaxIdsType`
* Add support for new value `issuing_regulatory_reporting` on enum `FilePurpose`
* Add support for `StatusDetails` on `TestHelpersTestClock`

## 79.8.0 - 2024-08-15
* [#1904](https://github.com/stripe/stripe-go/pull/1904) Update generated code
* Add support for `AuthorizationCode` on `ChargePaymentMethodDetailsCard`
Expand All @@ -52,6 +48,14 @@
* Add support for `Chips` on `TreasuryOutboundPaymentTrackingDetailsUsDomesticWireParams`, `TreasuryOutboundPaymentTrackingDetailsUsDomesticWire`, `TreasuryOutboundTransferTrackingDetailsUsDomesticWireParams`, and `TreasuryOutboundTransferTrackingDetailsUsDomesticWire`
* [#1903](https://github.com/stripe/stripe-go/pull/1903) Use pinned version of staticcheck

## 79.8.0-beta.1 - 2024-08-12
* [#1900](https://github.com/stripe/stripe-go/pull/1900) Update generated code for beta
* Add support for `CapitalFinancingApplication` and `CapitalFinancing` on `AccountSessionComponents`
* Add support for `Payto` on `CheckoutSessionPaymentMethodOptionsParams` and `CheckoutSessionPaymentMethodOptions`
* Add support for new value `custom` on enum `CheckoutSessionUiMode`
* ⚠️ Remove support for `RiskCorrelationID` on `PaymentIntentConfirmPaymentMethodOptionsRechnungParams`, `PaymentIntentPaymentMethodOptionsRechnungParams`, and `PaymentIntentPaymentMethodOptionsRechnung`
* Add support for new value `payto` on enum `PaymentLinkPaymentMethodTypes`

## 79.7.0 - 2024-08-08
* [#1899](https://github.com/stripe/stripe-go/pull/1899) Update generated code
* Add support for `Activate`, `Archive`, `Deactivate`, `Get`, `List`, and `New` methods on resource `Billing.Alert`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1247
v1259
13 changes: 13 additions & 0 deletions checkout_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -1055,6 +1055,15 @@ const (
CheckoutSessionSubmitTypePay CheckoutSessionSubmitType = "pay"
)

// Indicates whether a tax ID is required on the payment page
type CheckoutSessionTaxIDCollectionRequired string

// List of values that CheckoutSessionTaxIDCollectionRequired can take
const (
CheckoutSessionTaxIDCollectionRequiredIfSupported CheckoutSessionTaxIDCollectionRequired = "if_supported"
CheckoutSessionTaxIDCollectionRequiredNever CheckoutSessionTaxIDCollectionRequired = "never"
)

// 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 CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason string

Expand Down Expand Up @@ -2311,6 +2320,8 @@ func (p *CheckoutSessionSubscriptionDataParams) AddMetadata(key string, value st
type CheckoutSessionTaxIDCollectionParams struct {
// Enable tax ID collection during checkout. Defaults to `false`.
Enabled *bool `form:"enabled"`
// Describes whether a tax ID is required during checkout. Defaults to `never`.
Required *string `form:"required"`
}

// Creates a Session object.
Expand Down Expand Up @@ -3309,6 +3320,8 @@ type CheckoutSessionShippingOption struct {
type CheckoutSessionTaxIDCollection struct {
// Indicates whether tax ID collection is enabled for the session
Enabled bool `json:"enabled"`
// Indicates whether a tax ID is required on the payment page
Required CheckoutSessionTaxIDCollectionRequired `json:"required"`
}

// The aggregated discounts.
Expand Down
8 changes: 8 additions & 0 deletions client/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,13 @@ import (
"github.com/stripe/stripe-go/v79/invoiceitem"
"github.com/stripe/stripe-go/v79/invoicelineitem"
"github.com/stripe/stripe-go/v79/invoicepayment"
"github.com/stripe/stripe-go/v79/invoicerenderingtemplate"
issuingauthorization "github.com/stripe/stripe-go/v79/issuing/authorization"
issuingcard "github.com/stripe/stripe-go/v79/issuing/card"
issuingcardholder "github.com/stripe/stripe-go/v79/issuing/cardholder"
issuingcreditunderwritingrecord "github.com/stripe/stripe-go/v79/issuing/creditunderwritingrecord"
issuingdispute "github.com/stripe/stripe-go/v79/issuing/dispute"
issuingdisputesettlementdetail "github.com/stripe/stripe-go/v79/issuing/disputesettlementdetail"
issuingpersonalizationdesign "github.com/stripe/stripe-go/v79/issuing/personalizationdesign"
issuingphysicalbundle "github.com/stripe/stripe-go/v79/issuing/physicalbundle"
issuingtoken "github.com/stripe/stripe-go/v79/issuing/token"
Expand Down Expand Up @@ -277,6 +279,8 @@ type API struct {
InvoiceLineItems *invoicelineitem.Client
// InvoicePayments is the client used to invoke /invoices/{invoice}/payments APIs.
InvoicePayments *invoicepayment.Client
// InvoiceRenderingTemplates is the client used to invoke /invoice_rendering_templates APIs.
InvoiceRenderingTemplates *invoicerenderingtemplate.Client
// Invoices is the client used to invoke /invoices APIs.
Invoices *invoice.Client
// IssuingAuthorizations is the client used to invoke /issuing/authorizations APIs.
Expand All @@ -289,6 +293,8 @@ type API struct {
IssuingCreditUnderwritingRecords *issuingcreditunderwritingrecord.Client
// IssuingDisputes is the client used to invoke /issuing/disputes APIs.
IssuingDisputes *issuingdispute.Client
// IssuingDisputeSettlementDetails is the client used to invoke /issuing/dispute_settlement_details APIs.
IssuingDisputeSettlementDetails *issuingdisputesettlementdetail.Client
// IssuingPersonalizationDesigns is the client used to invoke /issuing/personalization_designs APIs.
IssuingPersonalizationDesigns *issuingpersonalizationdesign.Client
// IssuingPhysicalBundles is the client used to invoke /issuing/physical_bundles APIs.
Expand Down Expand Up @@ -532,12 +538,14 @@ func (a *API) Init(key string, backends *stripe.Backends) {
a.InvoiceItems = &invoiceitem.Client{B: backends.API, Key: key}
a.InvoiceLineItems = &invoicelineitem.Client{B: backends.API, Key: key}
a.InvoicePayments = &invoicepayment.Client{B: backends.API, Key: key}
a.InvoiceRenderingTemplates = &invoicerenderingtemplate.Client{B: backends.API, Key: key}
a.Invoices = &invoice.Client{B: backends.API, Key: key}
a.IssuingAuthorizations = &issuingauthorization.Client{B: backends.API, Key: key}
a.IssuingCardholders = &issuingcardholder.Client{B: backends.API, Key: key}
a.IssuingCards = &issuingcard.Client{B: backends.API, Key: key}
a.IssuingCreditUnderwritingRecords = &issuingcreditunderwritingrecord.Client{B: backends.API, Key: key}
a.IssuingDisputes = &issuingdispute.Client{B: backends.API, Key: key}
a.IssuingDisputeSettlementDetails = &issuingdisputesettlementdetail.Client{B: backends.API, Key: key}
a.IssuingPersonalizationDesigns = &issuingpersonalizationdesign.Client{B: backends.API, Key: key}
a.IssuingPhysicalBundles = &issuingphysicalbundle.Client{B: backends.API, Key: key}
a.IssuingTokens = &issuingtoken.Client{B: backends.API, Key: key}
Expand Down
4 changes: 4 additions & 0 deletions customer.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ type CustomerInvoiceSettingsCustomFieldParams struct {
type CustomerInvoiceSettingsRenderingOptionsParams 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"`
// ID of the invoice rendering template to use for future invoices.
Template *string `form:"template"`
}

// Default invoice settings for this customer.
Expand Down Expand Up @@ -295,6 +297,8 @@ type CustomerInvoiceSettingsCustomField struct {
type CustomerInvoiceSettingsRenderingOptions struct {
// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
AmountTaxDisplay string `json:"amount_tax_display"`
// ID of the invoice rendering template to be used for this customer's invoices. If set, the template will be used on all invoices for this customer unless a template is set directly on the invoice.
Template string `json:"template"`
}
type CustomerInvoiceSettings struct {
// Default custom fields to be displayed on invoices for this customer.
Expand Down
4 changes: 4 additions & 0 deletions event.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,14 @@ const (
EventTypeIssuingDisputeFundsRescinded EventType = "issuing_dispute.funds_rescinded"
EventTypeIssuingDisputeSubmitted EventType = "issuing_dispute.submitted"
EventTypeIssuingDisputeUpdated EventType = "issuing_dispute.updated"
EventTypeIssuingDisputeSettlementDetailCreated EventType = "issuing_dispute_settlement_detail.created"
EventTypeIssuingDisputeSettlementDetailUpdated EventType = "issuing_dispute_settlement_detail.updated"
EventTypeIssuingPersonalizationDesignActivated EventType = "issuing_personalization_design.activated"
EventTypeIssuingPersonalizationDesignDeactivated EventType = "issuing_personalization_design.deactivated"
EventTypeIssuingPersonalizationDesignRejected EventType = "issuing_personalization_design.rejected"
EventTypeIssuingPersonalizationDesignUpdated EventType = "issuing_personalization_design.updated"
EventTypeIssuingSettlementCreated EventType = "issuing_settlement.created"
EventTypeIssuingSettlementUpdated EventType = "issuing_settlement.updated"
EventTypeIssuingTokenCreated EventType = "issuing_token.created"
EventTypeIssuingTokenUpdated EventType = "issuing_token.updated"
EventTypeIssuingTransactionCreated EventType = "issuing_transaction.created"
Expand Down
8 changes: 8 additions & 0 deletions invoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,10 @@ type InvoiceRenderingParams struct {
AmountTaxDisplay *string `form:"amount_tax_display"`
// Invoice pdf rendering options
PDF *InvoiceRenderingPDFParams `form:"pdf"`
// ID of the invoice rendering template to use for this invoice.
Template *string `form:"template"`
// The specific version of invoice rendering template to use for this invoice.
TemplateVersion *int64 `form:"template_version"`
}

// The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
Expand Down Expand Up @@ -4751,6 +4755,10 @@ type InvoiceRendering struct {
AmountTaxDisplay string `json:"amount_tax_display"`
// Invoice pdf rendering options
PDF *InvoiceRenderingPDF `json:"pdf"`
// ID of the rendering template that the invoice is formatted by.
Template string `json:"template"`
// Version of the rendering template that the invoice is using.
TemplateVersion int64 `json:"template_version"`
}

// The taxes applied to the shipping rate.
Expand Down
93 changes: 93 additions & 0 deletions invoicerenderingtemplate.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
//
//
// File generated from our OpenAPI spec
//
//

package stripe

// The status of the template, one of `active` or `archived`.
type InvoiceRenderingTemplateStatus string

// List of values that InvoiceRenderingTemplateStatus can take
const (
InvoiceRenderingTemplateStatusActive InvoiceRenderingTemplateStatus = "active"
InvoiceRenderingTemplateStatusArchived InvoiceRenderingTemplateStatus = "archived"
)

// List all templates, ordered by creation date, with the most recently created template appearing first.
type InvoiceRenderingTemplateListParams struct {
ListParams `form:"*"`
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
Status *string `form:"status"`
}

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

// Retrieves an invoice rendering template with the given ID. It by default returns the latest version of the template. Optionally, specify a version to see previous versions.
type InvoiceRenderingTemplateParams struct {
Params `form:"*"`
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
Version *int64 `form:"version"`
}

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

// Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it.
type InvoiceRenderingTemplateArchiveParams 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 *InvoiceRenderingTemplateArchiveParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}

// Unarchive an invoice rendering template so it can be used on new Stripe objects again.
type InvoiceRenderingTemplateUnarchiveParams 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 *InvoiceRenderingTemplateUnarchiveParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}

type InvoiceRenderingTemplate struct {
APIResource
// Time at which the object was created. Measured in seconds since the Unix epoch.
Created int64 `json:"created"`
// Unique identifier for the object.
ID string `json:"id"`
// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
Livemode bool `json:"livemode"`
// 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"`
// A brief description of the template, hidden from customers
Nickname string `json:"nickname"`
// String representing the object's type. Objects of the same type share the same value.
Object string `json:"object"`
// The status of the template, one of `active` or `archived`.
Status InvoiceRenderingTemplateStatus `json:"status"`
// Version of this template; version increases by one when an update on the template changes any field that controls invoice rendering
Version int64 `json:"version"`
}

// InvoiceRenderingTemplateList is a list of InvoiceRenderingTemplates as retrieved from a list endpoint.
type InvoiceRenderingTemplateList struct {
APIResource
ListMeta
Data []*InvoiceRenderingTemplate `json:"data"`
}
Loading

0 comments on commit 31a093a

Please sign in to comment.