Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beta: fix incompatible combination #1742

Merged
merged 1 commit into from
Sep 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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