Skip to content

Commit

Permalink
Merge pull request #1742 from stripe/richardm-fix-incompatible-combin…
Browse files Browse the repository at this point in the history
…ation

Beta: fix incompatible combination
  • Loading branch information
richardm-stripe authored Sep 27, 2023
2 parents fc3a301 + 6f3dfef commit 2cdc115
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions invoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ func (p *InvoiceSearchParams) AddExpand(f string) {
}

// The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
type InvoiceUpcomingAutomaticTaxLiabilityParams struct {
type InvoiceAutomaticTaxLiabilityParams struct {
// The connected account being referenced when `type` is `account`.
Account *string `form:"account"`
// Type of the account referenced in the request.
Expand All @@ -268,8 +268,6 @@ type InvoiceAutomaticTaxParams struct {
Enabled *bool `form:"enabled"`
// The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
Liability *InvoiceAutomaticTaxLiabilityParams `form:"liability"`
// The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
LiabilityTODOINCOMPATIBLECOMBINATION *InvoiceUpcomingAutomaticTaxLiabilityParams `form:"liabilityTODO_INCOMPATIBLE_COMBINATION"`
}
type InvoiceUpcomingAutomaticTaxParams struct {
Enabled *bool `form:"enabled"`
Expand Down Expand Up @@ -314,7 +312,7 @@ type InvoiceUpcomingCustomerDetailsParams struct {
}

// Time span for the redeemed discount.
type InvoiceUpcomingDiscountDiscountEndDurationParams struct {
type InvoiceDiscountDiscountEndDurationParams struct {
// Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
Interval *string `form:"interval"`
// The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
Expand All @@ -325,8 +323,6 @@ type InvoiceUpcomingDiscountDiscountEndDurationParams struct {
type InvoiceDiscountDiscountEndParams struct {
// Time span for the redeemed discount.
Duration *InvoiceDiscountDiscountEndDurationParams `form:"duration"`
// Time span for the redeemed discount.
DurationTODOINCOMPATIBLECOMBINATION *InvoiceUpcomingDiscountDiscountEndDurationParams `form:"durationTODO_INCOMPATIBLE_COMBINATION"`
// A precise Unix timestamp for the discount to end. Must be in the future.
Timestamp *int64 `form:"timestamp"`
// The type of calculation made to determine when the discount ends.
Expand Down Expand Up @@ -490,14 +486,6 @@ func (p *InvoiceUpcomingParams) AppendTo(body *form.Values, keyParts []string) {
}
}

// The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
type InvoiceAutomaticTaxLiabilityParams struct {
// The connected account being referenced when `type` is `account`.
Account *string `form:"account"`
// Type of the account referenced in the request.
Type *string `form:"type"`
}

// A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields.
type InvoiceCustomFieldParams struct {
// The name of the custom field. This may be up to 30 characters.
Expand All @@ -506,14 +494,6 @@ type InvoiceCustomFieldParams struct {
Value *string `form:"value"`
}

// Time span for the redeemed discount.
type InvoiceDiscountDiscountEndDurationParams struct {
// Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
Interval *string `form:"interval"`
// The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
IntervalCount *int64 `form:"interval_count"`
}

// The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
type InvoiceIssuerParams struct {
// The connected account being referenced when `type` is `account`.
Expand Down

0 comments on commit 2cdc115

Please sign in to comment.