models

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2024 License: MIT Imports: 10 Imported by: 3

Documentation

Overview

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Package advancedbilling

This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).

Index

Constants

This section is empty.

Variables

View Source
var AddSubscriptionToAGroupGroupContainer internalAddSubscriptionToAGroupGroup
View Source
var AllocationPreviewItemPreviousQuantityContainer internalAllocationPreviewItemPreviousQuantity
View Source
var AllocationPreviewItemQuantityContainer internalAllocationPreviewItemQuantity
View Source
var AllocationPreviousQuantityContainer internalAllocationPreviousQuantity
View Source
var AllocationQuantityContainer internalAllocationQuantity
View Source
var ArchiveProductPricePointPricePointIdContainer internalArchiveProductPricePointPricePointId
View Source
var ArchiveProductPricePointProductIdContainer internalArchiveProductPricePointProductId
View Source
var CalendarBillingSnapDayContainer internalCalendarBillingSnapDay
View Source
var ComponentAllocationChangeAllocatedQuantityContainer internalComponentAllocationChangeAllocatedQuantity
View Source
var ComponentPricePointAssignmentPricePointContainer internalComponentPricePointAssignmentPricePoint
View Source
var CreateAllocationPricePointIdContainer internalCreateAllocationPricePointId
View Source
var CreateComponentPricePointRequestPricePointContainer internalCreateComponentPricePointRequestPricePoint
View Source
var CreateComponentPricePointsRequestPricePointsContainer internalCreateComponentPricePointsRequestPricePoints
View Source
var CreateInvoiceCouponAmountContainer internalCreateInvoiceCouponAmount
View Source
var CreateInvoiceCouponPercentageContainer internalCreateInvoiceCouponPercentage
View Source
var CreateInvoiceCouponProductFamilyIdContainer internalCreateInvoiceCouponProductFamilyId
View Source
var CreateInvoiceItemComponentIdContainer internalCreateInvoiceItemComponentId
View Source
var CreateInvoiceItemPricePointIdContainer internalCreateInvoiceItemPricePointId
View Source
var CreateInvoiceItemProductIdContainer internalCreateInvoiceItemProductId
View Source
var CreateInvoiceItemProductPricePointIdContainer internalCreateInvoiceItemProductPricePointId
View Source
var CreateInvoiceItemQuantityContainer internalCreateInvoiceItemQuantity
View Source
var CreateInvoiceItemUnitPriceContainer internalCreateInvoiceItemUnitPrice
View Source
var CreateInvoicePaymentAmountContainer internalCreateInvoicePaymentAmount
View Source
var CreateMetafieldsRequestMetafieldsContainer internalCreateMetafieldsRequestMetafields
View Source
var CreateMultiInvoicePaymentAmountContainer internalCreateMultiInvoicePaymentAmount
View Source
var CreateOrUpdateCouponCouponContainer internalCreateOrUpdateCouponCoupon
View Source
var CreateOrUpdatePercentageCouponPercentageContainer internalCreateOrUpdatePercentageCouponPercentage
View Source
var CreateOrUpdateSegmentPriceUnitPriceContainer internalCreateOrUpdateSegmentPriceUnitPrice
View Source
var CreatePaymentProfileExpirationMonthContainer internalCreatePaymentProfileExpirationMonth
View Source
var CreatePaymentProfileExpirationYearContainer internalCreatePaymentProfileExpirationYear
View Source
var CreateProductPricePointProductIdContainer internalCreateProductPricePointProductId
View Source
var CreateSegmentSegmentProperty1ValueContainer internalCreateSegmentSegmentProperty1Value
View Source
var CreateSegmentSegmentProperty2ValueContainer internalCreateSegmentSegmentProperty2Value
View Source
var CreateSegmentSegmentProperty3ValueContainer internalCreateSegmentSegmentProperty3Value
View Source
var CreateSegmentSegmentProperty4ValueContainer internalCreateSegmentSegmentProperty4Value
View Source
var CreateSubscriptionComponentAllocatedQuantityContainer internalCreateSubscriptionComponentAllocatedQuantity
View Source
var CreateSubscriptionComponentComponentIdContainer internalCreateSubscriptionComponentComponentId
View Source
var CreateSubscriptionComponentPricePointIdContainer internalCreateSubscriptionComponentPricePointId
View Source
var CreateSubscriptionOfferIdContainer internalCreateSubscriptionOfferId
View Source
var CreateUsageComponentIdContainer internalCreateUsageComponentId
View Source
var CustomerErrorResponseErrorsContainer internalCustomerErrorResponseErrors
View Source
var DEFAULT_DATE = utilities.DEFAULT_DATE

DEFAULT_DATE is a utility.

View Source
var DeductServiceCreditAmountContainer internalDeductServiceCreditAmount
View Source
var EBBComponentUnitPriceContainer internalEBBComponentUnitPrice
View Source
var EventEventSpecificDataContainer internalEventEventSpecificData
View Source
var GetFile = https.GetFile

GetFile retrieves a file from the given fileUrl and returns it as a FileWrapper. It makes an HTTP GET request to the fileUrl to fetch the file's content and metadata.

View Source
var InvoiceEventContainer internalInvoiceEvent
View Source
var InvoiceEventPaymentContainer internalInvoiceEventPayment
View Source
var IssueServiceCreditAmountContainer internalIssueServiceCreditAmount
View Source
var ListProductPricePointsInputProductIdContainer internalListProductPricePointsInputProductId
View Source
var ListUsagesInputComponentIdContainer internalListUsagesInputComponentId
View Source
var MapAdditionalProperties = utilities.MapAdditionalProperties

MapAdditionalProperties is a utility.

View Source
var MetafieldEnumContainer internalMetafieldEnum
View Source
var MeteredComponentUnitPriceContainer internalMeteredComponentUnitPrice
View Source
var NewTypeHolder = utilities.NewTypeHolder

NewTypeHolder is a utility.

View Source
var NewTypeHolderDiscriminator = utilities.NewTypeHolderDiscriminator

NewTypeHolderDiscriminator is a utility.

View Source
var OnOffComponentUnitPriceContainer internalOnOffComponentUnitPrice
View Source
var PaymentProfileAttributesExpirationMonthContainer internalPaymentProfileAttributesExpirationMonth
View Source
var PaymentProfileAttributesExpirationYearContainer internalPaymentProfileAttributesExpirationYear
View Source
var PaymentProfileResponsePaymentProfileContainer internalPaymentProfileResponsePaymentProfile
View Source
var PrepaidUsageComponentUnitPriceContainer internalPrepaidUsageComponentUnitPrice
View Source
var PriceEndingQuantityContainer internalPriceEndingQuantity
View Source
var PriceStartingQuantityContainer internalPriceStartingQuantity
View Source
var PriceUnitPriceContainer internalPriceUnitPrice
View Source
var QuantityBasedComponentUnitPriceContainer internalQuantityBasedComponentUnitPrice
View Source
var ReactivateSubscriptionRequestResumeContainer internalReactivateSubscriptionRequestResume
View Source
var ReadProductPricePointPricePointIdContainer internalReadProductPricePointPricePointId
View Source
var ReadProductPricePointProductIdContainer internalReadProductPricePointProductId
View Source
var RefundConsolidatedInvoiceSegmentUidsContainer internalRefundConsolidatedInvoiceSegmentUids
View Source
var RefundInvoiceRequestRefundContainer internalRefundInvoiceRequestRefund
View Source
var RefundPrepaymentAmountContainer internalRefundPrepaymentAmount
View Source
var RenewalPreviewComponentComponentIdContainer internalRenewalPreviewComponentComponentId
View Source
var RenewalPreviewComponentPricePointIdContainer internalRenewalPreviewComponentPricePointId
View Source
var SegmentSegmentProperty1ValueContainer internalSegmentSegmentProperty1Value
View Source
var SegmentSegmentProperty2ValueContainer internalSegmentSegmentProperty2Value
View Source
var SegmentSegmentProperty3ValueContainer internalSegmentSegmentProperty3Value
View Source
var SegmentSegmentProperty4ValueContainer internalSegmentSegmentProperty4Value
View Source
var SubscriptionComponentAllocatedQuantityContainer internalSubscriptionComponentAllocatedQuantity
View Source
var SubscriptionCustomPriceExpirationIntervalContainer internalSubscriptionCustomPriceExpirationInterval
View Source
var SubscriptionCustomPriceInitialChargeInCentsContainer internalSubscriptionCustomPriceInitialChargeInCents
View Source
var SubscriptionCustomPriceIntervalContainer internalSubscriptionCustomPriceInterval
View Source
var SubscriptionCustomPricePriceInCentsContainer internalSubscriptionCustomPricePriceInCents
View Source
var SubscriptionCustomPriceTrialIntervalContainer internalSubscriptionCustomPriceTrialInterval
View Source
var SubscriptionCustomPriceTrialPriceInCentsContainer internalSubscriptionCustomPriceTrialPriceInCents
View Source
var SubscriptionGroupCreateErrorResponseErrorsContainer internalSubscriptionGroupCreateErrorResponseErrors
View Source
var SubscriptionGroupCreditCardExpirationMonthContainer internalSubscriptionGroupCreditCardExpirationMonth
View Source
var SubscriptionGroupCreditCardExpirationYearContainer internalSubscriptionGroupCreditCardExpirationYear
View Source
var SubscriptionGroupCreditCardFullNumberContainer internalSubscriptionGroupCreditCardFullNumber
View Source
var SubscriptionGroupSignupComponentAllocatedQuantityContainer internalSubscriptionGroupSignupComponentAllocatedQuantity
View Source
var SubscriptionGroupSignupComponentComponentIdContainer internalSubscriptionGroupSignupComponentComponentId
View Source
var SubscriptionGroupSignupComponentPricePointIdContainer internalSubscriptionGroupSignupComponentPricePointId
View Source
var SubscriptionGroupSignupComponentUnitBalanceContainer internalSubscriptionGroupSignupComponentUnitBalance
View Source
var TimeToStringMap = utilities.TimeToStringMap

TimeToStringMap is a utility.

View Source
var TimeToStringSlice = utilities.TimeToStringSlice

TimeToStringSlice is a utility.

View Source
var ToTimeMap = utilities.ToTimeMap

ToTimeMap is a utility.

View Source
var ToTimeSlice = utilities.ToTimeSlice

ToTimeSlice is a utility.

View Source
var UnmarshalAdditionalProperties = utilities.UnmarshalAdditionalProperties

UnmarshalAdditionalProperties is a utility.

View Source
var UnmarshallAnyOf = utilities.UnmarshallAnyOf

UnmarshallAnyOf is a utility.

View Source
var UnmarshallAnyOfWithDiscriminator = utilities.UnmarshallAnyOfWithDiscriminator

UnmarshallAnyOfWithDiscriminator is a utility.

View Source
var UnmarshallOneOf = utilities.UnmarshallOneOf

UnmarshallOneOf is a utility.

View Source
var UnmarshallOneOfWithDiscriminator = utilities.UnmarshallOneOfWithDiscriminator

UnmarshallOneOfWithDiscriminator is a utility.

View Source
var UpdateMetafieldsRequestMetafieldsContainer internalUpdateMetafieldsRequestMetafields
View Source
var UpdatePriceEndingQuantityContainer internalUpdatePriceEndingQuantity
View Source
var UpdatePriceStartingQuantityContainer internalUpdatePriceStartingQuantity
View Source
var UpdatePriceUnitPriceContainer internalUpdatePriceUnitPrice
View Source
var UpdateProductPricePointPricePointIdContainer internalUpdateProductPricePointPricePointId
View Source
var UpdateProductPricePointProductIdContainer internalUpdateProductPricePointProductId
View Source
var UpdateSubscriptionNetTermsContainer internalUpdateSubscriptionNetTerms
View Source
var UpdateSubscriptionSnapDayContainer internalUpdateSubscriptionSnapDay
View Source
var UsageQuantityContainer internalUsageQuantity

Functions

func ToPointer

func ToPointer[T any](value T) *T

Types

type ACHAgreement

type ACHAgreement struct {
	// (Required when providing ACH agreement params) The ACH authorization agreement terms.
	AgreementTerms *string `json:"agreement_terms,omitempty"`
	// (Required when providing ACH agreement params) The first name of the person authorizing the ACH agreement.
	AuthorizerFirstName *string `json:"authorizer_first_name,omitempty"`
	// (Required when providing ACH agreement params) The last name of the person authorizing the ACH agreement.
	AuthorizerLastName *string `json:"authorizer_last_name,omitempty"`
	// (Required when providing ACH agreement params) The IP address of the person authorizing the ACH agreement.
	IpAddress            *string        `json:"ip_address,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ACHAgreement represents a ACHAgreement struct. (Optional) If passed, the proof of the authorized ACH agreement terms will be persisted.

func (ACHAgreement) MarshalJSON

func (a ACHAgreement) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ACHAgreement. It customizes the JSON marshaling process for ACHAgreement objects.

func (*ACHAgreement) UnmarshalJSON

func (a *ACHAgreement) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ACHAgreement. It customizes the JSON unmarshaling process for ACHAgreement objects.

type AccountBalance

type AccountBalance struct {
	// The balance in cents.
	BalanceInCents *int64 `json:"balance_in_cents,omitempty"`
	// The automatic balance in cents.
	AutomaticBalanceInCents Optional[int64] `json:"automatic_balance_in_cents"`
	// The remittance balance in cents.
	RemittanceBalanceInCents Optional[int64] `json:"remittance_balance_in_cents"`
	AdditionalProperties     map[string]any  `json:"_"`
}

AccountBalance represents a AccountBalance struct.

func (AccountBalance) MarshalJSON

func (a AccountBalance) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AccountBalance. It customizes the JSON marshaling process for AccountBalance objects.

func (*AccountBalance) UnmarshalJSON

func (a *AccountBalance) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AccountBalance. It customizes the JSON unmarshaling process for AccountBalance objects.

type AccountBalances

type AccountBalances struct {
	// The balance, in cents, of the sum of the subscription's  open, payable invoices.
	OpenInvoices *AccountBalance `json:"open_invoices,omitempty"`
	// The balance, in cents, of the sum of the subscription's  pending, payable invoices.
	PendingInvoices *AccountBalance `json:"pending_invoices,omitempty"`
	// The balance, in cents, of the subscription's Pending Discount account.
	PendingDiscounts *AccountBalance `json:"pending_discounts,omitempty"`
	// The balance, in cents, of the subscription's Service Credit account.
	ServiceCredits *AccountBalance `json:"service_credits,omitempty"`
	// The balance, in cents, of the subscription's Prepayment account.
	Prepayments          *AccountBalance `json:"prepayments,omitempty"`
	AdditionalProperties map[string]any  `json:"_"`
}

AccountBalances represents a AccountBalances struct.

func (AccountBalances) MarshalJSON

func (a AccountBalances) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AccountBalances. It customizes the JSON marshaling process for AccountBalances objects.

func (*AccountBalances) UnmarshalJSON

func (a *AccountBalances) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AccountBalances. It customizes the JSON unmarshaling process for AccountBalances objects.

type ActivateSubscriptionRequest

type ActivateSubscriptionRequest struct {
	// You may choose how to handle the activation failure. `true` means do not change the subscription’s state and billing period. `false`  means to continue through with the activation and enter an end of life state. If this parameter is omitted or `null` is passed it will default to value set in the  site settings (default: `true`)
	RevertOnFailure      Optional[bool] `json:"revert_on_failure"`
	AdditionalProperties map[string]any `json:"_"`
}

ActivateSubscriptionRequest represents a ActivateSubscriptionRequest struct.

func (ActivateSubscriptionRequest) MarshalJSON

func (a ActivateSubscriptionRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ActivateSubscriptionRequest. It customizes the JSON marshaling process for ActivateSubscriptionRequest objects.

func (*ActivateSubscriptionRequest) UnmarshalJSON

func (a *ActivateSubscriptionRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ActivateSubscriptionRequest. It customizes the JSON unmarshaling process for ActivateSubscriptionRequest objects.

type AddCouponsRequest

type AddCouponsRequest struct {
	Codes                []string       `json:"codes,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

AddCouponsRequest represents a AddCouponsRequest struct.

func (AddCouponsRequest) MarshalJSON

func (a AddCouponsRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AddCouponsRequest. It customizes the JSON marshaling process for AddCouponsRequest objects.

func (*AddCouponsRequest) UnmarshalJSON

func (a *AddCouponsRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AddCouponsRequest. It customizes the JSON unmarshaling process for AddCouponsRequest objects.

type AddSubscriptionToAGroup

type AddSubscriptionToAGroup struct {
	Group                *AddSubscriptionToAGroupGroup `json:"group,omitempty"`
	AdditionalProperties map[string]any                `json:"_"`
}

AddSubscriptionToAGroup represents a AddSubscriptionToAGroup struct.

func (AddSubscriptionToAGroup) MarshalJSON

func (a AddSubscriptionToAGroup) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AddSubscriptionToAGroup. It customizes the JSON marshaling process for AddSubscriptionToAGroup objects.

func (*AddSubscriptionToAGroup) UnmarshalJSON

func (a *AddSubscriptionToAGroup) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AddSubscriptionToAGroup. It customizes the JSON unmarshaling process for AddSubscriptionToAGroup objects.

type AddSubscriptionToAGroupGroup added in v0.1.0

type AddSubscriptionToAGroupGroup struct {
	// contains filtered or unexported fields
}

AddSubscriptionToAGroupGroup represents a AddSubscriptionToAGroupGroup struct. This is a container for one-of cases.

func (*AddSubscriptionToAGroupGroup) AsBoolean added in v0.1.0

func (a *AddSubscriptionToAGroupGroup) AsBoolean() (
	*bool,
	bool)

func (*AddSubscriptionToAGroupGroup) AsGroupSettings added in v0.1.0

func (a *AddSubscriptionToAGroupGroup) AsGroupSettings() (
	*GroupSettings,
	bool)

func (AddSubscriptionToAGroupGroup) MarshalJSON added in v0.1.0

func (a AddSubscriptionToAGroupGroup) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AddSubscriptionToAGroupGroup. It customizes the JSON marshaling process for AddSubscriptionToAGroupGroup objects.

func (AddSubscriptionToAGroupGroup) String added in v0.1.0

String converts the AddSubscriptionToAGroupGroup object to a string representation.

func (*AddSubscriptionToAGroupGroup) UnmarshalJSON added in v0.1.0

func (a *AddSubscriptionToAGroupGroup) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AddSubscriptionToAGroupGroup. It customizes the JSON unmarshaling process for AddSubscriptionToAGroupGroup objects.

type AddressChange added in v0.1.0

type AddressChange struct {
	Before               InvoiceAddress `json:"before"`
	After                InvoiceAddress `json:"after"`
	AdditionalProperties map[string]any `json:"_"`
}

AddressChange represents a AddressChange struct.

func (AddressChange) MarshalJSON added in v0.1.0

func (a AddressChange) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AddressChange. It customizes the JSON marshaling process for AddressChange objects.

func (*AddressChange) UnmarshalJSON added in v0.1.0

func (a *AddressChange) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AddressChange. It customizes the JSON unmarshaling process for AddressChange objects.

type AgreementAcceptance

type AgreementAcceptance struct {
	// Required when providing agreement acceptance params.
	IpAddress *string `json:"ip_address,omitempty"`
	// Required when creating a subscription with Maxio Payments. Either terms_url or provacy_policy_url required when providing agreement_acceptance params.
	TermsUrl                *string        `json:"terms_url,omitempty"`
	PrivacyPolicyUrl        *string        `json:"privacy_policy_url,omitempty"`
	ReturnRefundPolicyUrl   *string        `json:"return_refund_policy_url,omitempty"`
	DeliveryPolicyUrl       *string        `json:"delivery_policy_url,omitempty"`
	SecureCheckoutPolicyUrl *string        `json:"secure_checkout_policy_url,omitempty"`
	AdditionalProperties    map[string]any `json:"_"`
}

AgreementAcceptance represents a AgreementAcceptance struct. Required when creating a subscription with Maxio Payments.

func (AgreementAcceptance) MarshalJSON

func (a AgreementAcceptance) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AgreementAcceptance. It customizes the JSON marshaling process for AgreementAcceptance objects.

func (*AgreementAcceptance) UnmarshalJSON

func (a *AgreementAcceptance) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AgreementAcceptance. It customizes the JSON unmarshaling process for AgreementAcceptance objects.

type AllocateComponents

type AllocateComponents struct {
	ProrationUpgradeScheme   *string            `json:"proration_upgrade_scheme,omitempty"`   // Deprecated
	ProrationDowngradeScheme *string            `json:"proration_downgrade_scheme,omitempty"` // Deprecated
	Allocations              []CreateAllocation `json:"allocations,omitempty"`
	AccrueCharge             *bool              `json:"accrue_charge,omitempty"`
	// The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
	// Available values: `full`, `prorated`, `none`.
	UpgradeCharge Optional[CreditType] `json:"upgrade_charge"`
	// The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
	// Available values: `full`, `prorated`, `none`.
	DowngradeCredit Optional[CreditType] `json:"downgrade_credit"`
	// (Optional) If not passed, the allocation(s) will use the payment collection method on the subscription
	PaymentCollectionMethod *CollectionMethod `json:"payment_collection_method,omitempty"`
	// If true, if the immediate component payment fails, initiate dunning for the subscription.
	// Otherwise, leave the charges on the subscription to pay for at renewal.
	InitiateDunning      *bool          `json:"initiate_dunning,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

AllocateComponents represents a AllocateComponents struct.

func (AllocateComponents) MarshalJSON

func (a AllocateComponents) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AllocateComponents. It customizes the JSON marshaling process for AllocateComponents objects.

func (*AllocateComponents) UnmarshalJSON

func (a *AllocateComponents) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AllocateComponents. It customizes the JSON unmarshaling process for AllocateComponents objects.

type Allocation

type Allocation struct {
	// The allocation unique id
	AllocationId *int `json:"allocation_id,omitempty"`
	// The integer component ID for the allocation. This references a component that you have created in your Product setup
	ComponentId *int `json:"component_id,omitempty"`
	// The handle of the component. This references a component that you have created in your Product setup
	ComponentHandle Optional[string] `json:"component_handle"`
	// The integer subscription ID for the allocation. This references a unique subscription in your Site
	SubscriptionId *int `json:"subscription_id,omitempty"`
	// The allocated quantity set in to effect by the allocation. String for components supporting fractional quantities
	Quantity *AllocationQuantity `json:"quantity,omitempty"`
	// The allocated quantity that was in effect before this allocation was created. String for components supporting fractional quantities
	PreviousQuantity *AllocationPreviousQuantity `json:"previous_quantity,omitempty"`
	// The memo passed when the allocation was created
	Memo Optional[string] `json:"memo"`
	// The time that the allocation was recorded, in format and UTC timezone, i.e. 2012-11-20T22:00:37Z
	Timestamp *time.Time `json:"timestamp,omitempty"`
	// Timestamp indicating when this allocation was created
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// The scheme used if the proration was an upgrade. This is only present when the allocation was created mid-period.
	ProrationUpgradeScheme *string `json:"proration_upgrade_scheme,omitempty"` // Deprecated
	// The scheme used if the proration was a downgrade. This is only present when the allocation was created mid-period.
	ProrationDowngradeScheme *string `json:"proration_downgrade_scheme,omitempty"` // Deprecated
	PricePointId             *int    `json:"price_point_id,omitempty"`
	PricePointName           *string `json:"price_point_name,omitempty"`
	PricePointHandle         *string `json:"price_point_handle,omitempty"`
	// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled.
	Interval *int `json:"interval,omitempty"`
	// A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled.
	IntervalUnit         *IntervalUnit `json:"interval_unit,omitempty"`
	PreviousPricePointId *int          `json:"previous_price_point_id,omitempty"`
	// If the change in cost is an upgrade, this determines if the charge should accrue to the next renewal or if capture should be attempted immediately.
	AccrueCharge *bool `json:"accrue_charge,omitempty"`
	// If true, if the immediate component payment fails, initiate dunning for the subscription.
	// Otherwise, leave the charges on the subscription to pay for at renewal.
	InitiateDunning *bool `json:"initiate_dunning,omitempty"`
	// The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
	// Available values: `full`, `prorated`, `none`.
	UpgradeCharge Optional[CreditType] `json:"upgrade_charge"`
	// The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
	// Available values: `full`, `prorated`, `none`.
	DowngradeCredit      Optional[CreditType]           `json:"downgrade_credit"`
	Payment              Optional[PaymentForAllocation] `json:"payment"`
	ExpiresAt            *time.Time                     `json:"expires_at,omitempty"`
	UsedQuantity         *int64                         `json:"used_quantity,omitempty"`
	ChargeId             *int64                         `json:"charge_id,omitempty"`
	AdditionalProperties map[string]any                 `json:"_"`
}

Allocation represents a Allocation struct.

func (Allocation) MarshalJSON

func (a Allocation) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Allocation. It customizes the JSON marshaling process for Allocation objects.

func (*Allocation) UnmarshalJSON

func (a *Allocation) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Allocation. It customizes the JSON unmarshaling process for Allocation objects.

type AllocationExpirationDate

type AllocationExpirationDate struct {
	ExpiresAt            *time.Time     `json:"expires_at,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

AllocationExpirationDate represents a AllocationExpirationDate struct.

func (AllocationExpirationDate) MarshalJSON

func (a AllocationExpirationDate) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AllocationExpirationDate. It customizes the JSON marshaling process for AllocationExpirationDate objects.

func (*AllocationExpirationDate) UnmarshalJSON

func (a *AllocationExpirationDate) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AllocationExpirationDate. It customizes the JSON unmarshaling process for AllocationExpirationDate objects.

type AllocationPreview

type AllocationPreview struct {
	StartDate            *time.Time                  `json:"start_date,omitempty"`
	EndDate              *time.Time                  `json:"end_date,omitempty"`
	SubtotalInCents      *int64                      `json:"subtotal_in_cents,omitempty"`
	TotalTaxInCents      *int64                      `json:"total_tax_in_cents,omitempty"`
	TotalDiscountInCents *int64                      `json:"total_discount_in_cents,omitempty"`
	TotalInCents         *int64                      `json:"total_in_cents,omitempty"`
	Direction            *AllocationPreviewDirection `json:"direction,omitempty"`
	ProrationScheme      *string                     `json:"proration_scheme,omitempty"`
	LineItems            []AllocationPreviewLineItem `json:"line_items,omitempty"`
	AccrueCharge         *bool                       `json:"accrue_charge,omitempty"`
	Allocations          []AllocationPreviewItem     `json:"allocations,omitempty"`
	PeriodType           *string                     `json:"period_type,omitempty"`
	// An integer representing the amount of the subscription's current balance
	ExistingBalanceInCents *int64         `json:"existing_balance_in_cents,omitempty"`
	AdditionalProperties   map[string]any `json:"_"`
}

AllocationPreview represents a AllocationPreview struct.

func (AllocationPreview) MarshalJSON

func (a AllocationPreview) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AllocationPreview. It customizes the JSON marshaling process for AllocationPreview objects.

func (*AllocationPreview) UnmarshalJSON

func (a *AllocationPreview) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AllocationPreview. It customizes the JSON unmarshaling process for AllocationPreview objects.

type AllocationPreviewDirection

type AllocationPreviewDirection string

AllocationPreviewDirection is a string enum.

const (
	AllocationPreviewDirection_UPGRADE   AllocationPreviewDirection = "upgrade"
	AllocationPreviewDirection_DOWNGRADE AllocationPreviewDirection = "downgrade"
)

func (AllocationPreviewDirection) MarshalJSON added in v0.2.0

func (e AllocationPreviewDirection) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AllocationPreviewDirection. It customizes the JSON marshaling process for AllocationPreviewDirection objects.

func (*AllocationPreviewDirection) UnmarshalJSON added in v0.2.0

func (e *AllocationPreviewDirection) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AllocationPreviewDirection. It customizes the JSON unmarshaling process for AllocationPreviewDirection objects.

type AllocationPreviewItem

type AllocationPreviewItem struct {
	ComponentId              *int                                   `json:"component_id,omitempty"`
	SubscriptionId           *int                                   `json:"subscription_id,omitempty"`
	Quantity                 *AllocationPreviewItemQuantity         `json:"quantity,omitempty"`
	PreviousQuantity         *AllocationPreviewItemPreviousQuantity `json:"previous_quantity,omitempty"`
	Memo                     Optional[string]                       `json:"memo"`
	Timestamp                Optional[string]                       `json:"timestamp"`
	ProrationUpgradeScheme   *string                                `json:"proration_upgrade_scheme,omitempty"`   // Deprecated
	ProrationDowngradeScheme *string                                `json:"proration_downgrade_scheme,omitempty"` // Deprecated
	AccrueCharge             *bool                                  `json:"accrue_charge,omitempty"`
	// The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
	// Available values: `full`, `prorated`, `none`.
	UpgradeCharge Optional[CreditType] `json:"upgrade_charge"`
	// The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
	// Available values: `full`, `prorated`, `none`.
	DowngradeCredit Optional[CreditType] `json:"downgrade_credit"`
	PricePointId    *int                 `json:"price_point_id,omitempty"`
	// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled.
	Interval *int `json:"interval,omitempty"`
	// A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled.
	IntervalUnit         *IntervalUnit    `json:"interval_unit,omitempty"`
	PreviousPricePointId *int             `json:"previous_price_point_id,omitempty"`
	PricePointHandle     *string          `json:"price_point_handle,omitempty"`
	PricePointName       *string          `json:"price_point_name,omitempty"`
	ComponentHandle      Optional[string] `json:"component_handle"`
	AdditionalProperties map[string]any   `json:"_"`
}

AllocationPreviewItem represents a AllocationPreviewItem struct.

func (AllocationPreviewItem) MarshalJSON

func (a AllocationPreviewItem) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AllocationPreviewItem. It customizes the JSON marshaling process for AllocationPreviewItem objects.

func (*AllocationPreviewItem) UnmarshalJSON

func (a *AllocationPreviewItem) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AllocationPreviewItem. It customizes the JSON unmarshaling process for AllocationPreviewItem objects.

type AllocationPreviewItemPreviousQuantity added in v0.1.0

type AllocationPreviewItemPreviousQuantity struct {
	// contains filtered or unexported fields
}

AllocationPreviewItemPreviousQuantity represents a AllocationPreviewItemPreviousQuantity struct. This is a container for one-of cases.

func (*AllocationPreviewItemPreviousQuantity) AsNumber added in v0.1.0

func (a *AllocationPreviewItemPreviousQuantity) AsNumber() (
	*int,
	bool)

func (*AllocationPreviewItemPreviousQuantity) AsString added in v0.1.0

func (AllocationPreviewItemPreviousQuantity) MarshalJSON added in v0.1.0

func (a AllocationPreviewItemPreviousQuantity) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AllocationPreviewItemPreviousQuantity. It customizes the JSON marshaling process for AllocationPreviewItemPreviousQuantity objects.

func (AllocationPreviewItemPreviousQuantity) String added in v0.1.0

String converts the AllocationPreviewItemPreviousQuantity object to a string representation.

func (*AllocationPreviewItemPreviousQuantity) UnmarshalJSON added in v0.1.0

func (a *AllocationPreviewItemPreviousQuantity) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AllocationPreviewItemPreviousQuantity. It customizes the JSON unmarshaling process for AllocationPreviewItemPreviousQuantity objects.

type AllocationPreviewItemQuantity added in v0.1.0

type AllocationPreviewItemQuantity struct {
	// contains filtered or unexported fields
}

AllocationPreviewItemQuantity represents a AllocationPreviewItemQuantity struct. This is a container for one-of cases.

func (*AllocationPreviewItemQuantity) AsNumber added in v0.1.0

func (a *AllocationPreviewItemQuantity) AsNumber() (
	*int,
	bool)

func (*AllocationPreviewItemQuantity) AsString added in v0.1.0

func (a *AllocationPreviewItemQuantity) AsString() (
	*string,
	bool)

func (AllocationPreviewItemQuantity) MarshalJSON added in v0.1.0

func (a AllocationPreviewItemQuantity) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AllocationPreviewItemQuantity. It customizes the JSON marshaling process for AllocationPreviewItemQuantity objects.

func (AllocationPreviewItemQuantity) String added in v0.1.0

String converts the AllocationPreviewItemQuantity object to a string representation.

func (*AllocationPreviewItemQuantity) UnmarshalJSON added in v0.1.0

func (a *AllocationPreviewItemQuantity) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AllocationPreviewItemQuantity. It customizes the JSON unmarshaling process for AllocationPreviewItemQuantity objects.

type AllocationPreviewLineItem

type AllocationPreviewLineItem struct {
	// A handle for the line item transaction type
	TransactionType *LineItemTransactionType `json:"transaction_type,omitempty"`
	// A handle for the line item kind for allocation preview
	Kind                  *AllocationPreviewLineItemKind `json:"kind,omitempty"`
	AmountInCents         *int64                         `json:"amount_in_cents,omitempty"`
	Memo                  *string                        `json:"memo,omitempty"`
	DiscountAmountInCents *int64                         `json:"discount_amount_in_cents,omitempty"`
	TaxableAmountInCents  *int64                         `json:"taxable_amount_in_cents,omitempty"`
	ComponentId           *int                           `json:"component_id,omitempty"`
	ComponentHandle       *string                        `json:"component_handle,omitempty"`
	// Visible when using Fine-grained Component Control
	Direction            *AllocationPreviewDirection `json:"direction,omitempty"`
	AdditionalProperties map[string]any              `json:"_"`
}

AllocationPreviewLineItem represents a AllocationPreviewLineItem struct.

func (AllocationPreviewLineItem) MarshalJSON

func (a AllocationPreviewLineItem) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AllocationPreviewLineItem. It customizes the JSON marshaling process for AllocationPreviewLineItem objects.

func (*AllocationPreviewLineItem) UnmarshalJSON

func (a *AllocationPreviewLineItem) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AllocationPreviewLineItem. It customizes the JSON unmarshaling process for AllocationPreviewLineItem objects.

type AllocationPreviewLineItemKind

type AllocationPreviewLineItemKind string

AllocationPreviewLineItemKind is a string enum. A handle for the line item kind for allocation preview

const (
	AllocationPreviewLineItemKind_QUANTITYBASEDCOMPONENT AllocationPreviewLineItemKind = "quantity_based_component"
	AllocationPreviewLineItemKind_ONOFFCOMPONENT         AllocationPreviewLineItemKind = "on_off_component"
	AllocationPreviewLineItemKind_COUPON                 AllocationPreviewLineItemKind = "coupon"
	AllocationPreviewLineItemKind_TAX                    AllocationPreviewLineItemKind = "tax"
)

func (AllocationPreviewLineItemKind) MarshalJSON added in v0.2.0

func (e AllocationPreviewLineItemKind) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AllocationPreviewLineItemKind. It customizes the JSON marshaling process for AllocationPreviewLineItemKind objects.

func (*AllocationPreviewLineItemKind) UnmarshalJSON added in v0.2.0

func (e *AllocationPreviewLineItemKind) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AllocationPreviewLineItemKind. It customizes the JSON unmarshaling process for AllocationPreviewLineItemKind objects.

type AllocationPreviewResponse

type AllocationPreviewResponse struct {
	AllocationPreview    AllocationPreview `json:"allocation_preview"`
	AdditionalProperties map[string]any    `json:"_"`
}

AllocationPreviewResponse represents a AllocationPreviewResponse struct.

func (AllocationPreviewResponse) MarshalJSON

func (a AllocationPreviewResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AllocationPreviewResponse. It customizes the JSON marshaling process for AllocationPreviewResponse objects.

func (*AllocationPreviewResponse) UnmarshalJSON

func (a *AllocationPreviewResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AllocationPreviewResponse. It customizes the JSON unmarshaling process for AllocationPreviewResponse objects.

type AllocationPreviousQuantity added in v0.1.0

type AllocationPreviousQuantity struct {
	// contains filtered or unexported fields
}

AllocationPreviousQuantity represents a AllocationPreviousQuantity struct. This is a container for one-of cases.

func (*AllocationPreviousQuantity) AsNumber added in v0.1.0

func (a *AllocationPreviousQuantity) AsNumber() (
	*int,
	bool)

func (*AllocationPreviousQuantity) AsString added in v0.1.0

func (a *AllocationPreviousQuantity) AsString() (
	*string,
	bool)

func (AllocationPreviousQuantity) MarshalJSON added in v0.1.0

func (a AllocationPreviousQuantity) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AllocationPreviousQuantity. It customizes the JSON marshaling process for AllocationPreviousQuantity objects.

func (AllocationPreviousQuantity) String added in v0.1.0

String converts the AllocationPreviousQuantity object to a string representation.

func (*AllocationPreviousQuantity) UnmarshalJSON added in v0.1.0

func (a *AllocationPreviousQuantity) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AllocationPreviousQuantity. It customizes the JSON unmarshaling process for AllocationPreviousQuantity objects.

type AllocationQuantity added in v0.1.0

type AllocationQuantity struct {
	// contains filtered or unexported fields
}

AllocationQuantity represents a AllocationQuantity struct. This is a container for one-of cases.

func (*AllocationQuantity) AsNumber added in v0.1.0

func (a *AllocationQuantity) AsNumber() (
	*int,
	bool)

func (*AllocationQuantity) AsString added in v0.1.0

func (a *AllocationQuantity) AsString() (
	*string,
	bool)

func (AllocationQuantity) MarshalJSON added in v0.1.0

func (a AllocationQuantity) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AllocationQuantity. It customizes the JSON marshaling process for AllocationQuantity objects.

func (AllocationQuantity) String added in v0.1.0

func (a AllocationQuantity) String() string

String converts the AllocationQuantity object to a string representation.

func (*AllocationQuantity) UnmarshalJSON added in v0.1.0

func (a *AllocationQuantity) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AllocationQuantity. It customizes the JSON unmarshaling process for AllocationQuantity objects.

type AllocationResponse

type AllocationResponse struct {
	Allocation           *Allocation    `json:"allocation,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

AllocationResponse represents a AllocationResponse struct.

func (AllocationResponse) MarshalJSON

func (a AllocationResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AllocationResponse. It customizes the JSON marshaling process for AllocationResponse objects.

func (*AllocationResponse) UnmarshalJSON

func (a *AllocationResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AllocationResponse. It customizes the JSON unmarshaling process for AllocationResponse objects.

type AllocationSettings

type AllocationSettings struct {
	// The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
	// Available values: `full`, `prorated`, `none`.
	UpgradeCharge Optional[CreditType] `json:"upgrade_charge"`
	// The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
	// Available values: `full`, `prorated`, `none`.
	DowngradeCredit Optional[CreditType] `json:"downgrade_credit"`
	// Either "true" or "false".
	AccrueCharge         *string        `json:"accrue_charge,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

AllocationSettings represents a AllocationSettings struct.

func (AllocationSettings) MarshalJSON

func (a AllocationSettings) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AllocationSettings. It customizes the JSON marshaling process for AllocationSettings objects.

func (*AllocationSettings) UnmarshalJSON

func (a *AllocationSettings) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AllocationSettings. It customizes the JSON unmarshaling process for AllocationSettings objects.

type ApiResponse

type ApiResponse[T any] struct {
	https.ApiResponse[T]
}

ApiResponse is a generic struct that represents an API response containing data and the HTTP response. The `Data` field holds the data of any type `T` returned by the API. The `Response` field contains the underlying HTTP response associated with the API call.

func NewApiResponse

func NewApiResponse[T any](
	data T,
	response *http.Response) ApiResponse[T]

NewApiResponse creates a new instance of ApiResponse. It takes the `data` of type `T` and the `response` as parameters, and returns an ApiResponse[T] struct.

type AppliedCreditNoteData added in v0.1.0

type AppliedCreditNoteData struct {
	// The UID of the credit note
	Uid *string `json:"uid,omitempty"`
	// The number of the credit note
	Number               *string        `json:"number,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

AppliedCreditNoteData represents a AppliedCreditNoteData struct.

func (AppliedCreditNoteData) MarshalJSON added in v0.1.0

func (a AppliedCreditNoteData) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AppliedCreditNoteData. It customizes the JSON marshaling process for AppliedCreditNoteData objects.

func (*AppliedCreditNoteData) UnmarshalJSON added in v0.1.0

func (a *AppliedCreditNoteData) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AppliedCreditNoteData. It customizes the JSON unmarshaling process for AppliedCreditNoteData objects.

type ApplyCreditNoteEvent added in v0.2.0

type ApplyCreditNoteEvent struct {
	Id        int64            `json:"id"`
	Timestamp time.Time        `json:"timestamp"`
	Invoice   Invoice          `json:"invoice"`
	EventType InvoiceEventType `json:"event_type"`
	// Example schema for an `apply_credit_note` event
	EventData            ApplyCreditNoteEventData `json:"event_data"`
	AdditionalProperties map[string]any           `json:"_"`
}

ApplyCreditNoteEvent represents a ApplyCreditNoteEvent struct.

func (ApplyCreditNoteEvent) MarshalJSON added in v0.2.0

func (a ApplyCreditNoteEvent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ApplyCreditNoteEvent. It customizes the JSON marshaling process for ApplyCreditNoteEvent objects.

func (*ApplyCreditNoteEvent) UnmarshalJSON added in v0.2.0

func (a *ApplyCreditNoteEvent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ApplyCreditNoteEvent. It customizes the JSON unmarshaling process for ApplyCreditNoteEvent objects.

type ApplyCreditNoteEventData added in v0.1.0

type ApplyCreditNoteEventData struct {
	// Unique identifier for the credit note application. It is generated automatically by Chargify and has the prefix "cdt_" followed by alphanumeric characters.
	Uid string `json:"uid"`
	// A unique, identifying string that appears on the credit note and in places it is referenced.
	CreditNoteNumber string `json:"credit_note_number"`
	// Unique identifier for the credit note. It is generated automatically by Chargify and has the prefix "cn_" followed by alphanumeric characters.
	CreditNoteUid string `json:"credit_note_uid"`
	// The full, original amount of the credit note.
	OriginalAmount string `json:"original_amount"`
	// The amount of the credit note applied to invoice.
	AppliedAmount string `json:"applied_amount"`
	// The time the credit note was applied, in ISO 8601 format, i.e. "2019-06-07T17:20:06Z"
	TransactionTime *time.Time `json:"transaction_time,omitempty"`
	// The credit note memo.
	Memo Optional[string] `json:"memo"`
	// The role of the credit note (e.g. 'general')
	Role *string `json:"role,omitempty"`
	// Shows whether it was applied to consolidated invoice or not
	ConsolidatedInvoice *bool `json:"consolidated_invoice,omitempty"`
	// List of credit notes applied to children invoices (if consolidated invoice)
	AppliedCreditNotes   []AppliedCreditNoteData `json:"applied_credit_notes,omitempty"`
	AdditionalProperties map[string]any          `json:"_"`
}

ApplyCreditNoteEventData represents a ApplyCreditNoteEventData struct. Example schema for an `apply_credit_note` event

func (ApplyCreditNoteEventData) MarshalJSON added in v0.1.0

func (a ApplyCreditNoteEventData) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ApplyCreditNoteEventData. It customizes the JSON marshaling process for ApplyCreditNoteEventData objects.

func (*ApplyCreditNoteEventData) UnmarshalJSON added in v0.1.0

func (a *ApplyCreditNoteEventData) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ApplyCreditNoteEventData. It customizes the JSON unmarshaling process for ApplyCreditNoteEventData objects.

type ApplyDebitNoteEvent added in v0.2.0

type ApplyDebitNoteEvent struct {
	Id        int64            `json:"id"`
	Timestamp time.Time        `json:"timestamp"`
	Invoice   Invoice          `json:"invoice"`
	EventType InvoiceEventType `json:"event_type"`
	// Example schema for an `apply_debit_note` event
	EventData            ApplyDebitNoteEventData `json:"event_data"`
	AdditionalProperties map[string]any          `json:"_"`
}

ApplyDebitNoteEvent represents a ApplyDebitNoteEvent struct.

func (ApplyDebitNoteEvent) MarshalJSON added in v0.2.0

func (a ApplyDebitNoteEvent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ApplyDebitNoteEvent. It customizes the JSON marshaling process for ApplyDebitNoteEvent objects.

func (*ApplyDebitNoteEvent) UnmarshalJSON added in v0.2.0

func (a *ApplyDebitNoteEvent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ApplyDebitNoteEvent. It customizes the JSON unmarshaling process for ApplyDebitNoteEvent objects.

type ApplyDebitNoteEventData added in v0.1.0

type ApplyDebitNoteEventData struct {
	// A unique, identifying string that appears on the debit note and in places it is referenced.
	DebitNoteNumber string `json:"debit_note_number"`
	// Unique identifier for the debit note. It is generated automatically by Chargify and has the prefix "db_" followed by alphanumeric characters.
	DebitNoteUid string `json:"debit_note_uid"`
	// The full, original amount of the debit note.
	OriginalAmount string `json:"original_amount"`
	// The amount of the debit note applied to invoice.
	AppliedAmount string `json:"applied_amount"`
	// The debit note memo.
	Memo Optional[string] `json:"memo"`
	// The time the debit note was applied, in ISO 8601 format, i.e. "2019-06-07T17:20:06Z"
	TransactionTime      Optional[time.Time] `json:"transaction_time"`
	AdditionalProperties map[string]any      `json:"_"`
}

ApplyDebitNoteEventData represents a ApplyDebitNoteEventData struct. Example schema for an `apply_debit_note` event

func (ApplyDebitNoteEventData) MarshalJSON added in v0.1.0

func (a ApplyDebitNoteEventData) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ApplyDebitNoteEventData. It customizes the JSON marshaling process for ApplyDebitNoteEventData objects.

func (*ApplyDebitNoteEventData) UnmarshalJSON added in v0.1.0

func (a *ApplyDebitNoteEventData) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ApplyDebitNoteEventData. It customizes the JSON unmarshaling process for ApplyDebitNoteEventData objects.

type ApplyPaymentEvent added in v0.2.0

type ApplyPaymentEvent struct {
	Id        int64            `json:"id"`
	Timestamp time.Time        `json:"timestamp"`
	Invoice   Invoice          `json:"invoice"`
	EventType InvoiceEventType `json:"event_type"`
	// Example schema for an `apply_payment` event
	EventData            ApplyPaymentEventData `json:"event_data"`
	AdditionalProperties map[string]any        `json:"_"`
}

ApplyPaymentEvent represents a ApplyPaymentEvent struct.

func (ApplyPaymentEvent) MarshalJSON added in v0.2.0

func (a ApplyPaymentEvent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ApplyPaymentEvent. It customizes the JSON marshaling process for ApplyPaymentEvent objects.

func (*ApplyPaymentEvent) UnmarshalJSON added in v0.2.0

func (a *ApplyPaymentEvent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ApplyPaymentEvent. It customizes the JSON unmarshaling process for ApplyPaymentEvent objects.

type ApplyPaymentEventData added in v0.1.0

type ApplyPaymentEventData struct {
	ConsolidationLevel InvoiceConsolidationLevel `json:"consolidation_level"`
	// The payment memo
	Memo string `json:"memo"`
	// The full, original amount of the payment transaction as a string in full units. Incoming payments can be split amongst several invoices, which will result in a `applied_amount` less than the `original_amount`. Example: A $100.99 payment, of which $40.11 is applied to this invoice, will have an `original_amount` of `"100.99"`.
	OriginalAmount string `json:"original_amount"`
	// The amount of the payment applied to this invoice. Incoming payments can be split amongst several invoices, which will result in a `applied_amount` less than the `original_amount`. Example: A $100.99 payment, of which $40.11 is applied to this invoice, will have an `applied_amount` of `"40.11"`.
	AppliedAmount string `json:"applied_amount"`
	// The time the payment was applied, in ISO 8601 format, i.e. "2019-06-07T17:20:06Z"
	TransactionTime time.Time `json:"transaction_time"`
	// A nested data structure detailing the method of payment
	PaymentMethod InvoiceEventPayment `json:"payment_method"`
	// The Chargify id of the original payment
	TransactionId             *int             `json:"transaction_id,omitempty"`
	ParentInvoiceNumber       Optional[int]    `json:"parent_invoice_number"`
	RemainingPrepaymentAmount Optional[string] `json:"remaining_prepayment_amount"`
	Prepayment                *bool            `json:"prepayment,omitempty"`
	External                  *bool            `json:"external,omitempty"`
	AdditionalProperties      map[string]any   `json:"_"`
}

ApplyPaymentEventData represents a ApplyPaymentEventData struct. Example schema for an `apply_payment` event

func (ApplyPaymentEventData) MarshalJSON added in v0.1.0

func (a ApplyPaymentEventData) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ApplyPaymentEventData. It customizes the JSON marshaling process for ApplyPaymentEventData objects.

func (*ApplyPaymentEventData) UnmarshalJSON added in v0.1.0

func (a *ApplyPaymentEventData) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ApplyPaymentEventData. It customizes the JSON unmarshaling process for ApplyPaymentEventData objects.

type ArchiveProductPricePointPricePointId added in v0.1.0

type ArchiveProductPricePointPricePointId struct {
	// contains filtered or unexported fields
}

ArchiveProductPricePointPricePointId represents a ArchiveProductPricePointPricePointId struct. This is a container for one-of cases.

func (*ArchiveProductPricePointPricePointId) AsNumber added in v0.1.0

func (a *ArchiveProductPricePointPricePointId) AsNumber() (
	*int,
	bool)

func (*ArchiveProductPricePointPricePointId) AsString added in v0.1.0

func (ArchiveProductPricePointPricePointId) MarshalJSON added in v0.1.0

func (a ArchiveProductPricePointPricePointId) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ArchiveProductPricePointPricePointId. It customizes the JSON marshaling process for ArchiveProductPricePointPricePointId objects.

func (ArchiveProductPricePointPricePointId) String added in v0.1.0

String converts the ArchiveProductPricePointPricePointId object to a string representation.

func (*ArchiveProductPricePointPricePointId) UnmarshalJSON added in v0.1.0

func (a *ArchiveProductPricePointPricePointId) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ArchiveProductPricePointPricePointId. It customizes the JSON unmarshaling process for ArchiveProductPricePointPricePointId objects.

type ArchiveProductPricePointProductId added in v0.1.0

type ArchiveProductPricePointProductId struct {
	// contains filtered or unexported fields
}

ArchiveProductPricePointProductId represents a ArchiveProductPricePointProductId struct. This is a container for one-of cases.

func (*ArchiveProductPricePointProductId) AsNumber added in v0.1.0

func (a *ArchiveProductPricePointProductId) AsNumber() (
	*int,
	bool)

func (*ArchiveProductPricePointProductId) AsString added in v0.1.0

func (a *ArchiveProductPricePointProductId) AsString() (
	*string,
	bool)

func (ArchiveProductPricePointProductId) MarshalJSON added in v0.1.0

func (a ArchiveProductPricePointProductId) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ArchiveProductPricePointProductId. It customizes the JSON marshaling process for ArchiveProductPricePointProductId objects.

func (ArchiveProductPricePointProductId) String added in v0.1.0

String converts the ArchiveProductPricePointProductId object to a string representation.

func (*ArchiveProductPricePointProductId) UnmarshalJSON added in v0.1.0

func (a *ArchiveProductPricePointProductId) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ArchiveProductPricePointProductId. It customizes the JSON unmarshaling process for ArchiveProductPricePointProductId objects.

type AttributeError

type AttributeError struct {
	Attribute            []string       `json:"attribute"`
	AdditionalProperties map[string]any `json:"_"`
}

AttributeError represents a AttributeError struct.

func (AttributeError) MarshalJSON

func (a AttributeError) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AttributeError. It customizes the JSON marshaling process for AttributeError objects.

func (*AttributeError) UnmarshalJSON

func (a *AttributeError) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AttributeError. It customizes the JSON unmarshaling process for AttributeError objects.

type AutoInvite

type AutoInvite int

AutoInvite is a int enum.

const (
	AutoInvite_NO  AutoInvite = 0
	AutoInvite_YES AutoInvite = 1
)

func (AutoInvite) MarshalJSON added in v0.2.0

func (e AutoInvite) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AutoInvite. It customizes the JSON marshaling process for AutoInvite objects.

func (*AutoInvite) UnmarshalJSON added in v0.2.0

func (e *AutoInvite) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AutoInvite. It customizes the JSON unmarshaling process for AutoInvite objects.

type AutoResume

type AutoResume struct {
	AutomaticallyResumeAt Optional[time.Time] `json:"automatically_resume_at"`
	AdditionalProperties  map[string]any      `json:"_"`
}

AutoResume represents a AutoResume struct.

func (AutoResume) MarshalJSON

func (a AutoResume) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for AutoResume. It customizes the JSON marshaling process for AutoResume objects.

func (*AutoResume) UnmarshalJSON

func (a *AutoResume) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AutoResume. It customizes the JSON unmarshaling process for AutoResume objects.

type BackportInvoiceEvent added in v0.2.0

type BackportInvoiceEvent struct {
	Id        int64            `json:"id"`
	Timestamp time.Time        `json:"timestamp"`
	Invoice   Invoice          `json:"invoice"`
	EventType InvoiceEventType `json:"event_type"`
	// Example schema for an `backport_invoice` event
	EventData            Invoice        `json:"event_data"`
	AdditionalProperties map[string]any `json:"_"`
}

BackportInvoiceEvent represents a BackportInvoiceEvent struct.

func (BackportInvoiceEvent) MarshalJSON added in v0.2.0

func (b BackportInvoiceEvent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BackportInvoiceEvent. It customizes the JSON marshaling process for BackportInvoiceEvent objects.

func (*BackportInvoiceEvent) UnmarshalJSON added in v0.2.0

func (b *BackportInvoiceEvent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BackportInvoiceEvent. It customizes the JSON unmarshaling process for BackportInvoiceEvent objects.

type BankAccountAttributes

type BankAccountAttributes struct {
	ChargifyToken *string `json:"chargify_token,omitempty"`
	// (Required when creating a subscription with ACH or GoCardless) The name of the bank where the customer’s account resides
	BankName *string `json:"bank_name,omitempty"`
	// (Required when creating a subscription with ACH. Optional when creating a subscription with GoCardless). The routing number of the bank. It becomes bank_code while passing via GoCardless API
	BankRoutingNumber *string `json:"bank_routing_number,omitempty"`
	// (Required when creating a subscription with ACH. Required when creating a subscription with GoCardless and bank_iban is blank) The customerʼs bank account number
	BankAccountNumber *string `json:"bank_account_number,omitempty"`
	// Defaults to checking
	BankAccountType *BankAccountType `json:"bank_account_type,omitempty"`
	// (Optional when creating a subscription with GoCardless) Branch code. Alternatively, an IBAN can be provided
	BankBranchCode *string `json:"bank_branch_code,omitempty"`
	// (Optional when creating a subscription with GoCardless). International Bank Account Number. Alternatively, local bank details can be provided
	BankIban *string `json:"bank_iban,omitempty"`
	// Defaults to personal
	BankAccountHolderType *BankAccountHolderType `json:"bank_account_holder_type,omitempty"`
	PaymentType           *PaymentType           `json:"payment_type,omitempty"`
	// The vault that stores the payment profile with the provided vault_token.
	CurrentVault *BankAccountVault `json:"current_vault,omitempty"`
	VaultToken   *string           `json:"vault_token,omitempty"`
	// (only for Authorize.Net CIM storage or Square) The customerProfileId for the owner of the customerPaymentProfileId provided as the vault_token
	CustomerVaultToken   *string        `json:"customer_vault_token,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

BankAccountAttributes represents a BankAccountAttributes struct.

func (BankAccountAttributes) MarshalJSON

func (b BankAccountAttributes) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BankAccountAttributes. It customizes the JSON marshaling process for BankAccountAttributes objects.

func (*BankAccountAttributes) UnmarshalJSON

func (b *BankAccountAttributes) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BankAccountAttributes. It customizes the JSON unmarshaling process for BankAccountAttributes objects.

type BankAccountHolderType

type BankAccountHolderType string

BankAccountHolderType is a string enum. Defaults to personal

const (
	BankAccountHolderType_PERSONAL BankAccountHolderType = "personal"
	BankAccountHolderType_BUSINESS BankAccountHolderType = "business"
)

func (BankAccountHolderType) MarshalJSON added in v0.2.0

func (e BankAccountHolderType) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BankAccountHolderType. It customizes the JSON marshaling process for BankAccountHolderType objects.

func (*BankAccountHolderType) UnmarshalJSON added in v0.2.0

func (e *BankAccountHolderType) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BankAccountHolderType. It customizes the JSON unmarshaling process for BankAccountHolderType objects.

type BankAccountPaymentProfile

type BankAccountPaymentProfile struct {
	// The Chargify-assigned ID of the stored bank account. This value can be used as an input to payment_profile_id when creating a subscription, in order to re-use a stored payment profile for the same customer
	Id *int `json:"id,omitempty"`
	// The first name of the bank account holder
	FirstName *string `json:"first_name,omitempty"`
	// The last name of the bank account holder
	LastName *string `json:"last_name,omitempty"`
	// The Chargify-assigned id for the customer record to which the bank account belongs
	CustomerId *int `json:"customer_id,omitempty"`
	// The vault that stores the payment profile with the provided vault_token.
	CurrentVault *BankAccountVault `json:"current_vault,omitempty"`
	// The “token” provided by your vault storage for an already stored payment profile
	VaultToken *string `json:"vault_token,omitempty"`
	// The current billing street address for the bank account
	BillingAddress Optional[string] `json:"billing_address"`
	// The current billing address city for the bank account
	BillingCity Optional[string] `json:"billing_city"`
	// The current billing address state for the bank account
	BillingState Optional[string] `json:"billing_state"`
	// The current billing address zip code for the bank account
	BillingZip Optional[string] `json:"billing_zip"`
	// The current billing address country for the bank account
	BillingCountry Optional[string] `json:"billing_country"`
	// (only for Authorize.Net CIM storage): the customerProfileId for the owner of the customerPaymentProfileId provided as the vault_token.
	CustomerVaultToken Optional[string] `json:"customer_vault_token"`
	// The current billing street address, second line, for the bank account
	BillingAddress2 Optional[string] `json:"billing_address_2"`
	// The bank where the account resides
	BankName *string `json:"bank_name,omitempty"`
	// A string representation of the stored bank routing number with all but the last 4 digits marked with X’s (i.e. ‘XXXXXXX1111’). payment_type will be bank_account
	MaskedBankRoutingNumber string `json:"masked_bank_routing_number"`
	// A string representation of the stored bank account number with all but the last 4 digits marked with X’s (i.e. ‘XXXXXXX1111’)
	MaskedBankAccountNumber string `json:"masked_bank_account_number"`
	// Defaults to checking
	BankAccountType *BankAccountType `json:"bank_account_type,omitempty"`
	// Defaults to personal
	BankAccountHolderType *BankAccountHolderType `json:"bank_account_holder_type,omitempty"`
	PaymentType           *PaymentType           `json:"payment_type,omitempty"`
	// denotes whether a bank account has been verified by providing the amounts of two small deposits made into the account
	Verified             *bool            `json:"verified,omitempty"`
	SiteGatewaySettingId Optional[int]    `json:"site_gateway_setting_id"`
	GatewayHandle        Optional[string] `json:"gateway_handle"`
	AdditionalProperties map[string]any   `json:"_"`
}

BankAccountPaymentProfile represents a BankAccountPaymentProfile struct.

func (BankAccountPaymentProfile) MarshalJSON

func (b BankAccountPaymentProfile) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BankAccountPaymentProfile. It customizes the JSON marshaling process for BankAccountPaymentProfile objects.

func (*BankAccountPaymentProfile) UnmarshalJSON

func (b *BankAccountPaymentProfile) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BankAccountPaymentProfile. It customizes the JSON unmarshaling process for BankAccountPaymentProfile objects.

type BankAccountResponse

type BankAccountResponse struct {
	PaymentProfile       BankAccountPaymentProfile `json:"payment_profile"`
	AdditionalProperties map[string]any            `json:"_"`
}

BankAccountResponse represents a BankAccountResponse struct.

func (BankAccountResponse) MarshalJSON

func (b BankAccountResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BankAccountResponse. It customizes the JSON marshaling process for BankAccountResponse objects.

func (*BankAccountResponse) UnmarshalJSON

func (b *BankAccountResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BankAccountResponse. It customizes the JSON unmarshaling process for BankAccountResponse objects.

type BankAccountType

type BankAccountType string

BankAccountType is a string enum. Defaults to checking

const (
	BankAccountType_CHECKING BankAccountType = "checking"
	BankAccountType_SAVINGS  BankAccountType = "savings"
)

func (BankAccountType) MarshalJSON added in v0.2.0

func (e BankAccountType) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BankAccountType. It customizes the JSON marshaling process for BankAccountType objects.

func (*BankAccountType) UnmarshalJSON added in v0.2.0

func (e *BankAccountType) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BankAccountType. It customizes the JSON unmarshaling process for BankAccountType objects.

type BankAccountVault

type BankAccountVault string

BankAccountVault is a string enum. The vault that stores the payment profile with the provided vault_token.

const (
	BankAccountVault_BOGUS         BankAccountVault = "bogus"
	BankAccountVault_AUTHORIZENET  BankAccountVault = "authorizenet"
	BankAccountVault_STRIPECONNECT BankAccountVault = "stripe_connect"
	BankAccountVault_BRAINTREEBLUE BankAccountVault = "braintree_blue"
	BankAccountVault_GOCARDLESS    BankAccountVault = "gocardless"
)

func (BankAccountVault) MarshalJSON added in v0.2.0

func (e BankAccountVault) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BankAccountVault. It customizes the JSON marshaling process for BankAccountVault objects.

func (*BankAccountVault) UnmarshalJSON added in v0.2.0

func (e *BankAccountVault) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BankAccountVault. It customizes the JSON unmarshaling process for BankAccountVault objects.

type BankAccountVerification

type BankAccountVerification struct {
	Deposit1InCents      *int64         `json:"deposit_1_in_cents,omitempty"`
	Deposit2InCents      *int64         `json:"deposit_2_in_cents,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

BankAccountVerification represents a BankAccountVerification struct.

func (BankAccountVerification) MarshalJSON

func (b BankAccountVerification) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BankAccountVerification. It customizes the JSON marshaling process for BankAccountVerification objects.

func (*BankAccountVerification) UnmarshalJSON

func (b *BankAccountVerification) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BankAccountVerification. It customizes the JSON unmarshaling process for BankAccountVerification objects.

type BankAccountVerificationRequest

type BankAccountVerificationRequest struct {
	BankAccountVerification BankAccountVerification `json:"bank_account_verification"`
	AdditionalProperties    map[string]any          `json:"_"`
}

BankAccountVerificationRequest represents a BankAccountVerificationRequest struct.

func (BankAccountVerificationRequest) MarshalJSON

func (b BankAccountVerificationRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BankAccountVerificationRequest. It customizes the JSON marshaling process for BankAccountVerificationRequest objects.

func (*BankAccountVerificationRequest) UnmarshalJSON

func (b *BankAccountVerificationRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BankAccountVerificationRequest. It customizes the JSON unmarshaling process for BankAccountVerificationRequest objects.

type BaseRefundError

type BaseRefundError struct {
	Base                 []interface{}  `json:"base,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

BaseRefundError represents a BaseRefundError struct.

func (BaseRefundError) MarshalJSON

func (b BaseRefundError) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BaseRefundError. It customizes the JSON marshaling process for BaseRefundError objects.

func (*BaseRefundError) UnmarshalJSON

func (b *BaseRefundError) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BaseRefundError. It customizes the JSON unmarshaling process for BaseRefundError objects.

type BaseStringError

type BaseStringError struct {
	Base                 []string       `json:"base,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

BaseStringError represents a BaseStringError struct. The error is base if it is not directly associated with a single attribute.

func (BaseStringError) MarshalJSON

func (b BaseStringError) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BaseStringError. It customizes the JSON marshaling process for BaseStringError objects.

func (*BaseStringError) UnmarshalJSON

func (b *BaseStringError) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BaseStringError. It customizes the JSON unmarshaling process for BaseStringError objects.

type BasicDateField

type BasicDateField string

BasicDateField is a string enum. Allows to filter by `created_at` or `updated_at`.

const (
	BasicDateField_UPDATEDAT BasicDateField = "updated_at"
	BasicDateField_CREATEDAT BasicDateField = "created_at"
)

func (BasicDateField) MarshalJSON added in v0.2.0

func (e BasicDateField) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BasicDateField. It customizes the JSON marshaling process for BasicDateField objects.

func (*BasicDateField) UnmarshalJSON added in v0.2.0

func (e *BasicDateField) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BasicDateField. It customizes the JSON unmarshaling process for BasicDateField objects.

type BatchJob

type BatchJob struct {
	Id                   *int                `json:"id,omitempty"`
	FinishedAt           Optional[time.Time] `json:"finished_at"`
	RowCount             Optional[int]       `json:"row_count"`
	CreatedAt            Optional[time.Time] `json:"created_at"`
	Completed            *string             `json:"completed,omitempty"`
	AdditionalProperties map[string]any      `json:"_"`
}

BatchJob represents a BatchJob struct.

func (BatchJob) MarshalJSON

func (b BatchJob) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BatchJob. It customizes the JSON marshaling process for BatchJob objects.

func (*BatchJob) UnmarshalJSON

func (b *BatchJob) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BatchJob. It customizes the JSON unmarshaling process for BatchJob objects.

type BatchJobResponse

type BatchJobResponse struct {
	Batchjob             BatchJob       `json:"batchjob"`
	AdditionalProperties map[string]any `json:"_"`
}

BatchJobResponse represents a BatchJobResponse struct.

func (BatchJobResponse) MarshalJSON

func (b BatchJobResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BatchJobResponse. It customizes the JSON marshaling process for BatchJobResponse objects.

func (*BatchJobResponse) UnmarshalJSON

func (b *BatchJobResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BatchJobResponse. It customizes the JSON unmarshaling process for BatchJobResponse objects.

type BillingManifest

type BillingManifest struct {
	LineItems              []BillingManifestItem `json:"line_items,omitempty"`
	TotalInCents           *int64                `json:"total_in_cents,omitempty"`
	TotalDiscountInCents   *int64                `json:"total_discount_in_cents,omitempty"`
	TotalTaxInCents        *int64                `json:"total_tax_in_cents,omitempty"`
	SubtotalInCents        *int64                `json:"subtotal_in_cents,omitempty"`
	StartDate              Optional[time.Time]   `json:"start_date"`
	EndDate                Optional[time.Time]   `json:"end_date"`
	PeriodType             Optional[string]      `json:"period_type"`
	ExistingBalanceInCents *int64                `json:"existing_balance_in_cents,omitempty"`
	AdditionalProperties   map[string]any        `json:"_"`
}

BillingManifest represents a BillingManifest struct.

func (BillingManifest) MarshalJSON

func (b BillingManifest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BillingManifest. It customizes the JSON marshaling process for BillingManifest objects.

func (*BillingManifest) UnmarshalJSON

func (b *BillingManifest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BillingManifest. It customizes the JSON unmarshaling process for BillingManifest objects.

type BillingManifestItem

type BillingManifestItem struct {
	// A handle for the line item transaction type
	TransactionType *LineItemTransactionType `json:"transaction_type,omitempty"`
	// A handle for the billing manifest line item kind
	Kind                  *BillingManifestLineItemKind `json:"kind,omitempty"`
	AmountInCents         *int64                       `json:"amount_in_cents,omitempty"`
	Memo                  *string                      `json:"memo,omitempty"`
	DiscountAmountInCents *int64                       `json:"discount_amount_in_cents,omitempty"`
	TaxableAmountInCents  *int64                       `json:"taxable_amount_in_cents,omitempty"`
	ComponentId           *int                         `json:"component_id,omitempty"`
	ComponentHandle       *string                      `json:"component_handle,omitempty"`
	ComponentName         *string                      `json:"component_name,omitempty"`
	ProductId             *int                         `json:"product_id,omitempty"`
	ProductHandle         *string                      `json:"product_handle,omitempty"`
	ProductName           *string                      `json:"product_name,omitempty"`
	PeriodRangeStart      *string                      `json:"period_range_start,omitempty"`
	PeriodRangeEnd        *string                      `json:"period_range_end,omitempty"`
	AdditionalProperties  map[string]any               `json:"_"`
}

BillingManifestItem represents a BillingManifestItem struct.

func (BillingManifestItem) MarshalJSON

func (b BillingManifestItem) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BillingManifestItem. It customizes the JSON marshaling process for BillingManifestItem objects.

func (*BillingManifestItem) UnmarshalJSON

func (b *BillingManifestItem) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BillingManifestItem. It customizes the JSON unmarshaling process for BillingManifestItem objects.

type BillingManifestLineItemKind

type BillingManifestLineItemKind string

BillingManifestLineItemKind is a string enum. A handle for the billing manifest line item kind

const (
	BillingManifestLineItemKind_BASELINE  BillingManifestLineItemKind = "baseline"
	BillingManifestLineItemKind_INITIAL   BillingManifestLineItemKind = "initial"
	BillingManifestLineItemKind_TRIAL     BillingManifestLineItemKind = "trial"
	BillingManifestLineItemKind_COUPON    BillingManifestLineItemKind = "coupon"
	BillingManifestLineItemKind_COMPONENT BillingManifestLineItemKind = "component"
	BillingManifestLineItemKind_TAX       BillingManifestLineItemKind = "tax"
)

func (BillingManifestLineItemKind) MarshalJSON added in v0.2.0

func (e BillingManifestLineItemKind) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BillingManifestLineItemKind. It customizes the JSON marshaling process for BillingManifestLineItemKind objects.

func (*BillingManifestLineItemKind) UnmarshalJSON added in v0.2.0

func (e *BillingManifestLineItemKind) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BillingManifestLineItemKind. It customizes the JSON unmarshaling process for BillingManifestLineItemKind objects.

type BillingSchedule

type BillingSchedule struct {
	// The initial_billing_at attribute in Maxio allows you to specify a custom starting date for billing cycles associated with components that have their own billing frequency set. Only ISO8601 format is supported.
	InitialBillingAt     *time.Time     `json:"initial_billing_at,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

BillingSchedule represents a BillingSchedule struct. This attribute is particularly useful when you need to align billing events for different components on distinct schedules within a subscription. Please note this only works for site with Multifrequency enabled

func (BillingSchedule) MarshalJSON

func (b BillingSchedule) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BillingSchedule. It customizes the JSON marshaling process for BillingSchedule objects.

func (*BillingSchedule) UnmarshalJSON

func (b *BillingSchedule) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BillingSchedule. It customizes the JSON unmarshaling process for BillingSchedule objects.

type Breakouts

type Breakouts struct {
	PlanAmountInCents    *int64         `json:"plan_amount_in_cents,omitempty"`
	PlanAmountFormatted  *string        `json:"plan_amount_formatted,omitempty"`
	UsageAmountInCents   *int64         `json:"usage_amount_in_cents,omitempty"`
	UsageAmountFormatted *string        `json:"usage_amount_formatted,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

Breakouts represents a Breakouts struct.

func (Breakouts) MarshalJSON

func (b Breakouts) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Breakouts. It customizes the JSON marshaling process for Breakouts objects.

func (*Breakouts) UnmarshalJSON

func (b *Breakouts) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Breakouts. It customizes the JSON unmarshaling process for Breakouts objects.

type BulkComponentsPricePointAssignment added in v0.1.0

type BulkComponentsPricePointAssignment struct {
	Components           []ComponentPricePointAssignment `json:"components,omitempty"`
	AdditionalProperties map[string]any                  `json:"_"`
}

BulkComponentsPricePointAssignment represents a BulkComponentsPricePointAssignment struct.

func (BulkComponentsPricePointAssignment) MarshalJSON added in v0.1.0

func (b BulkComponentsPricePointAssignment) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BulkComponentsPricePointAssignment. It customizes the JSON marshaling process for BulkComponentsPricePointAssignment objects.

func (*BulkComponentsPricePointAssignment) UnmarshalJSON added in v0.1.0

func (b *BulkComponentsPricePointAssignment) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BulkComponentsPricePointAssignment. It customizes the JSON unmarshaling process for BulkComponentsPricePointAssignment objects.

type BulkCreateProductPricePointsRequest

type BulkCreateProductPricePointsRequest struct {
	PricePoints          []CreateProductPricePoint `json:"price_points"`
	AdditionalProperties map[string]any            `json:"_"`
}

BulkCreateProductPricePointsRequest represents a BulkCreateProductPricePointsRequest struct.

func (BulkCreateProductPricePointsRequest) MarshalJSON

func (b BulkCreateProductPricePointsRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BulkCreateProductPricePointsRequest. It customizes the JSON marshaling process for BulkCreateProductPricePointsRequest objects.

func (*BulkCreateProductPricePointsRequest) UnmarshalJSON

func (b *BulkCreateProductPricePointsRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BulkCreateProductPricePointsRequest. It customizes the JSON unmarshaling process for BulkCreateProductPricePointsRequest objects.

type BulkCreateProductPricePointsResponse

type BulkCreateProductPricePointsResponse struct {
	PricePoints          []ProductPricePoint `json:"price_points,omitempty"`
	AdditionalProperties map[string]any      `json:"_"`
}

BulkCreateProductPricePointsResponse represents a BulkCreateProductPricePointsResponse struct.

func (BulkCreateProductPricePointsResponse) MarshalJSON

func (b BulkCreateProductPricePointsResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BulkCreateProductPricePointsResponse. It customizes the JSON marshaling process for BulkCreateProductPricePointsResponse objects.

func (*BulkCreateProductPricePointsResponse) UnmarshalJSON

func (b *BulkCreateProductPricePointsResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BulkCreateProductPricePointsResponse. It customizes the JSON unmarshaling process for BulkCreateProductPricePointsResponse objects.

type BulkCreateSegments

type BulkCreateSegments struct {
	Segments             []CreateSegment `json:"segments,omitempty"`
	AdditionalProperties map[string]any  `json:"_"`
}

BulkCreateSegments represents a BulkCreateSegments struct.

func (BulkCreateSegments) MarshalJSON

func (b BulkCreateSegments) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BulkCreateSegments. It customizes the JSON marshaling process for BulkCreateSegments objects.

func (*BulkCreateSegments) UnmarshalJSON

func (b *BulkCreateSegments) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BulkCreateSegments. It customizes the JSON unmarshaling process for BulkCreateSegments objects.

type BulkUpdateSegments

type BulkUpdateSegments struct {
	Segments             []BulkUpdateSegmentsItem `json:"segments,omitempty"`
	AdditionalProperties map[string]any           `json:"_"`
}

BulkUpdateSegments represents a BulkUpdateSegments struct.

func (BulkUpdateSegments) MarshalJSON

func (b BulkUpdateSegments) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BulkUpdateSegments. It customizes the JSON marshaling process for BulkUpdateSegments objects.

func (*BulkUpdateSegments) UnmarshalJSON

func (b *BulkUpdateSegments) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BulkUpdateSegments. It customizes the JSON unmarshaling process for BulkUpdateSegments objects.

type BulkUpdateSegmentsItem

type BulkUpdateSegmentsItem struct {
	// The ID of the segment you want to update.
	Id int `json:"id"`
	// The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes.
	PricingScheme        PricingScheme                `json:"pricing_scheme"`
	Prices               []CreateOrUpdateSegmentPrice `json:"prices"`
	AdditionalProperties map[string]any               `json:"_"`
}

BulkUpdateSegmentsItem represents a BulkUpdateSegmentsItem struct.

func (BulkUpdateSegmentsItem) MarshalJSON

func (b BulkUpdateSegmentsItem) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for BulkUpdateSegmentsItem. It customizes the JSON marshaling process for BulkUpdateSegmentsItem objects.

func (*BulkUpdateSegmentsItem) UnmarshalJSON

func (b *BulkUpdateSegmentsItem) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for BulkUpdateSegmentsItem. It customizes the JSON unmarshaling process for BulkUpdateSegmentsItem objects.

type CalendarBilling

type CalendarBilling struct {
	// A day of month that subscription will be processed on. Can be 1 up to 28 or 'end'.
	SnapDay                    *CalendarBillingSnapDay `json:"snap_day,omitempty"`
	CalendarBillingFirstCharge *FirstChargeType        `json:"calendar_billing_first_charge,omitempty"`
	AdditionalProperties       map[string]any          `json:"_"`
}

CalendarBilling represents a CalendarBilling struct. (Optional). Cannot be used when also specifying next_billing_at

func (CalendarBilling) MarshalJSON

func (c CalendarBilling) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CalendarBilling. It customizes the JSON marshaling process for CalendarBilling objects.

func (*CalendarBilling) UnmarshalJSON

func (c *CalendarBilling) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CalendarBilling. It customizes the JSON unmarshaling process for CalendarBilling objects.

type CalendarBillingSnapDay added in v0.1.0

type CalendarBillingSnapDay struct {
	// contains filtered or unexported fields
}

CalendarBillingSnapDay represents a CalendarBillingSnapDay struct. This is a container for one-of cases.

func (*CalendarBillingSnapDay) AsNumber added in v0.1.0

func (c *CalendarBillingSnapDay) AsNumber() (
	*int,
	bool)

func (*CalendarBillingSnapDay) AsString added in v0.1.0

func (c *CalendarBillingSnapDay) AsString() (
	*string,
	bool)

func (CalendarBillingSnapDay) MarshalJSON added in v0.1.0

func (c CalendarBillingSnapDay) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CalendarBillingSnapDay. It customizes the JSON marshaling process for CalendarBillingSnapDay objects.

func (CalendarBillingSnapDay) String added in v0.1.0

func (c CalendarBillingSnapDay) String() string

String converts the CalendarBillingSnapDay object to a string representation.

func (*CalendarBillingSnapDay) UnmarshalJSON added in v0.1.0

func (c *CalendarBillingSnapDay) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CalendarBillingSnapDay. It customizes the JSON unmarshaling process for CalendarBillingSnapDay objects.

type CancelGroupedSubscriptionsRequest

type CancelGroupedSubscriptionsRequest struct {
	ChargeUnbilledUsage  *bool          `json:"charge_unbilled_usage,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

CancelGroupedSubscriptionsRequest represents a CancelGroupedSubscriptionsRequest struct.

func (CancelGroupedSubscriptionsRequest) MarshalJSON

func (c CancelGroupedSubscriptionsRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CancelGroupedSubscriptionsRequest. It customizes the JSON marshaling process for CancelGroupedSubscriptionsRequest objects.

func (*CancelGroupedSubscriptionsRequest) UnmarshalJSON

func (c *CancelGroupedSubscriptionsRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CancelGroupedSubscriptionsRequest. It customizes the JSON unmarshaling process for CancelGroupedSubscriptionsRequest objects.

type CancellationMethod

type CancellationMethod string

CancellationMethod is a string enum. The process used to cancel the subscription, if the subscription has been canceled. It is nil if the subscription's state is not canceled.

const (
	CancellationMethod_MERCHANTUI    CancellationMethod = "merchant_ui"
	CancellationMethod_MERCHANTAPI   CancellationMethod = "merchant_api"
	CancellationMethod_DUNNING       CancellationMethod = "dunning"
	CancellationMethod_BILLINGPORTAL CancellationMethod = "billing_portal"
	CancellationMethod_UNKNOWN       CancellationMethod = "unknown"
)

func (CancellationMethod) MarshalJSON added in v0.2.0

func (e CancellationMethod) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CancellationMethod. It customizes the JSON marshaling process for CancellationMethod objects.

func (*CancellationMethod) UnmarshalJSON added in v0.2.0

func (e *CancellationMethod) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CancellationMethod. It customizes the JSON unmarshaling process for CancellationMethod objects.

type CancellationOptions

type CancellationOptions struct {
	// For your internal use. An indication as to why the subscription is being canceled.
	CancellationMessage *string `json:"cancellation_message,omitempty"`
	// The reason code associated with the cancellation. See the list of reason codes associated with your site.
	ReasonCode           *string        `json:"reason_code,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

CancellationOptions represents a CancellationOptions struct.

func (CancellationOptions) MarshalJSON

func (c CancellationOptions) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CancellationOptions. It customizes the JSON marshaling process for CancellationOptions objects.

func (*CancellationOptions) UnmarshalJSON

func (c *CancellationOptions) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CancellationOptions. It customizes the JSON unmarshaling process for CancellationOptions objects.

type CancellationRequest

type CancellationRequest struct {
	Subscription         CancellationOptions `json:"subscription"`
	AdditionalProperties map[string]any      `json:"_"`
}

CancellationRequest represents a CancellationRequest struct.

func (CancellationRequest) MarshalJSON

func (c CancellationRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CancellationRequest. It customizes the JSON marshaling process for CancellationRequest objects.

func (*CancellationRequest) UnmarshalJSON

func (c *CancellationRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CancellationRequest. It customizes the JSON unmarshaling process for CancellationRequest objects.

type CardType

type CardType string

CardType is a string enum. The type of card used.

const (
	CardType_VISA               CardType = "visa"
	CardType_MASTER             CardType = "master"
	CardType_ELO                CardType = "elo"
	CardType_CABAL              CardType = "cabal"
	CardType_ALELO              CardType = "alelo"
	CardType_DISCOVER           CardType = "discover"
	CardType_AMERICANEXPRESS    CardType = "american_express"
	CardType_NARANJA            CardType = "naranja"
	CardType_DINERSCLUB         CardType = "diners_club"
	CardType_JCB                CardType = "jcb"
	CardType_DANKORT            CardType = "dankort"
	CardType_MAESTRO            CardType = "maestro"
	CardType_MAESTRONOLUHN      CardType = "maestro_no_luhn"
	CardType_FORBRUGSFORENINGEN CardType = "forbrugsforeningen"
	CardType_SODEXO             CardType = "sodexo"
	CardType_ALIA               CardType = "alia"
	CardType_VR                 CardType = "vr"
	CardType_UNIONPAY           CardType = "unionpay"
	CardType_CARNET             CardType = "carnet"
	CardType_CARTESBANCAIRES    CardType = "cartes_bancaires"
	CardType_OLIMPICA           CardType = "olimpica"
	CardType_CREDITEL           CardType = "creditel"
	CardType_CONFIABLE          CardType = "confiable"
	CardType_SYNCHRONY          CardType = "synchrony"
	CardType_ROUTEX             CardType = "routex"
	CardType_MADA               CardType = "mada"
	CardType_BPPLUS             CardType = "bp_plus"
	CardType_PASSCARD           CardType = "passcard"
	CardType_EDENRED            CardType = "edenred"
	CardType_ANDA               CardType = "anda"
	CardType_TARJETAD           CardType = "tarjeta-d"
	CardType_HIPERCARD          CardType = "hipercard"
	CardType_BOGUS              CardType = "bogus"
	CardType_ENUMSWITCH         CardType = "switch"
	CardType_SOLO               CardType = "solo"
	CardType_LASER              CardType = "laser"
)

func (CardType) MarshalJSON added in v0.2.0

func (e CardType) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CardType. It customizes the JSON marshaling process for CardType objects.

func (*CardType) UnmarshalJSON added in v0.2.0

func (e *CardType) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CardType. It customizes the JSON unmarshaling process for CardType objects.

type ChangeChargebackStatusEvent added in v0.2.0

type ChangeChargebackStatusEvent struct {
	Id        int64            `json:"id"`
	Timestamp time.Time        `json:"timestamp"`
	Invoice   Invoice          `json:"invoice"`
	EventType InvoiceEventType `json:"event_type"`
	// Example schema for an `change_chargeback_status` event
	EventData            ChangeChargebackStatusEventData `json:"event_data"`
	AdditionalProperties map[string]any                  `json:"_"`
}

ChangeChargebackStatusEvent represents a ChangeChargebackStatusEvent struct.

func (ChangeChargebackStatusEvent) MarshalJSON added in v0.2.0

func (c ChangeChargebackStatusEvent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ChangeChargebackStatusEvent. It customizes the JSON marshaling process for ChangeChargebackStatusEvent objects.

func (*ChangeChargebackStatusEvent) UnmarshalJSON added in v0.2.0

func (c *ChangeChargebackStatusEvent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ChangeChargebackStatusEvent. It customizes the JSON unmarshaling process for ChangeChargebackStatusEvent objects.

type ChangeChargebackStatusEventData added in v0.2.0

type ChangeChargebackStatusEventData struct {
	ChargebackStatus     ChargebackStatus `json:"chargeback_status"`
	AdditionalProperties map[string]any   `json:"_"`
}

ChangeChargebackStatusEventData represents a ChangeChargebackStatusEventData struct. Example schema for an `change_chargeback_status` event

func (ChangeChargebackStatusEventData) MarshalJSON added in v0.2.0

func (c ChangeChargebackStatusEventData) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ChangeChargebackStatusEventData. It customizes the JSON marshaling process for ChangeChargebackStatusEventData objects.

func (*ChangeChargebackStatusEventData) UnmarshalJSON added in v0.2.0

func (c *ChangeChargebackStatusEventData) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ChangeChargebackStatusEventData. It customizes the JSON unmarshaling process for ChangeChargebackStatusEventData objects.

type ChangeInvoiceCollectionMethodEvent added in v0.2.0

type ChangeInvoiceCollectionMethodEvent struct {
	Id        int64            `json:"id"`
	Timestamp time.Time        `json:"timestamp"`
	Invoice   Invoice          `json:"invoice"`
	EventType InvoiceEventType `json:"event_type"`
	// Example schema for an `change_invoice_collection_method` event
	EventData            ChangeInvoiceCollectionMethodEventData `json:"event_data"`
	AdditionalProperties map[string]any                         `json:"_"`
}

ChangeInvoiceCollectionMethodEvent represents a ChangeInvoiceCollectionMethodEvent struct.

func (ChangeInvoiceCollectionMethodEvent) MarshalJSON added in v0.2.0

func (c ChangeInvoiceCollectionMethodEvent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ChangeInvoiceCollectionMethodEvent. It customizes the JSON marshaling process for ChangeInvoiceCollectionMethodEvent objects.

func (*ChangeInvoiceCollectionMethodEvent) UnmarshalJSON added in v0.2.0

func (c *ChangeInvoiceCollectionMethodEvent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ChangeInvoiceCollectionMethodEvent. It customizes the JSON unmarshaling process for ChangeInvoiceCollectionMethodEvent objects.

type ChangeInvoiceCollectionMethodEventData added in v0.1.0

type ChangeInvoiceCollectionMethodEventData struct {
	// The previous collection method of the invoice.
	FromCollectionMethod string `json:"from_collection_method"`
	// The new collection method of the invoice.
	ToCollectionMethod   string         `json:"to_collection_method"`
	AdditionalProperties map[string]any `json:"_"`
}

ChangeInvoiceCollectionMethodEventData represents a ChangeInvoiceCollectionMethodEventData struct. Example schema for an `change_invoice_collection_method` event

func (ChangeInvoiceCollectionMethodEventData) MarshalJSON added in v0.1.0

func (c ChangeInvoiceCollectionMethodEventData) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ChangeInvoiceCollectionMethodEventData. It customizes the JSON marshaling process for ChangeInvoiceCollectionMethodEventData objects.

func (*ChangeInvoiceCollectionMethodEventData) UnmarshalJSON added in v0.1.0

func (c *ChangeInvoiceCollectionMethodEventData) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ChangeInvoiceCollectionMethodEventData. It customizes the JSON unmarshaling process for ChangeInvoiceCollectionMethodEventData objects.

type ChangeInvoiceStatusEvent added in v0.2.0

type ChangeInvoiceStatusEvent struct {
	Id        int64            `json:"id"`
	Timestamp time.Time        `json:"timestamp"`
	Invoice   Invoice          `json:"invoice"`
	EventType InvoiceEventType `json:"event_type"`
	// Example schema for an `change_invoice_status` event
	EventData            ChangeInvoiceStatusEventData `json:"event_data"`
	AdditionalProperties map[string]any               `json:"_"`
}

ChangeInvoiceStatusEvent represents a ChangeInvoiceStatusEvent struct.

func (ChangeInvoiceStatusEvent) MarshalJSON added in v0.2.0

func (c ChangeInvoiceStatusEvent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ChangeInvoiceStatusEvent. It customizes the JSON marshaling process for ChangeInvoiceStatusEvent objects.

func (*ChangeInvoiceStatusEvent) UnmarshalJSON added in v0.2.0

func (c *ChangeInvoiceStatusEvent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ChangeInvoiceStatusEvent. It customizes the JSON unmarshaling process for ChangeInvoiceStatusEvent objects.

type ChangeInvoiceStatusEventData added in v0.2.0

type ChangeInvoiceStatusEventData struct {
	// Identifier for the transaction within the payment gateway.
	GatewayTransId *string `json:"gateway_trans_id,omitempty"`
	// The monetary value associated with the linked payment, expressed in dollars.
	Amount *string `json:"amount,omitempty"`
	// The status of the invoice before any changes occurred. See [Invoice Statuses](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405078794253-Introduction-to-Invoices#invoice-statuses) for more.
	FromStatus InvoiceStatus `json:"from_status"`
	// The updated status of the invoice after changes have been made. See [Invoice Statuses](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405078794253-Introduction-to-Invoices#invoice-statuses) for more.
	ToStatus             InvoiceStatus              `json:"to_status"`
	ConsolidationLevel   *InvoiceConsolidationLevel `json:"consolidation_level,omitempty"`
	AdditionalProperties map[string]any             `json:"_"`
}

ChangeInvoiceStatusEventData represents a ChangeInvoiceStatusEventData struct. Example schema for an `change_invoice_status` event

func (ChangeInvoiceStatusEventData) MarshalJSON added in v0.2.0

func (c ChangeInvoiceStatusEventData) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ChangeInvoiceStatusEventData. It customizes the JSON marshaling process for ChangeInvoiceStatusEventData objects.

func (*ChangeInvoiceStatusEventData) UnmarshalJSON added in v0.2.0

func (c *ChangeInvoiceStatusEventData) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ChangeInvoiceStatusEventData. It customizes the JSON unmarshaling process for ChangeInvoiceStatusEventData objects.

type ChargebackStatus added in v0.2.0

type ChargebackStatus string

ChargebackStatus is a string enum. The current chargeback status.

const (
	ChargebackStatus_OPEN   ChargebackStatus = "open"
	ChargebackStatus_LOST   ChargebackStatus = "lost"
	ChargebackStatus_WON    ChargebackStatus = "won"
	ChargebackStatus_CLOSED ChargebackStatus = "closed"
)

func (ChargebackStatus) MarshalJSON added in v0.2.0

func (e ChargebackStatus) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ChargebackStatus. It customizes the JSON marshaling process for ChargebackStatus objects.

func (*ChargebackStatus) UnmarshalJSON added in v0.2.0

func (e *ChargebackStatus) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ChargebackStatus. It customizes the JSON unmarshaling process for ChargebackStatus objects.

type ChargifyEBB

type ChargifyEBB struct {
	// This timestamp determines what billing period the event will be billed in. If your request payload does not include it, Chargify will add `chargify.timestamp` to the event payload and set the value to `now`.
	Timestamp *time.Time `json:"timestamp,omitempty"`
	// A unique ID set by Chargify. Please note that this field is reserved. If `chargify.id` is present in the request payload, it will be overwritten.
	Id *string `json:"id,omitempty"`
	// An ISO-8601 timestamp, set by Chargify at the time each event is recorded. Please note that this field is reserved. If `chargify.created_at` is present in the request payload, it will be overwritten.
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// User-defined string scoped per-stream. Duplicate events within a stream will be silently ignored. Tokens expire after 31 days.
	UniquenessToken *string `json:"uniqueness_token,omitempty"`
	// Id of Maxio Advanced Billing Subscription which is connected to this event.
	// Provide `subscription_id` if you configured `chargify.subscription_id` as Subscription Identifier in your Event Stream.
	SubscriptionId *int `json:"subscription_id,omitempty"`
	// Reference of Maxio Advanced Billing Subscription which is connected to this event.
	// Provide `subscription_reference` if you configured `chargify.subscription_reference` as Subscription Identifier in your Event Stream.
	SubscriptionReference *string        `json:"subscription_reference,omitempty"`
	AdditionalProperties  map[string]any `json:"_"`
}

ChargifyEBB represents a ChargifyEBB struct.

func (ChargifyEBB) MarshalJSON

func (c ChargifyEBB) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ChargifyEBB. It customizes the JSON marshaling process for ChargifyEBB objects.

func (*ChargifyEBB) UnmarshalJSON

func (c *ChargifyEBB) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ChargifyEBB. It customizes the JSON unmarshaling process for ChargifyEBB objects.

type CleanupScope

type CleanupScope string

CleanupScope is a string enum. all: Will clear all products, customers, and related subscriptions from the site. customers: Will clear only customers and related subscriptions (leaving the products untouched) for the site. Revenue will also be reset to 0.

const (
	CleanupScope_ALL       CleanupScope = "all"
	CleanupScope_CUSTOMERS CleanupScope = "customers"
)

func (CleanupScope) MarshalJSON added in v0.2.0

func (e CleanupScope) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CleanupScope. It customizes the JSON marshaling process for CleanupScope objects.

func (*CleanupScope) UnmarshalJSON added in v0.2.0

func (e *CleanupScope) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CleanupScope. It customizes the JSON unmarshaling process for CleanupScope objects.

type CollectionMethod added in v0.1.0

type CollectionMethod string

CollectionMethod is a string enum. The type of payment collection to be used in the subscription. For legacy Statements Architecture valid options are - `invoice`, `automatic`. For current Relationship Invoicing Architecture valid options are - `remittance`, `automatic`, `prepaid`.

const (
	CollectionMethod_AUTOMATIC  CollectionMethod = "automatic"
	CollectionMethod_REMITTANCE CollectionMethod = "remittance"
	CollectionMethod_PREPAID    CollectionMethod = "prepaid"
	CollectionMethod_INVOICE    CollectionMethod = "invoice"
)

func (CollectionMethod) MarshalJSON added in v0.2.0

func (e CollectionMethod) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CollectionMethod. It customizes the JSON marshaling process for CollectionMethod objects.

func (*CollectionMethod) UnmarshalJSON added in v0.2.0

func (e *CollectionMethod) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CollectionMethod. It customizes the JSON unmarshaling process for CollectionMethod objects.

type Component

type Component struct {
	// The unique ID assigned to the component by Chargify. This ID can be used to fetch the component from the API.
	Id *int `json:"id,omitempty"`
	// The name of the Component, suitable for display on statements. i.e. Text Messages.
	Name *string `json:"name,omitempty"`
	// The component API handle
	Handle        Optional[string]        `json:"handle"`
	PricingScheme Optional[PricingScheme] `json:"pricing_scheme"`
	// The name of the unit that the component’s usage is measured in. i.e. message
	UnitName *string `json:"unit_name,omitempty"`
	// The amount the customer will be charged per unit. This field is only populated for ‘per_unit’ pricing schemes, otherwise it may be null.
	UnitPrice Optional[string] `json:"unit_price"`
	// The id of the Product Family to which the Component belongs
	ProductFamilyId *int `json:"product_family_id,omitempty"`
	// The name of the Product Family to which the Component belongs
	ProductFamilyName *string `json:"product_family_name,omitempty"`
	// deprecated - use unit_price instead
	PricePerUnitInCents Optional[int64] `json:"price_per_unit_in_cents"`
	// A handle for the component type
	Kind *ComponentKind `json:"kind,omitempty"`
	// Boolean flag describing whether a component is archived or not.
	Archived *bool `json:"archived,omitempty"`
	// Boolean flag describing whether a component is taxable or not.
	Taxable *bool `json:"taxable,omitempty"`
	// The description of the component.
	Description         Optional[string] `json:"description"`
	DefaultPricePointId Optional[int]    `json:"default_price_point_id"`
	// An array of price brackets. If the component uses the ‘per_unit’ pricing scheme, this array will be empty.
	OveragePrices Optional[[]ComponentPrice] `json:"overage_prices"`
	// An array of price brackets. If the component uses the ‘per_unit’ pricing scheme, this array will be empty.
	Prices Optional[[]ComponentPrice] `json:"prices"`
	// Count for the number of price points associated with the component
	PricePointCount *int `json:"price_point_count,omitempty"`
	// URL that points to the location to read the existing price points via GET request
	PricePointsUrl        Optional[string] `json:"price_points_url"`
	DefaultPricePointName *string          `json:"default_price_point_name,omitempty"`
	// A string representing the tax code related to the component type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters.
	TaxCode   Optional[string] `json:"tax_code"`
	Recurring *bool            `json:"recurring,omitempty"`
	// The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
	// Available values: `full`, `prorated`, `none`.
	UpgradeCharge Optional[CreditType] `json:"upgrade_charge"`
	// The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
	// Available values: `full`, `prorated`, `none`.
	DowngradeCredit Optional[CreditType] `json:"downgrade_credit"`
	// Timestamp indicating when this component was created
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// Timestamp indicating when this component was updated
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
	// Timestamp indicating when this component was archived
	ArchivedAt Optional[time.Time] `json:"archived_at"`
	// (Only available on Relationship Invoicing sites) Boolean flag describing if the service date range should show for the component on generated invoices.
	HideDateRangeOnInvoice    *bool `json:"hide_date_range_on_invoice,omitempty"`
	AllowFractionalQuantities *bool `json:"allow_fractional_quantities,omitempty"`
	// One of the following: Business Software, Consumer Software, Digital Services, Physical Goods, Other
	ItemCategory        Optional[ItemCategory] `json:"item_category"`
	UseSiteExchangeRate Optional[bool]         `json:"use_site_exchange_rate"`
	// E.g. Internal ID or SKU Number
	AccountingCode Optional[string] `json:"accounting_code"`
	// (Only for Event Based Components) This is an ID of a metric attached to the component. This metric is used to bill upon collected events.
	EventBasedBillingMetricId *int `json:"event_based_billing_metric_id,omitempty"`
	// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component's default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled.
	Interval *int `json:"interval,omitempty"`
	// A string representing the interval unit for this component's default price point, either month or day. This property is only available for sites with Multifrequency enabled.
	IntervalUnit         *IntervalUnit  `json:"interval_unit,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

Component represents a Component struct.

func (Component) MarshalJSON

func (c Component) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Component. It customizes the JSON marshaling process for Component objects.

func (*Component) UnmarshalJSON

func (c *Component) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Component. It customizes the JSON unmarshaling process for Component objects.

type ComponentAllocationChange added in v0.1.0

type ComponentAllocationChange struct {
	PreviousAllocation   int                                         `json:"previous_allocation"`
	NewAllocation        int                                         `json:"new_allocation"`
	ComponentId          int                                         `json:"component_id"`
	ComponentHandle      string                                      `json:"component_handle"`
	Memo                 string                                      `json:"memo"`
	AllocationId         int                                         `json:"allocation_id"`
	AllocatedQuantity    *ComponentAllocationChangeAllocatedQuantity `json:"allocated_quantity,omitempty"`
	AdditionalProperties map[string]any                              `json:"_"`
}

ComponentAllocationChange represents a ComponentAllocationChange struct.

func (ComponentAllocationChange) MarshalJSON added in v0.1.0

func (c ComponentAllocationChange) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ComponentAllocationChange. It customizes the JSON marshaling process for ComponentAllocationChange objects.

func (*ComponentAllocationChange) UnmarshalJSON added in v0.1.0

func (c *ComponentAllocationChange) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ComponentAllocationChange. It customizes the JSON unmarshaling process for ComponentAllocationChange objects.

type ComponentAllocationChangeAllocatedQuantity added in v0.1.0

type ComponentAllocationChangeAllocatedQuantity struct {
	// contains filtered or unexported fields
}

ComponentAllocationChangeAllocatedQuantity represents a ComponentAllocationChangeAllocatedQuantity struct. This is a container for one-of cases.

func (*ComponentAllocationChangeAllocatedQuantity) AsNumber added in v0.1.0

func (*ComponentAllocationChangeAllocatedQuantity) AsString added in v0.1.0

func (ComponentAllocationChangeAllocatedQuantity) MarshalJSON added in v0.1.0

MarshalJSON implements the json.Marshaler interface for ComponentAllocationChangeAllocatedQuantity. It customizes the JSON marshaling process for ComponentAllocationChangeAllocatedQuantity objects.

func (ComponentAllocationChangeAllocatedQuantity) String added in v0.1.0

String converts the ComponentAllocationChangeAllocatedQuantity object to a string representation.

func (*ComponentAllocationChangeAllocatedQuantity) UnmarshalJSON added in v0.1.0

func (c *ComponentAllocationChangeAllocatedQuantity) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ComponentAllocationChangeAllocatedQuantity. It customizes the JSON unmarshaling process for ComponentAllocationChangeAllocatedQuantity objects.

type ComponentAllocationErrorItem

type ComponentAllocationErrorItem struct {
	ComponentId          *int           `json:"component_id,omitempty"`
	Message              *string        `json:"message,omitempty"`
	Kind                 *string        `json:"kind,omitempty"`
	On                   *string        `json:"on,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ComponentAllocationErrorItem represents a ComponentAllocationErrorItem struct.

func (ComponentAllocationErrorItem) MarshalJSON

func (c ComponentAllocationErrorItem) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ComponentAllocationErrorItem. It customizes the JSON marshaling process for ComponentAllocationErrorItem objects.

func (*ComponentAllocationErrorItem) UnmarshalJSON

func (c *ComponentAllocationErrorItem) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ComponentAllocationErrorItem. It customizes the JSON unmarshaling process for ComponentAllocationErrorItem objects.

type ComponentCostData

type ComponentCostData struct {
	ComponentCodeId Optional[int] `json:"component_code_id"`
	PricePointId    *int          `json:"price_point_id,omitempty"`
	ProductId       *int          `json:"product_id,omitempty"`
	Quantity        *string       `json:"quantity,omitempty"`
	Amount          *string       `json:"amount,omitempty"`
	// The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes.
	PricingScheme        *PricingScheme              `json:"pricing_scheme,omitempty"`
	Tiers                []ComponentCostDataRateTier `json:"tiers,omitempty"`
	AdditionalProperties map[string]any              `json:"_"`
}

ComponentCostData represents a ComponentCostData struct.

func (ComponentCostData) MarshalJSON

func (c ComponentCostData) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ComponentCostData. It customizes the JSON marshaling process for ComponentCostData objects.

func (*ComponentCostData) UnmarshalJSON

func (c *ComponentCostData) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ComponentCostData. It customizes the JSON unmarshaling process for ComponentCostData objects.

type ComponentCostDataRateTier

type ComponentCostDataRateTier struct {
	StartingQuantity     *int           `json:"starting_quantity,omitempty"`
	EndingQuantity       Optional[int]  `json:"ending_quantity"`
	Quantity             *string        `json:"quantity,omitempty"`
	UnitPrice            *string        `json:"unit_price,omitempty"`
	Amount               *string        `json:"amount,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ComponentCostDataRateTier represents a ComponentCostDataRateTier struct.

func (ComponentCostDataRateTier) MarshalJSON

func (c ComponentCostDataRateTier) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ComponentCostDataRateTier. It customizes the JSON marshaling process for ComponentCostDataRateTier objects.

func (*ComponentCostDataRateTier) UnmarshalJSON

func (c *ComponentCostDataRateTier) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ComponentCostDataRateTier. It customizes the JSON unmarshaling process for ComponentCostDataRateTier objects.

type ComponentCurrencyPrice

type ComponentCurrencyPrice struct {
	Id                   *int           `json:"id,omitempty"`
	Currency             *string        `json:"currency,omitempty"`
	Price                *string        `json:"price,omitempty"`
	FormattedPrice       *string        `json:"formatted_price,omitempty"`
	PriceId              *int           `json:"price_id,omitempty"`
	PricePointId         *int           `json:"price_point_id,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ComponentCurrencyPrice represents a ComponentCurrencyPrice struct.

func (ComponentCurrencyPrice) MarshalJSON

func (c ComponentCurrencyPrice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ComponentCurrencyPrice. It customizes the JSON marshaling process for ComponentCurrencyPrice objects.

func (*ComponentCurrencyPrice) UnmarshalJSON

func (c *ComponentCurrencyPrice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ComponentCurrencyPrice. It customizes the JSON unmarshaling process for ComponentCurrencyPrice objects.

type ComponentCurrencyPricesResponse added in v0.1.0

type ComponentCurrencyPricesResponse struct {
	CurrencyPrices       []ComponentCurrencyPrice `json:"currency_prices"`
	AdditionalProperties map[string]any           `json:"_"`
}

ComponentCurrencyPricesResponse represents a ComponentCurrencyPricesResponse struct.

func (ComponentCurrencyPricesResponse) MarshalJSON added in v0.1.0

func (c ComponentCurrencyPricesResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ComponentCurrencyPricesResponse. It customizes the JSON marshaling process for ComponentCurrencyPricesResponse objects.

func (*ComponentCurrencyPricesResponse) UnmarshalJSON added in v0.1.0

func (c *ComponentCurrencyPricesResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ComponentCurrencyPricesResponse. It customizes the JSON unmarshaling process for ComponentCurrencyPricesResponse objects.

type ComponentCustomPrice

type ComponentCustomPrice struct {
	// Omit for On/Off components
	PricingScheme *PricingScheme `json:"pricing_scheme,omitempty"`
	// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled.
	Interval *int `json:"interval,omitempty"`
	// A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled.
	IntervalUnit *IntervalUnit `json:"interval_unit,omitempty"`
	// On/off components only need one price bracket starting at 1
	Prices               []Price        `json:"prices,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ComponentCustomPrice represents a ComponentCustomPrice struct. Create or update custom pricing unique to the subscription. Used in place of `price_point_id`.

func (ComponentCustomPrice) MarshalJSON

func (c ComponentCustomPrice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ComponentCustomPrice. It customizes the JSON marshaling process for ComponentCustomPrice objects.

func (*ComponentCustomPrice) UnmarshalJSON

func (c *ComponentCustomPrice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ComponentCustomPrice. It customizes the JSON unmarshaling process for ComponentCustomPrice objects.

type ComponentKind

type ComponentKind string

ComponentKind is a string enum. A handle for the component type

const (
	ComponentKind_METEREDCOMPONENT       ComponentKind = "metered_component"
	ComponentKind_QUANTITYBASEDCOMPONENT ComponentKind = "quantity_based_component"
	ComponentKind_ONOFFCOMPONENT         ComponentKind = "on_off_component"
	ComponentKind_PREPAIDUSAGECOMPONENT  ComponentKind = "prepaid_usage_component"
	ComponentKind_EVENTBASEDCOMPONENT    ComponentKind = "event_based_component"
)

func (ComponentKind) MarshalJSON added in v0.2.0

func (e ComponentKind) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ComponentKind. It customizes the JSON marshaling process for ComponentKind objects.

func (*ComponentKind) UnmarshalJSON added in v0.2.0

func (e *ComponentKind) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ComponentKind. It customizes the JSON unmarshaling process for ComponentKind objects.

type ComponentPrice

type ComponentPrice struct {
	Id                   *int           `json:"id,omitempty"`
	ComponentId          *int           `json:"component_id,omitempty"`
	StartingQuantity     *int           `json:"starting_quantity,omitempty"`
	EndingQuantity       Optional[int]  `json:"ending_quantity"`
	UnitPrice            *string        `json:"unit_price,omitempty"`
	PricePointId         *int           `json:"price_point_id,omitempty"`
	FormattedUnitPrice   *string        `json:"formatted_unit_price,omitempty"`
	SegmentId            Optional[int]  `json:"segment_id"`
	AdditionalProperties map[string]any `json:"_"`
}

ComponentPrice represents a ComponentPrice struct.

func (ComponentPrice) MarshalJSON

func (c ComponentPrice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ComponentPrice. It customizes the JSON marshaling process for ComponentPrice objects.

func (*ComponentPrice) UnmarshalJSON

func (c *ComponentPrice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ComponentPrice. It customizes the JSON unmarshaling process for ComponentPrice objects.

type ComponentPricePoint

type ComponentPricePoint struct {
	Id *int `json:"id,omitempty"`
	// Price point type. We expose the following types:
	// 1. **default**: a price point that is marked as a default price for a certain product.
	// 2. **custom**: a custom price point.
	// 3. **catalog**: a price point that is **not** marked as a default price for a certain product and is **not** a custom one.
	Type *PricePointType `json:"type,omitempty"`
	// Note: Refer to type attribute instead
	Default *bool   `json:"default,omitempty"` // Deprecated
	Name    *string `json:"name,omitempty"`
	// The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes.
	PricingScheme *PricingScheme      `json:"pricing_scheme,omitempty"`
	ComponentId   *int                `json:"component_id,omitempty"`
	Handle        Optional[string]    `json:"handle"`
	ArchivedAt    Optional[time.Time] `json:"archived_at"`
	CreatedAt     *time.Time          `json:"created_at,omitempty"`
	UpdatedAt     *time.Time          `json:"updated_at,omitempty"`
	Prices        []ComponentPrice    `json:"prices,omitempty"`
	// Whether to use the site level exchange rate or define your own prices for each currency if you have multiple currencies defined on the site. Defaults to true during creation.
	UseSiteExchangeRate *bool `json:"use_site_exchange_rate,omitempty"`
	// (only used for Custom Pricing - ie. when the price point's type is `custom`) The id of the subscription that the custom price point is for.
	SubscriptionId *int  `json:"subscription_id,omitempty"`
	TaxIncluded    *bool `json:"tax_included,omitempty"`
	// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled.
	Interval Optional[int] `json:"interval"`
	// A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled.
	IntervalUnit Optional[IntervalUnit] `json:"interval_unit"`
	// An array of currency pricing data is available when multiple currencies are defined for the site. It varies based on the use_site_exchange_rate setting for the price point. This parameter is present only in the response of read endpoints, after including the appropriate query parameter.
	CurrencyPrices       []ComponentCurrencyPrice `json:"currency_prices,omitempty"`
	AdditionalProperties map[string]any           `json:"_"`
}

ComponentPricePoint represents a ComponentPricePoint struct.

func (ComponentPricePoint) MarshalJSON

func (c ComponentPricePoint) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ComponentPricePoint. It customizes the JSON marshaling process for ComponentPricePoint objects.

func (*ComponentPricePoint) UnmarshalJSON

func (c *ComponentPricePoint) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ComponentPricePoint. It customizes the JSON unmarshaling process for ComponentPricePoint objects.

type ComponentPricePointAssignment added in v0.1.0

type ComponentPricePointAssignment struct {
	ComponentId          *int                                     `json:"component_id,omitempty"`
	PricePoint           *ComponentPricePointAssignmentPricePoint `json:"price_point,omitempty"`
	AdditionalProperties map[string]any                           `json:"_"`
}

ComponentPricePointAssignment represents a ComponentPricePointAssignment struct.

func (ComponentPricePointAssignment) MarshalJSON added in v0.1.0

func (c ComponentPricePointAssignment) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ComponentPricePointAssignment. It customizes the JSON marshaling process for ComponentPricePointAssignment objects.

func (*ComponentPricePointAssignment) UnmarshalJSON added in v0.1.0

func (c *ComponentPricePointAssignment) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ComponentPricePointAssignment. It customizes the JSON unmarshaling process for ComponentPricePointAssignment objects.

type ComponentPricePointAssignmentPricePoint added in v0.1.0

type ComponentPricePointAssignmentPricePoint struct {
	// contains filtered or unexported fields
}

ComponentPricePointAssignmentPricePoint represents a ComponentPricePointAssignmentPricePoint struct. This is a container for one-of cases.

func (*ComponentPricePointAssignmentPricePoint) AsNumber added in v0.1.0

func (*ComponentPricePointAssignmentPricePoint) AsString added in v0.1.0

func (ComponentPricePointAssignmentPricePoint) MarshalJSON added in v0.1.0

func (c ComponentPricePointAssignmentPricePoint) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ComponentPricePointAssignmentPricePoint. It customizes the JSON marshaling process for ComponentPricePointAssignmentPricePoint objects.

func (ComponentPricePointAssignmentPricePoint) String added in v0.1.0

String converts the ComponentPricePointAssignmentPricePoint object to a string representation.

func (*ComponentPricePointAssignmentPricePoint) UnmarshalJSON added in v0.1.0

func (c *ComponentPricePointAssignmentPricePoint) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ComponentPricePointAssignmentPricePoint. It customizes the JSON unmarshaling process for ComponentPricePointAssignmentPricePoint objects.

type ComponentPricePointErrorItem

type ComponentPricePointErrorItem struct {
	ComponentId          *int           `json:"component_id,omitempty"`
	Message              *string        `json:"message,omitempty"`
	PricePoint           *int           `json:"price_point,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ComponentPricePointErrorItem represents a ComponentPricePointErrorItem struct.

func (ComponentPricePointErrorItem) MarshalJSON

func (c ComponentPricePointErrorItem) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ComponentPricePointErrorItem. It customizes the JSON marshaling process for ComponentPricePointErrorItem objects.

func (*ComponentPricePointErrorItem) UnmarshalJSON

func (c *ComponentPricePointErrorItem) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ComponentPricePointErrorItem. It customizes the JSON unmarshaling process for ComponentPricePointErrorItem objects.

type ComponentPricePointItem added in v0.1.0

type ComponentPricePointItem struct {
	Name   *string `json:"name,omitempty"`
	Handle *string `json:"handle,omitempty"`
	// The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes.
	PricingScheme *PricingScheme `json:"pricing_scheme,omitempty"`
	// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled.
	Interval *int `json:"interval,omitempty"`
	// A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled.
	IntervalUnit         *IntervalUnit  `json:"interval_unit,omitempty"`
	Prices               []Price        `json:"prices,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ComponentPricePointItem represents a ComponentPricePointItem struct.

func (ComponentPricePointItem) MarshalJSON added in v0.1.0

func (c ComponentPricePointItem) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ComponentPricePointItem. It customizes the JSON marshaling process for ComponentPricePointItem objects.

func (*ComponentPricePointItem) UnmarshalJSON added in v0.1.0

func (c *ComponentPricePointItem) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ComponentPricePointItem. It customizes the JSON unmarshaling process for ComponentPricePointItem objects.

type ComponentPricePointResponse

type ComponentPricePointResponse struct {
	PricePoint           ComponentPricePoint `json:"price_point"`
	AdditionalProperties map[string]any      `json:"_"`
}

ComponentPricePointResponse represents a ComponentPricePointResponse struct.

func (ComponentPricePointResponse) MarshalJSON

func (c ComponentPricePointResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ComponentPricePointResponse. It customizes the JSON marshaling process for ComponentPricePointResponse objects.

func (*ComponentPricePointResponse) UnmarshalJSON

func (c *ComponentPricePointResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ComponentPricePointResponse. It customizes the JSON unmarshaling process for ComponentPricePointResponse objects.

type ComponentPricePointsResponse

type ComponentPricePointsResponse struct {
	PricePoints          []ComponentPricePoint `json:"price_points,omitempty"`
	Meta                 *ListPublicKeysMeta   `json:"meta,omitempty"`
	AdditionalProperties map[string]any        `json:"_"`
}

ComponentPricePointsResponse represents a ComponentPricePointsResponse struct.

func (ComponentPricePointsResponse) MarshalJSON

func (c ComponentPricePointsResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ComponentPricePointsResponse. It customizes the JSON marshaling process for ComponentPricePointsResponse objects.

func (*ComponentPricePointsResponse) UnmarshalJSON

func (c *ComponentPricePointsResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ComponentPricePointsResponse. It customizes the JSON unmarshaling process for ComponentPricePointsResponse objects.

type ComponentResponse

type ComponentResponse struct {
	Component            Component      `json:"component"`
	AdditionalProperties map[string]any `json:"_"`
}

ComponentResponse represents a ComponentResponse struct.

func (ComponentResponse) MarshalJSON

func (c ComponentResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ComponentResponse. It customizes the JSON marshaling process for ComponentResponse objects.

func (*ComponentResponse) UnmarshalJSON

func (c *ComponentResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ComponentResponse. It customizes the JSON unmarshaling process for ComponentResponse objects.

type CompoundingStrategy

type CompoundingStrategy string

CompoundingStrategy is a string enum.

const (
	CompoundingStrategy_COMPOUND  CompoundingStrategy = "compound"
	CompoundingStrategy_FULLPRICE CompoundingStrategy = "full-price"
)

func (CompoundingStrategy) MarshalJSON added in v0.2.0

func (e CompoundingStrategy) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CompoundingStrategy. It customizes the JSON marshaling process for CompoundingStrategy objects.

func (*CompoundingStrategy) UnmarshalJSON added in v0.2.0

func (e *CompoundingStrategy) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CompoundingStrategy. It customizes the JSON unmarshaling process for CompoundingStrategy objects.

type ConsolidatedInvoice

type ConsolidatedInvoice struct {
	Invoices             []Invoice      `json:"invoices,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ConsolidatedInvoice represents a ConsolidatedInvoice struct.

func (ConsolidatedInvoice) MarshalJSON

func (c ConsolidatedInvoice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ConsolidatedInvoice. It customizes the JSON marshaling process for ConsolidatedInvoice objects.

func (*ConsolidatedInvoice) UnmarshalJSON

func (c *ConsolidatedInvoice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ConsolidatedInvoice. It customizes the JSON unmarshaling process for ConsolidatedInvoice objects.

type CountResponse

type CountResponse struct {
	Count                *int           `json:"count,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

CountResponse represents a CountResponse struct.

func (CountResponse) MarshalJSON

func (c CountResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CountResponse. It customizes the JSON marshaling process for CountResponse objects.

func (*CountResponse) UnmarshalJSON

func (c *CountResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CountResponse. It customizes the JSON unmarshaling process for CountResponse objects.

type Coupon

type Coupon struct {
	Id                            *int                          `json:"id,omitempty"`
	Name                          *string                       `json:"name,omitempty"`
	Code                          *string                       `json:"code,omitempty"`
	Description                   *string                       `json:"description,omitempty"`
	Amount                        Optional[float64]             `json:"amount"`
	AmountInCents                 Optional[int]                 `json:"amount_in_cents"`
	ProductFamilyId               *int                          `json:"product_family_id,omitempty"`
	ProductFamilyName             Optional[string]              `json:"product_family_name"`
	StartDate                     *time.Time                    `json:"start_date,omitempty"`
	EndDate                       Optional[time.Time]           `json:"end_date"`
	Percentage                    Optional[string]              `json:"percentage"`
	Recurring                     *bool                         `json:"recurring,omitempty"`
	RecurringScheme               *RecurringScheme              `json:"recurring_scheme,omitempty"`
	DurationPeriodCount           Optional[int]                 `json:"duration_period_count"`
	DurationInterval              Optional[int]                 `json:"duration_interval"`
	DurationIntervalUnit          Optional[string]              `json:"duration_interval_unit"`
	DurationIntervalSpan          Optional[string]              `json:"duration_interval_span"`
	AllowNegativeBalance          *bool                         `json:"allow_negative_balance,omitempty"`
	ArchivedAt                    Optional[time.Time]           `json:"archived_at"`
	ConversionLimit               Optional[string]              `json:"conversion_limit"`
	Stackable                     *bool                         `json:"stackable,omitempty"`
	CompoundingStrategy           Optional[CompoundingStrategy] `json:"compounding_strategy"`
	UseSiteExchangeRate           *bool                         `json:"use_site_exchange_rate,omitempty"`
	CreatedAt                     *time.Time                    `json:"created_at,omitempty"`
	UpdatedAt                     *time.Time                    `json:"updated_at,omitempty"`
	DiscountType                  *DiscountType                 `json:"discount_type,omitempty"`
	ExcludeMidPeriodAllocations   *bool                         `json:"exclude_mid_period_allocations,omitempty"`
	ApplyOnCancelAtEndOfPeriod    *bool                         `json:"apply_on_cancel_at_end_of_period,omitempty"`
	ApplyOnSubscriptionExpiration *bool                         `json:"apply_on_subscription_expiration,omitempty"`
	CouponRestrictions            []CouponRestriction           `json:"coupon_restrictions,omitempty"`
	AdditionalProperties          map[string]any                `json:"_"`
}

Coupon represents a Coupon struct.

func (Coupon) MarshalJSON

func (c Coupon) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Coupon. It customizes the JSON marshaling process for Coupon objects.

func (*Coupon) UnmarshalJSON

func (c *Coupon) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Coupon. It customizes the JSON unmarshaling process for Coupon objects.

type CouponCurrency

type CouponCurrency struct {
	Id                   *int           `json:"id,omitempty"`
	Currency             *string        `json:"currency,omitempty"`
	Price                *int           `json:"price,omitempty"`
	CouponId             *int           `json:"coupon_id,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

CouponCurrency represents a CouponCurrency struct.

func (CouponCurrency) MarshalJSON

func (c CouponCurrency) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CouponCurrency. It customizes the JSON marshaling process for CouponCurrency objects.

func (*CouponCurrency) UnmarshalJSON

func (c *CouponCurrency) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CouponCurrency. It customizes the JSON unmarshaling process for CouponCurrency objects.

type CouponCurrencyRequest

type CouponCurrencyRequest struct {
	CurrencyPrices       []UpdateCouponCurrency `json:"currency_prices"`
	AdditionalProperties map[string]any         `json:"_"`
}

CouponCurrencyRequest represents a CouponCurrencyRequest struct.

func (CouponCurrencyRequest) MarshalJSON

func (c CouponCurrencyRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CouponCurrencyRequest. It customizes the JSON marshaling process for CouponCurrencyRequest objects.

func (*CouponCurrencyRequest) UnmarshalJSON

func (c *CouponCurrencyRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CouponCurrencyRequest. It customizes the JSON unmarshaling process for CouponCurrencyRequest objects.

type CouponCurrencyResponse

type CouponCurrencyResponse struct {
	CurrencyPrices       []CouponCurrency `json:"currency_prices,omitempty"`
	AdditionalProperties map[string]any   `json:"_"`
}

CouponCurrencyResponse represents a CouponCurrencyResponse struct.

func (CouponCurrencyResponse) MarshalJSON

func (c CouponCurrencyResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CouponCurrencyResponse. It customizes the JSON marshaling process for CouponCurrencyResponse objects.

func (*CouponCurrencyResponse) UnmarshalJSON

func (c *CouponCurrencyResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CouponCurrencyResponse. It customizes the JSON unmarshaling process for CouponCurrencyResponse objects.

type CouponResponse

type CouponResponse struct {
	Coupon               *Coupon        `json:"coupon,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

CouponResponse represents a CouponResponse struct.

func (CouponResponse) MarshalJSON

func (c CouponResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CouponResponse. It customizes the JSON marshaling process for CouponResponse objects.

func (*CouponResponse) UnmarshalJSON

func (c *CouponResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CouponResponse. It customizes the JSON unmarshaling process for CouponResponse objects.

type CouponRestriction

type CouponRestriction struct {
	Id                   *int             `json:"id,omitempty"`
	ItemType             *RestrictionType `json:"item_type,omitempty"`
	ItemId               *int             `json:"item_id,omitempty"`
	Name                 *string          `json:"name,omitempty"`
	Handle               Optional[string] `json:"handle"`
	AdditionalProperties map[string]any   `json:"_"`
}

CouponRestriction represents a CouponRestriction struct.

func (CouponRestriction) MarshalJSON

func (c CouponRestriction) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CouponRestriction. It customizes the JSON marshaling process for CouponRestriction objects.

func (*CouponRestriction) UnmarshalJSON

func (c *CouponRestriction) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CouponRestriction. It customizes the JSON unmarshaling process for CouponRestriction objects.

type CouponSubcodes

type CouponSubcodes struct {
	Codes                []string       `json:"codes,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

CouponSubcodes represents a CouponSubcodes struct.

func (CouponSubcodes) MarshalJSON

func (c CouponSubcodes) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CouponSubcodes. It customizes the JSON marshaling process for CouponSubcodes objects.

func (*CouponSubcodes) UnmarshalJSON

func (c *CouponSubcodes) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CouponSubcodes. It customizes the JSON unmarshaling process for CouponSubcodes objects.

type CouponSubcodesResponse

type CouponSubcodesResponse struct {
	CreatedCodes         []string       `json:"created_codes,omitempty"`
	DuplicateCodes       []string       `json:"duplicate_codes,omitempty"`
	InvalidCodes         []string       `json:"invalid_codes,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

CouponSubcodesResponse represents a CouponSubcodesResponse struct.

func (CouponSubcodesResponse) MarshalJSON

func (c CouponSubcodesResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CouponSubcodesResponse. It customizes the JSON marshaling process for CouponSubcodesResponse objects.

func (*CouponSubcodesResponse) UnmarshalJSON

func (c *CouponSubcodesResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CouponSubcodesResponse. It customizes the JSON unmarshaling process for CouponSubcodesResponse objects.

type CouponUsage

type CouponUsage struct {
	// The Chargify id of the product
	Id *int `json:"id,omitempty"`
	// Name of the product
	Name *string `json:"name,omitempty"`
	// Number of times the coupon has been applied
	Signups *int `json:"signups,omitempty"`
	// Dollar amount of customer savings as a result of the coupon.
	Savings Optional[int] `json:"savings"`
	// Dollar amount of customer savings as a result of the coupon.
	SavingsInCents Optional[int64] `json:"savings_in_cents"`
	// Total revenue of the all subscriptions that have received a discount from this coupon.
	Revenue Optional[int] `json:"revenue"`
	// Total revenue of the all subscriptions that have received a discount from this coupon.
	RevenueInCents       *int64         `json:"revenue_in_cents,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

CouponUsage represents a CouponUsage struct.

func (CouponUsage) MarshalJSON

func (c CouponUsage) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CouponUsage. It customizes the JSON marshaling process for CouponUsage objects.

func (*CouponUsage) UnmarshalJSON

func (c *CouponUsage) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CouponUsage. It customizes the JSON unmarshaling process for CouponUsage objects.

type CreateAllocation

type CreateAllocation struct {
	// The allocated quantity to which to set the line-items allocated quantity. By default, this is an integer. If decimal allocations are enabled for the component, it will be a decimal number. For On/Off components, use 1for on and 0 for off.
	Quantity float64 `json:"quantity"`
	// (required for the multiple allocations endpoint) The id associated with the component for which the allocation is being made
	ComponentId *int `json:"component_id,omitempty"`
	// A memo to record along with the allocation
	Memo *string `json:"memo,omitempty"`
	// The scheme used if the proration is a downgrade. Defaults to the site setting if one is not provided.
	ProrationDowngradeScheme *string `json:"proration_downgrade_scheme,omitempty"` // Deprecated
	// The scheme used if the proration is an upgrade. Defaults to the site setting if one is not provided.
	ProrationUpgradeScheme *string `json:"proration_upgrade_scheme,omitempty"` // Deprecated
	// If the change in cost is an upgrade, this determines if the charge should accrue to the next renewal or if capture should be attempted immediately. Defaults to the site setting if one is not provided.
	AccrueCharge *bool `json:"accrue_charge,omitempty"`
	// The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
	// Available values: `full`, `prorated`, `none`.
	DowngradeCredit Optional[CreditType] `json:"downgrade_credit"`
	// The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
	// Available values: `full`, `prorated`, `none`.
	UpgradeCharge Optional[CreditType] `json:"upgrade_charge"`
	// If set to true, if the immediate component payment fails, initiate dunning for the subscription.
	// Otherwise, leave the charges on the subscription to pay for at renewal. Defaults to false.
	InitiateDunning *bool `json:"initiate_dunning,omitempty"`
	// Price point that the allocation should be charged at. Accepts either the price point's id (integer) or handle (string). When not specified, the default price point will be used.
	PricePointId Optional[CreateAllocationPricePointId] `json:"price_point_id"`
	// This attribute is particularly useful when you need to align billing events for different components on distinct schedules within a subscription. Please note this only works for site with Multifrequency enabled
	BillingSchedule      *BillingSchedule `json:"billing_schedule,omitempty"`
	AdditionalProperties map[string]any   `json:"_"`
}

CreateAllocation represents a CreateAllocation struct.

func (CreateAllocation) MarshalJSON

func (c CreateAllocation) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateAllocation. It customizes the JSON marshaling process for CreateAllocation objects.

func (*CreateAllocation) UnmarshalJSON

func (c *CreateAllocation) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateAllocation. It customizes the JSON unmarshaling process for CreateAllocation objects.

type CreateAllocationPricePointId added in v0.1.0

type CreateAllocationPricePointId struct {
	// contains filtered or unexported fields
}

CreateAllocationPricePointId represents a CreateAllocationPricePointId struct. This is a container for one-of cases.

func (*CreateAllocationPricePointId) AsNumber added in v0.1.0

func (c *CreateAllocationPricePointId) AsNumber() (
	*int,
	bool)

func (*CreateAllocationPricePointId) AsString added in v0.1.0

func (c *CreateAllocationPricePointId) AsString() (
	*string,
	bool)

func (CreateAllocationPricePointId) MarshalJSON added in v0.1.0

func (c CreateAllocationPricePointId) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateAllocationPricePointId. It customizes the JSON marshaling process for CreateAllocationPricePointId objects.

func (CreateAllocationPricePointId) String added in v0.1.0

String converts the CreateAllocationPricePointId object to a string representation.

func (*CreateAllocationPricePointId) UnmarshalJSON added in v0.1.0

func (c *CreateAllocationPricePointId) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateAllocationPricePointId. It customizes the JSON unmarshaling process for CreateAllocationPricePointId objects.

type CreateAllocationRequest

type CreateAllocationRequest struct {
	Allocation           CreateAllocation `json:"allocation"`
	AdditionalProperties map[string]any   `json:"_"`
}

CreateAllocationRequest represents a CreateAllocationRequest struct.

func (CreateAllocationRequest) MarshalJSON

func (c CreateAllocationRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateAllocationRequest. It customizes the JSON marshaling process for CreateAllocationRequest objects.

func (*CreateAllocationRequest) UnmarshalJSON

func (c *CreateAllocationRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateAllocationRequest. It customizes the JSON unmarshaling process for CreateAllocationRequest objects.

type CreateComponentPricePoint added in v0.1.0

type CreateComponentPricePoint struct {
	Name   string  `json:"name"`
	Handle *string `json:"handle,omitempty"`
	// The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes.
	PricingScheme PricingScheme `json:"pricing_scheme"`
	Prices        []Price       `json:"prices"`
	// Whether to use the site level exchange rate or define your own prices for each currency if you have multiple currencies defined on the site.
	UseSiteExchangeRate *bool `json:"use_site_exchange_rate,omitempty"`
	// Whether or not the price point includes tax
	TaxIncluded *bool `json:"tax_included,omitempty"`
	// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this price point would renew every 30 days. This property is only available for sites with Multifrequency enabled.
	Interval *int `json:"interval,omitempty"`
	// A string representing the interval unit for this price point, either month or day. This property is only available for sites with Multifrequency enabled.
	IntervalUnit         *IntervalUnit  `json:"interval_unit,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

CreateComponentPricePoint represents a CreateComponentPricePoint struct.

func (CreateComponentPricePoint) MarshalJSON added in v0.1.0

func (c CreateComponentPricePoint) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateComponentPricePoint. It customizes the JSON marshaling process for CreateComponentPricePoint objects.

func (*CreateComponentPricePoint) UnmarshalJSON added in v0.1.0

func (c *CreateComponentPricePoint) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateComponentPricePoint. It customizes the JSON unmarshaling process for CreateComponentPricePoint objects.

type CreateComponentPricePointRequest

type CreateComponentPricePointRequest struct {
	PricePoint           CreateComponentPricePointRequestPricePoint `json:"price_point"`
	AdditionalProperties map[string]any                             `json:"_"`
}

CreateComponentPricePointRequest represents a CreateComponentPricePointRequest struct.

func (CreateComponentPricePointRequest) MarshalJSON

func (c CreateComponentPricePointRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateComponentPricePointRequest. It customizes the JSON marshaling process for CreateComponentPricePointRequest objects.

func (*CreateComponentPricePointRequest) UnmarshalJSON

func (c *CreateComponentPricePointRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateComponentPricePointRequest. It customizes the JSON unmarshaling process for CreateComponentPricePointRequest objects.

type CreateComponentPricePointRequestPricePoint added in v0.1.0

type CreateComponentPricePointRequestPricePoint struct {
	// contains filtered or unexported fields
}

CreateComponentPricePointRequestPricePoint represents a CreateComponentPricePointRequestPricePoint struct. This is a container for any-of cases.

func (*CreateComponentPricePointRequestPricePoint) AsCreateComponentPricePoint added in v0.1.0

func (c *CreateComponentPricePointRequestPricePoint) AsCreateComponentPricePoint() (
	*CreateComponentPricePoint,
	bool)

func (*CreateComponentPricePointRequestPricePoint) AsCreatePrepaidUsageComponentPricePoint added in v0.1.0

func (c *CreateComponentPricePointRequestPricePoint) AsCreatePrepaidUsageComponentPricePoint() (
	*CreatePrepaidUsageComponentPricePoint,
	bool)

func (CreateComponentPricePointRequestPricePoint) MarshalJSON added in v0.1.0

MarshalJSON implements the json.Marshaler interface for CreateComponentPricePointRequestPricePoint. It customizes the JSON marshaling process for CreateComponentPricePointRequestPricePoint objects.

func (CreateComponentPricePointRequestPricePoint) String added in v0.1.0

String converts the CreateComponentPricePointRequestPricePoint object to a string representation.

func (*CreateComponentPricePointRequestPricePoint) UnmarshalJSON added in v0.1.0

func (c *CreateComponentPricePointRequestPricePoint) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateComponentPricePointRequestPricePoint. It customizes the JSON unmarshaling process for CreateComponentPricePointRequestPricePoint objects.

type CreateComponentPricePointsRequest

type CreateComponentPricePointsRequest struct {
	PricePoints          []CreateComponentPricePointsRequestPricePoints `json:"price_points"`
	AdditionalProperties map[string]any                                 `json:"_"`
}

CreateComponentPricePointsRequest represents a CreateComponentPricePointsRequest struct.

func (CreateComponentPricePointsRequest) MarshalJSON

func (c CreateComponentPricePointsRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateComponentPricePointsRequest. It customizes the JSON marshaling process for CreateComponentPricePointsRequest objects.

func (*CreateComponentPricePointsRequest) UnmarshalJSON

func (c *CreateComponentPricePointsRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateComponentPricePointsRequest. It customizes the JSON unmarshaling process for CreateComponentPricePointsRequest objects.

type CreateComponentPricePointsRequestPricePoints added in v0.1.0

type CreateComponentPricePointsRequestPricePoints struct {
	// contains filtered or unexported fields
}

CreateComponentPricePointsRequestPricePoints represents a CreateComponentPricePointsRequestPricePoints struct. This is Array of a container for any-of cases.

func (*CreateComponentPricePointsRequestPricePoints) AsCreateComponentPricePoint added in v0.1.0

func (c *CreateComponentPricePointsRequestPricePoints) AsCreateComponentPricePoint() (
	*CreateComponentPricePoint,
	bool)

func (*CreateComponentPricePointsRequestPricePoints) AsCreatePrepaidUsageComponentPricePoint added in v0.1.0

func (c *CreateComponentPricePointsRequestPricePoints) AsCreatePrepaidUsageComponentPricePoint() (
	*CreatePrepaidUsageComponentPricePoint,
	bool)

func (CreateComponentPricePointsRequestPricePoints) MarshalJSON added in v0.1.0

MarshalJSON implements the json.Marshaler interface for CreateComponentPricePointsRequestPricePoints. It customizes the JSON marshaling process for CreateComponentPricePointsRequestPricePoints objects.

func (CreateComponentPricePointsRequestPricePoints) String added in v0.1.0

String converts the CreateComponentPricePointsRequestPricePoints object to a string representation.

func (*CreateComponentPricePointsRequestPricePoints) UnmarshalJSON added in v0.1.0

func (c *CreateComponentPricePointsRequestPricePoints) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateComponentPricePointsRequestPricePoints. It customizes the JSON unmarshaling process for CreateComponentPricePointsRequestPricePoints objects.

type CreateCreditNoteEvent added in v0.2.0

type CreateCreditNoteEvent struct {
	Id        int64            `json:"id"`
	Timestamp time.Time        `json:"timestamp"`
	Invoice   Invoice          `json:"invoice"`
	EventType InvoiceEventType `json:"event_type"`
	// Example schema for an `create_credit_note` event
	EventData            CreditNote     `json:"event_data"`
	AdditionalProperties map[string]any `json:"_"`
}

CreateCreditNoteEvent represents a CreateCreditNoteEvent struct.

func (CreateCreditNoteEvent) MarshalJSON added in v0.2.0

func (c CreateCreditNoteEvent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateCreditNoteEvent. It customizes the JSON marshaling process for CreateCreditNoteEvent objects.

func (*CreateCreditNoteEvent) UnmarshalJSON added in v0.2.0

func (c *CreateCreditNoteEvent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateCreditNoteEvent. It customizes the JSON unmarshaling process for CreateCreditNoteEvent objects.

type CreateCurrencyPrice

type CreateCurrencyPrice struct {
	// ISO code for a currency defined on the site level
	Currency *string `json:"currency,omitempty"`
	// Price for the price level in this currency
	Price *float64 `json:"price,omitempty"`
	// ID of the price that this corresponds with
	PriceId              *int           `json:"price_id,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

CreateCurrencyPrice represents a CreateCurrencyPrice struct.

func (CreateCurrencyPrice) MarshalJSON

func (c CreateCurrencyPrice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateCurrencyPrice. It customizes the JSON marshaling process for CreateCurrencyPrice objects.

func (*CreateCurrencyPrice) UnmarshalJSON

func (c *CreateCurrencyPrice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateCurrencyPrice. It customizes the JSON unmarshaling process for CreateCurrencyPrice objects.

type CreateCurrencyPricesRequest

type CreateCurrencyPricesRequest struct {
	CurrencyPrices       []CreateCurrencyPrice `json:"currency_prices"`
	AdditionalProperties map[string]any        `json:"_"`
}

CreateCurrencyPricesRequest represents a CreateCurrencyPricesRequest struct.

func (CreateCurrencyPricesRequest) MarshalJSON

func (c CreateCurrencyPricesRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateCurrencyPricesRequest. It customizes the JSON marshaling process for CreateCurrencyPricesRequest objects.

func (*CreateCurrencyPricesRequest) UnmarshalJSON

func (c *CreateCurrencyPricesRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateCurrencyPricesRequest. It customizes the JSON unmarshaling process for CreateCurrencyPricesRequest objects.

type CreateCustomer

type CreateCustomer struct {
	FirstName    string  `json:"first_name"`
	LastName     string  `json:"last_name"`
	Email        string  `json:"email"`
	CcEmails     *string `json:"cc_emails,omitempty"`
	Organization *string `json:"organization,omitempty"`
	Reference    *string `json:"reference,omitempty"`
	Address      *string `json:"address,omitempty"`
	Address2     *string `json:"address_2,omitempty"`
	City         *string `json:"city,omitempty"`
	State        *string `json:"state,omitempty"`
	Zip          *string `json:"zip,omitempty"`
	Country      *string `json:"country,omitempty"`
	Phone        *string `json:"phone,omitempty"`
	// Set a specific language on a customer record.
	Locale          *string `json:"locale,omitempty"`
	VatNumber       *string `json:"vat_number,omitempty"`
	TaxExempt       *bool   `json:"tax_exempt,omitempty"`
	TaxExemptReason *string `json:"tax_exempt_reason,omitempty"`
	// The parent ID in Chargify if applicable. Parent is another Customer object.
	ParentId             Optional[int]  `json:"parent_id"`
	AdditionalProperties map[string]any `json:"_"`
}

CreateCustomer represents a CreateCustomer struct.

func (CreateCustomer) MarshalJSON

func (c CreateCustomer) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateCustomer. It customizes the JSON marshaling process for CreateCustomer objects.

func (*CreateCustomer) UnmarshalJSON

func (c *CreateCustomer) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateCustomer. It customizes the JSON unmarshaling process for CreateCustomer objects.

type CreateCustomerRequest

type CreateCustomerRequest struct {
	Customer             CreateCustomer `json:"customer"`
	AdditionalProperties map[string]any `json:"_"`
}

CreateCustomerRequest represents a CreateCustomerRequest struct.

func (CreateCustomerRequest) MarshalJSON

func (c CreateCustomerRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateCustomerRequest. It customizes the JSON marshaling process for CreateCustomerRequest objects.

func (*CreateCustomerRequest) UnmarshalJSON

func (c *CreateCustomerRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateCustomerRequest. It customizes the JSON unmarshaling process for CreateCustomerRequest objects.

type CreateDebitNoteEvent added in v0.2.0

type CreateDebitNoteEvent struct {
	Id        int64            `json:"id"`
	Timestamp time.Time        `json:"timestamp"`
	Invoice   Invoice          `json:"invoice"`
	EventType InvoiceEventType `json:"event_type"`
	// Example schema for an `create_debit_note` event
	EventData            DebitNote      `json:"event_data"`
	AdditionalProperties map[string]any `json:"_"`
}

CreateDebitNoteEvent represents a CreateDebitNoteEvent struct.

func (CreateDebitNoteEvent) MarshalJSON added in v0.2.0

func (c CreateDebitNoteEvent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateDebitNoteEvent. It customizes the JSON marshaling process for CreateDebitNoteEvent objects.

func (*CreateDebitNoteEvent) UnmarshalJSON added in v0.2.0

func (c *CreateDebitNoteEvent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateDebitNoteEvent. It customizes the JSON unmarshaling process for CreateDebitNoteEvent objects.

type CreateEBBComponent added in v0.1.0

type CreateEBBComponent struct {
	EventBasedComponent  EBBComponent   `json:"event_based_component"`
	AdditionalProperties map[string]any `json:"_"`
}

CreateEBBComponent represents a CreateEBBComponent struct.

func (CreateEBBComponent) MarshalJSON added in v0.1.0

func (c CreateEBBComponent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateEBBComponent. It customizes the JSON marshaling process for CreateEBBComponent objects.

func (*CreateEBBComponent) UnmarshalJSON added in v0.1.0

func (c *CreateEBBComponent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateEBBComponent. It customizes the JSON unmarshaling process for CreateEBBComponent objects.

type CreateInvoice

type CreateInvoice struct {
	LineItems []CreateInvoiceItem `json:"line_items,omitempty"`
	IssueDate *time.Time          `json:"issue_date,omitempty"`
	// By default, invoices will be created with a due date matching the date of invoice creation. If a different due date is desired, the net_terms parameter can be sent indicating the number of days in advance the due date should be.
	NetTerms            *int    `json:"net_terms,omitempty"`
	PaymentInstructions *string `json:"payment_instructions,omitempty"`
	// A custom memo can be sent to override the site's default.
	Memo *string `json:"memo,omitempty"`
	// Overrides the defaults for the site
	SellerAddress *CreateInvoiceAddress `json:"seller_address,omitempty"`
	// Overrides the default for the customer
	BillingAddress *CreateInvoiceAddress `json:"billing_address,omitempty"`
	// Overrides the default for the customer
	ShippingAddress      *CreateInvoiceAddress `json:"shipping_address,omitempty"`
	Coupons              []CreateInvoiceCoupon `json:"coupons,omitempty"`
	Status               *CreateInvoiceStatus  `json:"status,omitempty"`
	AdditionalProperties map[string]any        `json:"_"`
}

CreateInvoice represents a CreateInvoice struct.

func (CreateInvoice) MarshalJSON

func (c CreateInvoice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateInvoice. It customizes the JSON marshaling process for CreateInvoice objects.

func (*CreateInvoice) UnmarshalJSON

func (c *CreateInvoice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateInvoice. It customizes the JSON unmarshaling process for CreateInvoice objects.

type CreateInvoiceAddress

type CreateInvoiceAddress struct {
	FirstName            *string        `json:"first_name,omitempty"`
	LastName             *string        `json:"last_name,omitempty"`
	Phone                *string        `json:"phone,omitempty"`
	Address              *string        `json:"address,omitempty"`
	Address2             *string        `json:"address_2,omitempty"`
	City                 *string        `json:"city,omitempty"`
	State                *string        `json:"state,omitempty"`
	Zip                  *string        `json:"zip,omitempty"`
	Country              *string        `json:"country,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

CreateInvoiceAddress represents a CreateInvoiceAddress struct. Overrides the default address.

func (CreateInvoiceAddress) MarshalJSON

func (c CreateInvoiceAddress) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateInvoiceAddress. It customizes the JSON marshaling process for CreateInvoiceAddress objects.

func (*CreateInvoiceAddress) UnmarshalJSON

func (c *CreateInvoiceAddress) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateInvoiceAddress. It customizes the JSON unmarshaling process for CreateInvoiceAddress objects.

type CreateInvoiceCoupon

type CreateInvoiceCoupon struct {
	Code                 *string                             `json:"code,omitempty"`
	Percentage           *CreateInvoiceCouponPercentage      `json:"percentage,omitempty"`
	Amount               *CreateInvoiceCouponAmount          `json:"amount,omitempty"`
	Description          *string                             `json:"description,omitempty"`
	ProductFamilyId      *CreateInvoiceCouponProductFamilyId `json:"product_family_id,omitempty"`
	CompoundingStrategy  *CompoundingStrategy                `json:"compounding_strategy,omitempty"`
	AdditionalProperties map[string]any                      `json:"_"`
}

CreateInvoiceCoupon represents a CreateInvoiceCoupon struct.

func (CreateInvoiceCoupon) MarshalJSON

func (c CreateInvoiceCoupon) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateInvoiceCoupon. It customizes the JSON marshaling process for CreateInvoiceCoupon objects.

func (*CreateInvoiceCoupon) UnmarshalJSON

func (c *CreateInvoiceCoupon) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateInvoiceCoupon. It customizes the JSON unmarshaling process for CreateInvoiceCoupon objects.

type CreateInvoiceCouponAmount added in v0.1.0

type CreateInvoiceCouponAmount struct {
	// contains filtered or unexported fields
}

CreateInvoiceCouponAmount represents a CreateInvoiceCouponAmount struct. This is a container for one-of cases.

func (*CreateInvoiceCouponAmount) AsPrecision added in v0.1.0

func (c *CreateInvoiceCouponAmount) AsPrecision() (
	*float64,
	bool)

func (*CreateInvoiceCouponAmount) AsString added in v0.1.0

func (c *CreateInvoiceCouponAmount) AsString() (
	*string,
	bool)

func (CreateInvoiceCouponAmount) MarshalJSON added in v0.1.0

func (c CreateInvoiceCouponAmount) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateInvoiceCouponAmount. It customizes the JSON marshaling process for CreateInvoiceCouponAmount objects.

func (CreateInvoiceCouponAmount) String added in v0.1.0

func (c CreateInvoiceCouponAmount) String() string

String converts the CreateInvoiceCouponAmount object to a string representation.

func (*CreateInvoiceCouponAmount) UnmarshalJSON added in v0.1.0

func (c *CreateInvoiceCouponAmount) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateInvoiceCouponAmount. It customizes the JSON unmarshaling process for CreateInvoiceCouponAmount objects.

type CreateInvoiceCouponPercentage added in v0.1.0

type CreateInvoiceCouponPercentage struct {
	// contains filtered or unexported fields
}

CreateInvoiceCouponPercentage represents a CreateInvoiceCouponPercentage struct. This is a container for one-of cases.

func (*CreateInvoiceCouponPercentage) AsPrecision added in v0.1.0

func (c *CreateInvoiceCouponPercentage) AsPrecision() (
	*float64,
	bool)

func (*CreateInvoiceCouponPercentage) AsString added in v0.1.0

func (c *CreateInvoiceCouponPercentage) AsString() (
	*string,
	bool)

func (CreateInvoiceCouponPercentage) MarshalJSON added in v0.1.0

func (c CreateInvoiceCouponPercentage) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateInvoiceCouponPercentage. It customizes the JSON marshaling process for CreateInvoiceCouponPercentage objects.

func (CreateInvoiceCouponPercentage) String added in v0.1.0

String converts the CreateInvoiceCouponPercentage object to a string representation.

func (*CreateInvoiceCouponPercentage) UnmarshalJSON added in v0.1.0

func (c *CreateInvoiceCouponPercentage) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateInvoiceCouponPercentage. It customizes the JSON unmarshaling process for CreateInvoiceCouponPercentage objects.

type CreateInvoiceCouponProductFamilyId added in v0.1.0

type CreateInvoiceCouponProductFamilyId struct {
	// contains filtered or unexported fields
}

CreateInvoiceCouponProductFamilyId represents a CreateInvoiceCouponProductFamilyId struct. This is a container for one-of cases.

func (*CreateInvoiceCouponProductFamilyId) AsNumber added in v0.1.0

func (c *CreateInvoiceCouponProductFamilyId) AsNumber() (
	*int,
	bool)

func (*CreateInvoiceCouponProductFamilyId) AsString added in v0.1.0

func (c *CreateInvoiceCouponProductFamilyId) AsString() (
	*string,
	bool)

func (CreateInvoiceCouponProductFamilyId) MarshalJSON added in v0.1.0

func (c CreateInvoiceCouponProductFamilyId) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateInvoiceCouponProductFamilyId. It customizes the JSON marshaling process for CreateInvoiceCouponProductFamilyId objects.

func (CreateInvoiceCouponProductFamilyId) String added in v0.1.0

String converts the CreateInvoiceCouponProductFamilyId object to a string representation.

func (*CreateInvoiceCouponProductFamilyId) UnmarshalJSON added in v0.1.0

func (c *CreateInvoiceCouponProductFamilyId) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateInvoiceCouponProductFamilyId. It customizes the JSON unmarshaling process for CreateInvoiceCouponProductFamilyId objects.

type CreateInvoiceItem

type CreateInvoiceItem struct {
	Title *string `json:"title,omitempty"`
	// The quantity can contain up to 8 decimal places. i.e. 1.00 or 0.0012 or 0.00000065. If you submit a value with more than 8 decimal places, we will round it down to the 8th decimal place.
	Quantity *CreateInvoiceItemQuantity `json:"quantity,omitempty"`
	// The unit_price can contain up to 8 decimal places. i.e. 1.00 or 0.0012 or 0.00000065. If you submit a value with more than 8 decimal places, we will round it down to the 8th decimal place.
	UnitPrice *CreateInvoiceItemUnitPrice `json:"unit_price,omitempty"`
	// Set to true to automatically calculate taxes. Site must be configured to use and calculate taxes.
	// If using Avalara, a tax_code parameter must also be sent.
	Taxable *bool   `json:"taxable,omitempty"`
	TaxCode *string `json:"tax_code,omitempty"`
	// YYYY-MM-DD
	PeriodRangeStart *string `json:"period_range_start,omitempty"`
	// YYYY-MM-DD
	PeriodRangeEnd *string `json:"period_range_end,omitempty"`
	// Product handle or product id.
	ProductId *CreateInvoiceItemProductId `json:"product_id,omitempty"`
	// Component handle or component id.
	ComponentId *CreateInvoiceItemComponentId `json:"component_id,omitempty"`
	// Price point handle or id. For component.
	PricePointId         *CreateInvoiceItemPricePointId        `json:"price_point_id,omitempty"`
	ProductPricePointId  *CreateInvoiceItemProductPricePointId `json:"product_price_point_id,omitempty"`
	Description          *string                               `json:"description,omitempty"`
	AdditionalProperties map[string]any                        `json:"_"`
}

CreateInvoiceItem represents a CreateInvoiceItem struct.

func (CreateInvoiceItem) MarshalJSON

func (c CreateInvoiceItem) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateInvoiceItem. It customizes the JSON marshaling process for CreateInvoiceItem objects.

func (*CreateInvoiceItem) UnmarshalJSON

func (c *CreateInvoiceItem) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateInvoiceItem. It customizes the JSON unmarshaling process for CreateInvoiceItem objects.

type CreateInvoiceItemComponentId added in v0.1.0

type CreateInvoiceItemComponentId struct {
	// contains filtered or unexported fields
}

CreateInvoiceItemComponentId represents a CreateInvoiceItemComponentId struct. This is a container for one-of cases.

func (*CreateInvoiceItemComponentId) AsNumber added in v0.1.0

func (c *CreateInvoiceItemComponentId) AsNumber() (
	*int,
	bool)

func (*CreateInvoiceItemComponentId) AsString added in v0.1.0

func (c *CreateInvoiceItemComponentId) AsString() (
	*string,
	bool)

func (CreateInvoiceItemComponentId) MarshalJSON added in v0.1.0

func (c CreateInvoiceItemComponentId) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateInvoiceItemComponentId. It customizes the JSON marshaling process for CreateInvoiceItemComponentId objects.

func (CreateInvoiceItemComponentId) String added in v0.1.0

String converts the CreateInvoiceItemComponentId object to a string representation.

func (*CreateInvoiceItemComponentId) UnmarshalJSON added in v0.1.0

func (c *CreateInvoiceItemComponentId) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateInvoiceItemComponentId. It customizes the JSON unmarshaling process for CreateInvoiceItemComponentId objects.

type CreateInvoiceItemPricePointId added in v0.1.0

type CreateInvoiceItemPricePointId struct {
	// contains filtered or unexported fields
}

CreateInvoiceItemPricePointId represents a CreateInvoiceItemPricePointId struct. This is a container for one-of cases.

func (*CreateInvoiceItemPricePointId) AsNumber added in v0.1.0

func (c *CreateInvoiceItemPricePointId) AsNumber() (
	*int,
	bool)

func (*CreateInvoiceItemPricePointId) AsString added in v0.1.0

func (c *CreateInvoiceItemPricePointId) AsString() (
	*string,
	bool)

func (CreateInvoiceItemPricePointId) MarshalJSON added in v0.1.0

func (c CreateInvoiceItemPricePointId) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateInvoiceItemPricePointId. It customizes the JSON marshaling process for CreateInvoiceItemPricePointId objects.

func (CreateInvoiceItemPricePointId) String added in v0.1.0

String converts the CreateInvoiceItemPricePointId object to a string representation.

func (*CreateInvoiceItemPricePointId) UnmarshalJSON added in v0.1.0

func (c *CreateInvoiceItemPricePointId) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateInvoiceItemPricePointId. It customizes the JSON unmarshaling process for CreateInvoiceItemPricePointId objects.

type CreateInvoiceItemProductId added in v0.1.0

type CreateInvoiceItemProductId struct {
	// contains filtered or unexported fields
}

CreateInvoiceItemProductId represents a CreateInvoiceItemProductId struct. This is a container for one-of cases.

func (*CreateInvoiceItemProductId) AsNumber added in v0.1.0

func (c *CreateInvoiceItemProductId) AsNumber() (
	*int,
	bool)

func (*CreateInvoiceItemProductId) AsString added in v0.1.0

func (c *CreateInvoiceItemProductId) AsString() (
	*string,
	bool)

func (CreateInvoiceItemProductId) MarshalJSON added in v0.1.0

func (c CreateInvoiceItemProductId) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateInvoiceItemProductId. It customizes the JSON marshaling process for CreateInvoiceItemProductId objects.

func (CreateInvoiceItemProductId) String added in v0.1.0

String converts the CreateInvoiceItemProductId object to a string representation.

func (*CreateInvoiceItemProductId) UnmarshalJSON added in v0.1.0

func (c *CreateInvoiceItemProductId) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateInvoiceItemProductId. It customizes the JSON unmarshaling process for CreateInvoiceItemProductId objects.

type CreateInvoiceItemProductPricePointId added in v0.1.0

type CreateInvoiceItemProductPricePointId struct {
	// contains filtered or unexported fields
}

CreateInvoiceItemProductPricePointId represents a CreateInvoiceItemProductPricePointId struct. This is a container for one-of cases.

func (*CreateInvoiceItemProductPricePointId) AsNumber added in v0.1.0

func (c *CreateInvoiceItemProductPricePointId) AsNumber() (
	*int,
	bool)

func (*CreateInvoiceItemProductPricePointId) AsString added in v0.1.0

func (CreateInvoiceItemProductPricePointId) MarshalJSON added in v0.1.0

func (c CreateInvoiceItemProductPricePointId) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateInvoiceItemProductPricePointId. It customizes the JSON marshaling process for CreateInvoiceItemProductPricePointId objects.

func (CreateInvoiceItemProductPricePointId) String added in v0.1.0

String converts the CreateInvoiceItemProductPricePointId object to a string representation.

func (*CreateInvoiceItemProductPricePointId) UnmarshalJSON added in v0.1.0

func (c *CreateInvoiceItemProductPricePointId) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateInvoiceItemProductPricePointId. It customizes the JSON unmarshaling process for CreateInvoiceItemProductPricePointId objects.

type CreateInvoiceItemQuantity added in v0.1.0

type CreateInvoiceItemQuantity struct {
	// contains filtered or unexported fields
}

CreateInvoiceItemQuantity represents a CreateInvoiceItemQuantity struct. This is a container for one-of cases.

func (*CreateInvoiceItemQuantity) AsPrecision added in v0.1.0

func (c *CreateInvoiceItemQuantity) AsPrecision() (
	*float64,
	bool)

func (*CreateInvoiceItemQuantity) AsString added in v0.1.0

func (c *CreateInvoiceItemQuantity) AsString() (
	*string,
	bool)

func (CreateInvoiceItemQuantity) MarshalJSON added in v0.1.0

func (c CreateInvoiceItemQuantity) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateInvoiceItemQuantity. It customizes the JSON marshaling process for CreateInvoiceItemQuantity objects.

func (CreateInvoiceItemQuantity) String added in v0.1.0

func (c CreateInvoiceItemQuantity) String() string

String converts the CreateInvoiceItemQuantity object to a string representation.

func (*CreateInvoiceItemQuantity) UnmarshalJSON added in v0.1.0

func (c *CreateInvoiceItemQuantity) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateInvoiceItemQuantity. It customizes the JSON unmarshaling process for CreateInvoiceItemQuantity objects.

type CreateInvoiceItemUnitPrice added in v0.1.0

type CreateInvoiceItemUnitPrice struct {
	// contains filtered or unexported fields
}

CreateInvoiceItemUnitPrice represents a CreateInvoiceItemUnitPrice struct. This is a container for one-of cases.

func (*CreateInvoiceItemUnitPrice) AsPrecision added in v0.1.0

func (c *CreateInvoiceItemUnitPrice) AsPrecision() (
	*float64,
	bool)

func (*CreateInvoiceItemUnitPrice) AsString added in v0.1.0

func (c *CreateInvoiceItemUnitPrice) AsString() (
	*string,
	bool)

func (CreateInvoiceItemUnitPrice) MarshalJSON added in v0.1.0

func (c CreateInvoiceItemUnitPrice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateInvoiceItemUnitPrice. It customizes the JSON marshaling process for CreateInvoiceItemUnitPrice objects.

func (CreateInvoiceItemUnitPrice) String added in v0.1.0

String converts the CreateInvoiceItemUnitPrice object to a string representation.

func (*CreateInvoiceItemUnitPrice) UnmarshalJSON added in v0.1.0

func (c *CreateInvoiceItemUnitPrice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateInvoiceItemUnitPrice. It customizes the JSON unmarshaling process for CreateInvoiceItemUnitPrice objects.

type CreateInvoicePayment

type CreateInvoicePayment struct {
	// A string of the dollar amount to be refunded (eg. "10.50" => $10.50)
	Amount *CreateInvoicePaymentAmount `json:"amount,omitempty"`
	// A description to be attached to the payment.
	Memo *string `json:"memo,omitempty"`
	// The type of payment method used. Defaults to other.
	Method *InvoicePaymentMethodType `json:"method,omitempty"`
	// Additional information related to the payment method (eg. Check #)
	Details *string `json:"details,omitempty"`
	// The ID of the payment profile to be used for the payment.
	PaymentProfileId     *int           `json:"payment_profile_id,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

CreateInvoicePayment represents a CreateInvoicePayment struct.

func (CreateInvoicePayment) MarshalJSON

func (c CreateInvoicePayment) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateInvoicePayment. It customizes the JSON marshaling process for CreateInvoicePayment objects.

func (*CreateInvoicePayment) UnmarshalJSON

func (c *CreateInvoicePayment) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateInvoicePayment. It customizes the JSON unmarshaling process for CreateInvoicePayment objects.

type CreateInvoicePaymentAmount added in v0.1.0

type CreateInvoicePaymentAmount struct {
	// contains filtered or unexported fields
}

CreateInvoicePaymentAmount represents a CreateInvoicePaymentAmount struct. This is a container for one-of cases.

func (*CreateInvoicePaymentAmount) AsPrecision added in v0.1.0

func (c *CreateInvoicePaymentAmount) AsPrecision() (
	*float64,
	bool)

func (*CreateInvoicePaymentAmount) AsString added in v0.1.0

func (c *CreateInvoicePaymentAmount) AsString() (
	*string,
	bool)

func (CreateInvoicePaymentAmount) MarshalJSON added in v0.1.0

func (c CreateInvoicePaymentAmount) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateInvoicePaymentAmount. It customizes the JSON marshaling process for CreateInvoicePaymentAmount objects.

func (CreateInvoicePaymentAmount) String added in v0.1.0

String converts the CreateInvoicePaymentAmount object to a string representation.

func (*CreateInvoicePaymentAmount) UnmarshalJSON added in v0.1.0

func (c *CreateInvoicePaymentAmount) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateInvoicePaymentAmount. It customizes the JSON unmarshaling process for CreateInvoicePaymentAmount objects.

type CreateInvoicePaymentApplication

type CreateInvoicePaymentApplication struct {
	// Unique identifier for the invoice. It has the prefix "inv_" followed by alphanumeric characters.
	InvoiceUid string `json:"invoice_uid"`
	// Dollar amount of the invoice payment (eg. "10.50" => $10.50).
	Amount               string         `json:"amount"`
	AdditionalProperties map[string]any `json:"_"`
}

CreateInvoicePaymentApplication represents a CreateInvoicePaymentApplication struct.

func (CreateInvoicePaymentApplication) MarshalJSON

func (c CreateInvoicePaymentApplication) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateInvoicePaymentApplication. It customizes the JSON marshaling process for CreateInvoicePaymentApplication objects.

func (*CreateInvoicePaymentApplication) UnmarshalJSON

func (c *CreateInvoicePaymentApplication) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateInvoicePaymentApplication. It customizes the JSON unmarshaling process for CreateInvoicePaymentApplication objects.

type CreateInvoicePaymentRequest

type CreateInvoicePaymentRequest struct {
	Payment CreateInvoicePayment `json:"payment"`
	// The type of payment to be applied to an Invoice. Defaults to external.
	Type                 *InvoicePaymentType `json:"type,omitempty"`
	AdditionalProperties map[string]any      `json:"_"`
}

CreateInvoicePaymentRequest represents a CreateInvoicePaymentRequest struct.

func (CreateInvoicePaymentRequest) MarshalJSON

func (c CreateInvoicePaymentRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateInvoicePaymentRequest. It customizes the JSON marshaling process for CreateInvoicePaymentRequest objects.

func (*CreateInvoicePaymentRequest) UnmarshalJSON

func (c *CreateInvoicePaymentRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateInvoicePaymentRequest. It customizes the JSON unmarshaling process for CreateInvoicePaymentRequest objects.

type CreateInvoiceRequest

type CreateInvoiceRequest struct {
	Invoice              CreateInvoice  `json:"invoice"`
	AdditionalProperties map[string]any `json:"_"`
}

CreateInvoiceRequest represents a CreateInvoiceRequest struct.

func (CreateInvoiceRequest) MarshalJSON

func (c CreateInvoiceRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateInvoiceRequest. It customizes the JSON marshaling process for CreateInvoiceRequest objects.

func (*CreateInvoiceRequest) UnmarshalJSON

func (c *CreateInvoiceRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateInvoiceRequest. It customizes the JSON unmarshaling process for CreateInvoiceRequest objects.

type CreateInvoiceStatus

type CreateInvoiceStatus string

CreateInvoiceStatus is a string enum.

const (
	CreateInvoiceStatus_DRAFT CreateInvoiceStatus = "draft"
	CreateInvoiceStatus_OPEN  CreateInvoiceStatus = "open"
)

func (CreateInvoiceStatus) MarshalJSON added in v0.2.0

func (e CreateInvoiceStatus) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateInvoiceStatus. It customizes the JSON marshaling process for CreateInvoiceStatus objects.

func (*CreateInvoiceStatus) UnmarshalJSON added in v0.2.0

func (e *CreateInvoiceStatus) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateInvoiceStatus. It customizes the JSON unmarshaling process for CreateInvoiceStatus objects.

type CreateMetadata

type CreateMetadata struct {
	Name                 *string        `json:"name,omitempty"`
	Value                *string        `json:"value,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

CreateMetadata represents a CreateMetadata struct.

func (CreateMetadata) MarshalJSON

func (c CreateMetadata) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateMetadata. It customizes the JSON marshaling process for CreateMetadata objects.

func (*CreateMetadata) UnmarshalJSON

func (c *CreateMetadata) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateMetadata. It customizes the JSON unmarshaling process for CreateMetadata objects.

type CreateMetadataRequest

type CreateMetadataRequest struct {
	Metadata             []CreateMetadata `json:"metadata"`
	AdditionalProperties map[string]any   `json:"_"`
}

CreateMetadataRequest represents a CreateMetadataRequest struct.

func (CreateMetadataRequest) MarshalJSON

func (c CreateMetadataRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateMetadataRequest. It customizes the JSON marshaling process for CreateMetadataRequest objects.

func (*CreateMetadataRequest) UnmarshalJSON

func (c *CreateMetadataRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateMetadataRequest. It customizes the JSON unmarshaling process for CreateMetadataRequest objects.

type CreateMetafield added in v0.1.0

type CreateMetafield struct {
	Name *string `json:"name,omitempty"`
	// Warning: When updating a metafield's scope attribute, all scope attributes must be passed. Partially complete scope attributes will override the existing settings.
	Scope *MetafieldScope `json:"scope,omitempty"`
	// Indicates how data should be added to the metafield. For example, a text type is just a string, so a given metafield of this type can have any value attached. On the other hand, dropdown and radio have a set of allowed values that can be input, and appear differently on a Public Signup Page. Defaults to 'text'
	InputType *MetafieldInput `json:"input_type,omitempty"`
	// Only applicable when input_type is radio or dropdown
	Enum                 []string       `json:"enum,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

CreateMetafield represents a CreateMetafield struct.

func (CreateMetafield) MarshalJSON added in v0.1.0

func (c CreateMetafield) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateMetafield. It customizes the JSON marshaling process for CreateMetafield objects.

func (*CreateMetafield) UnmarshalJSON added in v0.1.0

func (c *CreateMetafield) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateMetafield. It customizes the JSON unmarshaling process for CreateMetafield objects.

type CreateMetafieldsRequest

type CreateMetafieldsRequest struct {
	Metafields           CreateMetafieldsRequestMetafields `json:"metafields"`
	AdditionalProperties map[string]any                    `json:"_"`
}

CreateMetafieldsRequest represents a CreateMetafieldsRequest struct.

func (CreateMetafieldsRequest) MarshalJSON

func (c CreateMetafieldsRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateMetafieldsRequest. It customizes the JSON marshaling process for CreateMetafieldsRequest objects.

func (*CreateMetafieldsRequest) UnmarshalJSON

func (c *CreateMetafieldsRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateMetafieldsRequest. It customizes the JSON unmarshaling process for CreateMetafieldsRequest objects.

type CreateMetafieldsRequestMetafields added in v0.1.0

type CreateMetafieldsRequestMetafields struct {
	// contains filtered or unexported fields
}

CreateMetafieldsRequestMetafields represents a CreateMetafieldsRequestMetafields struct. This is a container for one-of cases.

func (*CreateMetafieldsRequestMetafields) AsArrayOfCreateMetafield added in v0.1.0

func (c *CreateMetafieldsRequestMetafields) AsArrayOfCreateMetafield() (
	*[]CreateMetafield,
	bool)

func (*CreateMetafieldsRequestMetafields) AsCreateMetafield added in v0.1.0

func (c *CreateMetafieldsRequestMetafields) AsCreateMetafield() (
	*CreateMetafield,
	bool)

func (CreateMetafieldsRequestMetafields) MarshalJSON added in v0.1.0

func (c CreateMetafieldsRequestMetafields) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateMetafieldsRequestMetafields. It customizes the JSON marshaling process for CreateMetafieldsRequestMetafields objects.

func (CreateMetafieldsRequestMetafields) String added in v0.1.0

String converts the CreateMetafieldsRequestMetafields object to a string representation.

func (*CreateMetafieldsRequestMetafields) UnmarshalJSON added in v0.1.0

func (c *CreateMetafieldsRequestMetafields) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateMetafieldsRequestMetafields. It customizes the JSON unmarshaling process for CreateMetafieldsRequestMetafields objects.

type CreateMeteredComponent added in v0.1.0

type CreateMeteredComponent struct {
	MeteredComponent     MeteredComponent `json:"metered_component"`
	AdditionalProperties map[string]any   `json:"_"`
}

CreateMeteredComponent represents a CreateMeteredComponent struct.

func (CreateMeteredComponent) MarshalJSON added in v0.1.0

func (c CreateMeteredComponent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateMeteredComponent. It customizes the JSON marshaling process for CreateMeteredComponent objects.

func (*CreateMeteredComponent) UnmarshalJSON added in v0.1.0

func (c *CreateMeteredComponent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateMeteredComponent. It customizes the JSON unmarshaling process for CreateMeteredComponent objects.

type CreateMultiInvoicePayment

type CreateMultiInvoicePayment struct {
	// A description to be attached to the payment.
	Memo *string `json:"memo,omitempty"`
	// Additional information related to the payment method (eg. Check #).
	Details *string `json:"details,omitempty"`
	// The type of payment method used. Defaults to other.
	Method *InvoicePaymentMethodType `json:"method,omitempty"`
	// Dollar amount of the sum of the invoices payment (eg. "10.50" => $10.50).
	Amount CreateMultiInvoicePaymentAmount `json:"amount"`
	// Date reflecting when the payment was received from a customer. Must be in the past.
	ReceivedOn           *string                           `json:"received_on,omitempty"`
	Applications         []CreateInvoicePaymentApplication `json:"applications"`
	AdditionalProperties map[string]any                    `json:"_"`
}

CreateMultiInvoicePayment represents a CreateMultiInvoicePayment struct.

func (CreateMultiInvoicePayment) MarshalJSON

func (c CreateMultiInvoicePayment) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateMultiInvoicePayment. It customizes the JSON marshaling process for CreateMultiInvoicePayment objects.

func (*CreateMultiInvoicePayment) UnmarshalJSON

func (c *CreateMultiInvoicePayment) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateMultiInvoicePayment. It customizes the JSON unmarshaling process for CreateMultiInvoicePayment objects.

type CreateMultiInvoicePaymentAmount added in v0.1.0

type CreateMultiInvoicePaymentAmount struct {
	// contains filtered or unexported fields
}

CreateMultiInvoicePaymentAmount represents a CreateMultiInvoicePaymentAmount struct. This is a container for one-of cases.

func (*CreateMultiInvoicePaymentAmount) AsPrecision added in v0.1.0

func (c *CreateMultiInvoicePaymentAmount) AsPrecision() (
	*float64,
	bool)

func (*CreateMultiInvoicePaymentAmount) AsString added in v0.1.0

func (c *CreateMultiInvoicePaymentAmount) AsString() (
	*string,
	bool)

func (CreateMultiInvoicePaymentAmount) MarshalJSON added in v0.1.0

func (c CreateMultiInvoicePaymentAmount) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateMultiInvoicePaymentAmount. It customizes the JSON marshaling process for CreateMultiInvoicePaymentAmount objects.

func (CreateMultiInvoicePaymentAmount) String added in v0.1.0

String converts the CreateMultiInvoicePaymentAmount object to a string representation.

func (*CreateMultiInvoicePaymentAmount) UnmarshalJSON added in v0.1.0

func (c *CreateMultiInvoicePaymentAmount) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateMultiInvoicePaymentAmount. It customizes the JSON unmarshaling process for CreateMultiInvoicePaymentAmount objects.

type CreateMultiInvoicePaymentRequest

type CreateMultiInvoicePaymentRequest struct {
	Payment              CreateMultiInvoicePayment `json:"payment"`
	AdditionalProperties map[string]any            `json:"_"`
}

CreateMultiInvoicePaymentRequest represents a CreateMultiInvoicePaymentRequest struct.

func (CreateMultiInvoicePaymentRequest) MarshalJSON

func (c CreateMultiInvoicePaymentRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateMultiInvoicePaymentRequest. It customizes the JSON marshaling process for CreateMultiInvoicePaymentRequest objects.

func (*CreateMultiInvoicePaymentRequest) UnmarshalJSON

func (c *CreateMultiInvoicePaymentRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateMultiInvoicePaymentRequest. It customizes the JSON unmarshaling process for CreateMultiInvoicePaymentRequest objects.

type CreateOffer

type CreateOffer struct {
	Name                 string                 `json:"name"`
	Handle               string                 `json:"handle"`
	Description          *string                `json:"description,omitempty"`
	ProductId            int                    `json:"product_id"`
	ProductPricePointId  *int                   `json:"product_price_point_id,omitempty"`
	Components           []CreateOfferComponent `json:"components,omitempty"`
	Coupons              []string               `json:"coupons,omitempty"`
	AdditionalProperties map[string]any         `json:"_"`
}

CreateOffer represents a CreateOffer struct.

func (CreateOffer) MarshalJSON

func (c CreateOffer) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateOffer. It customizes the JSON marshaling process for CreateOffer objects.

func (*CreateOffer) UnmarshalJSON

func (c *CreateOffer) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateOffer. It customizes the JSON unmarshaling process for CreateOffer objects.

type CreateOfferComponent

type CreateOfferComponent struct {
	ComponentId          *int           `json:"component_id,omitempty"`
	PricePointId         *int           `json:"price_point_id,omitempty"`
	StartingQuantity     *int           `json:"starting_quantity,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

CreateOfferComponent represents a CreateOfferComponent struct.

func (CreateOfferComponent) MarshalJSON

func (c CreateOfferComponent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateOfferComponent. It customizes the JSON marshaling process for CreateOfferComponent objects.

func (*CreateOfferComponent) UnmarshalJSON

func (c *CreateOfferComponent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateOfferComponent. It customizes the JSON unmarshaling process for CreateOfferComponent objects.

type CreateOfferRequest

type CreateOfferRequest struct {
	Offer                CreateOffer    `json:"offer"`
	AdditionalProperties map[string]any `json:"_"`
}

CreateOfferRequest represents a CreateOfferRequest struct.

func (CreateOfferRequest) MarshalJSON

func (c CreateOfferRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateOfferRequest. It customizes the JSON marshaling process for CreateOfferRequest objects.

func (*CreateOfferRequest) UnmarshalJSON

func (c *CreateOfferRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateOfferRequest. It customizes the JSON unmarshaling process for CreateOfferRequest objects.

type CreateOnOffComponent added in v0.1.0

type CreateOnOffComponent struct {
	OnOffComponent       OnOffComponent `json:"on_off_component"`
	AdditionalProperties map[string]any `json:"_"`
}

CreateOnOffComponent represents a CreateOnOffComponent struct.

func (CreateOnOffComponent) MarshalJSON added in v0.1.0

func (c CreateOnOffComponent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateOnOffComponent. It customizes the JSON marshaling process for CreateOnOffComponent objects.

func (*CreateOnOffComponent) UnmarshalJSON added in v0.1.0

func (c *CreateOnOffComponent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateOnOffComponent. It customizes the JSON unmarshaling process for CreateOnOffComponent objects.

type CreateOrUpdateCoupon

type CreateOrUpdateCoupon struct {
	Coupon *CreateOrUpdateCouponCoupon `json:"coupon,omitempty"`
	// An object where the keys are product_ids and the values are booleans indicating if the coupon should be applicable to the product
	RestrictedProducts map[string]bool `json:"restricted_products,omitempty"`
	// An object where the keys are component_ids and the values are booleans indicating if the coupon should be applicable to the component
	RestrictedComponents map[string]bool `json:"restricted_components,omitempty"`
	AdditionalProperties map[string]any  `json:"_"`
}

CreateOrUpdateCoupon represents a CreateOrUpdateCoupon struct.

func (CreateOrUpdateCoupon) MarshalJSON

func (c CreateOrUpdateCoupon) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateOrUpdateCoupon. It customizes the JSON marshaling process for CreateOrUpdateCoupon objects.

func (*CreateOrUpdateCoupon) UnmarshalJSON

func (c *CreateOrUpdateCoupon) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateOrUpdateCoupon. It customizes the JSON unmarshaling process for CreateOrUpdateCoupon objects.

type CreateOrUpdateCouponCoupon added in v0.1.0

type CreateOrUpdateCouponCoupon struct {
	// contains filtered or unexported fields
}

CreateOrUpdateCouponCoupon represents a CreateOrUpdateCouponCoupon struct. This is a container for one-of cases.

func (*CreateOrUpdateCouponCoupon) AsCreateOrUpdateFlatAmountCoupon added in v0.1.0

func (c *CreateOrUpdateCouponCoupon) AsCreateOrUpdateFlatAmountCoupon() (
	*CreateOrUpdateFlatAmountCoupon,
	bool)

func (*CreateOrUpdateCouponCoupon) AsCreateOrUpdatePercentageCoupon added in v0.1.0

func (c *CreateOrUpdateCouponCoupon) AsCreateOrUpdatePercentageCoupon() (
	*CreateOrUpdatePercentageCoupon,
	bool)

func (CreateOrUpdateCouponCoupon) MarshalJSON added in v0.1.0

func (c CreateOrUpdateCouponCoupon) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateOrUpdateCouponCoupon. It customizes the JSON marshaling process for CreateOrUpdateCouponCoupon objects.

func (CreateOrUpdateCouponCoupon) String added in v0.1.0

String converts the CreateOrUpdateCouponCoupon object to a string representation.

func (*CreateOrUpdateCouponCoupon) UnmarshalJSON added in v0.1.0

func (c *CreateOrUpdateCouponCoupon) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateOrUpdateCouponCoupon. It customizes the JSON unmarshaling process for CreateOrUpdateCouponCoupon objects.

type CreateOrUpdateEndpoint added in v0.1.0

type CreateOrUpdateEndpoint struct {
	Url                  string                `json:"url"`
	WebhookSubscriptions []WebhookSubscription `json:"webhook_subscriptions"`
	AdditionalProperties map[string]any        `json:"_"`
}

CreateOrUpdateEndpoint represents a CreateOrUpdateEndpoint struct. Used to Create or Update Endpoint

func (CreateOrUpdateEndpoint) MarshalJSON added in v0.1.0

func (c CreateOrUpdateEndpoint) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateOrUpdateEndpoint. It customizes the JSON marshaling process for CreateOrUpdateEndpoint objects.

func (*CreateOrUpdateEndpoint) UnmarshalJSON added in v0.1.0

func (c *CreateOrUpdateEndpoint) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateOrUpdateEndpoint. It customizes the JSON unmarshaling process for CreateOrUpdateEndpoint objects.

type CreateOrUpdateEndpointRequest added in v0.1.0

type CreateOrUpdateEndpointRequest struct {
	// Used to Create or Update Endpoint
	Endpoint             CreateOrUpdateEndpoint `json:"endpoint"`
	AdditionalProperties map[string]any         `json:"_"`
}

CreateOrUpdateEndpointRequest represents a CreateOrUpdateEndpointRequest struct. Used to Create or Update Endpoint

func (CreateOrUpdateEndpointRequest) MarshalJSON added in v0.1.0

func (c CreateOrUpdateEndpointRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateOrUpdateEndpointRequest. It customizes the JSON marshaling process for CreateOrUpdateEndpointRequest objects.

func (*CreateOrUpdateEndpointRequest) UnmarshalJSON added in v0.1.0

func (c *CreateOrUpdateEndpointRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateOrUpdateEndpointRequest. It customizes the JSON unmarshaling process for CreateOrUpdateEndpointRequest objects.

type CreateOrUpdateFlatAmountCoupon added in v0.1.0

type CreateOrUpdateFlatAmountCoupon struct {
	// the name of the coupon
	Name string `json:"name"`
	// may contain uppercase alphanumeric characters and these special characters (which allow for email addresses to be used): “%”, “@”, “+”, “-”, “_”, and “.”
	Code                          string               `json:"code"`
	Description                   *string              `json:"description,omitempty"`
	AmountInCents                 int64                `json:"amount_in_cents"`
	AllowNegativeBalance          *bool                `json:"allow_negative_balance,omitempty"`
	Recurring                     *bool                `json:"recurring,omitempty"`
	EndDate                       *time.Time           `json:"end_date,omitempty"`
	ProductFamilyId               *string              `json:"product_family_id,omitempty"`
	Stackable                     *bool                `json:"stackable,omitempty"`
	CompoundingStrategy           *CompoundingStrategy `json:"compounding_strategy,omitempty"`
	ExcludeMidPeriodAllocations   *bool                `json:"exclude_mid_period_allocations,omitempty"`
	ApplyOnCancelAtEndOfPeriod    *bool                `json:"apply_on_cancel_at_end_of_period,omitempty"`
	ApplyOnSubscriptionExpiration *bool                `json:"apply_on_subscription_expiration,omitempty"`
	AdditionalProperties          map[string]any       `json:"_"`
}

CreateOrUpdateFlatAmountCoupon represents a CreateOrUpdateFlatAmountCoupon struct.

func (CreateOrUpdateFlatAmountCoupon) MarshalJSON added in v0.1.0

func (c CreateOrUpdateFlatAmountCoupon) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateOrUpdateFlatAmountCoupon. It customizes the JSON marshaling process for CreateOrUpdateFlatAmountCoupon objects.

func (*CreateOrUpdateFlatAmountCoupon) UnmarshalJSON added in v0.1.0

func (c *CreateOrUpdateFlatAmountCoupon) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateOrUpdateFlatAmountCoupon. It customizes the JSON unmarshaling process for CreateOrUpdateFlatAmountCoupon objects.

type CreateOrUpdatePercentageCoupon added in v0.1.0

type CreateOrUpdatePercentageCoupon struct {
	// the name of the coupon
	Name string `json:"name"`
	// may contain uppercase alphanumeric characters and these special characters (which allow for email addresses to be used): “%”, “@”, “+”, “-”, “_”, and “.”
	Code                          string                                   `json:"code"`
	Description                   *string                                  `json:"description,omitempty"`
	Percentage                    CreateOrUpdatePercentageCouponPercentage `json:"percentage"`
	AllowNegativeBalance          *bool                                    `json:"allow_negative_balance,omitempty"`
	Recurring                     *bool                                    `json:"recurring,omitempty"`
	EndDate                       *time.Time                               `json:"end_date,omitempty"`
	ProductFamilyId               *string                                  `json:"product_family_id,omitempty"`
	Stackable                     *bool                                    `json:"stackable,omitempty"`
	CompoundingStrategy           *CompoundingStrategy                     `json:"compounding_strategy,omitempty"`
	ExcludeMidPeriodAllocations   *bool                                    `json:"exclude_mid_period_allocations,omitempty"`
	ApplyOnCancelAtEndOfPeriod    *bool                                    `json:"apply_on_cancel_at_end_of_period,omitempty"`
	ApplyOnSubscriptionExpiration *bool                                    `json:"apply_on_subscription_expiration,omitempty"`
	AdditionalProperties          map[string]any                           `json:"_"`
}

CreateOrUpdatePercentageCoupon represents a CreateOrUpdatePercentageCoupon struct.

func (CreateOrUpdatePercentageCoupon) MarshalJSON added in v0.1.0

func (c CreateOrUpdatePercentageCoupon) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateOrUpdatePercentageCoupon. It customizes the JSON marshaling process for CreateOrUpdatePercentageCoupon objects.

func (*CreateOrUpdatePercentageCoupon) UnmarshalJSON added in v0.1.0

func (c *CreateOrUpdatePercentageCoupon) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateOrUpdatePercentageCoupon. It customizes the JSON unmarshaling process for CreateOrUpdatePercentageCoupon objects.

type CreateOrUpdatePercentageCouponPercentage added in v0.1.0

type CreateOrUpdatePercentageCouponPercentage struct {
	// contains filtered or unexported fields
}

CreateOrUpdatePercentageCouponPercentage represents a CreateOrUpdatePercentageCouponPercentage struct. This is a container for one-of cases.

func (*CreateOrUpdatePercentageCouponPercentage) AsPrecision added in v0.1.0

func (*CreateOrUpdatePercentageCouponPercentage) AsString added in v0.1.0

func (CreateOrUpdatePercentageCouponPercentage) MarshalJSON added in v0.1.0

func (c CreateOrUpdatePercentageCouponPercentage) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateOrUpdatePercentageCouponPercentage. It customizes the JSON marshaling process for CreateOrUpdatePercentageCouponPercentage objects.

func (CreateOrUpdatePercentageCouponPercentage) String added in v0.1.0

String converts the CreateOrUpdatePercentageCouponPercentage object to a string representation.

func (*CreateOrUpdatePercentageCouponPercentage) UnmarshalJSON added in v0.1.0

func (c *CreateOrUpdatePercentageCouponPercentage) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateOrUpdatePercentageCouponPercentage. It customizes the JSON unmarshaling process for CreateOrUpdatePercentageCouponPercentage objects.

type CreateOrUpdateProduct

type CreateOrUpdateProduct struct {
	// The product name
	Name string `json:"name"`
	// The product API handle
	Handle *string `json:"handle,omitempty"`
	// The product description
	Description string `json:"description"`
	// E.g. Internal ID or SKU Number
	AccountingCode *string `json:"accounting_code,omitempty"`
	// Deprecated value that can be ignored unless you have legacy hosted pages. For Public Signup Page users, please read this attribute from under the signup page.
	RequireCreditCard *bool `json:"require_credit_card,omitempty"`
	// The product price, in integer cents
	PriceInCents int64 `json:"price_in_cents"`
	// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this product would renew every 30 days
	Interval int `json:"interval"`
	// A string representing the interval unit for this product, either month or day
	IntervalUnit IntervalUnit `json:"interval_unit"`
	// The product trial price, in integer cents
	TrialPriceInCents *int64 `json:"trial_price_in_cents,omitempty"`
	// The numerical trial interval. i.e. an interval of ‘30’ coupled with a trial_interval_unit of day would mean this product trial would last 30 days.
	TrialInterval *int `json:"trial_interval,omitempty"`
	// A string representing the trial interval unit for this product, either month or day
	TrialIntervalUnit *IntervalUnit `json:"trial_interval_unit,omitempty"`
	TrialType         *string       `json:"trial_type,omitempty"`
	// The numerical expiration interval. i.e. an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product would expire after 30 days.
	ExpirationInterval *int `json:"expiration_interval,omitempty"`
	// A string representing the expiration interval unit for this product, either month or day
	ExpirationIntervalUnit *IntervalUnit `json:"expiration_interval_unit,omitempty"`
	AutoCreateSignupPage   *bool         `json:"auto_create_signup_page,omitempty"`
	// A string representing the tax code related to the product type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters.
	TaxCode              *string        `json:"tax_code,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

CreateOrUpdateProduct represents a CreateOrUpdateProduct struct.

func (CreateOrUpdateProduct) MarshalJSON

func (c CreateOrUpdateProduct) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateOrUpdateProduct. It customizes the JSON marshaling process for CreateOrUpdateProduct objects.

func (*CreateOrUpdateProduct) UnmarshalJSON

func (c *CreateOrUpdateProduct) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateOrUpdateProduct. It customizes the JSON unmarshaling process for CreateOrUpdateProduct objects.

type CreateOrUpdateProductRequest

type CreateOrUpdateProductRequest struct {
	Product              CreateOrUpdateProduct `json:"product"`
	AdditionalProperties map[string]any        `json:"_"`
}

CreateOrUpdateProductRequest represents a CreateOrUpdateProductRequest struct.

func (CreateOrUpdateProductRequest) MarshalJSON

func (c CreateOrUpdateProductRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateOrUpdateProductRequest. It customizes the JSON marshaling process for CreateOrUpdateProductRequest objects.

func (*CreateOrUpdateProductRequest) UnmarshalJSON

func (c *CreateOrUpdateProductRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateOrUpdateProductRequest. It customizes the JSON unmarshaling process for CreateOrUpdateProductRequest objects.

type CreateOrUpdateSegmentPrice

type CreateOrUpdateSegmentPrice struct {
	StartingQuantity *int `json:"starting_quantity,omitempty"`
	EndingQuantity   *int `json:"ending_quantity,omitempty"`
	// The price can contain up to 8 decimal places. i.e. 1.00 or 0.0012 or 0.00000065
	UnitPrice            CreateOrUpdateSegmentPriceUnitPrice `json:"unit_price"`
	AdditionalProperties map[string]any                      `json:"_"`
}

CreateOrUpdateSegmentPrice represents a CreateOrUpdateSegmentPrice struct.

func (CreateOrUpdateSegmentPrice) MarshalJSON

func (c CreateOrUpdateSegmentPrice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateOrUpdateSegmentPrice. It customizes the JSON marshaling process for CreateOrUpdateSegmentPrice objects.

func (*CreateOrUpdateSegmentPrice) UnmarshalJSON

func (c *CreateOrUpdateSegmentPrice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateOrUpdateSegmentPrice. It customizes the JSON unmarshaling process for CreateOrUpdateSegmentPrice objects.

type CreateOrUpdateSegmentPriceUnitPrice added in v0.1.0

type CreateOrUpdateSegmentPriceUnitPrice struct {
	// contains filtered or unexported fields
}

CreateOrUpdateSegmentPriceUnitPrice represents a CreateOrUpdateSegmentPriceUnitPrice struct. This is a container for one-of cases.

func (*CreateOrUpdateSegmentPriceUnitPrice) AsPrecision added in v0.1.0

func (c *CreateOrUpdateSegmentPriceUnitPrice) AsPrecision() (
	*float64,
	bool)

func (*CreateOrUpdateSegmentPriceUnitPrice) AsString added in v0.1.0

func (c *CreateOrUpdateSegmentPriceUnitPrice) AsString() (
	*string,
	bool)

func (CreateOrUpdateSegmentPriceUnitPrice) MarshalJSON added in v0.1.0

func (c CreateOrUpdateSegmentPriceUnitPrice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateOrUpdateSegmentPriceUnitPrice. It customizes the JSON marshaling process for CreateOrUpdateSegmentPriceUnitPrice objects.

func (CreateOrUpdateSegmentPriceUnitPrice) String added in v0.1.0

String converts the CreateOrUpdateSegmentPriceUnitPrice object to a string representation.

func (*CreateOrUpdateSegmentPriceUnitPrice) UnmarshalJSON added in v0.1.0

func (c *CreateOrUpdateSegmentPriceUnitPrice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateOrUpdateSegmentPriceUnitPrice. It customizes the JSON unmarshaling process for CreateOrUpdateSegmentPriceUnitPrice objects.

type CreatePayment

type CreatePayment struct {
	Amount         string `json:"amount"`
	Memo           string `json:"memo"`
	PaymentDetails string `json:"payment_details"`
	// The type of payment method used. Defaults to other.
	PaymentMethod        InvoicePaymentMethodType `json:"payment_method"`
	AdditionalProperties map[string]any           `json:"_"`
}

CreatePayment represents a CreatePayment struct.

func (CreatePayment) MarshalJSON

func (c CreatePayment) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreatePayment. It customizes the JSON marshaling process for CreatePayment objects.

func (*CreatePayment) UnmarshalJSON

func (c *CreatePayment) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreatePayment. It customizes the JSON unmarshaling process for CreatePayment objects.

type CreatePaymentProfile

type CreatePaymentProfile struct {
	// Token received after sending billing informations using chargify.js.
	ChargifyToken *string      `json:"chargify_token,omitempty"`
	Id            *int         `json:"id,omitempty"`
	PaymentType   *PaymentType `json:"payment_type,omitempty"`
	// First name on card or bank account. If omitted, the first_name from customer attributes will be used.
	FirstName *string `json:"first_name,omitempty"`
	// Last name on card or bank account. If omitted, the last_name from customer attributes will be used.
	LastName         *string `json:"last_name,omitempty"`
	MaskedCardNumber *string `json:"masked_card_number,omitempty"`
	// The full credit card number
	FullNumber *string `json:"full_number,omitempty"`
	// The type of card used.
	CardType *CardType `json:"card_type,omitempty"`
	// (Optional when performing an Import via vault_token, required otherwise) The 1- or 2-digit credit card expiration month, as an integer or string, i.e. 5
	ExpirationMonth *CreatePaymentProfileExpirationMonth `json:"expiration_month,omitempty"`
	// (Optional when performing a Import via vault_token, required otherwise) The 4-digit credit card expiration year, as an integer or string, i.e. 2012
	ExpirationYear *CreatePaymentProfileExpirationYear `json:"expiration_year,omitempty"`
	// The credit card or bank account billing street address (i.e. 123 Main St.). This value is merely passed through to the payment gateway.
	BillingAddress *string `json:"billing_address,omitempty"`
	// Second line of the customer’s billing address i.e. Apt. 100
	BillingAddress2 Optional[string] `json:"billing_address_2"`
	// The credit card or bank account billing address city (i.e. “Boston”). This value is merely passed through to the payment gateway.
	BillingCity *string `json:"billing_city,omitempty"`
	// The credit card or bank account billing address state (i.e. MA). This value is merely passed through to the payment gateway. This must conform to the [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes.
	BillingState *string `json:"billing_state,omitempty"`
	// The credit card or bank account billing address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (i.e. “US”). This value is merely passed through to the payment gateway. Some gateways require country codes in a specific format. Please check your gateway’s documentation. If creating an ACH subscription, only US is supported at this time.
	BillingCountry *string `json:"billing_country,omitempty"`
	// The credit card or bank account billing address zip code (i.e. 12345). This value is merely passed through to the payment gateway.
	BillingZip *string `json:"billing_zip,omitempty"`
	// The vault that stores the payment profile with the provided `vault_token`. Use `bogus` for testing.
	CurrentVault *CurrentVault `json:"current_vault,omitempty"`
	// The “token” provided by your vault storage for an already stored payment profile
	VaultToken *string `json:"vault_token,omitempty"`
	// (only for Authorize.Net CIM storage or Square) The customerProfileId for the owner of the customerPaymentProfileId provided as the vault_token
	CustomerVaultToken *string `json:"customer_vault_token,omitempty"`
	// (Required when creating a new payment profile) The Chargify customer id.
	CustomerId *int `json:"customer_id,omitempty"`
	// used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend using Chargify.js instead.
	PaypalEmail *string `json:"paypal_email,omitempty"` // Deprecated
	// used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend using Chargify.js instead.
	PaymentMethodNonce *string `json:"payment_method_nonce,omitempty"` // Deprecated
	// This attribute is only available if MultiGateway feature is enabled for your Site. This feature is in the Private Beta currently. gateway_handle is used to directly select a gateway where a payment profile will be stored in. Every connected gateway must have a unique gateway handle specified. Read [Multigateway description](https://chargify.zendesk.com/hc/en-us/articles/4407761759643#connecting-with-multiple-gateways) to learn more about new concepts that MultiGateway introduces and the default behavior when this attribute is not passed.
	GatewayHandle *string `json:"gateway_handle,omitempty"`
	// The 3- or 4-digit Card Verification Value. This value is merely passed through to the payment gateway.
	Cvv *string `json:"cvv,omitempty"`
	// (Required when creating with ACH or GoCardless, optional with Stripe Direct Debit). The name of the bank where the customerʼs account resides
	BankName *string `json:"bank_name,omitempty"`
	// (Optional when creating with GoCardless, required with Stripe Direct Debit). International Bank Account Number. Alternatively, local bank details can be provided
	BankIban *string `json:"bank_iban,omitempty"`
	// (Required when creating with ACH. Optional when creating a subscription with GoCardless). The routing number of the bank. It becomes bank_code while passing via GoCardless API
	BankRoutingNumber *string `json:"bank_routing_number,omitempty"`
	// (Required when creating with ACH, GoCardless, Stripe BECS or BACS Direct Debit, and bank_iban is blank) The customerʼs bank account number
	BankAccountNumber *string `json:"bank_account_number,omitempty"`
	// (Optional when creating with GoCardless, required with Stripe BECS or BACS Direct Debit) Branch/Sort code. Alternatively, an IBAN can be provided
	BankBranchCode *string `json:"bank_branch_code,omitempty"`
	// Defaults to checking
	BankAccountType *BankAccountType `json:"bank_account_type,omitempty"`
	// Defaults to personal
	BankAccountHolderType *BankAccountHolderType `json:"bank_account_holder_type,omitempty"`
	// (Optional) Used for creating subscription with payment profile imported using vault_token, for proper display in Advanced Billing UI
	LastFour             *string        `json:"last_four,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

CreatePaymentProfile represents a CreatePaymentProfile struct.

func (CreatePaymentProfile) MarshalJSON

func (c CreatePaymentProfile) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreatePaymentProfile. It customizes the JSON marshaling process for CreatePaymentProfile objects.

func (*CreatePaymentProfile) UnmarshalJSON

func (c *CreatePaymentProfile) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreatePaymentProfile. It customizes the JSON unmarshaling process for CreatePaymentProfile objects.

type CreatePaymentProfileExpirationMonth added in v0.1.0

type CreatePaymentProfileExpirationMonth struct {
	// contains filtered or unexported fields
}

CreatePaymentProfileExpirationMonth represents a CreatePaymentProfileExpirationMonth struct. This is a container for one-of cases.

func (*CreatePaymentProfileExpirationMonth) AsNumber added in v0.1.0

func (c *CreatePaymentProfileExpirationMonth) AsNumber() (
	*int,
	bool)

func (*CreatePaymentProfileExpirationMonth) AsString added in v0.1.0

func (c *CreatePaymentProfileExpirationMonth) AsString() (
	*string,
	bool)

func (CreatePaymentProfileExpirationMonth) MarshalJSON added in v0.1.0

func (c CreatePaymentProfileExpirationMonth) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreatePaymentProfileExpirationMonth. It customizes the JSON marshaling process for CreatePaymentProfileExpirationMonth objects.

func (CreatePaymentProfileExpirationMonth) String added in v0.1.0

String converts the CreatePaymentProfileExpirationMonth object to a string representation.

func (*CreatePaymentProfileExpirationMonth) UnmarshalJSON added in v0.1.0

func (c *CreatePaymentProfileExpirationMonth) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreatePaymentProfileExpirationMonth. It customizes the JSON unmarshaling process for CreatePaymentProfileExpirationMonth objects.

type CreatePaymentProfileExpirationYear added in v0.1.0

type CreatePaymentProfileExpirationYear struct {
	// contains filtered or unexported fields
}

CreatePaymentProfileExpirationYear represents a CreatePaymentProfileExpirationYear struct. This is a container for one-of cases.

func (*CreatePaymentProfileExpirationYear) AsNumber added in v0.1.0

func (c *CreatePaymentProfileExpirationYear) AsNumber() (
	*int,
	bool)

func (*CreatePaymentProfileExpirationYear) AsString added in v0.1.0

func (c *CreatePaymentProfileExpirationYear) AsString() (
	*string,
	bool)

func (CreatePaymentProfileExpirationYear) MarshalJSON added in v0.1.0

func (c CreatePaymentProfileExpirationYear) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreatePaymentProfileExpirationYear. It customizes the JSON marshaling process for CreatePaymentProfileExpirationYear objects.

func (CreatePaymentProfileExpirationYear) String added in v0.1.0

String converts the CreatePaymentProfileExpirationYear object to a string representation.

func (*CreatePaymentProfileExpirationYear) UnmarshalJSON added in v0.1.0

func (c *CreatePaymentProfileExpirationYear) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreatePaymentProfileExpirationYear. It customizes the JSON unmarshaling process for CreatePaymentProfileExpirationYear objects.

type CreatePaymentProfileRequest

type CreatePaymentProfileRequest struct {
	PaymentProfile       CreatePaymentProfile `json:"payment_profile"`
	AdditionalProperties map[string]any       `json:"_"`
}

CreatePaymentProfileRequest represents a CreatePaymentProfileRequest struct.

func (CreatePaymentProfileRequest) MarshalJSON

func (c CreatePaymentProfileRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreatePaymentProfileRequest. It customizes the JSON marshaling process for CreatePaymentProfileRequest objects.

func (*CreatePaymentProfileRequest) UnmarshalJSON

func (c *CreatePaymentProfileRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreatePaymentProfileRequest. It customizes the JSON unmarshaling process for CreatePaymentProfileRequest objects.

type CreatePrepaidComponent added in v0.1.0

type CreatePrepaidComponent struct {
	PrepaidUsageComponent PrepaidUsageComponent `json:"prepaid_usage_component"`
	AdditionalProperties  map[string]any        `json:"_"`
}

CreatePrepaidComponent represents a CreatePrepaidComponent struct.

func (CreatePrepaidComponent) MarshalJSON added in v0.1.0

func (c CreatePrepaidComponent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreatePrepaidComponent. It customizes the JSON marshaling process for CreatePrepaidComponent objects.

func (*CreatePrepaidComponent) UnmarshalJSON added in v0.1.0

func (c *CreatePrepaidComponent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreatePrepaidComponent. It customizes the JSON unmarshaling process for CreatePrepaidComponent objects.

type CreatePrepaidUsageComponentPricePoint added in v0.1.0

type CreatePrepaidUsageComponentPricePoint struct {
	Name   string  `json:"name"`
	Handle *string `json:"handle,omitempty"`
	// The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes.
	PricingScheme  PricingScheme  `json:"pricing_scheme"`
	Prices         []Price        `json:"prices"`
	OveragePricing OveragePricing `json:"overage_pricing"`
	// Whether to use the site level exchange rate or define your own prices for each currency if you have multiple currencies defined on the site.
	UseSiteExchangeRate *bool `json:"use_site_exchange_rate,omitempty"`
	// Boolean which controls whether or not remaining units should be rolled over to the next period
	RolloverPrepaidRemainder *bool `json:"rollover_prepaid_remainder,omitempty"`
	// Boolean which controls whether or not the allocated quantity should be renewed at the beginning of each period
	RenewPrepaidAllocation *bool `json:"renew_prepaid_allocation,omitempty"`
	// (only for prepaid usage components where rollover_prepaid_remainder is true) The number of `expiration_interval_unit`s after which rollover amounts should expire
	ExpirationInterval     *float64       `json:"expiration_interval,omitempty"`
	ExpirationIntervalUnit *IntervalUnit  `json:"expiration_interval_unit,omitempty"`
	AdditionalProperties   map[string]any `json:"_"`
}

CreatePrepaidUsageComponentPricePoint represents a CreatePrepaidUsageComponentPricePoint struct.

func (CreatePrepaidUsageComponentPricePoint) MarshalJSON added in v0.1.0

func (c CreatePrepaidUsageComponentPricePoint) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreatePrepaidUsageComponentPricePoint. It customizes the JSON marshaling process for CreatePrepaidUsageComponentPricePoint objects.

func (*CreatePrepaidUsageComponentPricePoint) UnmarshalJSON added in v0.1.0

func (c *CreatePrepaidUsageComponentPricePoint) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreatePrepaidUsageComponentPricePoint. It customizes the JSON unmarshaling process for CreatePrepaidUsageComponentPricePoint objects.

type CreatePrepayment

type CreatePrepayment struct {
	Amount  float64 `json:"amount"`
	Details string  `json:"details"`
	Memo    string  `json:"memo"`
	// :- When the `method` specified is `"credit_card_on_file"`, the prepayment amount will be collected using the default credit card payment profile and applied to the prepayment account balance. This is especially useful for manual replenishment of prepaid subscriptions.
	Method               CreatePrepaymentMethod `json:"method"`
	PaymentProfileId     *int                   `json:"payment_profile_id,omitempty"`
	AdditionalProperties map[string]any         `json:"_"`
}

CreatePrepayment represents a CreatePrepayment struct.

func (CreatePrepayment) MarshalJSON

func (c CreatePrepayment) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreatePrepayment. It customizes the JSON marshaling process for CreatePrepayment objects.

func (*CreatePrepayment) UnmarshalJSON

func (c *CreatePrepayment) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreatePrepayment. It customizes the JSON unmarshaling process for CreatePrepayment objects.

type CreatePrepaymentMethod added in v0.1.0

type CreatePrepaymentMethod string

CreatePrepaymentMethod is a string enum. :- When the `method` specified is `"credit_card_on_file"`, the prepayment amount will be collected using the default credit card payment profile and applied to the prepayment account balance. This is especially useful for manual replenishment of prepaid subscriptions.

const (
	CreatePrepaymentMethod_CHECK            CreatePrepaymentMethod = "check"
	CreatePrepaymentMethod_CASH             CreatePrepaymentMethod = "cash"
	CreatePrepaymentMethod_MONEYORDER       CreatePrepaymentMethod = "money_order"
	CreatePrepaymentMethod_ACH              CreatePrepaymentMethod = "ach"
	CreatePrepaymentMethod_PAYPALACCOUNT    CreatePrepaymentMethod = "paypal_account"
	CreatePrepaymentMethod_CREDITCARD       CreatePrepaymentMethod = "credit_card"
	CreatePrepaymentMethod_CREDITCARDONFILE CreatePrepaymentMethod = "credit_card_on_file"
	CreatePrepaymentMethod_OTHER            CreatePrepaymentMethod = "other"
)

func (CreatePrepaymentMethod) MarshalJSON added in v0.2.0

func (e CreatePrepaymentMethod) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreatePrepaymentMethod. It customizes the JSON marshaling process for CreatePrepaymentMethod objects.

func (*CreatePrepaymentMethod) UnmarshalJSON added in v0.2.0

func (e *CreatePrepaymentMethod) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreatePrepaymentMethod. It customizes the JSON unmarshaling process for CreatePrepaymentMethod objects.

type CreatePrepaymentRequest

type CreatePrepaymentRequest struct {
	Prepayment           CreatePrepayment `json:"prepayment"`
	AdditionalProperties map[string]any   `json:"_"`
}

CreatePrepaymentRequest represents a CreatePrepaymentRequest struct.

func (CreatePrepaymentRequest) MarshalJSON

func (c CreatePrepaymentRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreatePrepaymentRequest. It customizes the JSON marshaling process for CreatePrepaymentRequest objects.

func (*CreatePrepaymentRequest) UnmarshalJSON

func (c *CreatePrepaymentRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreatePrepaymentRequest. It customizes the JSON unmarshaling process for CreatePrepaymentRequest objects.

type CreatePrepaymentResponse

type CreatePrepaymentResponse struct {
	Prepayment           CreatedPrepayment `json:"prepayment"`
	AdditionalProperties map[string]any    `json:"_"`
}

CreatePrepaymentResponse represents a CreatePrepaymentResponse struct.

func (CreatePrepaymentResponse) MarshalJSON

func (c CreatePrepaymentResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreatePrepaymentResponse. It customizes the JSON marshaling process for CreatePrepaymentResponse objects.

func (*CreatePrepaymentResponse) UnmarshalJSON

func (c *CreatePrepaymentResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreatePrepaymentResponse. It customizes the JSON unmarshaling process for CreatePrepaymentResponse objects.

type CreateProductCurrencyPrice

type CreateProductCurrencyPrice struct {
	// ISO code for one of the site level currencies.
	Currency string `json:"currency"`
	// Price for the given role.
	Price int `json:"price"`
	// Role for the price.
	Role                 CurrencyPriceRole `json:"role"`
	AdditionalProperties map[string]any    `json:"_"`
}

CreateProductCurrencyPrice represents a CreateProductCurrencyPrice struct.

func (CreateProductCurrencyPrice) MarshalJSON

func (c CreateProductCurrencyPrice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateProductCurrencyPrice. It customizes the JSON marshaling process for CreateProductCurrencyPrice objects.

func (*CreateProductCurrencyPrice) UnmarshalJSON

func (c *CreateProductCurrencyPrice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateProductCurrencyPrice. It customizes the JSON unmarshaling process for CreateProductCurrencyPrice objects.

type CreateProductCurrencyPricesRequest

type CreateProductCurrencyPricesRequest struct {
	CurrencyPrices       []CreateProductCurrencyPrice `json:"currency_prices"`
	AdditionalProperties map[string]any               `json:"_"`
}

CreateProductCurrencyPricesRequest represents a CreateProductCurrencyPricesRequest struct.

func (CreateProductCurrencyPricesRequest) MarshalJSON

func (c CreateProductCurrencyPricesRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateProductCurrencyPricesRequest. It customizes the JSON marshaling process for CreateProductCurrencyPricesRequest objects.

func (*CreateProductCurrencyPricesRequest) UnmarshalJSON

func (c *CreateProductCurrencyPricesRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateProductCurrencyPricesRequest. It customizes the JSON unmarshaling process for CreateProductCurrencyPricesRequest objects.

type CreateProductFamily

type CreateProductFamily struct {
	Name                 string           `json:"name"`
	Handle               Optional[string] `json:"handle"`
	Description          Optional[string] `json:"description"`
	AdditionalProperties map[string]any   `json:"_"`
}

CreateProductFamily represents a CreateProductFamily struct.

func (CreateProductFamily) MarshalJSON

func (c CreateProductFamily) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateProductFamily. It customizes the JSON marshaling process for CreateProductFamily objects.

func (*CreateProductFamily) UnmarshalJSON

func (c *CreateProductFamily) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateProductFamily. It customizes the JSON unmarshaling process for CreateProductFamily objects.

type CreateProductFamilyRequest

type CreateProductFamilyRequest struct {
	ProductFamily        CreateProductFamily `json:"product_family"`
	AdditionalProperties map[string]any      `json:"_"`
}

CreateProductFamilyRequest represents a CreateProductFamilyRequest struct.

func (CreateProductFamilyRequest) MarshalJSON

func (c CreateProductFamilyRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateProductFamilyRequest. It customizes the JSON marshaling process for CreateProductFamilyRequest objects.

func (*CreateProductFamilyRequest) UnmarshalJSON

func (c *CreateProductFamilyRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateProductFamilyRequest. It customizes the JSON unmarshaling process for CreateProductFamilyRequest objects.

type CreateProductPricePoint

type CreateProductPricePoint struct {
	// The product price point name
	Name string `json:"name"`
	// The product price point API handle
	Handle *string `json:"handle,omitempty"`
	// The product price point price, in integer cents
	PriceInCents int64 `json:"price_in_cents"`
	// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this product price point would renew every 30 days
	Interval int `json:"interval"`
	// A string representing the interval unit for this product price point, either month or day
	IntervalUnit IntervalUnit `json:"interval_unit"`
	// The product price point trial price, in integer cents
	TrialPriceInCents *int64 `json:"trial_price_in_cents,omitempty"`
	// The numerical trial interval. i.e. an interval of ‘30’ coupled with a trial_interval_unit of day would mean this product price point trial would last 30 days.
	TrialInterval *int `json:"trial_interval,omitempty"`
	// A string representing the trial interval unit for this product price point, either month or day
	TrialIntervalUnit *IntervalUnit `json:"trial_interval_unit,omitempty"`
	TrialType         *string       `json:"trial_type,omitempty"`
	// The product price point initial charge, in integer cents
	InitialChargeInCents    *int64 `json:"initial_charge_in_cents,omitempty"`
	InitialChargeAfterTrial *bool  `json:"initial_charge_after_trial,omitempty"`
	// The numerical expiration interval. i.e. an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product price point would expire after 30 days.
	ExpirationInterval *int `json:"expiration_interval,omitempty"`
	// A string representing the expiration interval unit for this product price point, either month or day
	ExpirationIntervalUnit *IntervalUnit `json:"expiration_interval_unit,omitempty"`
	// Whether or not to use the site's exchange rate or define your own pricing when your site has multiple currencies defined.
	UseSiteExchangeRate  *bool          `json:"use_site_exchange_rate,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

CreateProductPricePoint represents a CreateProductPricePoint struct.

func (CreateProductPricePoint) MarshalJSON

func (c CreateProductPricePoint) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateProductPricePoint. It customizes the JSON marshaling process for CreateProductPricePoint objects.

func (*CreateProductPricePoint) UnmarshalJSON

func (c *CreateProductPricePoint) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateProductPricePoint. It customizes the JSON unmarshaling process for CreateProductPricePoint objects.

type CreateProductPricePointProductId added in v0.1.0

type CreateProductPricePointProductId struct {
	// contains filtered or unexported fields
}

CreateProductPricePointProductId represents a CreateProductPricePointProductId struct. This is a container for one-of cases.

func (*CreateProductPricePointProductId) AsNumber added in v0.1.0

func (c *CreateProductPricePointProductId) AsNumber() (
	*int,
	bool)

func (*CreateProductPricePointProductId) AsString added in v0.1.0

func (c *CreateProductPricePointProductId) AsString() (
	*string,
	bool)

func (CreateProductPricePointProductId) MarshalJSON added in v0.1.0

func (c CreateProductPricePointProductId) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateProductPricePointProductId. It customizes the JSON marshaling process for CreateProductPricePointProductId objects.

func (CreateProductPricePointProductId) String added in v0.1.0

String converts the CreateProductPricePointProductId object to a string representation.

func (*CreateProductPricePointProductId) UnmarshalJSON added in v0.1.0

func (c *CreateProductPricePointProductId) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateProductPricePointProductId. It customizes the JSON unmarshaling process for CreateProductPricePointProductId objects.

type CreateProductPricePointRequest

type CreateProductPricePointRequest struct {
	PricePoint           CreateProductPricePoint `json:"price_point"`
	AdditionalProperties map[string]any          `json:"_"`
}

CreateProductPricePointRequest represents a CreateProductPricePointRequest struct.

func (CreateProductPricePointRequest) MarshalJSON

func (c CreateProductPricePointRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateProductPricePointRequest. It customizes the JSON marshaling process for CreateProductPricePointRequest objects.

func (*CreateProductPricePointRequest) UnmarshalJSON

func (c *CreateProductPricePointRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateProductPricePointRequest. It customizes the JSON unmarshaling process for CreateProductPricePointRequest objects.

type CreateQuantityBasedComponent added in v0.1.0

type CreateQuantityBasedComponent struct {
	QuantityBasedComponent QuantityBasedComponent `json:"quantity_based_component"`
	AdditionalProperties   map[string]any         `json:"_"`
}

CreateQuantityBasedComponent represents a CreateQuantityBasedComponent struct.

func (CreateQuantityBasedComponent) MarshalJSON added in v0.1.0

func (c CreateQuantityBasedComponent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateQuantityBasedComponent. It customizes the JSON marshaling process for CreateQuantityBasedComponent objects.

func (*CreateQuantityBasedComponent) UnmarshalJSON added in v0.1.0

func (c *CreateQuantityBasedComponent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateQuantityBasedComponent. It customizes the JSON unmarshaling process for CreateQuantityBasedComponent objects.

type CreateReasonCode

type CreateReasonCode struct {
	// The unique identifier for the ReasonCode
	Code string `json:"code"`
	// The friendly summary of what the code signifies
	Description string `json:"description"`
	// The order that code appears in lists
	Position             *int           `json:"position,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

CreateReasonCode represents a CreateReasonCode struct.

func (CreateReasonCode) MarshalJSON

func (c CreateReasonCode) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateReasonCode. It customizes the JSON marshaling process for CreateReasonCode objects.

func (*CreateReasonCode) UnmarshalJSON

func (c *CreateReasonCode) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateReasonCode. It customizes the JSON unmarshaling process for CreateReasonCode objects.

type CreateReasonCodeRequest

type CreateReasonCodeRequest struct {
	ReasonCode           CreateReasonCode `json:"reason_code"`
	AdditionalProperties map[string]any   `json:"_"`
}

CreateReasonCodeRequest represents a CreateReasonCodeRequest struct.

func (CreateReasonCodeRequest) MarshalJSON

func (c CreateReasonCodeRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateReasonCodeRequest. It customizes the JSON marshaling process for CreateReasonCodeRequest objects.

func (*CreateReasonCodeRequest) UnmarshalJSON

func (c *CreateReasonCodeRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateReasonCodeRequest. It customizes the JSON unmarshaling process for CreateReasonCodeRequest objects.

type CreateSegment

type CreateSegment struct {
	// A value that will occur in your events that you want to bill upon. The type of the value depends on the property type in the related event based billing metric.
	SegmentProperty1Value *CreateSegmentSegmentProperty1Value `json:"segment_property_1_value,omitempty"`
	// A value that will occur in your events that you want to bill upon. The type of the value depends on the property type in the related event based billing metric.
	SegmentProperty2Value *CreateSegmentSegmentProperty2Value `json:"segment_property_2_value,omitempty"`
	// A value that will occur in your events that you want to bill upon. The type of the value depends on the property type in the related event based billing metric.
	SegmentProperty3Value *CreateSegmentSegmentProperty3Value `json:"segment_property_3_value,omitempty"`
	// A value that will occur in your events that you want to bill upon. The type of the value depends on the property type in the related event based billing metric.
	SegmentProperty4Value *CreateSegmentSegmentProperty4Value `json:"segment_property_4_value,omitempty"`
	// The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes.
	PricingScheme        PricingScheme                `json:"pricing_scheme"`
	Prices               []CreateOrUpdateSegmentPrice `json:"prices,omitempty"`
	AdditionalProperties map[string]any               `json:"_"`
}

CreateSegment represents a CreateSegment struct.

func (CreateSegment) MarshalJSON

func (c CreateSegment) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateSegment. It customizes the JSON marshaling process for CreateSegment objects.

func (*CreateSegment) UnmarshalJSON

func (c *CreateSegment) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateSegment. It customizes the JSON unmarshaling process for CreateSegment objects.

type CreateSegmentRequest

type CreateSegmentRequest struct {
	Segment              CreateSegment  `json:"segment"`
	AdditionalProperties map[string]any `json:"_"`
}

CreateSegmentRequest represents a CreateSegmentRequest struct.

func (CreateSegmentRequest) MarshalJSON

func (c CreateSegmentRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateSegmentRequest. It customizes the JSON marshaling process for CreateSegmentRequest objects.

func (*CreateSegmentRequest) UnmarshalJSON

func (c *CreateSegmentRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateSegmentRequest. It customizes the JSON unmarshaling process for CreateSegmentRequest objects.

type CreateSegmentSegmentProperty1Value added in v0.1.0

type CreateSegmentSegmentProperty1Value struct {
	// contains filtered or unexported fields
}

CreateSegmentSegmentProperty1Value represents a CreateSegmentSegmentProperty1Value struct. This is a container for one-of cases.

func (*CreateSegmentSegmentProperty1Value) AsBoolean added in v0.1.0

func (c *CreateSegmentSegmentProperty1Value) AsBoolean() (
	*bool,
	bool)

func (*CreateSegmentSegmentProperty1Value) AsNumber added in v0.1.0

func (c *CreateSegmentSegmentProperty1Value) AsNumber() (
	*int,
	bool)

func (*CreateSegmentSegmentProperty1Value) AsPrecision added in v0.1.0

func (c *CreateSegmentSegmentProperty1Value) AsPrecision() (
	*float64,
	bool)

func (*CreateSegmentSegmentProperty1Value) AsString added in v0.1.0

func (c *CreateSegmentSegmentProperty1Value) AsString() (
	*string,
	bool)

func (CreateSegmentSegmentProperty1Value) MarshalJSON added in v0.1.0

func (c CreateSegmentSegmentProperty1Value) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateSegmentSegmentProperty1Value. It customizes the JSON marshaling process for CreateSegmentSegmentProperty1Value objects.

func (CreateSegmentSegmentProperty1Value) String added in v0.1.0

String converts the CreateSegmentSegmentProperty1Value object to a string representation.

func (*CreateSegmentSegmentProperty1Value) UnmarshalJSON added in v0.1.0

func (c *CreateSegmentSegmentProperty1Value) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateSegmentSegmentProperty1Value. It customizes the JSON unmarshaling process for CreateSegmentSegmentProperty1Value objects.

type CreateSegmentSegmentProperty2Value added in v0.1.0

type CreateSegmentSegmentProperty2Value struct {
	// contains filtered or unexported fields
}

CreateSegmentSegmentProperty2Value represents a CreateSegmentSegmentProperty2Value struct. This is a container for one-of cases.

func (*CreateSegmentSegmentProperty2Value) AsBoolean added in v0.1.0

func (c *CreateSegmentSegmentProperty2Value) AsBoolean() (
	*bool,
	bool)

func (*CreateSegmentSegmentProperty2Value) AsNumber added in v0.1.0

func (c *CreateSegmentSegmentProperty2Value) AsNumber() (
	*int,
	bool)

func (*CreateSegmentSegmentProperty2Value) AsPrecision added in v0.1.0

func (c *CreateSegmentSegmentProperty2Value) AsPrecision() (
	*float64,
	bool)

func (*CreateSegmentSegmentProperty2Value) AsString added in v0.1.0

func (c *CreateSegmentSegmentProperty2Value) AsString() (
	*string,
	bool)

func (CreateSegmentSegmentProperty2Value) MarshalJSON added in v0.1.0

func (c CreateSegmentSegmentProperty2Value) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateSegmentSegmentProperty2Value. It customizes the JSON marshaling process for CreateSegmentSegmentProperty2Value objects.

func (CreateSegmentSegmentProperty2Value) String added in v0.1.0

String converts the CreateSegmentSegmentProperty2Value object to a string representation.

func (*CreateSegmentSegmentProperty2Value) UnmarshalJSON added in v0.1.0

func (c *CreateSegmentSegmentProperty2Value) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateSegmentSegmentProperty2Value. It customizes the JSON unmarshaling process for CreateSegmentSegmentProperty2Value objects.

type CreateSegmentSegmentProperty3Value added in v0.1.0

type CreateSegmentSegmentProperty3Value struct {
	// contains filtered or unexported fields
}

CreateSegmentSegmentProperty3Value represents a CreateSegmentSegmentProperty3Value struct. This is a container for one-of cases.

func (*CreateSegmentSegmentProperty3Value) AsBoolean added in v0.1.0

func (c *CreateSegmentSegmentProperty3Value) AsBoolean() (
	*bool,
	bool)

func (*CreateSegmentSegmentProperty3Value) AsNumber added in v0.1.0

func (c *CreateSegmentSegmentProperty3Value) AsNumber() (
	*int,
	bool)

func (*CreateSegmentSegmentProperty3Value) AsPrecision added in v0.1.0

func (c *CreateSegmentSegmentProperty3Value) AsPrecision() (
	*float64,
	bool)

func (*CreateSegmentSegmentProperty3Value) AsString added in v0.1.0

func (c *CreateSegmentSegmentProperty3Value) AsString() (
	*string,
	bool)

func (CreateSegmentSegmentProperty3Value) MarshalJSON added in v0.1.0

func (c CreateSegmentSegmentProperty3Value) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateSegmentSegmentProperty3Value. It customizes the JSON marshaling process for CreateSegmentSegmentProperty3Value objects.

func (CreateSegmentSegmentProperty3Value) String added in v0.1.0

String converts the CreateSegmentSegmentProperty3Value object to a string representation.

func (*CreateSegmentSegmentProperty3Value) UnmarshalJSON added in v0.1.0

func (c *CreateSegmentSegmentProperty3Value) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateSegmentSegmentProperty3Value. It customizes the JSON unmarshaling process for CreateSegmentSegmentProperty3Value objects.

type CreateSegmentSegmentProperty4Value added in v0.1.0

type CreateSegmentSegmentProperty4Value struct {
	// contains filtered or unexported fields
}

CreateSegmentSegmentProperty4Value represents a CreateSegmentSegmentProperty4Value struct. This is a container for one-of cases.

func (*CreateSegmentSegmentProperty4Value) AsBoolean added in v0.1.0

func (c *CreateSegmentSegmentProperty4Value) AsBoolean() (
	*bool,
	bool)

func (*CreateSegmentSegmentProperty4Value) AsNumber added in v0.1.0

func (c *CreateSegmentSegmentProperty4Value) AsNumber() (
	*int,
	bool)

func (*CreateSegmentSegmentProperty4Value) AsPrecision added in v0.1.0

func (c *CreateSegmentSegmentProperty4Value) AsPrecision() (
	*float64,
	bool)

func (*CreateSegmentSegmentProperty4Value) AsString added in v0.1.0

func (c *CreateSegmentSegmentProperty4Value) AsString() (
	*string,
	bool)

func (CreateSegmentSegmentProperty4Value) MarshalJSON added in v0.1.0

func (c CreateSegmentSegmentProperty4Value) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateSegmentSegmentProperty4Value. It customizes the JSON marshaling process for CreateSegmentSegmentProperty4Value objects.

func (CreateSegmentSegmentProperty4Value) String added in v0.1.0

String converts the CreateSegmentSegmentProperty4Value object to a string representation.

func (*CreateSegmentSegmentProperty4Value) UnmarshalJSON added in v0.1.0

func (c *CreateSegmentSegmentProperty4Value) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateSegmentSegmentProperty4Value. It customizes the JSON unmarshaling process for CreateSegmentSegmentProperty4Value objects.

type CreateSignupProformaPreviewInclude added in v0.1.0

type CreateSignupProformaPreviewInclude string

CreateSignupProformaPreviewInclude is a string enum.

const (
	CreateSignupProformaPreviewInclude_NEXTPROFORMAINVOICE CreateSignupProformaPreviewInclude = "next_proforma_invoice"
)

func (CreateSignupProformaPreviewInclude) MarshalJSON added in v0.2.0

func (e CreateSignupProformaPreviewInclude) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateSignupProformaPreviewInclude. It customizes the JSON marshaling process for CreateSignupProformaPreviewInclude objects.

func (*CreateSignupProformaPreviewInclude) UnmarshalJSON added in v0.2.0

func (e *CreateSignupProformaPreviewInclude) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateSignupProformaPreviewInclude. It customizes the JSON unmarshaling process for CreateSignupProformaPreviewInclude objects.

type CreateSubscription

type CreateSubscription struct {
	// The API Handle of the product for which you are creating a subscription. Required, unless a `product_id` is given instead.
	ProductHandle *string `json:"product_handle,omitempty"`
	// The Product ID of the product for which you are creating a subscription. The product ID is not currently published, so we recommend using the API Handle instead.
	ProductId *int `json:"product_id,omitempty"`
	// The user-friendly API handle of a product's particular price point.
	ProductPricePointHandle *string `json:"product_price_point_handle,omitempty"`
	// The ID of the particular price point on the product.
	ProductPricePointId *int `json:"product_price_point_id,omitempty"`
	// (Optional) Used in place of `product_price_point_id` to define a custom price point unique to the subscription
	CustomPrice *SubscriptionCustomPrice `json:"custom_price,omitempty"`
	// (deprecated) The coupon code of the single coupon currently applied to the subscription. See coupon_codes instead as subscriptions can now have more than one coupon.
	CouponCode *string `json:"coupon_code,omitempty"`
	// An array for all the coupons attached to the subscription.
	CouponCodes []string `json:"coupon_codes,omitempty"`
	// The type of payment collection to be used in the subscription. For legacy Statements Architecture valid options are - `invoice`, `automatic`. For current Relationship Invoicing Architecture valid options are - `remittance`, `automatic`, `prepaid`.
	PaymentCollectionMethod *CollectionMethod `json:"payment_collection_method,omitempty"`
	// (Optional) Default: True - Whether or not this subscription is set to receive emails related to this subscription.
	ReceivesInvoiceEmails *string `json:"receives_invoice_emails,omitempty"`
	// (Optional) Default: null The number of days after renewal (on invoice billing) that a subscription is due. A value between 0 (due immediately) and 180.
	NetTerms *string `json:"net_terms,omitempty"`
	// The ID of an existing customer within Chargify. Required, unless a `customer_reference` or a set of `customer_attributes` is given.
	CustomerId *int `json:"customer_id,omitempty"`
	// (Optional) Set this attribute to a future date/time to sync imported subscriptions to your existing renewal schedule. See the notes on “Date/Time Format” in our [subscription import documentation](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404863655821#date-format). If you provide a next_billing_at timestamp that is in the future, no trial or initial charges will be applied when you create the subscription. In fact, no payment will be captured at all. The first payment will be captured, according to the prices defined by the product, near the time specified by next_billing_at. If you do not provide a value for next_billing_at, any trial and/or initial charges will be assessed and charged at the time of subscription creation. If the card cannot be successfully charged, the subscription will not be created. See further notes in the section on Importing Subscriptions.
	NextBillingAt *time.Time `json:"next_billing_at,omitempty"`
	// (Optional) Set this attribute to a future date/time to create a subscription in the "Awaiting Signup" state, rather than "Active" or "Trialing". See the notes on “Date/Time Format” in our [subscription import documentation](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404863655821#date-format). In the "Awaiting Signup" state, a subscription behaves like any other. It can be canceled, allocated to, had its billing date changed. etc. When the initial_billing_at date hits, the subscription will transition to the expected state. If the product has a trial, the subscription will enter a trial, otherwise it will go active. Setup fees will be respected either before or after the trial, as configured on the price point. If the payment is due at the initial_billing_at and it fails the subscription will be immediately canceled. See further notes in the section on Delayed Signups.
	InitialBillingAt *time.Time `json:"initial_billing_at,omitempty"`
	// For European sites subject to PSD2 and using 3D Secure, this can be used to reference a previous transaction for the customer. This will ensure the card will be charged successfully at renewal.
	StoredCredentialTransactionId *int `json:"stored_credential_transaction_id,omitempty"`
	SalesRepId                    *int `json:"sales_rep_id,omitempty"`
	// The Payment Profile ID of an existing card or bank account, which belongs to an existing customer to use for payment for this subscription. If the card, bank account, or customer does not exist already, or if you want to use a new (unstored) card or bank account for the subscription, use `payment_profile_attributes` instead to create a new payment profile along with the subscription. (This value is available on an existing subscription via the API as `credit_card` > id or `bank_account` > id)
	PaymentProfileId *int `json:"payment_profile_id,omitempty"`
	// The reference value (provided by your app) for the subscription itelf.
	Reference          *string             `json:"reference,omitempty"`
	CustomerAttributes *CustomerAttributes `json:"customer_attributes,omitempty"`
	// alias to credit_card_attributes
	PaymentProfileAttributes *PaymentProfileAttributes `json:"payment_profile_attributes,omitempty"`
	// Credit Card data to create a new Subscription. Interchangeable with `payment_profile_attributes` property.
	CreditCardAttributes  *PaymentProfileAttributes `json:"credit_card_attributes,omitempty"`
	BankAccountAttributes *BankAccountAttributes    `json:"bank_account_attributes,omitempty"`
	// (Optional) An array of component ids and quantities to be added to the subscription. See [Components](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405020625677) for more information.
	Components []CreateSubscriptionComponent `json:"components,omitempty"`
	// (Optional). Cannot be used when also specifying next_billing_at
	CalendarBilling *CalendarBilling `json:"calendar_billing,omitempty"`
	// (Optional) A set of key/value pairs representing custom fields and their values. Metafields will be created “on-the-fly” in your site for a given key, if they have not been created yet.
	Metafields map[string]string `json:"metafields,omitempty"`
	// The reference value (provided by your app) of an existing customer within Chargify. Required, unless a `customer_id` or a set of `customer_attributes` is given.
	CustomerReference *string        `json:"customer_reference,omitempty"`
	Group             *GroupSettings `json:"group,omitempty"`
	// A valid referral code. (optional, see [Referrals](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405420204045-Referrals-Reference#how-to-obtain-referral-codes) for more details). If supplied, must be valid, or else subscription creation will fail.
	Ref *string `json:"ref,omitempty"`
	// (Optional) Can be used when canceling a subscription (via the HTTP DELETE method) to make a note about the reason for cancellation.
	CancellationMessage *string `json:"cancellation_message,omitempty"`
	// (Optional) Can be used when canceling a subscription (via the HTTP DELETE method) to make a note about how the subscription was canceled.
	CancellationMethod *string `json:"cancellation_method,omitempty"`
	// (Optional) If Multi-Currency is enabled and the currency is configured in Chargify, pass it at signup to create a subscription on a non-default currency. Note that you cannot update the currency of an existing subscription.
	Currency *string `json:"currency,omitempty"`
	// Timestamp giving the expiration date of this subscription (if any). You may manually change the expiration date at any point during a subscription period.
	ExpiresAt *time.Time `json:"expires_at,omitempty"`
	// (Optional, default false) When set to true, and when next_billing_at is present, if the subscription expires, the expires_at will be shifted by the same amount of time as the difference between the old and new “next billing” dates.
	ExpirationTracksNextBillingChange *string `json:"expiration_tracks_next_billing_change,omitempty"`
	// (Optional) The ACH authorization agreement terms. If enabled, an email will be sent to the customer with a copy of the terms.
	AgreementTerms *string `json:"agreement_terms,omitempty"`
	// (Optional) The first name of the person authorizing the ACH agreement.
	AuthorizerFirstName *string `json:"authorizer_first_name,omitempty"`
	// (Optional) The last name of the person authorizing the ACH agreement.
	AuthorizerLastName *string `json:"authorizer_last_name,omitempty"`
	// (Optional) One of “prorated” (the default – the prorated product price will be charged immediately), “immediate” (the full product price will be charged immediately), or “delayed” (the full product price will be charged with the first scheduled renewal).
	CalendarBillingFirstCharge *string `json:"calendar_billing_first_charge,omitempty"`
	// (Optional) Can be used when canceling a subscription (via the HTTP DELETE method) to indicate why a subscription was canceled.
	ReasonCode *string `json:"reason_code,omitempty"`
	// (Optional, used only for Delayed Product Change When set to true, indicates that a changed value for product_handle should schedule the product change to the next subscription renewal.
	ProductChangeDelayed *bool `json:"product_change_delayed,omitempty"`
	// Use in place of passing product and component information to set up the subscription with an existing offer. May be either the Chargify id of the offer or its handle prefixed with `handle:`.er
	OfferId              *CreateSubscriptionOfferId  `json:"offer_id,omitempty"`
	PrepaidConfiguration *UpsertPrepaidConfiguration `json:"prepaid_configuration,omitempty"`
	// Providing a previous_billing_at that is in the past will set the current_period_starts_at when the subscription is created. It will also set activated_at if not explicitly passed during the subscription import. Can only be used if next_billing_at is also passed. Using this option will allow you to set the period start for the subscription so mid period component allocations have the correct prorated amount.
	PreviousBillingAt *time.Time `json:"previous_billing_at,omitempty"`
	// Setting this attribute to true will cause the subscription's MRR to be added to your MRR analytics immediately. For this value to be honored, a next_billing_at must be present and set to a future date. This key/value will not be returned in the subscription response body.
	ImportMrr   *bool      `json:"import_mrr,omitempty"`
	CanceledAt  *time.Time `json:"canceled_at,omitempty"`
	ActivatedAt *time.Time `json:"activated_at,omitempty"`
	// Required when creating a subscription with Maxio Payments.
	AgreementAcceptance *AgreementAcceptance `json:"agreement_acceptance,omitempty"`
	// (Optional) If passed, the proof of the authorized ACH agreement terms will be persisted.
	AchAgreement *ACHAgreement `json:"ach_agreement,omitempty"`
	// Enable Communication Delay feature, making sure no communication (email or SMS) is sent to the Customer between 9PM and 8AM in time zone set by the `dunning_communication_delay_time_zone` attribute.
	DunningCommunicationDelayEnabled Optional[bool] `json:"dunning_communication_delay_enabled"`
	// Time zone for the Dunning Communication Delay feature.
	DunningCommunicationDelayTimeZone Optional[string] `json:"dunning_communication_delay_time_zone"`
	// Valid only for the Subscription Preview endpoint. When set to `true` it skips calculating taxes for the current and next billing manifests.
	SkipBillingManifestTaxes *bool          `json:"skip_billing_manifest_taxes,omitempty"`
	AdditionalProperties     map[string]any `json:"_"`
}

CreateSubscription represents a CreateSubscription struct.

func (CreateSubscription) MarshalJSON

func (c CreateSubscription) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateSubscription. It customizes the JSON marshaling process for CreateSubscription objects.

func (*CreateSubscription) UnmarshalJSON

func (c *CreateSubscription) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateSubscription. It customizes the JSON unmarshaling process for CreateSubscription objects.

type CreateSubscriptionComponent

type CreateSubscriptionComponent struct {
	ComponentId *CreateSubscriptionComponentComponentId `json:"component_id,omitempty"`
	// Used for on/off components only.
	Enabled *bool `json:"enabled,omitempty"`
	// Used for metered and events based components.
	UnitBalance *int `json:"unit_balance,omitempty"`
	// Used for quantity based components.
	AllocatedQuantity *CreateSubscriptionComponentAllocatedQuantity `json:"allocated_quantity,omitempty"`
	// Deprecated. Use `allocated_quantity` instead.
	Quantity     *int                                     `json:"quantity,omitempty"` // Deprecated
	PricePointId *CreateSubscriptionComponentPricePointId `json:"price_point_id,omitempty"`
	// Create or update custom pricing unique to the subscription. Used in place of `price_point_id`.
	CustomPrice          *ComponentCustomPrice `json:"custom_price,omitempty"`
	AdditionalProperties map[string]any        `json:"_"`
}

CreateSubscriptionComponent represents a CreateSubscriptionComponent struct.

func (CreateSubscriptionComponent) MarshalJSON

func (c CreateSubscriptionComponent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateSubscriptionComponent. It customizes the JSON marshaling process for CreateSubscriptionComponent objects.

func (*CreateSubscriptionComponent) UnmarshalJSON

func (c *CreateSubscriptionComponent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateSubscriptionComponent. It customizes the JSON unmarshaling process for CreateSubscriptionComponent objects.

type CreateSubscriptionComponentAllocatedQuantity added in v0.1.0

type CreateSubscriptionComponentAllocatedQuantity struct {
	// contains filtered or unexported fields
}

CreateSubscriptionComponentAllocatedQuantity represents a CreateSubscriptionComponentAllocatedQuantity struct. This is a container for one-of cases.

func (*CreateSubscriptionComponentAllocatedQuantity) AsNumber added in v0.1.0

func (*CreateSubscriptionComponentAllocatedQuantity) AsString added in v0.1.0

func (CreateSubscriptionComponentAllocatedQuantity) MarshalJSON added in v0.1.0

MarshalJSON implements the json.Marshaler interface for CreateSubscriptionComponentAllocatedQuantity. It customizes the JSON marshaling process for CreateSubscriptionComponentAllocatedQuantity objects.

func (CreateSubscriptionComponentAllocatedQuantity) String added in v0.1.0

String converts the CreateSubscriptionComponentAllocatedQuantity object to a string representation.

func (*CreateSubscriptionComponentAllocatedQuantity) UnmarshalJSON added in v0.1.0

func (c *CreateSubscriptionComponentAllocatedQuantity) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateSubscriptionComponentAllocatedQuantity. It customizes the JSON unmarshaling process for CreateSubscriptionComponentAllocatedQuantity objects.

type CreateSubscriptionComponentComponentId added in v0.1.0

type CreateSubscriptionComponentComponentId struct {
	// contains filtered or unexported fields
}

CreateSubscriptionComponentComponentId represents a CreateSubscriptionComponentComponentId struct. This is a container for one-of cases.

func (*CreateSubscriptionComponentComponentId) AsNumber added in v0.1.0

func (c *CreateSubscriptionComponentComponentId) AsNumber() (
	*int,
	bool)

func (*CreateSubscriptionComponentComponentId) AsString added in v0.1.0

func (CreateSubscriptionComponentComponentId) MarshalJSON added in v0.1.0

func (c CreateSubscriptionComponentComponentId) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateSubscriptionComponentComponentId. It customizes the JSON marshaling process for CreateSubscriptionComponentComponentId objects.

func (CreateSubscriptionComponentComponentId) String added in v0.1.0

String converts the CreateSubscriptionComponentComponentId object to a string representation.

func (*CreateSubscriptionComponentComponentId) UnmarshalJSON added in v0.1.0

func (c *CreateSubscriptionComponentComponentId) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateSubscriptionComponentComponentId. It customizes the JSON unmarshaling process for CreateSubscriptionComponentComponentId objects.

type CreateSubscriptionComponentPricePointId added in v0.1.0

type CreateSubscriptionComponentPricePointId struct {
	// contains filtered or unexported fields
}

CreateSubscriptionComponentPricePointId represents a CreateSubscriptionComponentPricePointId struct. This is a container for one-of cases.

func (*CreateSubscriptionComponentPricePointId) AsNumber added in v0.1.0

func (*CreateSubscriptionComponentPricePointId) AsString added in v0.1.0

func (CreateSubscriptionComponentPricePointId) MarshalJSON added in v0.1.0

func (c CreateSubscriptionComponentPricePointId) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateSubscriptionComponentPricePointId. It customizes the JSON marshaling process for CreateSubscriptionComponentPricePointId objects.

func (CreateSubscriptionComponentPricePointId) String added in v0.1.0

String converts the CreateSubscriptionComponentPricePointId object to a string representation.

func (*CreateSubscriptionComponentPricePointId) UnmarshalJSON added in v0.1.0

func (c *CreateSubscriptionComponentPricePointId) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateSubscriptionComponentPricePointId. It customizes the JSON unmarshaling process for CreateSubscriptionComponentPricePointId objects.

type CreateSubscriptionGroup

type CreateSubscriptionGroup struct {
	SubscriptionId       int            `json:"subscription_id"`
	MemberIds            []int          `json:"member_ids,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

CreateSubscriptionGroup represents a CreateSubscriptionGroup struct.

func (CreateSubscriptionGroup) MarshalJSON

func (c CreateSubscriptionGroup) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateSubscriptionGroup. It customizes the JSON marshaling process for CreateSubscriptionGroup objects.

func (*CreateSubscriptionGroup) UnmarshalJSON

func (c *CreateSubscriptionGroup) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateSubscriptionGroup. It customizes the JSON unmarshaling process for CreateSubscriptionGroup objects.

type CreateSubscriptionGroupRequest

type CreateSubscriptionGroupRequest struct {
	SubscriptionGroup    CreateSubscriptionGroup `json:"subscription_group"`
	AdditionalProperties map[string]any          `json:"_"`
}

CreateSubscriptionGroupRequest represents a CreateSubscriptionGroupRequest struct.

func (CreateSubscriptionGroupRequest) MarshalJSON

func (c CreateSubscriptionGroupRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateSubscriptionGroupRequest. It customizes the JSON marshaling process for CreateSubscriptionGroupRequest objects.

func (*CreateSubscriptionGroupRequest) UnmarshalJSON

func (c *CreateSubscriptionGroupRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateSubscriptionGroupRequest. It customizes the JSON unmarshaling process for CreateSubscriptionGroupRequest objects.

type CreateSubscriptionOfferId added in v0.1.0

type CreateSubscriptionOfferId struct {
	// contains filtered or unexported fields
}

CreateSubscriptionOfferId represents a CreateSubscriptionOfferId struct. This is a container for one-of cases.

func (*CreateSubscriptionOfferId) AsNumber added in v0.1.0

func (c *CreateSubscriptionOfferId) AsNumber() (
	*int,
	bool)

func (*CreateSubscriptionOfferId) AsString added in v0.1.0

func (c *CreateSubscriptionOfferId) AsString() (
	*string,
	bool)

func (CreateSubscriptionOfferId) MarshalJSON added in v0.1.0

func (c CreateSubscriptionOfferId) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateSubscriptionOfferId. It customizes the JSON marshaling process for CreateSubscriptionOfferId objects.

func (CreateSubscriptionOfferId) String added in v0.1.0

func (c CreateSubscriptionOfferId) String() string

String converts the CreateSubscriptionOfferId object to a string representation.

func (*CreateSubscriptionOfferId) UnmarshalJSON added in v0.1.0

func (c *CreateSubscriptionOfferId) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateSubscriptionOfferId. It customizes the JSON unmarshaling process for CreateSubscriptionOfferId objects.

type CreateSubscriptionRequest

type CreateSubscriptionRequest struct {
	Subscription         CreateSubscription `json:"subscription"`
	AdditionalProperties map[string]any     `json:"_"`
}

CreateSubscriptionRequest represents a CreateSubscriptionRequest struct.

func (CreateSubscriptionRequest) MarshalJSON

func (c CreateSubscriptionRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateSubscriptionRequest. It customizes the JSON marshaling process for CreateSubscriptionRequest objects.

func (*CreateSubscriptionRequest) UnmarshalJSON

func (c *CreateSubscriptionRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateSubscriptionRequest. It customizes the JSON unmarshaling process for CreateSubscriptionRequest objects.

type CreateUsage

type CreateUsage struct {
	// integer by default or decimal number if fractional quantities are enabled for the component
	Quantity     *float64 `json:"quantity,omitempty"`
	PricePointId *string  `json:"price_point_id,omitempty"`
	Memo         *string  `json:"memo,omitempty"`
	// This attribute is particularly useful when you need to align billing events for different components on distinct schedules within a subscription. Please note this only works for site with Multifrequency enabled
	BillingSchedule      *BillingSchedule `json:"billing_schedule,omitempty"`
	AdditionalProperties map[string]any   `json:"_"`
}

CreateUsage represents a CreateUsage struct.

func (CreateUsage) MarshalJSON

func (c CreateUsage) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateUsage. It customizes the JSON marshaling process for CreateUsage objects.

func (*CreateUsage) UnmarshalJSON

func (c *CreateUsage) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateUsage. It customizes the JSON unmarshaling process for CreateUsage objects.

type CreateUsageComponentId added in v0.1.0

type CreateUsageComponentId struct {
	// contains filtered or unexported fields
}

CreateUsageComponentId represents a CreateUsageComponentId struct. This is a container for one-of cases.

func (*CreateUsageComponentId) AsNumber added in v0.1.0

func (c *CreateUsageComponentId) AsNumber() (
	*int,
	bool)

func (*CreateUsageComponentId) AsString added in v0.1.0

func (c *CreateUsageComponentId) AsString() (
	*string,
	bool)

func (CreateUsageComponentId) MarshalJSON added in v0.1.0

func (c CreateUsageComponentId) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateUsageComponentId. It customizes the JSON marshaling process for CreateUsageComponentId objects.

func (CreateUsageComponentId) String added in v0.1.0

func (c CreateUsageComponentId) String() string

String converts the CreateUsageComponentId object to a string representation.

func (*CreateUsageComponentId) UnmarshalJSON added in v0.1.0

func (c *CreateUsageComponentId) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateUsageComponentId. It customizes the JSON unmarshaling process for CreateUsageComponentId objects.

type CreateUsageRequest

type CreateUsageRequest struct {
	Usage                CreateUsage    `json:"usage"`
	AdditionalProperties map[string]any `json:"_"`
}

CreateUsageRequest represents a CreateUsageRequest struct.

func (CreateUsageRequest) MarshalJSON

func (c CreateUsageRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreateUsageRequest. It customizes the JSON marshaling process for CreateUsageRequest objects.

func (*CreateUsageRequest) UnmarshalJSON

func (c *CreateUsageRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreateUsageRequest. It customizes the JSON unmarshaling process for CreateUsageRequest objects.

type CreatedPrepayment

type CreatedPrepayment struct {
	Id                     *int64         `json:"id,omitempty"`
	SubscriptionId         *int           `json:"subscription_id,omitempty"`
	AmountInCents          *int64         `json:"amount_in_cents,omitempty"`
	Memo                   *string        `json:"memo,omitempty"`
	CreatedAt              *time.Time     `json:"created_at,omitempty"`
	StartingBalanceInCents *int64         `json:"starting_balance_in_cents,omitempty"`
	EndingBalanceInCents   *int64         `json:"ending_balance_in_cents,omitempty"`
	AdditionalProperties   map[string]any `json:"_"`
}

CreatedPrepayment represents a CreatedPrepayment struct.

func (CreatedPrepayment) MarshalJSON

func (c CreatedPrepayment) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreatedPrepayment. It customizes the JSON marshaling process for CreatedPrepayment objects.

func (*CreatedPrepayment) UnmarshalJSON

func (c *CreatedPrepayment) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreatedPrepayment. It customizes the JSON unmarshaling process for CreatedPrepayment objects.

type CreditAccountBalanceChanged added in v0.1.0

type CreditAccountBalanceChanged struct {
	Reason                             string         `json:"reason"`
	ServiceCreditAccountBalanceInCents int64          `json:"service_credit_account_balance_in_cents"`
	ServiceCreditBalanceChangeInCents  int64          `json:"service_credit_balance_change_in_cents"`
	CurrencyCode                       string         `json:"currency_code"`
	AtTime                             time.Time      `json:"at_time"`
	AdditionalProperties               map[string]any `json:"_"`
}

CreditAccountBalanceChanged represents a CreditAccountBalanceChanged struct.

func (CreditAccountBalanceChanged) MarshalJSON added in v0.1.0

func (c CreditAccountBalanceChanged) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreditAccountBalanceChanged. It customizes the JSON marshaling process for CreditAccountBalanceChanged objects.

func (*CreditAccountBalanceChanged) UnmarshalJSON added in v0.1.0

func (c *CreditAccountBalanceChanged) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreditAccountBalanceChanged. It customizes the JSON unmarshaling process for CreditAccountBalanceChanged objects.

type CreditCardAttributes

type CreditCardAttributes struct {
	FullNumber           *string        `json:"full_number,omitempty"`
	ExpirationMonth      *string        `json:"expiration_month,omitempty"`
	ExpirationYear       *string        `json:"expiration_year,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

CreditCardAttributes represents a CreditCardAttributes struct.

func (CreditCardAttributes) MarshalJSON

func (c CreditCardAttributes) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreditCardAttributes. It customizes the JSON marshaling process for CreditCardAttributes objects.

func (*CreditCardAttributes) UnmarshalJSON

func (c *CreditCardAttributes) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreditCardAttributes. It customizes the JSON unmarshaling process for CreditCardAttributes objects.

type CreditCardPaymentProfile

type CreditCardPaymentProfile struct {
	// The Chargify-assigned ID of the stored card. This value can be used as an input to payment_profile_id when creating a subscription, in order to re-use a stored payment profile for the same customer.
	Id *int `json:"id,omitempty"`
	// The first name of the card holder.
	FirstName *string `json:"first_name,omitempty"`
	// The last name of the card holder.
	LastName *string `json:"last_name,omitempty"`
	// A string representation of the credit card number with all but the last 4 digits masked with X’s (i.e. ‘XXXX-XXXX-XXXX-1234’).
	MaskedCardNumber string `json:"masked_card_number"`
	// The type of card used.
	CardType *CardType `json:"card_type,omitempty"`
	// An integer representing the expiration month of the card(1 – 12).
	ExpirationMonth *int `json:"expiration_month,omitempty"`
	// An integer representing the 4-digit expiration year of the card(i.e. ‘2012’).
	ExpirationYear *int `json:"expiration_year,omitempty"`
	// The Chargify-assigned id for the customer record to which the card belongs.
	CustomerId *int `json:"customer_id,omitempty"`
	// The vault that stores the payment profile with the provided `vault_token`. Use `bogus` for testing.
	CurrentVault *CurrentVault `json:"current_vault,omitempty"`
	// The “token” provided by your vault storage for an already stored payment profile.
	VaultToken Optional[string] `json:"vault_token"`
	// The current billing street address for the card.
	BillingAddress Optional[string] `json:"billing_address"`
	// The current billing address city for the card.
	BillingCity Optional[string] `json:"billing_city"`
	// The current billing address state for the card.
	BillingState Optional[string] `json:"billing_state"`
	// The current billing address zip code for the card.
	BillingZip Optional[string] `json:"billing_zip"`
	// The current billing address country for the card.
	BillingCountry Optional[string] `json:"billing_country"`
	// (only for Authorize.Net CIM storage): the customerProfileId for the owner of the customerPaymentProfileId provided as the vault_token.
	CustomerVaultToken Optional[string] `json:"customer_vault_token"`
	// The current billing street address, second line, for the card.
	BillingAddress2 Optional[string] `json:"billing_address_2"`
	PaymentType     *PaymentType     `json:"payment_type,omitempty"`
	Disabled        *bool            `json:"disabled,omitempty"`
	// Token received after sending billing information using chargify.js. This token will only be received if passed as a sole attribute of credit_card_attributes (i.e. tok_9g6hw85pnpt6knmskpwp4ttt)
	ChargifyToken        *string       `json:"chargify_token,omitempty"`
	SiteGatewaySettingId Optional[int] `json:"site_gateway_setting_id"`
	// An identifier of connected gateway.
	GatewayHandle        Optional[string] `json:"gateway_handle"`
	AdditionalProperties map[string]any   `json:"_"`
}

CreditCardPaymentProfile represents a CreditCardPaymentProfile struct.

func (CreditCardPaymentProfile) MarshalJSON

func (c CreditCardPaymentProfile) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreditCardPaymentProfile. It customizes the JSON marshaling process for CreditCardPaymentProfile objects.

func (*CreditCardPaymentProfile) UnmarshalJSON

func (c *CreditCardPaymentProfile) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreditCardPaymentProfile. It customizes the JSON unmarshaling process for CreditCardPaymentProfile objects.

type CreditNote

type CreditNote struct {
	// Unique identifier for the credit note. It is generated automatically by Chargify and has the prefix "cn_" followed by alphanumeric characters.
	Uid *string `json:"uid,omitempty"`
	// ID of the site to which the credit note belongs.
	SiteId *int `json:"site_id,omitempty"`
	// ID of the customer to which the credit note belongs.
	CustomerId *int `json:"customer_id,omitempty"`
	// ID of the subscription that generated the credit note.
	SubscriptionId *int `json:"subscription_id,omitempty"`
	// A unique, identifying string that appears on the credit note and in places it is referenced.
	// While the UID is long and not appropriate to show to customers, the number is usually shorter and consumable by the customer and the merchant alike.
	Number *string `json:"number,omitempty"`
	// A monotonically increasing number assigned to credit notes as they are created.  This number is unique within a site and can be used to sort and order credit notes.
	SequenceNumber *int `json:"sequence_number,omitempty"`
	// Date the credit note was issued to the customer.  This is the date that the credit was made available for application, and may come before it is fully applied.
	// The format is `"YYYY-MM-DD"`.
	IssueDate *time.Time `json:"issue_date,omitempty"`
	// Credit notes are applied to invoices to offset invoiced amounts - they reduce the amount due. This field is the date the credit note became fully applied to invoices.
	// If the credit note has been partially applied, this field will not have a value until it has been fully applied.
	// The format is `"YYYY-MM-DD"`.
	AppliedDate *time.Time `json:"applied_date,omitempty"`
	// Current status of the credit note.
	Status *CreditNoteStatus `json:"status,omitempty"`
	// The ISO 4217 currency code (3 character string) representing the currency of the credit note amount fields.
	Currency *string `json:"currency,omitempty"`
	// The memo printed on credit note, which is a description of the reason for the credit.
	Memo *string `json:"memo,omitempty"`
	// Information about the seller (merchant) listed on the masthead of the credit note.
	Seller *InvoiceSeller `json:"seller,omitempty"`
	// Information about the customer who is owner or recipient the credited subscription.
	Customer *InvoiceCustomer `json:"customer,omitempty"`
	// The billing address of the credit subscription.
	BillingAddress *InvoiceAddress `json:"billing_address,omitempty"`
	// The shipping address of the credited subscription.
	ShippingAddress *InvoiceAddress `json:"shipping_address,omitempty"`
	// Subtotal of the credit note, which is the sum of all line items before discounts or taxes. Note that this is a positive amount representing the credit back to the customer.
	SubtotalAmount *string `json:"subtotal_amount,omitempty"`
	// Total discount applied to the credit note. Note that this is a positive amount representing the discount amount being credited back to the customer (i.e. a credit on an earlier discount). For example, if the original purchase was $1.00 and the original discount was $0.10, a credit of $0.50 of the original purchase (half) would have a discount credit of $0.05 (also half).
	DiscountAmount *string `json:"discount_amount,omitempty"`
	// Total tax of the credit note. Note that this is a positive amount representing a previously taxex amount being credited back to the customer (i.e. a credit of an earlier tax). For example, if the original purchase was $1.00 and the original tax was $0.10, a credit of $0.50 of the original purchase (half) would also have a tax credit of $0.05 (also half).
	TaxAmount *string `json:"tax_amount,omitempty"`
	// The credit note total, which is `subtotal_amount - discount_amount + tax_amount`.'
	TotalAmount *string `json:"total_amount,omitempty"`
	// The amount of the credit note that has already been applied to invoices.
	AppliedAmount *string `json:"applied_amount,omitempty"`
	// The amount of the credit note remaining to be applied to invoices, which is `total_amount - applied_amount`.
	RemainingAmount *string `json:"remaining_amount,omitempty"`
	// Line items on the credit note.
	LineItems    []CreditNoteLineItem    `json:"line_items,omitempty"`
	Discounts    []InvoiceDiscount       `json:"discounts,omitempty"`
	Taxes        []InvoiceTax            `json:"taxes,omitempty"`
	Applications []CreditNoteApplication `json:"applications,omitempty"`
	Refunds      []InvoiceRefund         `json:"refunds,omitempty"`
	// An array of origin invoices for the credit note. Learn more about [Origin Invoice from our docs](https://chargify.zendesk.com/hc/en-us/articles/4407753036699#origin-invoices)
	OriginInvoices       []OriginInvoice `json:"origin_invoices,omitempty"`
	AdditionalProperties map[string]any  `json:"_"`
}

CreditNote represents a CreditNote struct.

func (CreditNote) MarshalJSON

func (c CreditNote) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreditNote. It customizes the JSON marshaling process for CreditNote objects.

func (*CreditNote) UnmarshalJSON

func (c *CreditNote) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreditNote. It customizes the JSON unmarshaling process for CreditNote objects.

type CreditNoteApplication

type CreditNoteApplication struct {
	Uid                  *string        `json:"uid,omitempty"`
	TransactionTime      *time.Time     `json:"transaction_time,omitempty"`
	InvoiceUid           *string        `json:"invoice_uid,omitempty"`
	Memo                 *string        `json:"memo,omitempty"`
	AppliedAmount        *string        `json:"applied_amount,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

CreditNoteApplication represents a CreditNoteApplication struct.

func (CreditNoteApplication) MarshalJSON

func (c CreditNoteApplication) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreditNoteApplication. It customizes the JSON marshaling process for CreditNoteApplication objects.

func (*CreditNoteApplication) UnmarshalJSON

func (c *CreditNoteApplication) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreditNoteApplication. It customizes the JSON unmarshaling process for CreditNoteApplication objects.

type CreditNoteLineItem

type CreditNoteLineItem struct {
	// Unique identifier for the line item.  Useful when cross-referencing the line against individual discounts in the `discounts` or `taxes` lists.
	Uid *string `json:"uid,omitempty"`
	// A short descriptor for the credit given by this line.
	Title *string `json:"title,omitempty"`
	// Detailed description for the credit given by this line.  May include proration details in plain text.
	// Note: this string may contain line breaks that are hints for the best display format on the credit note.
	Description *string `json:"description,omitempty"`
	// The quantity or count of units credited by the line item.
	// This is a decimal number represented as a string. (See "About Decimal Numbers".)
	Quantity *string `json:"quantity,omitempty"`
	// The price per unit for the line item.
	// When tiered pricing was used (i.e. not every unit was actually priced at the same price) this will be the blended average cost per unit and the `tiered_unit_price` field will be set to `true`.
	UnitPrice *string `json:"unit_price,omitempty"`
	// The line subtotal, generally calculated as `quantity * unit_price`. This is the canonical amount of record for the line - when rounding differences are in play, `subtotal_amount` takes precedence over the value derived from `quantity * unit_price` (which may not have the proper precision to exactly equal this amount).
	SubtotalAmount *string `json:"subtotal_amount,omitempty"`
	// The approximate discount of just this line.
	// The value is approximated in cases where rounding errors make it difficult to apportion exactly a total discount among many lines. Several lines may have been summed prior to applying the discount to arrive at `discount_amount` for the invoice - backing that out to the discount on a single line may introduce rounding or precision errors.
	DiscountAmount *string `json:"discount_amount,omitempty"`
	// The approximate tax of just this line.
	// The value is approximated in cases where rounding errors make it difficult to apportion exactly a total tax among many lines. Several lines may have been summed prior to applying the tax rate to arrive at `tax_amount` for the invoice - backing that out to the tax on a single line may introduce rounding or precision errors.
	TaxAmount *string `json:"tax_amount,omitempty"`
	// The non-canonical total amount for the line.
	// `subtotal_amount` is the canonical amount for a line. The invoice `total_amount` is derived from the sum of the line `subtotal_amount`s and discounts or taxes applied thereafter.  Therefore, due to rounding or precision errors, the sum of line `total_amount`s may not equal the invoice `total_amount`.
	TotalAmount *string `json:"total_amount,omitempty"`
	// When `true`, indicates that the actual pricing scheme for the line was tiered, so the `unit_price` shown is the blended average for all units.
	TieredUnitPrice *bool `json:"tiered_unit_price,omitempty"`
	// Start date for the period credited by this line. The format is `"YYYY-MM-DD"`.
	PeriodRangeStart *time.Time `json:"period_range_start,omitempty"`
	// End date for the period credited by this line. The format is `"YYYY-MM-DD"`.
	PeriodRangeEnd *time.Time `json:"period_range_end,omitempty"`
	// The ID of the product being credited.
	// This may be set even for component credits, so true product-only (non-component) credits will also have a nil `component_id`.
	ProductId *int `json:"product_id,omitempty"`
	// The version of the product being credited.
	ProductVersion *int `json:"product_version,omitempty"`
	// The ID of the component being credited. Will be `nil` for non-component credits.
	ComponentId Optional[int] `json:"component_id"`
	// The price point ID of the component being credited. Will be `nil` for non-component credits.
	PricePointId          Optional[int]  `json:"price_point_id"`
	BillingScheduleItemId Optional[int]  `json:"billing_schedule_item_id"`
	CustomItem            *bool          `json:"custom_item,omitempty"`
	AdditionalProperties  map[string]any `json:"_"`
}

CreditNoteLineItem represents a CreditNoteLineItem struct.

func (CreditNoteLineItem) MarshalJSON

func (c CreditNoteLineItem) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreditNoteLineItem. It customizes the JSON marshaling process for CreditNoteLineItem objects.

func (*CreditNoteLineItem) UnmarshalJSON

func (c *CreditNoteLineItem) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreditNoteLineItem. It customizes the JSON unmarshaling process for CreditNoteLineItem objects.

type CreditNoteStatus added in v0.1.0

type CreditNoteStatus string

CreditNoteStatus is a string enum. Current status of the credit note.

const (
	CreditNoteStatus_OPEN    CreditNoteStatus = "open"
	CreditNoteStatus_APPLIED CreditNoteStatus = "applied"
)

func (CreditNoteStatus) MarshalJSON added in v0.2.0

func (e CreditNoteStatus) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreditNoteStatus. It customizes the JSON marshaling process for CreditNoteStatus objects.

func (*CreditNoteStatus) UnmarshalJSON added in v0.2.0

func (e *CreditNoteStatus) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreditNoteStatus. It customizes the JSON unmarshaling process for CreditNoteStatus objects.

type CreditScheme

type CreditScheme string

CreditScheme is a string enum.

const (
	CreditScheme_NONE   CreditScheme = "none"
	CreditScheme_CREDIT CreditScheme = "credit"
	CreditScheme_REFUND CreditScheme = "refund"
)

func (CreditScheme) MarshalJSON added in v0.2.0

func (e CreditScheme) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreditScheme. It customizes the JSON marshaling process for CreditScheme objects.

func (*CreditScheme) UnmarshalJSON added in v0.2.0

func (e *CreditScheme) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreditScheme. It customizes the JSON unmarshaling process for CreditScheme objects.

type CreditSchemeRequest

type CreditSchemeRequest struct {
	CreditScheme         CreditScheme   `json:"credit_scheme"`
	AdditionalProperties map[string]any `json:"_"`
}

CreditSchemeRequest represents a CreditSchemeRequest struct.

func (CreditSchemeRequest) MarshalJSON

func (c CreditSchemeRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreditSchemeRequest. It customizes the JSON marshaling process for CreditSchemeRequest objects.

func (*CreditSchemeRequest) UnmarshalJSON

func (c *CreditSchemeRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreditSchemeRequest. It customizes the JSON unmarshaling process for CreditSchemeRequest objects.

type CreditType

type CreditType string

CreditType is a string enum. The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. Available values: `full`, `prorated`, `none`.

const (
	CreditType_FULL     CreditType = "full"
	CreditType_PRORATED CreditType = "prorated"
	CreditType_NONE     CreditType = "none"
)

func (CreditType) MarshalJSON added in v0.2.0

func (e CreditType) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CreditType. It customizes the JSON marshaling process for CreditType objects.

func (*CreditType) UnmarshalJSON added in v0.2.0

func (e *CreditType) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CreditType. It customizes the JSON unmarshaling process for CreditType objects.

type CurrencyPrice

type CurrencyPrice struct {
	Id                  *int     `json:"id,omitempty"`
	Currency            *string  `json:"currency,omitempty"`
	Price               *float64 `json:"price,omitempty"`
	FormattedPrice      *string  `json:"formatted_price,omitempty"`
	ProductPricePointId *int     `json:"product_price_point_id,omitempty"`
	// Role for the price.
	Role                 *CurrencyPriceRole `json:"role,omitempty"`
	AdditionalProperties map[string]any     `json:"_"`
}

CurrencyPrice represents a CurrencyPrice struct.

func (CurrencyPrice) MarshalJSON

func (c CurrencyPrice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CurrencyPrice. It customizes the JSON marshaling process for CurrencyPrice objects.

func (*CurrencyPrice) UnmarshalJSON

func (c *CurrencyPrice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CurrencyPrice. It customizes the JSON unmarshaling process for CurrencyPrice objects.

type CurrencyPriceRole

type CurrencyPriceRole string

CurrencyPriceRole is a string enum. Role for the price.

const (
	CurrencyPriceRole_BASELINE CurrencyPriceRole = "baseline"
	CurrencyPriceRole_TRIAL    CurrencyPriceRole = "trial"
	CurrencyPriceRole_INITIAL  CurrencyPriceRole = "initial"
)

func (CurrencyPriceRole) MarshalJSON added in v0.2.0

func (e CurrencyPriceRole) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CurrencyPriceRole. It customizes the JSON marshaling process for CurrencyPriceRole objects.

func (*CurrencyPriceRole) UnmarshalJSON added in v0.2.0

func (e *CurrencyPriceRole) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CurrencyPriceRole. It customizes the JSON unmarshaling process for CurrencyPriceRole objects.

type CurrencyPricesResponse added in v0.1.0

type CurrencyPricesResponse struct {
	CurrencyPrices       []CurrencyPrice `json:"currency_prices"`
	AdditionalProperties map[string]any  `json:"_"`
}

CurrencyPricesResponse represents a CurrencyPricesResponse struct.

func (CurrencyPricesResponse) MarshalJSON added in v0.1.0

func (c CurrencyPricesResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CurrencyPricesResponse. It customizes the JSON marshaling process for CurrencyPricesResponse objects.

func (*CurrencyPricesResponse) UnmarshalJSON added in v0.1.0

func (c *CurrencyPricesResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CurrencyPricesResponse. It customizes the JSON unmarshaling process for CurrencyPricesResponse objects.

type CurrentVault

type CurrentVault string

CurrentVault is a string enum. The vault that stores the payment profile with the provided `vault_token`. Use `bogus` for testing.

const (
	CurrentVault_ADYEN          CurrentVault = "adyen"
	CurrentVault_AUTHORIZENET   CurrentVault = "authorizenet"
	CurrentVault_AVALARA        CurrentVault = "avalara"
	CurrentVault_BEANSTREAM     CurrentVault = "beanstream"
	CurrentVault_BLUESNAP       CurrentVault = "blue_snap"
	CurrentVault_BOGUS          CurrentVault = "bogus"
	CurrentVault_BRAINTREEBLUE  CurrentVault = "braintree_blue"
	CurrentVault_CHECKOUT       CurrentVault = "checkout"
	CurrentVault_CYBERSOURCE    CurrentVault = "cybersource"
	CurrentVault_ELAVON         CurrentVault = "elavon"
	CurrentVault_EWAY           CurrentVault = "eway"
	CurrentVault_EWAYRAPIDSTD   CurrentVault = "eway_rapid_std"
	CurrentVault_FIRSTDATA      CurrentVault = "firstdata"
	CurrentVault_FORTE          CurrentVault = "forte"
	CurrentVault_GOCARDLESS     CurrentVault = "gocardless"
	CurrentVault_LITLE          CurrentVault = "litle"
	CurrentVault_MAXIOPAYMENTS  CurrentVault = "maxio_payments"
	CurrentVault_MODUSLINK      CurrentVault = "moduslink"
	CurrentVault_MONERIS        CurrentVault = "moneris"
	CurrentVault_NMI            CurrentVault = "nmi"
	CurrentVault_ORBITAL        CurrentVault = "orbital"
	CurrentVault_PAYMENTEXPRESS CurrentVault = "payment_express"
	CurrentVault_PIN            CurrentVault = "pin"
	CurrentVault_SQUARE         CurrentVault = "square"
	CurrentVault_STRIPECONNECT  CurrentVault = "stripe_connect"
	CurrentVault_TRUSTCOMMERCE  CurrentVault = "trust_commerce"
	CurrentVault_UNIPAAS        CurrentVault = "unipaas"
)

func (CurrentVault) MarshalJSON added in v0.2.0

func (e CurrentVault) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CurrentVault. It customizes the JSON marshaling process for CurrentVault objects.

func (*CurrentVault) UnmarshalJSON added in v0.2.0

func (e *CurrentVault) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CurrentVault. It customizes the JSON unmarshaling process for CurrentVault objects.

type CustomFieldOwner added in v0.1.0

type CustomFieldOwner string

CustomFieldOwner is a string enum.

const (
	CustomFieldOwner_CUSTOMER     CustomFieldOwner = "Customer"
	CustomFieldOwner_SUBSCRIPTION CustomFieldOwner = "Subscription"
)

func (CustomFieldOwner) MarshalJSON added in v0.2.0

func (e CustomFieldOwner) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CustomFieldOwner. It customizes the JSON marshaling process for CustomFieldOwner objects.

func (*CustomFieldOwner) UnmarshalJSON added in v0.2.0

func (e *CustomFieldOwner) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CustomFieldOwner. It customizes the JSON unmarshaling process for CustomFieldOwner objects.

type CustomFieldValueChange added in v0.1.0

type CustomFieldValueChange struct {
	EventType            string         `json:"event_type"`
	MetafieldName        string         `json:"metafield_name"`
	MetafieldId          int            `json:"metafield_id"`
	OldValue             *string        `json:"old_value"`
	NewValue             *string        `json:"new_value"`
	ResourceType         string         `json:"resource_type"`
	ResourceId           int            `json:"resource_id"`
	AdditionalProperties map[string]any `json:"_"`
}

CustomFieldValueChange represents a CustomFieldValueChange struct.

func (CustomFieldValueChange) MarshalJSON added in v0.1.0

func (c CustomFieldValueChange) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CustomFieldValueChange. It customizes the JSON marshaling process for CustomFieldValueChange objects.

func (*CustomFieldValueChange) UnmarshalJSON added in v0.1.0

func (c *CustomFieldValueChange) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CustomFieldValueChange. It customizes the JSON unmarshaling process for CustomFieldValueChange objects.

type Customer

type Customer struct {
	// The first name of the customer
	FirstName *string `json:"first_name,omitempty"`
	// The last name of the customer
	LastName *string `json:"last_name,omitempty"`
	// The email address of the customer
	Email *string `json:"email,omitempty"`
	// A comma-separated list of emails that should be cc’d on all customer communications (i.e. “joe@example.com, sue@example.com”)
	CcEmails Optional[string] `json:"cc_emails"`
	// The organization of the customer. If no value, `null` or empty string is provided, `organization` will be populated with the customer's first and last name, separated with a space.
	Organization Optional[string] `json:"organization"`
	// The unique identifier used within your own application for this customer
	Reference Optional[string] `json:"reference"`
	// The customer ID in Chargify
	Id *int `json:"id,omitempty"`
	// The timestamp in which the customer object was created in Chargify
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// The timestamp in which the customer object was last edited
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
	// The customer’s shipping street address (i.e. “123 Main St.”)
	Address Optional[string] `json:"address"`
	// Second line of the customer’s shipping address i.e. “Apt. 100”
	Address2 Optional[string] `json:"address_2"`
	// The customer’s shipping address city (i.e. “Boston”)
	City Optional[string] `json:"city"`
	// The customer’s shipping address state (i.e. “MA”)
	State Optional[string] `json:"state"`
	// The customer's full name of state
	StateName Optional[string] `json:"state_name"`
	// The customer’s shipping address zip code (i.e. “12345”)
	Zip Optional[string] `json:"zip"`
	// The customer shipping address country
	Country Optional[string] `json:"country"`
	// The customer's full name of country
	CountryName Optional[string] `json:"country_name"`
	// The phone number of the customer
	Phone Optional[string] `json:"phone"`
	// Is the customer verified to use ACH as a payment method. Available only on Authorize.Net gateway
	Verified Optional[bool] `json:"verified"`
	// The timestamp of when the Billing Portal entry was created at for the customer
	PortalCustomerCreatedAt Optional[time.Time] `json:"portal_customer_created_at"`
	// The timestamp of when the Billing Portal invite was last sent at
	PortalInviteLastSentAt Optional[time.Time] `json:"portal_invite_last_sent_at"`
	// The timestamp of when the Billing Portal invite was last accepted
	PortalInviteLastAcceptedAt Optional[time.Time] `json:"portal_invite_last_accepted_at"`
	// The tax exempt status for the customer. Acceptable values are true or 1 for true and false or 0 for false.
	TaxExempt *bool `json:"tax_exempt,omitempty"`
	// The VAT business identification number for the customer. This number is used to determine VAT tax opt out rules. It is not validated when added or updated on a customer record. Instead, it is validated via VIES before calculating taxes. Only valid business identification numbers will allow for VAT opt out.
	VatNumber Optional[string] `json:"vat_number"`
	// The parent ID in Chargify if applicable. Parent is another Customer object.
	ParentId Optional[int] `json:"parent_id"`
	// The locale for the customer to identify language-region
	Locale                      Optional[string] `json:"locale"`
	DefaultSubscriptionGroupUid Optional[string] `json:"default_subscription_group_uid"`
	AdditionalProperties        map[string]any   `json:"_"`
}

Customer represents a Customer struct.

func (Customer) MarshalJSON

func (c Customer) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Customer. It customizes the JSON marshaling process for Customer objects.

func (*Customer) UnmarshalJSON

func (c *Customer) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Customer. It customizes the JSON unmarshaling process for Customer objects.

type CustomerAttributes

type CustomerAttributes struct {
	// The first name of the customer. Required when creating a customer via attributes.
	FirstName *string `json:"first_name,omitempty"`
	// The last name of the customer. Required when creating a customer via attributes.
	LastName *string `json:"last_name,omitempty"`
	// The email address of the customer. Required when creating a customer via attributes.
	Email *string `json:"email,omitempty"`
	// A list of emails that should be cc’d on all customer communications. Optional.
	CcEmails *string `json:"cc_emails,omitempty"`
	// The organization/company of the customer. Optional.
	Organization *string `json:"organization,omitempty"`
	// A customer “reference”, or unique identifier from your app, stored in Chargify. Can be used so that you may reference your customer’s within Chargify using the same unique value you use in your application. Optional.
	Reference *string `json:"reference,omitempty"`
	// (Optional) The customer’s shipping street address (i.e. “123 Main St.”).
	Address *string `json:"address,omitempty"`
	// (Optional) Second line of the customer’s shipping address i.e. “Apt. 100”
	Address2 Optional[string] `json:"address_2"`
	// (Optional) The customer’s shipping address city (i.e. “Boston”).
	City *string `json:"city,omitempty"`
	// (Optional) The customer’s shipping address state (i.e. “MA”). This must conform to the [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes.
	State *string `json:"state,omitempty"`
	// (Optional) The customer’s shipping address zip code (i.e. “12345”).
	Zip *string `json:"zip,omitempty"`
	// (Optional) The customer shipping address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (i.e. “US”).
	Country *string `json:"country,omitempty"`
	// (Optional) The phone number of the customer.
	Phone    *string `json:"phone,omitempty"`
	Verified *bool   `json:"verified,omitempty"`
	// (Optional) The tax_exempt status of the customer. Acceptable values are true or 1 for true and false or 0 for false.
	TaxExempt *bool `json:"tax_exempt,omitempty"`
	// (Optional) Supplying the VAT number allows EU customer’s to opt-out of the Value Added Tax assuming the merchant address and customer billing address are not within the same EU country. It’s important to omit the country code from the VAT number upon entry. Otherwise, taxes will be assessed upon the purchase.
	VatNumber *string `json:"vat_number,omitempty"`
	// (Optional) A set of key/value pairs representing custom fields and their values. Metafields will be created “on-the-fly” in your site for a given key, if they have not been created yet.
	Metafields map[string]string `json:"metafields,omitempty"`
	// The parent ID in Chargify if applicable. Parent is another Customer object.
	ParentId             Optional[int]  `json:"parent_id"`
	AdditionalProperties map[string]any `json:"_"`
}

CustomerAttributes represents a CustomerAttributes struct.

func (CustomerAttributes) MarshalJSON

func (c CustomerAttributes) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CustomerAttributes. It customizes the JSON marshaling process for CustomerAttributes objects.

func (*CustomerAttributes) UnmarshalJSON

func (c *CustomerAttributes) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CustomerAttributes. It customizes the JSON unmarshaling process for CustomerAttributes objects.

type CustomerChange

type CustomerChange struct {
	Payer                Optional[CustomerPayerChange]        `json:"payer"`
	ShippingAddress      Optional[AddressChange]              `json:"shipping_address"`
	BillingAddress       Optional[AddressChange]              `json:"billing_address"`
	CustomFields         Optional[CustomerCustomFieldsChange] `json:"custom_fields"`
	AdditionalProperties map[string]any                       `json:"_"`
}

CustomerChange represents a CustomerChange struct.

func (CustomerChange) MarshalJSON

func (c CustomerChange) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CustomerChange. It customizes the JSON marshaling process for CustomerChange objects.

func (*CustomerChange) UnmarshalJSON

func (c *CustomerChange) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CustomerChange. It customizes the JSON unmarshaling process for CustomerChange objects.

type CustomerChangesPreviewResponse

type CustomerChangesPreviewResponse struct {
	Changes              CustomerChange `json:"changes"`
	AdditionalProperties map[string]any `json:"_"`
}

CustomerChangesPreviewResponse represents a CustomerChangesPreviewResponse struct.

func (CustomerChangesPreviewResponse) MarshalJSON

func (c CustomerChangesPreviewResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CustomerChangesPreviewResponse. It customizes the JSON marshaling process for CustomerChangesPreviewResponse objects.

func (*CustomerChangesPreviewResponse) UnmarshalJSON

func (c *CustomerChangesPreviewResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CustomerChangesPreviewResponse. It customizes the JSON unmarshaling process for CustomerChangesPreviewResponse objects.

type CustomerCustomFieldsChange

type CustomerCustomFieldsChange struct {
	Before               []InvoiceCustomField `json:"before"`
	After                []InvoiceCustomField `json:"after"`
	AdditionalProperties map[string]any       `json:"_"`
}

CustomerCustomFieldsChange represents a CustomerCustomFieldsChange struct.

func (CustomerCustomFieldsChange) MarshalJSON

func (c CustomerCustomFieldsChange) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CustomerCustomFieldsChange. It customizes the JSON marshaling process for CustomerCustomFieldsChange objects.

func (*CustomerCustomFieldsChange) UnmarshalJSON

func (c *CustomerCustomFieldsChange) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CustomerCustomFieldsChange. It customizes the JSON unmarshaling process for CustomerCustomFieldsChange objects.

type CustomerError added in v0.1.0

type CustomerError struct {
	Customer             *string        `json:"customer,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

CustomerError represents a CustomerError struct.

func (CustomerError) MarshalJSON added in v0.1.0

func (c CustomerError) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CustomerError. It customizes the JSON marshaling process for CustomerError objects.

func (*CustomerError) UnmarshalJSON added in v0.1.0

func (c *CustomerError) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CustomerError. It customizes the JSON unmarshaling process for CustomerError objects.

type CustomerErrorResponseErrors added in v0.1.0

type CustomerErrorResponseErrors struct {
	// contains filtered or unexported fields
}

CustomerErrorResponseErrors represents a CustomerErrorResponseErrors struct. This is a container for one-of cases.

func (*CustomerErrorResponseErrors) AsArrayOfString added in v0.1.0

func (c *CustomerErrorResponseErrors) AsArrayOfString() (
	*[]string,
	bool)

func (*CustomerErrorResponseErrors) AsCustomerError added in v0.1.0

func (c *CustomerErrorResponseErrors) AsCustomerError() (
	*CustomerError,
	bool)

func (CustomerErrorResponseErrors) MarshalJSON added in v0.1.0

func (c CustomerErrorResponseErrors) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CustomerErrorResponseErrors. It customizes the JSON marshaling process for CustomerErrorResponseErrors objects.

func (CustomerErrorResponseErrors) String added in v0.1.0

String converts the CustomerErrorResponseErrors object to a string representation.

func (*CustomerErrorResponseErrors) UnmarshalJSON added in v0.1.0

func (c *CustomerErrorResponseErrors) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CustomerErrorResponseErrors. It customizes the JSON unmarshaling process for CustomerErrorResponseErrors objects.

type CustomerPayerChange

type CustomerPayerChange struct {
	Before               InvoicePayerChange `json:"before"`
	After                InvoicePayerChange `json:"after"`
	AdditionalProperties map[string]any     `json:"_"`
}

CustomerPayerChange represents a CustomerPayerChange struct.

func (CustomerPayerChange) MarshalJSON

func (c CustomerPayerChange) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CustomerPayerChange. It customizes the JSON marshaling process for CustomerPayerChange objects.

func (*CustomerPayerChange) UnmarshalJSON

func (c *CustomerPayerChange) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CustomerPayerChange. It customizes the JSON unmarshaling process for CustomerPayerChange objects.

type CustomerResponse

type CustomerResponse struct {
	Customer             Customer       `json:"customer"`
	AdditionalProperties map[string]any `json:"_"`
}

CustomerResponse represents a CustomerResponse struct.

func (CustomerResponse) MarshalJSON

func (c CustomerResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for CustomerResponse. It customizes the JSON marshaling process for CustomerResponse objects.

func (*CustomerResponse) UnmarshalJSON

func (c *CustomerResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CustomerResponse. It customizes the JSON unmarshaling process for CustomerResponse objects.

type DebitNote added in v0.2.0

type DebitNote struct {
	// Unique identifier for the debit note. It is generated automatically by Chargify and has the prefix "db_" followed by alphanumeric characters.
	Uid *string `json:"uid,omitempty"`
	// ID of the site to which the debit note belongs.
	SiteId *int `json:"site_id,omitempty"`
	// ID of the customer to which the debit note belongs.
	CustomerId *int `json:"customer_id,omitempty"`
	// ID of the subscription that generated the debit note.
	SubscriptionId *int `json:"subscription_id,omitempty"`
	// A unique, identifier that appears on the debit note and in places it is referenced.
	Number *int `json:"number,omitempty"`
	// A monotonically increasing number assigned to debit notes as they are created.
	SequenceNumber *int `json:"sequence_number,omitempty"`
	// Unique identifier for the connected credit note. It is generated automatically by Chargify and has the prefix "cn_" followed by alphanumeric characters.
	// While the UID is long and not appropriate to show to customers, the number is usually shorter and consumable by the customer and the merchant alike.
	OriginCreditNoteUid *string `json:"origin_credit_note_uid,omitempty"`
	// A unique, identifying string of the connected credit note.
	OriginCreditNoteNumber *string `json:"origin_credit_note_number,omitempty"`
	// Date the document was issued to the customer. This is the date that the document was made available for payment.
	// The format is "YYYY-MM-DD".
	IssueDate *time.Time `json:"issue_date,omitempty"`
	// Debit notes are applied to invoices to offset invoiced amounts - they adjust the amount due. This field is the date the debit note document became fully applied to the invoice.
	// The format is "YYYY-MM-DD".
	AppliedDate *time.Time `json:"applied_date,omitempty"`
	// Date the document is due for payment. The format is "YYYY-MM-DD".
	DueDate *time.Time `json:"due_date,omitempty"`
	// Current status of the debit note.
	Status *DebitNoteStatus `json:"status,omitempty"`
	// The memo printed on debit note, which is a description of the reason for the debit.
	Memo *string `json:"memo,omitempty"`
	// The role of the debit note.
	Role *DebitNoteRole `json:"role,omitempty"`
	// The ISO 4217 currency code (3 character string) representing the currency of the credit note amount fields.
	Currency *string `json:"currency,omitempty"`
	// Information about the seller (merchant) listed on the masthead of the debit note.
	Seller *InvoiceSeller `json:"seller,omitempty"`
	// Information about the customer who is owner or recipient the debited subscription.
	Customer *InvoiceCustomer `json:"customer,omitempty"`
	// The billing address of the debited subscription.
	BillingAddress *InvoiceAddress `json:"billing_address,omitempty"`
	// The shipping address of the debited subscription.
	ShippingAddress *InvoiceAddress `json:"shipping_address,omitempty"`
	// Line items on the debit note.
	LineItems            []CreditNoteLineItem `json:"line_items,omitempty"`
	Discounts            []InvoiceDiscount    `json:"discounts,omitempty"`
	Taxes                []InvoiceTax         `json:"taxes,omitempty"`
	Refunds              []InvoiceRefund      `json:"refunds,omitempty"`
	AdditionalProperties map[string]any       `json:"_"`
}

DebitNote represents a DebitNote struct.

func (DebitNote) MarshalJSON added in v0.2.0

func (d DebitNote) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for DebitNote. It customizes the JSON marshaling process for DebitNote objects.

func (*DebitNote) UnmarshalJSON added in v0.2.0

func (d *DebitNote) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for DebitNote. It customizes the JSON unmarshaling process for DebitNote objects.

type DebitNoteRole added in v0.2.0

type DebitNoteRole string

DebitNoteRole is a string enum. The role of the debit note.

const (
	DebitNoteRole_CHARGEBACK DebitNoteRole = "chargeback"
	DebitNoteRole_REFUND     DebitNoteRole = "refund"
)

func (DebitNoteRole) MarshalJSON added in v0.2.0

func (e DebitNoteRole) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for DebitNoteRole. It customizes the JSON marshaling process for DebitNoteRole objects.

func (*DebitNoteRole) UnmarshalJSON added in v0.2.0

func (e *DebitNoteRole) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for DebitNoteRole. It customizes the JSON unmarshaling process for DebitNoteRole objects.

type DebitNoteStatus added in v0.2.0

type DebitNoteStatus string

DebitNoteStatus is a string enum. Current status of the debit note.

const (
	DebitNoteStatus_OPEN     DebitNoteStatus = "open"
	DebitNoteStatus_APPLIED  DebitNoteStatus = "applied"
	DebitNoteStatus_BANISHED DebitNoteStatus = "banished"
	DebitNoteStatus_PAID     DebitNoteStatus = "paid"
)

func (DebitNoteStatus) MarshalJSON added in v0.2.0

func (e DebitNoteStatus) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for DebitNoteStatus. It customizes the JSON marshaling process for DebitNoteStatus objects.

func (*DebitNoteStatus) UnmarshalJSON added in v0.2.0

func (e *DebitNoteStatus) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for DebitNoteStatus. It customizes the JSON unmarshaling process for DebitNoteStatus objects.

type DeductServiceCredit

type DeductServiceCredit struct {
	Amount               DeductServiceCreditAmount `json:"amount"`
	Memo                 *string                   `json:"memo,omitempty"`
	AdditionalProperties map[string]any            `json:"_"`
}

DeductServiceCredit represents a DeductServiceCredit struct.

func (DeductServiceCredit) MarshalJSON

func (d DeductServiceCredit) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for DeductServiceCredit. It customizes the JSON marshaling process for DeductServiceCredit objects.

func (*DeductServiceCredit) UnmarshalJSON

func (d *DeductServiceCredit) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for DeductServiceCredit. It customizes the JSON unmarshaling process for DeductServiceCredit objects.

type DeductServiceCreditAmount added in v0.1.0

type DeductServiceCreditAmount struct {
	// contains filtered or unexported fields
}

DeductServiceCreditAmount represents a DeductServiceCreditAmount struct. This is a container for one-of cases.

func (*DeductServiceCreditAmount) AsPrecision added in v0.1.0

func (d *DeductServiceCreditAmount) AsPrecision() (
	*float64,
	bool)

func (*DeductServiceCreditAmount) AsString added in v0.1.0

func (d *DeductServiceCreditAmount) AsString() (
	*string,
	bool)

func (DeductServiceCreditAmount) MarshalJSON added in v0.1.0

func (d DeductServiceCreditAmount) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for DeductServiceCreditAmount. It customizes the JSON marshaling process for DeductServiceCreditAmount objects.

func (DeductServiceCreditAmount) String added in v0.1.0

func (d DeductServiceCreditAmount) String() string

String converts the DeductServiceCreditAmount object to a string representation.

func (*DeductServiceCreditAmount) UnmarshalJSON added in v0.1.0

func (d *DeductServiceCreditAmount) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for DeductServiceCreditAmount. It customizes the JSON unmarshaling process for DeductServiceCreditAmount objects.

type DeductServiceCreditRequest

type DeductServiceCreditRequest struct {
	Deduction            DeductServiceCredit `json:"deduction"`
	AdditionalProperties map[string]any      `json:"_"`
}

DeductServiceCreditRequest represents a DeductServiceCreditRequest struct.

func (DeductServiceCreditRequest) MarshalJSON

func (d DeductServiceCreditRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for DeductServiceCreditRequest. It customizes the JSON marshaling process for DeductServiceCreditRequest objects.

func (*DeductServiceCreditRequest) UnmarshalJSON

func (d *DeductServiceCreditRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for DeductServiceCreditRequest. It customizes the JSON unmarshaling process for DeductServiceCreditRequest objects.

type DelayedCancellationResponse

type DelayedCancellationResponse struct {
	Message              *string        `json:"message,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

DelayedCancellationResponse represents a DelayedCancellationResponse struct.

func (DelayedCancellationResponse) MarshalJSON

func (d DelayedCancellationResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for DelayedCancellationResponse. It customizes the JSON marshaling process for DelayedCancellationResponse objects.

func (*DelayedCancellationResponse) UnmarshalJSON

func (d *DelayedCancellationResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for DelayedCancellationResponse. It customizes the JSON unmarshaling process for DelayedCancellationResponse objects.

type DeleteSubscriptionGroupResponse

type DeleteSubscriptionGroupResponse struct {
	Uid                  *string        `json:"uid,omitempty"`
	Deleted              *bool          `json:"deleted,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

DeleteSubscriptionGroupResponse represents a DeleteSubscriptionGroupResponse struct.

func (DeleteSubscriptionGroupResponse) MarshalJSON

func (d DeleteSubscriptionGroupResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for DeleteSubscriptionGroupResponse. It customizes the JSON marshaling process for DeleteSubscriptionGroupResponse objects.

func (*DeleteSubscriptionGroupResponse) UnmarshalJSON

func (d *DeleteSubscriptionGroupResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for DeleteSubscriptionGroupResponse. It customizes the JSON unmarshaling process for DeleteSubscriptionGroupResponse objects.

type Direction

type Direction string

Direction is a string enum.

const (
	Direction_ASC  Direction = "asc"
	Direction_DESC Direction = "desc"
)

func (Direction) MarshalJSON added in v0.2.0

func (e Direction) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Direction. It customizes the JSON marshaling process for Direction objects.

func (*Direction) UnmarshalJSON added in v0.2.0

func (e *Direction) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Direction. It customizes the JSON unmarshaling process for Direction objects.

type DiscountType

type DiscountType string

DiscountType is a string enum.

const (
	DiscountType_AMOUNT  DiscountType = "amount"
	DiscountType_PERCENT DiscountType = "percent"
)

func (DiscountType) MarshalJSON added in v0.2.0

func (e DiscountType) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for DiscountType. It customizes the JSON marshaling process for DiscountType objects.

func (*DiscountType) UnmarshalJSON added in v0.2.0

func (e *DiscountType) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for DiscountType. It customizes the JSON unmarshaling process for DiscountType objects.

type DunnerData added in v0.1.0

type DunnerData struct {
	State                string         `json:"state"`
	SubscriptionId       int            `json:"subscription_id"`
	RevenueAtRiskInCents int64          `json:"revenue_at_risk_in_cents"`
	CreatedAt            time.Time      `json:"created_at"`
	Attempts             int            `json:"attempts"`
	LastAttemptedAt      time.Time      `json:"last_attempted_at"`
	AdditionalProperties map[string]any `json:"_"`
}

DunnerData represents a DunnerData struct.

func (DunnerData) MarshalJSON added in v0.1.0

func (d DunnerData) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for DunnerData. It customizes the JSON marshaling process for DunnerData objects.

func (*DunnerData) UnmarshalJSON added in v0.1.0

func (d *DunnerData) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for DunnerData. It customizes the JSON unmarshaling process for DunnerData objects.

type DunningStepData added in v0.1.0

type DunningStepData struct {
	DayThreshold         int              `json:"day_threshold"`
	Action               string           `json:"action"`
	EmailBody            Optional[string] `json:"email_body"`
	EmailSubject         Optional[string] `json:"email_subject"`
	SendEmail            bool             `json:"send_email"`
	SendBccEmail         bool             `json:"send_bcc_email"`
	SendSms              bool             `json:"send_sms"`
	SmsBody              Optional[string] `json:"sms_body"`
	AdditionalProperties map[string]any   `json:"_"`
}

DunningStepData represents a DunningStepData struct.

func (DunningStepData) MarshalJSON added in v0.1.0

func (d DunningStepData) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for DunningStepData. It customizes the JSON marshaling process for DunningStepData objects.

func (*DunningStepData) UnmarshalJSON added in v0.1.0

func (d *DunningStepData) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for DunningStepData. It customizes the JSON unmarshaling process for DunningStepData objects.

type DunningStepReached added in v0.1.0

type DunningStepReached struct {
	Dunner               DunnerData      `json:"dunner"`
	CurrentStep          DunningStepData `json:"current_step"`
	NextStep             DunningStepData `json:"next_step"`
	AdditionalProperties map[string]any  `json:"_"`
}

DunningStepReached represents a DunningStepReached struct.

func (DunningStepReached) MarshalJSON added in v0.1.0

func (d DunningStepReached) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for DunningStepReached. It customizes the JSON marshaling process for DunningStepReached objects.

func (*DunningStepReached) UnmarshalJSON added in v0.1.0

func (d *DunningStepReached) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for DunningStepReached. It customizes the JSON unmarshaling process for DunningStepReached objects.

type EBBComponent added in v0.1.0

type EBBComponent struct {
	// A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes".
	Name string `json:"name"`
	// The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. i.e. “message”, which may then be shown as “5 messages” on a subscription’s component line-item
	UnitName string `json:"unit_name"`
	// A description for the component that will be displayed to the user on the hosted signup page.
	Description *string `json:"description,omitempty"`
	// A unique identifier for your use that can be used to retrieve this component is subsequent requests.  Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.
	Handle *string `json:"handle,omitempty"`
	// Boolean flag describing whether a component is taxable or not.
	Taxable *bool `json:"taxable,omitempty"`
	// The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes.
	PricingScheme PricingScheme `json:"pricing_scheme"`
	// (Not required for ‘per_unit’ pricing schemes) One or more price brackets. See [Price Bracket Rules](https://help.chargify.com/products/product-components.html#general-price-bracket-rules) for an overview of how price brackets work for different pricing schemes.
	Prices []Price `json:"prices,omitempty"`
	// The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
	// Available values: `full`, `prorated`, `none`.
	UpgradeCharge Optional[CreditType] `json:"upgrade_charge"`
	// The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
	// Available values: `full`, `prorated`, `none`.
	DowngradeCredit Optional[CreditType]      `json:"downgrade_credit"`
	PricePoints     []ComponentPricePointItem `json:"price_points,omitempty"`
	// The amount the customer will be charged per unit when the pricing scheme is “per_unit”. The price can contain up to 8 decimal places. i.e. 1.00 or 0.0012 or 0.00000065
	UnitPrice *EBBComponentUnitPrice `json:"unit_price,omitempty"`
	// A string representing the tax code related to the component type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters.
	TaxCode *string `json:"tax_code,omitempty"`
	// (Only available on Relationship Invoicing sites) Boolean flag describing if the service date range should show for the component on generated invoices.
	HideDateRangeOnInvoice *bool `json:"hide_date_range_on_invoice,omitempty"`
	// deprecated May 2011 - use unit_price instead
	PriceInCents *string `json:"price_in_cents,omitempty"`
	// The ID of an event based billing metric that will be attached to this component.
	EventBasedBillingMetricId int `json:"event_based_billing_metric_id"`
	// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component's default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled.
	Interval *int `json:"interval,omitempty"`
	// A string representing the interval unit for this component's default price point, either month or day. This property is only available for sites with Multifrequency enabled.
	IntervalUnit         *IntervalUnit  `json:"interval_unit,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

EBBComponent represents a EBBComponent struct.

func (EBBComponent) MarshalJSON added in v0.1.0

func (e EBBComponent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for EBBComponent. It customizes the JSON marshaling process for EBBComponent objects.

func (*EBBComponent) UnmarshalJSON added in v0.1.0

func (e *EBBComponent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for EBBComponent. It customizes the JSON unmarshaling process for EBBComponent objects.

type EBBComponentUnitPrice added in v0.1.0

type EBBComponentUnitPrice struct {
	// contains filtered or unexported fields
}

EBBComponentUnitPrice represents a EBBComponentUnitPrice struct. This is a container for one-of cases.

func (*EBBComponentUnitPrice) AsPrecision added in v0.1.0

func (e *EBBComponentUnitPrice) AsPrecision() (
	*float64,
	bool)

func (*EBBComponentUnitPrice) AsString added in v0.1.0

func (e *EBBComponentUnitPrice) AsString() (
	*string,
	bool)

func (EBBComponentUnitPrice) MarshalJSON added in v0.1.0

func (e EBBComponentUnitPrice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for EBBComponentUnitPrice. It customizes the JSON marshaling process for EBBComponentUnitPrice objects.

func (EBBComponentUnitPrice) String added in v0.1.0

func (e EBBComponentUnitPrice) String() string

String converts the EBBComponentUnitPrice object to a string representation.

func (*EBBComponentUnitPrice) UnmarshalJSON added in v0.1.0

func (e *EBBComponentUnitPrice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for EBBComponentUnitPrice. It customizes the JSON unmarshaling process for EBBComponentUnitPrice objects.

type EBBEvent

type EBBEvent struct {
	Chargify             *ChargifyEBB   `json:"chargify,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

EBBEvent represents a EBBEvent struct.

func (EBBEvent) MarshalJSON

func (e EBBEvent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for EBBEvent. It customizes the JSON marshaling process for EBBEvent objects.

func (*EBBEvent) UnmarshalJSON

func (e *EBBEvent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for EBBEvent. It customizes the JSON unmarshaling process for EBBEvent objects.

type EnableWebhooksRequest

type EnableWebhooksRequest struct {
	WebhooksEnabled      bool           `json:"webhooks_enabled"`
	AdditionalProperties map[string]any `json:"_"`
}

EnableWebhooksRequest represents a EnableWebhooksRequest struct.

func (EnableWebhooksRequest) MarshalJSON

func (e EnableWebhooksRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for EnableWebhooksRequest. It customizes the JSON marshaling process for EnableWebhooksRequest objects.

func (*EnableWebhooksRequest) UnmarshalJSON

func (e *EnableWebhooksRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for EnableWebhooksRequest. It customizes the JSON unmarshaling process for EnableWebhooksRequest objects.

type EnableWebhooksResponse

type EnableWebhooksResponse struct {
	WebhooksEnabled      *bool          `json:"webhooks_enabled,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

EnableWebhooksResponse represents a EnableWebhooksResponse struct.

func (EnableWebhooksResponse) MarshalJSON

func (e EnableWebhooksResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for EnableWebhooksResponse. It customizes the JSON marshaling process for EnableWebhooksResponse objects.

func (*EnableWebhooksResponse) UnmarshalJSON

func (e *EnableWebhooksResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for EnableWebhooksResponse. It customizes the JSON unmarshaling process for EnableWebhooksResponse objects.

type Endpoint

type Endpoint struct {
	Id                   *int           `json:"id,omitempty"`
	Url                  *string        `json:"url,omitempty"`
	SiteId               *int           `json:"site_id,omitempty"`
	Status               *string        `json:"status,omitempty"`
	WebhookSubscriptions []string       `json:"webhook_subscriptions,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

Endpoint represents a Endpoint struct.

func (Endpoint) MarshalJSON

func (e Endpoint) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Endpoint. It customizes the JSON marshaling process for Endpoint objects.

func (*Endpoint) UnmarshalJSON

func (e *Endpoint) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Endpoint. It customizes the JSON unmarshaling process for Endpoint objects.

type EndpointResponse

type EndpointResponse struct {
	Endpoint             *Endpoint      `json:"endpoint,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

EndpointResponse represents a EndpointResponse struct.

func (EndpointResponse) MarshalJSON

func (e EndpointResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for EndpointResponse. It customizes the JSON marshaling process for EndpointResponse objects.

func (*EndpointResponse) UnmarshalJSON

func (e *EndpointResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for EndpointResponse. It customizes the JSON unmarshaling process for EndpointResponse objects.

type Errors

type Errors struct {
	PerPage              []string       `json:"per_page,omitempty"`
	PricePoint           []string       `json:"price_point,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

Errors represents a Errors struct.

func (Errors) MarshalJSON

func (e Errors) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Errors. It customizes the JSON marshaling process for Errors objects.

func (*Errors) UnmarshalJSON

func (e *Errors) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Errors. It customizes the JSON unmarshaling process for Errors objects.

type Event

type Event struct {
	Id                   int64                   `json:"id"`
	Key                  string                  `json:"key"`
	Message              string                  `json:"message"`
	SubscriptionId       *int                    `json:"subscription_id"`
	CustomerId           *int                    `json:"customer_id"`
	CreatedAt            time.Time               `json:"created_at"`
	EventSpecificData    *EventEventSpecificData `json:"event_specific_data"`
	AdditionalProperties map[string]any          `json:"_"`
}

Event represents a Event struct.

func (Event) MarshalJSON

func (e Event) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Event. It customizes the JSON marshaling process for Event objects.

func (*Event) UnmarshalJSON

func (e *Event) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Event. It customizes the JSON unmarshaling process for Event objects.

type EventBasedBillingSegmentError

type EventBasedBillingSegmentError struct {
	// The key of the object would be a number (an index in the request array) where the error occurred. In the value object, the key represents the field and the value is an array with error messages. In most cases, this object would contain just one key.
	Segments             map[string]interface{} `json:"segments"`
	AdditionalProperties map[string]any         `json:"_"`
}

EventBasedBillingSegmentError represents a EventBasedBillingSegmentError struct.

func (EventBasedBillingSegmentError) MarshalJSON

func (e EventBasedBillingSegmentError) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for EventBasedBillingSegmentError. It customizes the JSON marshaling process for EventBasedBillingSegmentError objects.

func (*EventBasedBillingSegmentError) UnmarshalJSON

func (e *EventBasedBillingSegmentError) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for EventBasedBillingSegmentError. It customizes the JSON unmarshaling process for EventBasedBillingSegmentError objects.

type EventEventSpecificData added in v0.1.0

type EventEventSpecificData struct {
	// contains filtered or unexported fields
}

EventEventSpecificData represents a EventEventSpecificData struct. This is a container for one-of cases.

func (*EventEventSpecificData) AsComponentAllocationChange added in v0.1.0

func (e *EventEventSpecificData) AsComponentAllocationChange() (
	*ComponentAllocationChange,
	bool)

func (*EventEventSpecificData) AsCreditAccountBalanceChanged added in v0.1.0

func (e *EventEventSpecificData) AsCreditAccountBalanceChanged() (
	*CreditAccountBalanceChanged,
	bool)

func (*EventEventSpecificData) AsCustomFieldValueChange added in v0.1.0

func (e *EventEventSpecificData) AsCustomFieldValueChange() (
	*CustomFieldValueChange,
	bool)

func (*EventEventSpecificData) AsDunningStepReached added in v0.1.0

func (e *EventEventSpecificData) AsDunningStepReached() (
	*DunningStepReached,
	bool)

func (*EventEventSpecificData) AsInvoiceIssued added in v0.1.0

func (e *EventEventSpecificData) AsInvoiceIssued() (
	*InvoiceIssued,
	bool)

func (*EventEventSpecificData) AsItemPricePointChanged added in v0.1.0

func (e *EventEventSpecificData) AsItemPricePointChanged() (
	*ItemPricePointChanged,
	bool)

func (*EventEventSpecificData) AsMeteredUsage added in v0.1.0

func (e *EventEventSpecificData) AsMeteredUsage() (
	*MeteredUsage,
	bool)

func (*EventEventSpecificData) AsPaymentCollectionMethodChanged added in v0.1.0

func (e *EventEventSpecificData) AsPaymentCollectionMethodChanged() (
	*PaymentCollectionMethodChanged,
	bool)

func (*EventEventSpecificData) AsPaymentRelatedEvents added in v0.1.0

func (e *EventEventSpecificData) AsPaymentRelatedEvents() (
	*PaymentRelatedEvents,
	bool)

func (*EventEventSpecificData) AsPendingCancellationChange added in v0.1.0

func (e *EventEventSpecificData) AsPendingCancellationChange() (
	*PendingCancellationChange,
	bool)

func (*EventEventSpecificData) AsPrepaidSubscriptionBalanceChanged added in v0.1.0

func (e *EventEventSpecificData) AsPrepaidSubscriptionBalanceChanged() (
	*PrepaidSubscriptionBalanceChanged,
	bool)

func (*EventEventSpecificData) AsPrepaidUsage added in v0.1.0

func (e *EventEventSpecificData) AsPrepaidUsage() (
	*PrepaidUsage,
	bool)

func (*EventEventSpecificData) AsPrepaymentAccountBalanceChanged added in v0.1.0

func (e *EventEventSpecificData) AsPrepaymentAccountBalanceChanged() (
	*PrepaymentAccountBalanceChanged,
	bool)

func (*EventEventSpecificData) AsProformaInvoiceIssued added in v0.1.0

func (e *EventEventSpecificData) AsProformaInvoiceIssued() (
	*ProformaInvoiceIssued,
	bool)

func (*EventEventSpecificData) AsRefundSuccess added in v0.1.0

func (e *EventEventSpecificData) AsRefundSuccess() (
	*RefundSuccess,
	bool)

func (*EventEventSpecificData) AsSubscriptionGroupSignupFailure added in v0.1.0

func (e *EventEventSpecificData) AsSubscriptionGroupSignupFailure() (
	*SubscriptionGroupSignupFailure,
	bool)

func (*EventEventSpecificData) AsSubscriptionGroupSignupSuccess added in v0.1.0

func (e *EventEventSpecificData) AsSubscriptionGroupSignupSuccess() (
	*SubscriptionGroupSignupSuccess,
	bool)

func (*EventEventSpecificData) AsSubscriptionProductChange added in v0.1.0

func (e *EventEventSpecificData) AsSubscriptionProductChange() (
	*SubscriptionProductChange,
	bool)

func (*EventEventSpecificData) AsSubscriptionStateChange added in v0.1.0

func (e *EventEventSpecificData) AsSubscriptionStateChange() (
	*SubscriptionStateChange,
	bool)

func (EventEventSpecificData) MarshalJSON added in v0.1.0

func (e EventEventSpecificData) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for EventEventSpecificData. It customizes the JSON marshaling process for EventEventSpecificData objects.

func (EventEventSpecificData) String added in v0.1.0

func (e EventEventSpecificData) String() string

String converts the EventEventSpecificData object to a string representation.

func (*EventEventSpecificData) UnmarshalJSON added in v0.1.0

func (e *EventEventSpecificData) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for EventEventSpecificData. It customizes the JSON unmarshaling process for EventEventSpecificData objects.

type EventResponse

type EventResponse struct {
	Event                Event          `json:"event"`
	AdditionalProperties map[string]any `json:"_"`
}

EventResponse represents a EventResponse struct.

func (EventResponse) MarshalJSON

func (e EventResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for EventResponse. It customizes the JSON marshaling process for EventResponse objects.

func (*EventResponse) UnmarshalJSON

func (e *EventResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for EventResponse. It customizes the JSON unmarshaling process for EventResponse objects.

type EventType

type EventType string

EventType is a string enum.

const (
	EventType_ACCOUNTTRANSACTIONCHANGED                      EventType = "account_transaction_changed"
	EventType_BILLINGDATECHANGE                              EventType = "billing_date_change"
	EventType_COMPONENTALLOCATIONCHANGE                      EventType = "component_allocation_change"
	EventType_CUSTOMERUPDATE                                 EventType = "customer_update"
	EventType_CUSTOMERCREATE                                 EventType = "customer_create"
	EventType_DUNNINGSTEPREACHED                             EventType = "dunning_step_reached"
	EventType_EXPIRATIONDATECHANGE                           EventType = "expiration_date_change"
	EventType_EXPIRINGCARD                                   EventType = "expiring_card"
	EventType_METEREDUSAGE                                   EventType = "metered_usage"
	EventType_PAYMENTSUCCESS                                 EventType = "payment_success"
	EventType_PAYMENTSUCCESSRECREATED                        EventType = "payment_success_recreated"
	EventType_PAYMENTFAILURE                                 EventType = "payment_failure"
	EventType_PAYMENTFAILURERECREATED                        EventType = "payment_failure_recreated"
	EventType_REFUNDFAILURE                                  EventType = "refund_failure"
	EventType_REFUNDSUCCESS                                  EventType = "refund_success"
	EventType_RENEWALSUCCESS                                 EventType = "renewal_success"
	EventType_RENEWALSUCCESSRECREATED                        EventType = "renewal_success_recreated"
	EventType_RENEWALFAILURE                                 EventType = "renewal_failure"
	EventType_SIGNUPSUCCESS                                  EventType = "signup_success"
	EventType_SIGNUPFAILURE                                  EventType = "signup_failure"
	EventType_STATEMENTCLOSED                                EventType = "statement_closed"
	EventType_STATEMENTSETTLED                               EventType = "statement_settled"
	EventType_SUBSCRIPTIONBANKACCOUNTUPDATE                  EventType = "subscription_bank_account_update"
	EventType_SUBSCRIPTIONDELETION                           EventType = "subscription_deletion"
	EventType_SUBSCRIPTIONPAYPALACCOUNTUPDATE                EventType = "subscription_paypal_account_update"
	EventType_SUBSCRIPTIONPRODUCTCHANGE                      EventType = "subscription_product_change"
	EventType_SUBSCRIPTIONSTATECHANGE                        EventType = "subscription_state_change"
	EventType_TRIALENDNOTICE                                 EventType = "trial_end_notice"
	EventType_UPGRADEDOWNGRADESUCCESS                        EventType = "upgrade_downgrade_success"
	EventType_UPGRADEDOWNGRADEFAILURE                        EventType = "upgrade_downgrade_failure"
	EventType_UPCOMINGRENEWALNOTICE                          EventType = "upcoming_renewal_notice"
	EventType_CUSTOMFIELDVALUECHANGE                         EventType = "custom_field_value_change"
	EventType_SUBSCRIPTIONPREPAYMENTACCOUNTBALANCECHANGED    EventType = "subscription_prepayment_account_balance_changed"
	EventType_SUBSCRIPTIONSERVICECREDITACCOUNTBALANCECHANGED EventType = "subscription_service_credit_account_balance_changed"
)

func (EventType) MarshalJSON added in v0.2.0

func (e EventType) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for EventType. It customizes the JSON marshaling process for EventType objects.

func (*EventType) UnmarshalJSON added in v0.2.0

func (e *EventType) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for EventType. It customizes the JSON unmarshaling process for EventType objects.

type ExtendedIntervalUnit

type ExtendedIntervalUnit string

ExtendedIntervalUnit is a string enum.

const (
	ExtendedIntervalUnit_DAY   ExtendedIntervalUnit = "day"
	ExtendedIntervalUnit_MONTH ExtendedIntervalUnit = "month"
	ExtendedIntervalUnit_NEVER ExtendedIntervalUnit = "never"
)

func (ExtendedIntervalUnit) MarshalJSON added in v0.2.0

func (e ExtendedIntervalUnit) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ExtendedIntervalUnit. It customizes the JSON marshaling process for ExtendedIntervalUnit objects.

func (*ExtendedIntervalUnit) UnmarshalJSON added in v0.2.0

func (e *ExtendedIntervalUnit) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ExtendedIntervalUnit. It customizes the JSON unmarshaling process for ExtendedIntervalUnit objects.

type FailedPaymentAction

type FailedPaymentAction string

FailedPaymentAction is a string enum. Action taken when payment for an invoice fails: - `leave_open_invoice` - prepayments and credits applied to invoice; invoice status set to "open"; email sent to the customer for the issued invoice (if setting applies); payment failure recorded in the invoice history. This is the default option. - `rollback_to_pending` - prepayments and credits not applied; invoice remains in "pending" status; no email sent to the customer; payment failure recorded in the invoice history. - `initiate_dunning` - prepayments and credits applied to the invoice; invoice status set to "open"; email sent to the customer for the issued invoice (if setting applies); payment failure recorded in the invoice history; subscription will most likely go into "past_due" or "canceled" state (depending upon net terms and dunning settings).

const (
	FailedPaymentAction_LEAVEOPENINVOICE  FailedPaymentAction = "leave_open_invoice"
	FailedPaymentAction_ROLLBACKTOPENDING FailedPaymentAction = "rollback_to_pending"
	FailedPaymentAction_INITIATEDUNNING   FailedPaymentAction = "initiate_dunning"
)

func (FailedPaymentAction) MarshalJSON added in v0.2.0

func (e FailedPaymentAction) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for FailedPaymentAction. It customizes the JSON marshaling process for FailedPaymentAction objects.

func (*FailedPaymentAction) UnmarshalJSON added in v0.2.0

func (e *FailedPaymentAction) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for FailedPaymentAction. It customizes the JSON unmarshaling process for FailedPaymentAction objects.

type FailedPaymentEvent added in v0.2.0

type FailedPaymentEvent struct {
	Id        int64            `json:"id"`
	Timestamp time.Time        `json:"timestamp"`
	Invoice   Invoice          `json:"invoice"`
	EventType InvoiceEventType `json:"event_type"`
	// Example schema for an `failed_payment` event
	EventData            FailedPaymentEventData `json:"event_data"`
	AdditionalProperties map[string]any         `json:"_"`
}

FailedPaymentEvent represents a FailedPaymentEvent struct.

func (FailedPaymentEvent) MarshalJSON added in v0.2.0

func (f FailedPaymentEvent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for FailedPaymentEvent. It customizes the JSON marshaling process for FailedPaymentEvent objects.

func (*FailedPaymentEvent) UnmarshalJSON added in v0.2.0

func (f *FailedPaymentEvent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for FailedPaymentEvent. It customizes the JSON unmarshaling process for FailedPaymentEvent objects.

type FailedPaymentEventData added in v0.2.0

type FailedPaymentEventData struct {
	// The monetary value of the payment, expressed in cents.
	AmountInCents int `json:"amount_in_cents"`
	// The monetary value of the payment, expressed in dollars.
	AppliedAmount int `json:"applied_amount"`
	// The memo passed when the payment was created.
	Memo          Optional[string]         `json:"memo"`
	PaymentMethod InvoicePaymentMethodType `json:"payment_method"`
	// The transaction ID of the failed payment.
	TransactionId        int            `json:"transaction_id"`
	AdditionalProperties map[string]any `json:"_"`
}

FailedPaymentEventData represents a FailedPaymentEventData struct. Example schema for an `failed_payment` event

func (FailedPaymentEventData) MarshalJSON added in v0.2.0

func (f FailedPaymentEventData) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for FailedPaymentEventData. It customizes the JSON marshaling process for FailedPaymentEventData objects.

func (*FailedPaymentEventData) UnmarshalJSON added in v0.2.0

func (f *FailedPaymentEventData) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for FailedPaymentEventData. It customizes the JSON unmarshaling process for FailedPaymentEventData objects.

type FileWrapper

type FileWrapper = https.FileWrapper

FileWrapper is a struct that represents a file along with its metadata such as the file content, file name, and file headers.

type FirstChargeType

type FirstChargeType string

FirstChargeType is a string enum.

const (
	FirstChargeType_PRORATED  FirstChargeType = "prorated"
	FirstChargeType_IMMEDIATE FirstChargeType = "immediate"
	FirstChargeType_DELAYED   FirstChargeType = "delayed"
)

func (FirstChargeType) MarshalJSON added in v0.2.0

func (e FirstChargeType) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for FirstChargeType. It customizes the JSON marshaling process for FirstChargeType objects.

func (*FirstChargeType) UnmarshalJSON added in v0.2.0

func (e *FirstChargeType) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for FirstChargeType. It customizes the JSON unmarshaling process for FirstChargeType objects.

type FullSubscriptionGroupResponse

type FullSubscriptionGroupResponse struct {
	Uid                   *string    `json:"uid,omitempty"`
	Scheme                *int       `json:"scheme,omitempty"`
	CustomerId            *int       `json:"customer_id,omitempty"`
	PaymentProfileId      *int       `json:"payment_profile_id,omitempty"`
	SubscriptionIds       []int      `json:"subscription_ids,omitempty"`
	PrimarySubscriptionId *int       `json:"primary_subscription_id,omitempty"`
	NextAssessmentAt      *time.Time `json:"next_assessment_at,omitempty"`
	// The state of a subscription.
	// * **Live States**
	//     * `active` - A normal, active subscription. It is not in a trial and is paid and up to date.
	//     * `assessing` - An internal (transient) state that indicates a subscription is in the middle of periodic assessment. Do not base any access decisions in your app on this state, as it may not always be exposed.
	//     * `pending` - An internal (transient) state that indicates a subscription is in the creation process. Do not base any access decisions in your app on this state, as it may not always be exposed.
	//     * `trialing` - A subscription in trialing state has a valid trial subscription. This type of subscription may transition to active once payment is received when the trial has ended. Otherwise, it may go to a Problem or End of Life state.
	//     * `paused` - An internal state that indicates that your account with Advanced Billing is in arrears.
	// * **Problem States**
	//     * `past_due` - Indicates that the most recent payment has failed, and payment is past due for this subscription. If you have enabled our automated dunning, this subscription will be in the dunning process (additional status and callbacks from the dunning process will be available in the future). If you are handling dunning and payment updates yourself, you will want to use this state to initiate a payment update from your customers.
	//     * `soft_failure` - Indicates that normal assessment/processing of the subscription has failed for a reason that cannot be fixed by the Customer. For example, a Soft Fail may result from a timeout at the gateway or incorrect credentials on your part. The subscriptions should be retried automatically. An interface is being built for you to review problems resulting from these events to take manual action when needed.
	//     * `unpaid` - Indicates an unpaid subscription. A subscription is marked unpaid if the retry period expires and you have configured your [Dunning](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405505141005) settings to have a Final Action of `mark the subscription unpaid`.
	// * **End of Life States**
	//     * `canceled` - Indicates a canceled subscription. This may happen at your request (via the API or the web interface) or due to the expiration of the [Dunning](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405505141005) process without payment. See the [Reactivation](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404559291021) documentation for info on how to restart a canceled subscription.
	//     While a subscription is canceled, its period will not advance, it will not accrue any new charges, and Advanced Billing will not attempt to collect the overdue balance.
	//     * `expired` - Indicates a subscription that has expired due to running its normal life cycle. Some products may be configured to have an expiration period. An expired subscription then is one that stayed active until it fulfilled its full period.
	//     * `failed_to_create` - Indicates that signup has failed. (You may see this state in a signup_failure webhook.)
	//     * `on_hold` - Indicates that a subscription’s billing has been temporarily stopped. While it is expected that the subscription will resume and return to active status, this is still treated as an “End of Life” state because the customer is not paying for services during this time.
	//     * `suspended` - Indicates that a prepaid subscription has used up all their prepayment balance. If a prepayment is applied, it will return to an active state.
	//     * `trial_ended` - A subscription in a trial_ended state is a subscription that completed a no-obligation trial and did not have a card on file at the expiration of the trial period. See [Product Pricing – No Obligation Trials](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405246782221) for more details.
	// See [Subscription States](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404222005773) for more info about subscription states and state transitions.
	State                       *SubscriptionState         `json:"state,omitempty"`
	CancelAtEndOfPeriod         *bool                      `json:"cancel_at_end_of_period,omitempty"`
	CurrentBillingAmountInCents *int64                     `json:"current_billing_amount_in_cents,omitempty"`
	Customer                    *SubscriptionGroupCustomer `json:"customer,omitempty"`
	AccountBalances             *SubscriptionGroupBalances `json:"account_balances,omitempty"`
	AdditionalProperties        map[string]any             `json:"_"`
}

FullSubscriptionGroupResponse represents a FullSubscriptionGroupResponse struct.

func (FullSubscriptionGroupResponse) MarshalJSON

func (f FullSubscriptionGroupResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for FullSubscriptionGroupResponse. It customizes the JSON marshaling process for FullSubscriptionGroupResponse objects.

func (*FullSubscriptionGroupResponse) UnmarshalJSON

func (f *FullSubscriptionGroupResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for FullSubscriptionGroupResponse. It customizes the JSON unmarshaling process for FullSubscriptionGroupResponse objects.

type GetOneTimeTokenPaymentProfile

type GetOneTimeTokenPaymentProfile struct {
	Id               Optional[string] `json:"id"`
	FirstName        string           `json:"first_name"`
	LastName         string           `json:"last_name"`
	MaskedCardNumber string           `json:"masked_card_number"`
	// The type of card used.
	CardType        CardType         `json:"card_type"`
	ExpirationMonth float64          `json:"expiration_month"`
	ExpirationYear  float64          `json:"expiration_year"`
	CustomerId      Optional[string] `json:"customer_id"`
	// The vault that stores the payment profile with the provided `vault_token`. Use `bogus` for testing.
	CurrentVault         CurrentVault     `json:"current_vault"`
	VaultToken           string           `json:"vault_token"`
	BillingAddress       string           `json:"billing_address"`
	BillingAddress2      *string          `json:"billing_address_2,omitempty"`
	BillingCity          string           `json:"billing_city"`
	BillingCountry       string           `json:"billing_country"`
	BillingState         string           `json:"billing_state"`
	BillingZip           string           `json:"billing_zip"`
	PaymentType          string           `json:"payment_type"`
	Disabled             bool             `json:"disabled"`
	SiteGatewaySettingId int              `json:"site_gateway_setting_id"`
	CustomerVaultToken   Optional[string] `json:"customer_vault_token"`
	GatewayHandle        Optional[string] `json:"gateway_handle"`
	AdditionalProperties map[string]any   `json:"_"`
}

GetOneTimeTokenPaymentProfile represents a GetOneTimeTokenPaymentProfile struct.

func (GetOneTimeTokenPaymentProfile) MarshalJSON

func (g GetOneTimeTokenPaymentProfile) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for GetOneTimeTokenPaymentProfile. It customizes the JSON marshaling process for GetOneTimeTokenPaymentProfile objects.

func (*GetOneTimeTokenPaymentProfile) UnmarshalJSON

func (g *GetOneTimeTokenPaymentProfile) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for GetOneTimeTokenPaymentProfile. It customizes the JSON unmarshaling process for GetOneTimeTokenPaymentProfile objects.

type GetOneTimeTokenRequest

type GetOneTimeTokenRequest struct {
	PaymentProfile       GetOneTimeTokenPaymentProfile `json:"payment_profile"`
	AdditionalProperties map[string]any                `json:"_"`
}

GetOneTimeTokenRequest represents a GetOneTimeTokenRequest struct.

func (GetOneTimeTokenRequest) MarshalJSON

func (g GetOneTimeTokenRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for GetOneTimeTokenRequest. It customizes the JSON marshaling process for GetOneTimeTokenRequest objects.

func (*GetOneTimeTokenRequest) UnmarshalJSON

func (g *GetOneTimeTokenRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for GetOneTimeTokenRequest. It customizes the JSON unmarshaling process for GetOneTimeTokenRequest objects.

type GroupBilling

type GroupBilling struct {
	// A flag indicating whether or not to accrue charges on the new subscription.
	Accrue *bool `json:"accrue,omitempty"`
	// A flag indicating whether or not to align the billing date of the new subscription with the billing date of the primary subscription of the hierarchy's default subscription group. Required to be true if prorate is also true.
	AlignDate *bool `json:"align_date,omitempty"`
	// A flag indicating whether or not to prorate billing of the new subscription for the current period. A value of true is ignored unless align_date is also true.
	Prorate              *bool          `json:"prorate,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

GroupBilling represents a GroupBilling struct. Optional attributes related to billing date and accrual. Note: Only applicable for new subscriptions.

func (GroupBilling) MarshalJSON

func (g GroupBilling) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for GroupBilling. It customizes the JSON marshaling process for GroupBilling objects.

func (*GroupBilling) UnmarshalJSON

func (g *GroupBilling) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for GroupBilling. It customizes the JSON unmarshaling process for GroupBilling objects.

type GroupSettings

type GroupSettings struct {
	// Attributes of the target customer who will be the responsible payer of the created subscription. Required.
	Target GroupTarget `json:"target"`
	// Optional attributes related to billing date and accrual. Note: Only applicable for new subscriptions.
	Billing              *GroupBilling  `json:"billing,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

GroupSettings represents a GroupSettings struct.

func (GroupSettings) MarshalJSON

func (g GroupSettings) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for GroupSettings. It customizes the JSON marshaling process for GroupSettings objects.

func (*GroupSettings) UnmarshalJSON

func (g *GroupSettings) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for GroupSettings. It customizes the JSON unmarshaling process for GroupSettings objects.

type GroupTarget

type GroupTarget struct {
	// The type of object indicated by the id attribute.
	Type GroupTargetType `json:"type"`
	// The id of the target customer or subscription to group the existing subscription with. Ignored and should not be included if type is "self" , "parent", or "eldest"
	Id                   *int           `json:"id,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

GroupTarget represents a GroupTarget struct. Attributes of the target customer who will be the responsible payer of the created subscription. Required.

func (GroupTarget) MarshalJSON

func (g GroupTarget) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for GroupTarget. It customizes the JSON marshaling process for GroupTarget objects.

func (*GroupTarget) UnmarshalJSON

func (g *GroupTarget) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for GroupTarget. It customizes the JSON unmarshaling process for GroupTarget objects.

type GroupTargetType

type GroupTargetType string

GroupTargetType is a string enum. The type of object indicated by the id attribute.

const (
	GroupTargetType_CUSTOMER     GroupTargetType = "customer"
	GroupTargetType_SUBSCRIPTION GroupTargetType = "subscription"
	GroupTargetType_SELF         GroupTargetType = "self"
	GroupTargetType_PARENT       GroupTargetType = "parent"
	GroupTargetType_ELDEST       GroupTargetType = "eldest"
)

func (GroupTargetType) MarshalJSON added in v0.2.0

func (e GroupTargetType) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for GroupTargetType. It customizes the JSON marshaling process for GroupTargetType objects.

func (*GroupTargetType) UnmarshalJSON added in v0.2.0

func (e *GroupTargetType) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for GroupTargetType. It customizes the JSON unmarshaling process for GroupTargetType objects.

type GroupType added in v0.1.0

type GroupType string

GroupType is a string enum.

const (
	GroupType_SINGLECUSTOMER    GroupType = "single_customer"
	GroupType_MULTIPLECUSTOMERS GroupType = "multiple_customers"
)

func (GroupType) MarshalJSON added in v0.2.0

func (e GroupType) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for GroupType. It customizes the JSON marshaling process for GroupType objects.

func (*GroupType) UnmarshalJSON added in v0.2.0

func (e *GroupType) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for GroupType. It customizes the JSON unmarshaling process for GroupType objects.

type HistoricUsage added in v0.2.0

type HistoricUsage struct {
	// Total usage of a component for billing period
	TotalUsageQuantity *float64 `json:"total_usage_quantity,omitempty"`
	// Start date of billing period
	BillingPeriodStartsAt *time.Time `json:"billing_period_starts_at,omitempty"`
	// End date of billing period
	BillingPeriodEndsAt  *time.Time     `json:"billing_period_ends_at,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

HistoricUsage represents a HistoricUsage struct. Optional for Event Based Components. If the `include=historic_usages` query param is provided, the last ten billing periods will be returned.

func (HistoricUsage) MarshalJSON added in v0.2.0

func (h HistoricUsage) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for HistoricUsage. It customizes the JSON marshaling process for HistoricUsage objects.

func (*HistoricUsage) UnmarshalJSON added in v0.2.0

func (h *HistoricUsage) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for HistoricUsage. It customizes the JSON unmarshaling process for HistoricUsage objects.

type IncludeNotNull

type IncludeNotNull string

IncludeNotNull is a string enum. Passed as a parameter to list methods to return only non null values.

const (
	IncludeNotNull_NOTNULL IncludeNotNull = "not_null"
)

func (IncludeNotNull) MarshalJSON added in v0.2.0

func (e IncludeNotNull) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for IncludeNotNull. It customizes the JSON marshaling process for IncludeNotNull objects.

func (*IncludeNotNull) UnmarshalJSON added in v0.2.0

func (e *IncludeNotNull) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for IncludeNotNull. It customizes the JSON unmarshaling process for IncludeNotNull objects.

type IncludeNullOrNotNull added in v0.2.0

type IncludeNullOrNotNull string

IncludeNullOrNotNull is a string enum. Allows to filter by `not_null` or `null`.

const (
	IncludeNullOrNotNull_NOTNULL IncludeNullOrNotNull = "not_null"
	IncludeNullOrNotNull_NULL    IncludeNullOrNotNull = "null"
)

func (IncludeNullOrNotNull) MarshalJSON added in v0.2.0

func (e IncludeNullOrNotNull) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for IncludeNullOrNotNull. It customizes the JSON marshaling process for IncludeNullOrNotNull objects.

func (*IncludeNullOrNotNull) UnmarshalJSON added in v0.2.0

func (e *IncludeNullOrNotNull) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for IncludeNullOrNotNull. It customizes the JSON unmarshaling process for IncludeNullOrNotNull objects.

type IncludeOption

type IncludeOption string

IncludeOption is a string enum.

const (
	IncludeOption_EXCLUDE IncludeOption = "0"
	IncludeOption_INCLUDE IncludeOption = "1"
)

func (IncludeOption) MarshalJSON added in v0.2.0

func (e IncludeOption) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for IncludeOption. It customizes the JSON marshaling process for IncludeOption objects.

func (*IncludeOption) UnmarshalJSON added in v0.2.0

func (e *IncludeOption) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for IncludeOption. It customizes the JSON unmarshaling process for IncludeOption objects.

type IntervalUnit

type IntervalUnit string

IntervalUnit is a string enum.

const (
	IntervalUnit_DAY   IntervalUnit = "day"
	IntervalUnit_MONTH IntervalUnit = "month"
)

func (IntervalUnit) MarshalJSON added in v0.2.0

func (e IntervalUnit) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for IntervalUnit. It customizes the JSON marshaling process for IntervalUnit objects.

func (*IntervalUnit) UnmarshalJSON added in v0.2.0

func (e *IntervalUnit) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for IntervalUnit. It customizes the JSON unmarshaling process for IntervalUnit objects.

type Invoice

type Invoice struct {
	Id *int64 `json:"id,omitempty"`
	// Unique identifier for the invoice. It is generated automatically by Chargify and has the prefix "inv_" followed by alphanumeric characters.
	Uid *string `json:"uid,omitempty"`
	// ID of the site to which the invoice belongs.
	SiteId *int `json:"site_id,omitempty"`
	// ID of the customer to which the invoice belongs.
	CustomerId *int `json:"customer_id,omitempty"`
	// ID of the subscription that generated the invoice.
	SubscriptionId *int `json:"subscription_id,omitempty"`
	// A unique, identifying string that appears on the invoice and in places the invoice is referenced.
	// While the UID is long and not appropriate to show to customers, the number is usually shorter and consumable by the customer and the merchant alike.
	Number *string `json:"number,omitempty"`
	// A monotonically increasing number assigned to invoices as they are created.  This number is unique within a site and can be used to sort and order invoices.
	SequenceNumber  *int       `json:"sequence_number,omitempty"`
	TransactionTime *time.Time `json:"transaction_time,omitempty"`
	CreatedAt       *time.Time `json:"created_at,omitempty"`
	UpdatedAt       *time.Time `json:"updated_at,omitempty"`
	// Date the invoice was issued to the customer.  This is the date that the invoice was made available for payment.
	// The format is `"YYYY-MM-DD"`.
	IssueDate *time.Time `json:"issue_date,omitempty"`
	// Date the invoice is due.
	// The format is `"YYYY-MM-DD"`.
	DueDate *time.Time `json:"due_date,omitempty"`
	// Date the invoice became fully paid.
	// If partial payments are applied to the invoice, this date will not be present until payment has been made in full.
	// The format is `"YYYY-MM-DD"`.
	PaidDate Optional[time.Time] `json:"paid_date"`
	// The current status of the invoice. See [Invoice Statuses](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405078794253-Introduction-to-Invoices#invoice-statuses) for more.
	Status          *InvoiceStatus `json:"status,omitempty"`
	Role            *InvoiceRole   `json:"role,omitempty"`
	ParentInvoiceId Optional[int]  `json:"parent_invoice_id"`
	// The type of payment collection to be used in the subscription. For legacy Statements Architecture valid options are - `invoice`, `automatic`. For current Relationship Invoicing Architecture valid options are - `remittance`, `automatic`, `prepaid`.
	CollectionMethod *CollectionMethod `json:"collection_method,omitempty"`
	// A message that is printed on the invoice when it is marked for remittance collection. It is intended to describe to the customer how they may make payment, and is configured by the merchant.
	PaymentInstructions *string `json:"payment_instructions,omitempty"`
	// The ISO 4217 currency code (3 character string) representing the currency of invoice transaction.
	Currency *string `json:"currency,omitempty"`
	// Consolidation level of the invoice, which is applicable to invoice consolidation.  It will hold one of the following values:
	// * "none": A normal invoice with no consolidation.
	// * "child": An invoice segment which has been combined into a consolidated invoice.
	// * "parent": A consolidated invoice, whose contents are composed of invoice segments.
	// "Parent" invoices do not have lines of their own, but they have subtotals and totals which aggregate the member invoice segments.
	// See also the [invoice consolidation documentation](https://chargify.zendesk.com/hc/en-us/articles/4407746391835).
	ConsolidationLevel *InvoiceConsolidationLevel `json:"consolidation_level,omitempty"`
	// For invoices with `consolidation_level` of `child`, this specifies the UID of the parent (consolidated) invoice.
	ParentInvoiceUid    Optional[string] `json:"parent_invoice_uid"`
	SubscriptionGroupId Optional[int]    `json:"subscription_group_id"`
	// For invoices with `consolidation_level` of `child`, this specifies the number of the parent (consolidated) invoice.
	ParentInvoiceNumber Optional[int] `json:"parent_invoice_number"`
	// For invoices with `consolidation_level` of `parent`, this specifies the ID of the subscription which was the primary subscription of the subscription group that generated the invoice.
	GroupPrimarySubscriptionId Optional[int] `json:"group_primary_subscription_id"`
	// The name of the product subscribed when the invoice was generated.
	ProductName *string `json:"product_name,omitempty"`
	// The name of the product family subscribed when the invoice was generated.
	ProductFamilyName *string `json:"product_family_name,omitempty"`
	// Information about the seller (merchant) listed on the masthead of the invoice.
	Seller *InvoiceSeller `json:"seller,omitempty"`
	// Information about the customer who is owner or recipient the invoiced subscription.
	Customer        *InvoiceCustomer `json:"customer,omitempty"`
	Payer           *InvoicePayer    `json:"payer,omitempty"`
	RecipientEmails []string         `json:"recipient_emails,omitempty"`
	NetTerms        *int             `json:"net_terms,omitempty"`
	// The memo printed on invoices of any collection type.  This message is in control of the merchant.
	Memo *string `json:"memo,omitempty"`
	// The invoice billing address.
	BillingAddress *InvoiceAddress `json:"billing_address,omitempty"`
	// The invoice shipping address.
	ShippingAddress *InvoiceAddress `json:"shipping_address,omitempty"`
	// Subtotal of the invoice, which is the sum of all line items before discounts or taxes.
	SubtotalAmount *string `json:"subtotal_amount,omitempty"`
	// Total discount applied to the invoice.
	DiscountAmount *string `json:"discount_amount,omitempty"`
	// Total tax on the invoice.
	TaxAmount *string `json:"tax_amount,omitempty"`
	// The invoice total, which is `subtotal_amount - discount_amount + tax_amount`.'
	TotalAmount *string `json:"total_amount,omitempty"`
	// The amount of credit (from credit notes) applied to this invoice.
	// Credits offset the amount due from the customer.
	CreditAmount *string `json:"credit_amount,omitempty"`
	RefundAmount *string `json:"refund_amount,omitempty"`
	// The amount paid on the invoice by the customer.
	PaidAmount *string `json:"paid_amount,omitempty"`
	// Amount due on the invoice, which is `total_amount - credit_amount - paid_amount`.
	DueAmount *string `json:"due_amount,omitempty"`
	// Line items on the invoice.
	LineItems       []InvoiceLineItem       `json:"line_items,omitempty"`
	Discounts       []InvoiceDiscount       `json:"discounts,omitempty"`
	Taxes           []InvoiceTax            `json:"taxes,omitempty"`
	Credits         []InvoiceCredit         `json:"credits,omitempty"`
	Refunds         []InvoiceRefund         `json:"refunds,omitempty"`
	Payments        []InvoicePayment        `json:"payments,omitempty"`
	CustomFields    []InvoiceCustomField    `json:"custom_fields,omitempty"`
	DisplaySettings *InvoiceDisplaySettings `json:"display_settings,omitempty"`
	// The public URL of the invoice
	PublicUrl            *string                 `json:"public_url,omitempty"`
	PreviousBalanceData  *InvoicePreviousBalance `json:"previous_balance_data,omitempty"`
	AdditionalProperties map[string]any          `json:"_"`
}

Invoice represents a Invoice struct.

func (Invoice) MarshalJSON

func (i Invoice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Invoice. It customizes the JSON marshaling process for Invoice objects.

func (*Invoice) UnmarshalJSON

func (i *Invoice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Invoice. It customizes the JSON unmarshaling process for Invoice objects.

type InvoiceAddress

type InvoiceAddress struct {
	Street               Optional[string] `json:"street"`
	Line2                Optional[string] `json:"line2"`
	City                 Optional[string] `json:"city"`
	State                Optional[string] `json:"state"`
	Zip                  Optional[string] `json:"zip"`
	Country              Optional[string] `json:"country"`
	AdditionalProperties map[string]any   `json:"_"`
}

InvoiceAddress represents a InvoiceAddress struct.

func (InvoiceAddress) MarshalJSON

func (i InvoiceAddress) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceAddress. It customizes the JSON marshaling process for InvoiceAddress objects.

func (*InvoiceAddress) UnmarshalJSON

func (i *InvoiceAddress) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceAddress. It customizes the JSON unmarshaling process for InvoiceAddress objects.

type InvoiceBalanceItem

type InvoiceBalanceItem struct {
	Uid                  *string        `json:"uid,omitempty"`
	Number               *string        `json:"number,omitempty"`
	OutstandingAmount    *string        `json:"outstanding_amount,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

InvoiceBalanceItem represents a InvoiceBalanceItem struct.

func (InvoiceBalanceItem) MarshalJSON

func (i InvoiceBalanceItem) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceBalanceItem. It customizes the JSON marshaling process for InvoiceBalanceItem objects.

func (*InvoiceBalanceItem) UnmarshalJSON

func (i *InvoiceBalanceItem) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceBalanceItem. It customizes the JSON unmarshaling process for InvoiceBalanceItem objects.

type InvoiceConsolidationLevel

type InvoiceConsolidationLevel string

InvoiceConsolidationLevel is a string enum. Consolidation level of the invoice, which is applicable to invoice consolidation. It will hold one of the following values: * "none": A normal invoice with no consolidation. * "child": An invoice segment which has been combined into a consolidated invoice. * "parent": A consolidated invoice, whose contents are composed of invoice segments. "Parent" invoices do not have lines of their own, but they have subtotals and totals which aggregate the member invoice segments. See also the [invoice consolidation documentation](https://chargify.zendesk.com/hc/en-us/articles/4407746391835).

const (
	InvoiceConsolidationLevel_NONE   InvoiceConsolidationLevel = "none"
	InvoiceConsolidationLevel_CHILD  InvoiceConsolidationLevel = "child"
	InvoiceConsolidationLevel_PARENT InvoiceConsolidationLevel = "parent"
)

func (InvoiceConsolidationLevel) MarshalJSON added in v0.2.0

func (e InvoiceConsolidationLevel) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceConsolidationLevel. It customizes the JSON marshaling process for InvoiceConsolidationLevel objects.

func (*InvoiceConsolidationLevel) UnmarshalJSON added in v0.2.0

func (e *InvoiceConsolidationLevel) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceConsolidationLevel. It customizes the JSON unmarshaling process for InvoiceConsolidationLevel objects.

type InvoiceCredit

type InvoiceCredit struct {
	Uid                  *string        `json:"uid,omitempty"`
	CreditNoteNumber     *string        `json:"credit_note_number,omitempty"`
	CreditNoteUid        *string        `json:"credit_note_uid,omitempty"`
	TransactionTime      *time.Time     `json:"transaction_time,omitempty"`
	Memo                 *string        `json:"memo,omitempty"`
	OriginalAmount       *string        `json:"original_amount,omitempty"`
	AppliedAmount        *string        `json:"applied_amount,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

InvoiceCredit represents a InvoiceCredit struct.

func (InvoiceCredit) MarshalJSON

func (i InvoiceCredit) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceCredit. It customizes the JSON marshaling process for InvoiceCredit objects.

func (*InvoiceCredit) UnmarshalJSON

func (i *InvoiceCredit) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceCredit. It customizes the JSON unmarshaling process for InvoiceCredit objects.

type InvoiceCustomField

type InvoiceCustomField struct {
	OwnerId              *int              `json:"owner_id,omitempty"`
	OwnerType            *CustomFieldOwner `json:"owner_type,omitempty"`
	Name                 *string           `json:"name,omitempty"`
	Value                *string           `json:"value,omitempty"`
	MetadatumId          *int              `json:"metadatum_id,omitempty"`
	AdditionalProperties map[string]any    `json:"_"`
}

InvoiceCustomField represents a InvoiceCustomField struct.

func (InvoiceCustomField) MarshalJSON

func (i InvoiceCustomField) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceCustomField. It customizes the JSON marshaling process for InvoiceCustomField objects.

func (*InvoiceCustomField) UnmarshalJSON

func (i *InvoiceCustomField) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceCustomField. It customizes the JSON unmarshaling process for InvoiceCustomField objects.

type InvoiceCustomer

type InvoiceCustomer struct {
	ChargifyId           Optional[int]    `json:"chargify_id"`
	FirstName            *string          `json:"first_name,omitempty"`
	LastName             *string          `json:"last_name,omitempty"`
	Organization         Optional[string] `json:"organization"`
	Email                *string          `json:"email,omitempty"`
	VatNumber            Optional[string] `json:"vat_number"`
	Reference            Optional[string] `json:"reference"`
	AdditionalProperties map[string]any   `json:"_"`
}

InvoiceCustomer represents a InvoiceCustomer struct. Information about the customer who is owner or recipient the invoiced subscription.

func (InvoiceCustomer) MarshalJSON

func (i InvoiceCustomer) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceCustomer. It customizes the JSON marshaling process for InvoiceCustomer objects.

func (*InvoiceCustomer) UnmarshalJSON

func (i *InvoiceCustomer) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceCustomer. It customizes the JSON unmarshaling process for InvoiceCustomer objects.

type InvoiceDateField

type InvoiceDateField string

InvoiceDateField is a string enum.

const (
	InvoiceDateField_CREATEDAT InvoiceDateField = "created_at"
	InvoiceDateField_DUEDATE   InvoiceDateField = "due_date"
	InvoiceDateField_ISSUEDATE InvoiceDateField = "issue_date"
	InvoiceDateField_UPDATEDAT InvoiceDateField = "updated_at"
	InvoiceDateField_PAIDDATE  InvoiceDateField = "paid_date"
)

func (InvoiceDateField) MarshalJSON added in v0.2.0

func (e InvoiceDateField) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceDateField. It customizes the JSON marshaling process for InvoiceDateField objects.

func (*InvoiceDateField) UnmarshalJSON added in v0.2.0

func (e *InvoiceDateField) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceDateField. It customizes the JSON unmarshaling process for InvoiceDateField objects.

type InvoiceDiscount

type InvoiceDiscount struct {
	Uid                  *string                    `json:"uid,omitempty"`
	Title                *string                    `json:"title,omitempty"`
	Description          Optional[string]           `json:"description"`
	Code                 *string                    `json:"code,omitempty"`
	SourceType           *InvoiceDiscountSourceType `json:"source_type,omitempty"`
	SourceId             *int                       `json:"source_id,omitempty"`
	DiscountType         *InvoiceDiscountType       `json:"discount_type,omitempty"`
	Percentage           *string                    `json:"percentage,omitempty"`
	EligibleAmount       *string                    `json:"eligible_amount,omitempty"`
	DiscountAmount       *string                    `json:"discount_amount,omitempty"`
	TransactionId        *int                       `json:"transaction_id,omitempty"`
	LineItemBreakouts    []InvoiceDiscountBreakout  `json:"line_item_breakouts,omitempty"`
	AdditionalProperties map[string]any             `json:"_"`
}

InvoiceDiscount represents a InvoiceDiscount struct.

func (InvoiceDiscount) MarshalJSON

func (i InvoiceDiscount) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceDiscount. It customizes the JSON marshaling process for InvoiceDiscount objects.

func (*InvoiceDiscount) UnmarshalJSON

func (i *InvoiceDiscount) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceDiscount. It customizes the JSON unmarshaling process for InvoiceDiscount objects.

type InvoiceDiscountBreakout

type InvoiceDiscountBreakout struct {
	Uid                  *string        `json:"uid,omitempty"`
	EligibleAmount       *string        `json:"eligible_amount,omitempty"`
	DiscountAmount       *string        `json:"discount_amount,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

InvoiceDiscountBreakout represents a InvoiceDiscountBreakout struct.

func (InvoiceDiscountBreakout) MarshalJSON

func (i InvoiceDiscountBreakout) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceDiscountBreakout. It customizes the JSON marshaling process for InvoiceDiscountBreakout objects.

func (*InvoiceDiscountBreakout) UnmarshalJSON

func (i *InvoiceDiscountBreakout) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceDiscountBreakout. It customizes the JSON unmarshaling process for InvoiceDiscountBreakout objects.

type InvoiceDiscountSourceType added in v0.1.0

type InvoiceDiscountSourceType string

InvoiceDiscountSourceType is a string enum.

const (
	InvoiceDiscountSourceType_COUPON          InvoiceDiscountSourceType = "Coupon"
	InvoiceDiscountSourceType_REFERRAL        InvoiceDiscountSourceType = "Referral"
	InvoiceDiscountSourceType_ENUMADHOCCOUPON InvoiceDiscountSourceType = "Ad Hoc Coupon"
)

func (InvoiceDiscountSourceType) MarshalJSON added in v0.2.0

func (e InvoiceDiscountSourceType) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceDiscountSourceType. It customizes the JSON marshaling process for InvoiceDiscountSourceType objects.

func (*InvoiceDiscountSourceType) UnmarshalJSON added in v0.2.0

func (e *InvoiceDiscountSourceType) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceDiscountSourceType. It customizes the JSON unmarshaling process for InvoiceDiscountSourceType objects.

type InvoiceDiscountType added in v0.1.0

type InvoiceDiscountType string

InvoiceDiscountType is a string enum.

const (
	InvoiceDiscountType_PERCENTAGE InvoiceDiscountType = "percentage"
	InvoiceDiscountType_FLATAMOUNT InvoiceDiscountType = "flat_amount"
	InvoiceDiscountType_ROLLOVER   InvoiceDiscountType = "rollover"
)

func (InvoiceDiscountType) MarshalJSON added in v0.2.0

func (e InvoiceDiscountType) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceDiscountType. It customizes the JSON marshaling process for InvoiceDiscountType objects.

func (*InvoiceDiscountType) UnmarshalJSON added in v0.2.0

func (e *InvoiceDiscountType) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceDiscountType. It customizes the JSON unmarshaling process for InvoiceDiscountType objects.

type InvoiceDisplaySettings

type InvoiceDisplaySettings struct {
	HideZeroSubtotalLines   *bool          `json:"hide_zero_subtotal_lines,omitempty"`
	IncludeDiscountsOnLines *bool          `json:"include_discounts_on_lines,omitempty"`
	AdditionalProperties    map[string]any `json:"_"`
}

InvoiceDisplaySettings represents a InvoiceDisplaySettings struct.

func (InvoiceDisplaySettings) MarshalJSON

func (i InvoiceDisplaySettings) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceDisplaySettings. It customizes the JSON marshaling process for InvoiceDisplaySettings objects.

func (*InvoiceDisplaySettings) UnmarshalJSON

func (i *InvoiceDisplaySettings) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceDisplaySettings. It customizes the JSON unmarshaling process for InvoiceDisplaySettings objects.

type InvoiceEvent

type InvoiceEvent struct {
	// contains filtered or unexported fields
}

InvoiceEvent represents a InvoiceEvent struct.

func (*InvoiceEvent) AsApplyCreditNoteEvent added in v0.2.0

func (i *InvoiceEvent) AsApplyCreditNoteEvent() (
	*ApplyCreditNoteEvent,
	bool)

func (*InvoiceEvent) AsApplyDebitNoteEvent added in v0.2.0

func (i *InvoiceEvent) AsApplyDebitNoteEvent() (
	*ApplyDebitNoteEvent,
	bool)

func (*InvoiceEvent) AsApplyPaymentEvent added in v0.2.0

func (i *InvoiceEvent) AsApplyPaymentEvent() (
	*ApplyPaymentEvent,
	bool)

func (*InvoiceEvent) AsBackportInvoiceEvent added in v0.2.0

func (i *InvoiceEvent) AsBackportInvoiceEvent() (
	*BackportInvoiceEvent,
	bool)

func (*InvoiceEvent) AsChangeChargebackStatusEvent added in v0.2.0

func (i *InvoiceEvent) AsChangeChargebackStatusEvent() (
	*ChangeChargebackStatusEvent,
	bool)

func (*InvoiceEvent) AsChangeInvoiceCollectionMethodEvent added in v0.2.0

func (i *InvoiceEvent) AsChangeInvoiceCollectionMethodEvent() (
	*ChangeInvoiceCollectionMethodEvent,
	bool)

func (*InvoiceEvent) AsChangeInvoiceStatusEvent added in v0.2.0

func (i *InvoiceEvent) AsChangeInvoiceStatusEvent() (
	*ChangeInvoiceStatusEvent,
	bool)

func (*InvoiceEvent) AsCreateCreditNoteEvent added in v0.2.0

func (i *InvoiceEvent) AsCreateCreditNoteEvent() (
	*CreateCreditNoteEvent,
	bool)

func (*InvoiceEvent) AsCreateDebitNoteEvent added in v0.2.0

func (i *InvoiceEvent) AsCreateDebitNoteEvent() (
	*CreateDebitNoteEvent,
	bool)

func (*InvoiceEvent) AsFailedPaymentEvent added in v0.2.0

func (i *InvoiceEvent) AsFailedPaymentEvent() (
	*FailedPaymentEvent,
	bool)

func (*InvoiceEvent) AsIssueInvoiceEvent added in v0.2.0

func (i *InvoiceEvent) AsIssueInvoiceEvent() (
	*IssueInvoiceEvent,
	bool)

func (*InvoiceEvent) AsRefundInvoiceEvent added in v0.2.0

func (i *InvoiceEvent) AsRefundInvoiceEvent() (
	*RefundInvoiceEvent,
	bool)

func (*InvoiceEvent) AsRemovePaymentEvent added in v0.2.0

func (i *InvoiceEvent) AsRemovePaymentEvent() (
	*RemovePaymentEvent,
	bool)

func (*InvoiceEvent) AsVoidInvoiceEvent added in v0.2.0

func (i *InvoiceEvent) AsVoidInvoiceEvent() (
	*VoidInvoiceEvent,
	bool)

func (*InvoiceEvent) AsVoidRemainderEvent added in v0.2.0

func (i *InvoiceEvent) AsVoidRemainderEvent() (
	*VoidRemainderEvent,
	bool)

func (InvoiceEvent) MarshalJSON

func (i InvoiceEvent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceEvent. It customizes the JSON marshaling process for InvoiceEvent objects.

func (InvoiceEvent) String added in v0.2.0

func (i InvoiceEvent) String() string

String converts the InvoiceEvent object to a string representation.

func (*InvoiceEvent) UnmarshalJSON

func (i *InvoiceEvent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceEvent. It customizes the JSON unmarshaling process for InvoiceEvent objects.

type InvoiceEventPayment added in v0.1.0

type InvoiceEventPayment struct {
	// contains filtered or unexported fields
}

InvoiceEventPayment represents a InvoiceEventPayment struct. A nested data structure detailing the method of payment

func (*InvoiceEventPayment) AsPaymentMethodApplePay added in v0.2.0

func (i *InvoiceEventPayment) AsPaymentMethodApplePay() (
	*PaymentMethodApplePay,
	bool)

func (*InvoiceEventPayment) AsPaymentMethodBankAccount added in v0.2.0

func (i *InvoiceEventPayment) AsPaymentMethodBankAccount() (
	*PaymentMethodBankAccount,
	bool)

func (*InvoiceEventPayment) AsPaymentMethodCreditCard added in v0.2.0

func (i *InvoiceEventPayment) AsPaymentMethodCreditCard() (
	*PaymentMethodCreditCard,
	bool)

func (*InvoiceEventPayment) AsPaymentMethodExternal added in v0.2.0

func (i *InvoiceEventPayment) AsPaymentMethodExternal() (
	*PaymentMethodExternal,
	bool)

func (*InvoiceEventPayment) AsPaymentMethodPaypal added in v0.2.0

func (i *InvoiceEventPayment) AsPaymentMethodPaypal() (
	*PaymentMethodPaypal,
	bool)

func (InvoiceEventPayment) MarshalJSON added in v0.1.0

func (i InvoiceEventPayment) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceEventPayment. It customizes the JSON marshaling process for InvoiceEventPayment objects.

func (InvoiceEventPayment) String added in v0.2.0

func (i InvoiceEventPayment) String() string

String converts the InvoiceEventPayment object to a string representation.

func (*InvoiceEventPayment) UnmarshalJSON added in v0.1.0

func (i *InvoiceEventPayment) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceEventPayment. It customizes the JSON unmarshaling process for InvoiceEventPayment objects.

type InvoiceEventPaymentMethod added in v0.1.0

type InvoiceEventPaymentMethod string

InvoiceEventPaymentMethod is a string enum.

const (
	InvoiceEventPaymentMethod_APPLEPAY      InvoiceEventPaymentMethod = "apple_pay"
	InvoiceEventPaymentMethod_BANKACCOUNT   InvoiceEventPaymentMethod = "bank_account"
	InvoiceEventPaymentMethod_CREDITCARD    InvoiceEventPaymentMethod = "credit_card"
	InvoiceEventPaymentMethod_EXTERNAL      InvoiceEventPaymentMethod = "external"
	InvoiceEventPaymentMethod_PAYPALACCOUNT InvoiceEventPaymentMethod = "paypal_account"
)

func (InvoiceEventPaymentMethod) MarshalJSON added in v0.2.0

func (e InvoiceEventPaymentMethod) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceEventPaymentMethod. It customizes the JSON marshaling process for InvoiceEventPaymentMethod objects.

func (*InvoiceEventPaymentMethod) UnmarshalJSON added in v0.2.0

func (e *InvoiceEventPaymentMethod) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceEventPaymentMethod. It customizes the JSON unmarshaling process for InvoiceEventPaymentMethod objects.

type InvoiceEventType

type InvoiceEventType string

InvoiceEventType is a string enum. Invoice Event Type

const (
	InvoiceEventType_ISSUEINVOICE                  InvoiceEventType = "issue_invoice"
	InvoiceEventType_APPLYCREDITNOTE               InvoiceEventType = "apply_credit_note"
	InvoiceEventType_CREATECREDITNOTE              InvoiceEventType = "create_credit_note"
	InvoiceEventType_APPLYPAYMENT                  InvoiceEventType = "apply_payment"
	InvoiceEventType_APPLYDEBITNOTE                InvoiceEventType = "apply_debit_note"
	InvoiceEventType_CREATEDEBITNOTE               InvoiceEventType = "create_debit_note"
	InvoiceEventType_REFUNDINVOICE                 InvoiceEventType = "refund_invoice"
	InvoiceEventType_VOIDINVOICE                   InvoiceEventType = "void_invoice"
	InvoiceEventType_VOIDREMAINDER                 InvoiceEventType = "void_remainder"
	InvoiceEventType_BACKPORTINVOICE               InvoiceEventType = "backport_invoice"
	InvoiceEventType_CHANGEINVOICESTATUS           InvoiceEventType = "change_invoice_status"
	InvoiceEventType_CHANGEINVOICECOLLECTIONMETHOD InvoiceEventType = "change_invoice_collection_method"
	InvoiceEventType_REMOVEPAYMENT                 InvoiceEventType = "remove_payment"
	InvoiceEventType_FAILEDPAYMENT                 InvoiceEventType = "failed_payment"
	InvoiceEventType_CHANGECHARGEBACKSTATUS        InvoiceEventType = "change_chargeback_status"
)

func (InvoiceEventType) MarshalJSON added in v0.2.0

func (e InvoiceEventType) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceEventType. It customizes the JSON marshaling process for InvoiceEventType objects.

func (*InvoiceEventType) UnmarshalJSON added in v0.2.0

func (e *InvoiceEventType) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceEventType. It customizes the JSON unmarshaling process for InvoiceEventType objects.

type InvoiceIssued added in v0.1.0

type InvoiceIssued struct {
	Uid     string     `json:"uid"`
	Number  string     `json:"number"`
	Role    string     `json:"role"`
	DueDate *time.Time `json:"due_date"`
	// Invoice issue date. Can be an empty string if value is missing.
	IssueDate string `json:"issue_date"`
	// Paid date. Can be an empty string if value is missing.
	PaidDate             string                     `json:"paid_date"`
	DueAmount            string                     `json:"due_amount"`
	PaidAmount           string                     `json:"paid_amount"`
	TaxAmount            string                     `json:"tax_amount"`
	RefundAmount         string                     `json:"refund_amount"`
	TotalAmount          string                     `json:"total_amount"`
	StatusAmount         string                     `json:"status_amount"`
	ProductName          string                     `json:"product_name"`
	ConsolidationLevel   string                     `json:"consolidation_level"`
	LineItems            []InvoiceLineItemEventData `json:"line_items"`
	AdditionalProperties map[string]any             `json:"_"`
}

InvoiceIssued represents a InvoiceIssued struct.

func (InvoiceIssued) MarshalJSON added in v0.1.0

func (i InvoiceIssued) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceIssued. It customizes the JSON marshaling process for InvoiceIssued objects.

func (*InvoiceIssued) UnmarshalJSON added in v0.1.0

func (i *InvoiceIssued) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceIssued. It customizes the JSON unmarshaling process for InvoiceIssued objects.

type InvoiceLineItem

type InvoiceLineItem struct {
	// Unique identifier for the line item.  Useful when cross-referencing the line against individual discounts in the `discounts` or `taxes` lists.
	Uid *string `json:"uid,omitempty"`
	// A short descriptor for the charge or item represented by this line.
	Title *string `json:"title,omitempty"`
	// Detailed description for the charge or item represented by this line.  May include proration details in plain text.
	// Note: this string may contain line breaks that are hints for the best display format on the invoice.
	Description *string `json:"description,omitempty"`
	// The quantity or count of units billed by the line item.
	// This is a decimal number represented as a string. (See "About Decimal Numbers".)
	Quantity *string `json:"quantity,omitempty"`
	// The price per unit for the line item.
	// When tiered pricing was used (i.e. not every unit was actually priced at the same price) this will be the blended average cost per unit and the `tiered_unit_price` field will be set to `true`.
	UnitPrice *string `json:"unit_price,omitempty"`
	// The line subtotal, generally calculated as `quantity * unit_price`. This is the canonical amount of record for the line - when rounding differences are in play, `subtotal_amount` takes precedence over the value derived from `quantity * unit_price` (which may not have the proper precision to exactly equal this amount).
	SubtotalAmount *string `json:"subtotal_amount,omitempty"`
	// The approximate discount applied to just this line.
	// The value is approximated in cases where rounding errors make it difficult to apportion exactly a total discount among many lines. Several lines may have been summed prior to applying the discount to arrive at `discount_amount` for the invoice - backing that out to the discount on a single line may introduce rounding or precision errors.
	DiscountAmount *string `json:"discount_amount,omitempty"`
	// The approximate tax applied to just this line.
	// The value is approximated in cases where rounding errors make it difficult to apportion exactly a total tax among many lines. Several lines may have been summed prior to applying the tax rate to arrive at `tax_amount` for the invoice - backing that out to the tax on a single line may introduce rounding or precision errors.
	TaxAmount *string `json:"tax_amount,omitempty"`
	// The non-canonical total amount for the line.
	// `subtotal_amount` is the canonical amount for a line. The invoice `total_amount` is derived from the sum of the line `subtotal_amount`s and discounts or taxes applied thereafter.  Therefore, due to rounding or precision errors, the sum of line `total_amount`s may not equal the invoice `total_amount`.
	TotalAmount *string `json:"total_amount,omitempty"`
	// When `true`, indicates that the actual pricing scheme for the line was tiered, so the `unit_price` shown is the blended average for all units.
	TieredUnitPrice *bool `json:"tiered_unit_price,omitempty"`
	// Start date for the period covered by this line. The format is `"YYYY-MM-DD"`.
	// * For periodic charges paid in advance, this date will match the billing date, and the end date will be in the future.
	// * For periodic charges paid in arrears (e.g. metered charges), this date will be the date of the previous billing, and the end date will be the current billing date.
	// * For non-periodic charges, this date and the end date will match.
	PeriodRangeStart *time.Time `json:"period_range_start,omitempty"`
	// End date for the period covered by this line. The format is `"YYYY-MM-DD"`.
	// * For periodic charges paid in advance, this date will match the next (future) billing date.
	// * For periodic charges paid in arrears (e.g. metered charges), this date will be the date of the current billing date.
	// * For non-periodic charges, this date and the start date will match.
	PeriodRangeEnd *time.Time `json:"period_range_end,omitempty"`
	TransactionId  *int       `json:"transaction_id,omitempty"`
	// The ID of the product subscribed when the charge was made.
	// This may be set even for component charges, so true product-only (non-component) charges will also have a nil `component_id`.
	ProductId Optional[int] `json:"product_id"`
	// The version of the product subscribed when the charge was made.
	ProductVersion Optional[int] `json:"product_version"`
	// The ID of the component being billed. Will be `nil` for non-component charges.
	ComponentId Optional[int] `json:"component_id"`
	// The price point ID of the component being billed. Will be `nil` for non-component charges.
	PricePointId      Optional[int]                              `json:"price_point_id"`
	Hide              *bool                                      `json:"hide,omitempty"`
	ComponentCostData Optional[InvoiceLineItemComponentCostData] `json:"component_cost_data"`
	// The price point ID of the line item's product
	ProductPricePointId  Optional[int]  `json:"product_price_point_id"`
	CustomItem           *bool          `json:"custom_item,omitempty"`
	Kind                 *string        `json:"kind,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

InvoiceLineItem represents a InvoiceLineItem struct.

func (InvoiceLineItem) MarshalJSON

func (i InvoiceLineItem) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceLineItem. It customizes the JSON marshaling process for InvoiceLineItem objects.

func (*InvoiceLineItem) UnmarshalJSON

func (i *InvoiceLineItem) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceLineItem. It customizes the JSON unmarshaling process for InvoiceLineItem objects.

type InvoiceLineItemComponentCostData

type InvoiceLineItemComponentCostData struct {
	Rates                []ComponentCostData `json:"rates,omitempty"`
	AdditionalProperties map[string]any      `json:"_"`
}

InvoiceLineItemComponentCostData represents a InvoiceLineItemComponentCostData struct.

func (InvoiceLineItemComponentCostData) MarshalJSON

func (i InvoiceLineItemComponentCostData) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceLineItemComponentCostData. It customizes the JSON marshaling process for InvoiceLineItemComponentCostData objects.

func (*InvoiceLineItemComponentCostData) UnmarshalJSON

func (i *InvoiceLineItemComponentCostData) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceLineItemComponentCostData. It customizes the JSON unmarshaling process for InvoiceLineItemComponentCostData objects.

type InvoiceLineItemEventData added in v0.1.0

type InvoiceLineItemEventData struct {
	Uid                   *string                        `json:"uid,omitempty"`
	Title                 *string                        `json:"title,omitempty"`
	Description           *string                        `json:"description,omitempty"`
	Quantity              *int                           `json:"quantity,omitempty"`
	QuantityDelta         Optional[int]                  `json:"quantity_delta"`
	UnitPrice             *string                        `json:"unit_price,omitempty"`
	PeriodRangeStart      *string                        `json:"period_range_start,omitempty"`
	PeriodRangeEnd        *string                        `json:"period_range_end,omitempty"`
	Amount                *string                        `json:"amount,omitempty"`
	LineReferences        *string                        `json:"line_references,omitempty"`
	PricingDetailsIndex   Optional[int]                  `json:"pricing_details_index"`
	PricingDetails        []InvoiceLineItemPricingDetail `json:"pricing_details,omitempty"`
	TaxCode               Optional[string]               `json:"tax_code"`
	TaxAmount             *string                        `json:"tax_amount,omitempty"`
	ProductId             *int                           `json:"product_id,omitempty"`
	ProductPricePointId   Optional[int]                  `json:"product_price_point_id"`
	PricePointId          Optional[int]                  `json:"price_point_id"`
	ComponentId           Optional[int]                  `json:"component_id"`
	BillingScheduleItemId Optional[int]                  `json:"billing_schedule_item_id"`
	CustomItem            Optional[bool]                 `json:"custom_item"`
	AdditionalProperties  map[string]any                 `json:"_"`
}

InvoiceLineItemEventData represents a InvoiceLineItemEventData struct.

func (InvoiceLineItemEventData) MarshalJSON added in v0.1.0

func (i InvoiceLineItemEventData) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceLineItemEventData. It customizes the JSON marshaling process for InvoiceLineItemEventData objects.

func (*InvoiceLineItemEventData) UnmarshalJSON added in v0.1.0

func (i *InvoiceLineItemEventData) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceLineItemEventData. It customizes the JSON unmarshaling process for InvoiceLineItemEventData objects.

type InvoiceLineItemPricingDetail added in v0.1.0

type InvoiceLineItemPricingDetail struct {
	Label                *string        `json:"label,omitempty"`
	Amount               *string        `json:"amount,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

InvoiceLineItemPricingDetail represents a InvoiceLineItemPricingDetail struct.

func (InvoiceLineItemPricingDetail) MarshalJSON added in v0.1.0

func (i InvoiceLineItemPricingDetail) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceLineItemPricingDetail. It customizes the JSON marshaling process for InvoiceLineItemPricingDetail objects.

func (*InvoiceLineItemPricingDetail) UnmarshalJSON added in v0.1.0

func (i *InvoiceLineItemPricingDetail) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceLineItemPricingDetail. It customizes the JSON unmarshaling process for InvoiceLineItemPricingDetail objects.

type InvoicePayer

type InvoicePayer struct {
	ChargifyId           *int             `json:"chargify_id,omitempty"`
	FirstName            *string          `json:"first_name,omitempty"`
	LastName             *string          `json:"last_name,omitempty"`
	Organization         Optional[string] `json:"organization"`
	Email                *string          `json:"email,omitempty"`
	VatNumber            Optional[string] `json:"vat_number"`
	AdditionalProperties map[string]any   `json:"_"`
}

InvoicePayer represents a InvoicePayer struct.

func (InvoicePayer) MarshalJSON

func (i InvoicePayer) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoicePayer. It customizes the JSON marshaling process for InvoicePayer objects.

func (*InvoicePayer) UnmarshalJSON

func (i *InvoicePayer) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoicePayer. It customizes the JSON unmarshaling process for InvoicePayer objects.

type InvoicePayerChange added in v0.1.0

type InvoicePayerChange struct {
	FirstName            *string        `json:"first_name,omitempty"`
	LastName             *string        `json:"last_name,omitempty"`
	Organization         *string        `json:"organization,omitempty"`
	Email                *string        `json:"email,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

InvoicePayerChange represents a InvoicePayerChange struct.

func (InvoicePayerChange) MarshalJSON added in v0.1.0

func (i InvoicePayerChange) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoicePayerChange. It customizes the JSON marshaling process for InvoicePayerChange objects.

func (*InvoicePayerChange) UnmarshalJSON added in v0.1.0

func (i *InvoicePayerChange) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoicePayerChange. It customizes the JSON unmarshaling process for InvoicePayerChange objects.

type InvoicePayment

type InvoicePayment struct {
	TransactionTime *time.Time            `json:"transaction_time,omitempty"`
	Memo            *string               `json:"memo,omitempty"`
	OriginalAmount  *string               `json:"original_amount,omitempty"`
	AppliedAmount   *string               `json:"applied_amount,omitempty"`
	PaymentMethod   *InvoicePaymentMethod `json:"payment_method,omitempty"`
	TransactionId   *int                  `json:"transaction_id,omitempty"`
	Prepayment      *bool                 `json:"prepayment,omitempty"`
	GatewayHandle   Optional[string]      `json:"gateway_handle"`
	GatewayUsed     *string               `json:"gateway_used,omitempty"`
	// The transaction ID for the payment as returned from the payment gateway
	GatewayTransactionId Optional[string] `json:"gateway_transaction_id"`
	AdditionalProperties map[string]any   `json:"_"`
}

InvoicePayment represents a InvoicePayment struct.

func (InvoicePayment) MarshalJSON

func (i InvoicePayment) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoicePayment. It customizes the JSON marshaling process for InvoicePayment objects.

func (*InvoicePayment) UnmarshalJSON

func (i *InvoicePayment) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoicePayment. It customizes the JSON unmarshaling process for InvoicePayment objects.

type InvoicePaymentApplication

type InvoicePaymentApplication struct {
	// Unique identifier for the paid invoice. It has the prefix "inv_" followed by alphanumeric characters.
	InvoiceUid *string `json:"invoice_uid,omitempty"`
	// Unique identifier for the payment. It has the prefix "pmt_" followed by alphanumeric characters.
	ApplicationUid *string `json:"application_uid,omitempty"`
	// Dollar amount of the paid invoice.
	AppliedAmount        *string        `json:"applied_amount,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

InvoicePaymentApplication represents a InvoicePaymentApplication struct.

func (InvoicePaymentApplication) MarshalJSON

func (i InvoicePaymentApplication) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoicePaymentApplication. It customizes the JSON marshaling process for InvoicePaymentApplication objects.

func (*InvoicePaymentApplication) UnmarshalJSON

func (i *InvoicePaymentApplication) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoicePaymentApplication. It customizes the JSON unmarshaling process for InvoicePaymentApplication objects.

type InvoicePaymentMethod

type InvoicePaymentMethod struct {
	Details              *string          `json:"details,omitempty"`
	Kind                 *string          `json:"kind,omitempty"`
	Memo                 *string          `json:"memo,omitempty"`
	Type                 *string          `json:"type,omitempty"`
	CardBrand            *string          `json:"card_brand,omitempty"`
	CardExpiration       *string          `json:"card_expiration,omitempty"`
	LastFour             Optional[string] `json:"last_four"`
	MaskedCardNumber     *string          `json:"masked_card_number,omitempty"`
	AdditionalProperties map[string]any   `json:"_"`
}

InvoicePaymentMethod represents a InvoicePaymentMethod struct.

func (InvoicePaymentMethod) MarshalJSON

func (i InvoicePaymentMethod) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoicePaymentMethod. It customizes the JSON marshaling process for InvoicePaymentMethod objects.

func (*InvoicePaymentMethod) UnmarshalJSON

func (i *InvoicePaymentMethod) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoicePaymentMethod. It customizes the JSON unmarshaling process for InvoicePaymentMethod objects.

type InvoicePaymentMethodType

type InvoicePaymentMethodType string

InvoicePaymentMethodType is a string enum. The type of payment method used. Defaults to other.

const (
	InvoicePaymentMethodType_CREDITCARD InvoicePaymentMethodType = "credit_card"
	InvoicePaymentMethodType_CHECK      InvoicePaymentMethodType = "check"
	InvoicePaymentMethodType_CASH       InvoicePaymentMethodType = "cash"
	InvoicePaymentMethodType_MONEYORDER InvoicePaymentMethodType = "money_order"
	InvoicePaymentMethodType_ACH        InvoicePaymentMethodType = "ach"
	InvoicePaymentMethodType_OTHER      InvoicePaymentMethodType = "other"
)

func (InvoicePaymentMethodType) MarshalJSON added in v0.2.0

func (e InvoicePaymentMethodType) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoicePaymentMethodType. It customizes the JSON marshaling process for InvoicePaymentMethodType objects.

func (*InvoicePaymentMethodType) UnmarshalJSON added in v0.2.0

func (e *InvoicePaymentMethodType) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoicePaymentMethodType. It customizes the JSON unmarshaling process for InvoicePaymentMethodType objects.

type InvoicePaymentType

type InvoicePaymentType string

InvoicePaymentType is a string enum. The type of payment to be applied to an Invoice. Defaults to external.

const (
	InvoicePaymentType_EXTERNAL      InvoicePaymentType = "external"
	InvoicePaymentType_PREPAYMENT    InvoicePaymentType = "prepayment"
	InvoicePaymentType_SERVICECREDIT InvoicePaymentType = "service_credit"
	InvoicePaymentType_PAYMENT       InvoicePaymentType = "payment"
)

func (InvoicePaymentType) MarshalJSON added in v0.2.0

func (e InvoicePaymentType) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoicePaymentType. It customizes the JSON marshaling process for InvoicePaymentType objects.

func (*InvoicePaymentType) UnmarshalJSON added in v0.2.0

func (e *InvoicePaymentType) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoicePaymentType. It customizes the JSON unmarshaling process for InvoicePaymentType objects.

type InvoicePrePayment

type InvoicePrePayment struct {
	// The subscription id for the prepayment account
	SubscriptionId *int `json:"subscription_id,omitempty"`
	// The amount in cents of the prepayment that was created as a result of this payment.
	AmountInCents *int64 `json:"amount_in_cents,omitempty"`
	// The total balance of the prepayment account for this subscription including any prior prepayments
	EndingBalanceInCents *int64         `json:"ending_balance_in_cents,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

InvoicePrePayment represents a InvoicePrePayment struct.

func (InvoicePrePayment) MarshalJSON

func (i InvoicePrePayment) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoicePrePayment. It customizes the JSON marshaling process for InvoicePrePayment objects.

func (*InvoicePrePayment) UnmarshalJSON

func (i *InvoicePrePayment) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoicePrePayment. It customizes the JSON unmarshaling process for InvoicePrePayment objects.

type InvoicePreviousBalance

type InvoicePreviousBalance struct {
	CapturedAt           *time.Time           `json:"captured_at,omitempty"`
	Invoices             []InvoiceBalanceItem `json:"invoices,omitempty"`
	AdditionalProperties map[string]any       `json:"_"`
}

InvoicePreviousBalance represents a InvoicePreviousBalance struct.

func (InvoicePreviousBalance) MarshalJSON

func (i InvoicePreviousBalance) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoicePreviousBalance. It customizes the JSON marshaling process for InvoicePreviousBalance objects.

func (*InvoicePreviousBalance) UnmarshalJSON

func (i *InvoicePreviousBalance) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoicePreviousBalance. It customizes the JSON unmarshaling process for InvoicePreviousBalance objects.

type InvoiceRefund

type InvoiceRefund struct {
	TransactionId  *int    `json:"transaction_id,omitempty"`
	PaymentId      *int    `json:"payment_id,omitempty"`
	Memo           *string `json:"memo,omitempty"`
	OriginalAmount *string `json:"original_amount,omitempty"`
	AppliedAmount  *string `json:"applied_amount,omitempty"`
	// The transaction ID for the refund as returned from the payment gateway
	GatewayTransactionId Optional[string] `json:"gateway_transaction_id"`
	GatewayUsed          *string          `json:"gateway_used,omitempty"`
	GatewayHandle        Optional[string] `json:"gateway_handle"`
	AdditionalProperties map[string]any   `json:"_"`
}

InvoiceRefund represents a InvoiceRefund struct.

func (InvoiceRefund) MarshalJSON

func (i InvoiceRefund) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceRefund. It customizes the JSON marshaling process for InvoiceRefund objects.

func (*InvoiceRefund) UnmarshalJSON

func (i *InvoiceRefund) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceRefund. It customizes the JSON unmarshaling process for InvoiceRefund objects.

type InvoiceResponse

type InvoiceResponse struct {
	Invoice              Invoice        `json:"invoice"`
	AdditionalProperties map[string]any `json:"_"`
}

InvoiceResponse represents a InvoiceResponse struct.

func (InvoiceResponse) MarshalJSON

func (i InvoiceResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceResponse. It customizes the JSON marshaling process for InvoiceResponse objects.

func (*InvoiceResponse) UnmarshalJSON

func (i *InvoiceResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceResponse. It customizes the JSON unmarshaling process for InvoiceResponse objects.

type InvoiceRole added in v0.1.0

type InvoiceRole string

InvoiceRole is a string enum.

const (
	InvoiceRole_UNSET                         InvoiceRole = "unset"
	InvoiceRole_SIGNUP                        InvoiceRole = "signup"
	InvoiceRole_RENEWAL                       InvoiceRole = "renewal"
	InvoiceRole_USAGE                         InvoiceRole = "usage"
	InvoiceRole_REACTIVATION                  InvoiceRole = "reactivation"
	InvoiceRole_PRORATION                     InvoiceRole = "proration"
	InvoiceRole_MIGRATION                     InvoiceRole = "migration"
	InvoiceRole_ADHOC                         InvoiceRole = "adhoc"
	InvoiceRole_BACKPORT                      InvoiceRole = "backport"
	InvoiceRole_BACKPORTBALANCERECONCILIATION InvoiceRole = "backport-balance-reconciliation"
)

func (InvoiceRole) MarshalJSON added in v0.2.0

func (e InvoiceRole) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceRole. It customizes the JSON marshaling process for InvoiceRole objects.

func (*InvoiceRole) UnmarshalJSON added in v0.2.0

func (e *InvoiceRole) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceRole. It customizes the JSON unmarshaling process for InvoiceRole objects.

type InvoiceSeller

type InvoiceSeller struct {
	Name                 *string          `json:"name,omitempty"`
	Address              *InvoiceAddress  `json:"address,omitempty"`
	Phone                *string          `json:"phone,omitempty"`
	LogoUrl              Optional[string] `json:"logo_url"`
	AdditionalProperties map[string]any   `json:"_"`
}

InvoiceSeller represents a InvoiceSeller struct. Information about the seller (merchant) listed on the masthead of the invoice.

func (InvoiceSeller) MarshalJSON

func (i InvoiceSeller) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceSeller. It customizes the JSON marshaling process for InvoiceSeller objects.

func (*InvoiceSeller) UnmarshalJSON

func (i *InvoiceSeller) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceSeller. It customizes the JSON unmarshaling process for InvoiceSeller objects.

type InvoiceSortField

type InvoiceSortField string

InvoiceSortField is a string enum.

const (
	InvoiceSortField_STATUS      InvoiceSortField = "status"
	InvoiceSortField_TOTALAMOUNT InvoiceSortField = "total_amount"
	InvoiceSortField_DUEAMOUNT   InvoiceSortField = "due_amount"
	InvoiceSortField_CREATEDAT   InvoiceSortField = "created_at"
	InvoiceSortField_UPDATEDAT   InvoiceSortField = "updated_at"
	InvoiceSortField_ISSUEDATE   InvoiceSortField = "issue_date"
	InvoiceSortField_DUEDATE     InvoiceSortField = "due_date"
	InvoiceSortField_NUMBER      InvoiceSortField = "number"
)

func (InvoiceSortField) MarshalJSON added in v0.2.0

func (e InvoiceSortField) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceSortField. It customizes the JSON marshaling process for InvoiceSortField objects.

func (*InvoiceSortField) UnmarshalJSON added in v0.2.0

func (e *InvoiceSortField) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceSortField. It customizes the JSON unmarshaling process for InvoiceSortField objects.

type InvoiceStatus

type InvoiceStatus string

InvoiceStatus is a string enum. The current status of the invoice. See [Invoice Statuses](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405078794253-Introduction-to-Invoices#invoice-statuses) for more.

const (
	InvoiceStatus_DRAFT    InvoiceStatus = "draft"
	InvoiceStatus_OPEN     InvoiceStatus = "open"
	InvoiceStatus_PAID     InvoiceStatus = "paid"
	InvoiceStatus_PENDING  InvoiceStatus = "pending"
	InvoiceStatus_VOIDED   InvoiceStatus = "voided"
	InvoiceStatus_CANCELED InvoiceStatus = "canceled"
)

func (InvoiceStatus) MarshalJSON added in v0.2.0

func (e InvoiceStatus) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceStatus. It customizes the JSON marshaling process for InvoiceStatus objects.

func (*InvoiceStatus) UnmarshalJSON added in v0.2.0

func (e *InvoiceStatus) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceStatus. It customizes the JSON unmarshaling process for InvoiceStatus objects.

type InvoiceTax

type InvoiceTax struct {
	Uid                   *string                       `json:"uid,omitempty"`
	Title                 *string                       `json:"title,omitempty"`
	Description           Optional[string]              `json:"description"`
	SourceType            *ProformaInvoiceTaxSourceType `json:"source_type,omitempty"`
	SourceId              *int                          `json:"source_id,omitempty"`
	Percentage            *string                       `json:"percentage,omitempty"`
	TaxableAmount         *string                       `json:"taxable_amount,omitempty"`
	TaxAmount             *string                       `json:"tax_amount,omitempty"`
	TransactionId         *int                          `json:"transaction_id,omitempty"`
	LineItemBreakouts     []InvoiceTaxBreakout          `json:"line_item_breakouts,omitempty"`
	TaxComponentBreakouts []InvoiceTaxComponentBreakout `json:"tax_component_breakouts,omitempty"`
	AdditionalProperties  map[string]any                `json:"_"`
}

InvoiceTax represents a InvoiceTax struct.

func (InvoiceTax) MarshalJSON

func (i InvoiceTax) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceTax. It customizes the JSON marshaling process for InvoiceTax objects.

func (*InvoiceTax) UnmarshalJSON

func (i *InvoiceTax) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceTax. It customizes the JSON unmarshaling process for InvoiceTax objects.

type InvoiceTaxBreakout

type InvoiceTaxBreakout struct {
	Uid                  *string        `json:"uid,omitempty"`
	TaxableAmount        *string        `json:"taxable_amount,omitempty"`
	TaxAmount            *string        `json:"tax_amount,omitempty"`
	TaxExemptAmount      *string        `json:"tax_exempt_amount,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

InvoiceTaxBreakout represents a InvoiceTaxBreakout struct.

func (InvoiceTaxBreakout) MarshalJSON

func (i InvoiceTaxBreakout) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceTaxBreakout. It customizes the JSON marshaling process for InvoiceTaxBreakout objects.

func (*InvoiceTaxBreakout) UnmarshalJSON

func (i *InvoiceTaxBreakout) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceTaxBreakout. It customizes the JSON unmarshaling process for InvoiceTaxBreakout objects.

type InvoiceTaxComponentBreakout

type InvoiceTaxComponentBreakout struct {
	TaxRuleId            *int           `json:"tax_rule_id,omitempty"`
	Percentage           *string        `json:"percentage,omitempty"`
	CountryCode          *string        `json:"country_code,omitempty"`
	SubdivisionCode      *string        `json:"subdivision_code,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

InvoiceTaxComponentBreakout represents a InvoiceTaxComponentBreakout struct.

func (InvoiceTaxComponentBreakout) MarshalJSON

func (i InvoiceTaxComponentBreakout) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for InvoiceTaxComponentBreakout. It customizes the JSON marshaling process for InvoiceTaxComponentBreakout objects.

func (*InvoiceTaxComponentBreakout) UnmarshalJSON

func (i *InvoiceTaxComponentBreakout) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for InvoiceTaxComponentBreakout. It customizes the JSON unmarshaling process for InvoiceTaxComponentBreakout objects.

type IssueAdvanceInvoiceRequest

type IssueAdvanceInvoiceRequest struct {
	Force                *bool          `json:"force,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

IssueAdvanceInvoiceRequest represents a IssueAdvanceInvoiceRequest struct.

func (IssueAdvanceInvoiceRequest) MarshalJSON

func (i IssueAdvanceInvoiceRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for IssueAdvanceInvoiceRequest. It customizes the JSON marshaling process for IssueAdvanceInvoiceRequest objects.

func (*IssueAdvanceInvoiceRequest) UnmarshalJSON

func (i *IssueAdvanceInvoiceRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for IssueAdvanceInvoiceRequest. It customizes the JSON unmarshaling process for IssueAdvanceInvoiceRequest objects.

type IssueInvoiceEvent added in v0.2.0

type IssueInvoiceEvent struct {
	Id        int64            `json:"id"`
	Timestamp time.Time        `json:"timestamp"`
	Invoice   Invoice          `json:"invoice"`
	EventType InvoiceEventType `json:"event_type"`
	// Example schema for an `issue_invoice` event
	EventData            IssueInvoiceEventData `json:"event_data"`
	AdditionalProperties map[string]any        `json:"_"`
}

IssueInvoiceEvent represents a IssueInvoiceEvent struct.

func (IssueInvoiceEvent) MarshalJSON added in v0.2.0

func (i IssueInvoiceEvent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for IssueInvoiceEvent. It customizes the JSON marshaling process for IssueInvoiceEvent objects.

func (*IssueInvoiceEvent) UnmarshalJSON added in v0.2.0

func (i *IssueInvoiceEvent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for IssueInvoiceEvent. It customizes the JSON unmarshaling process for IssueInvoiceEvent objects.

type IssueInvoiceEventData added in v0.1.0

type IssueInvoiceEventData struct {
	// Consolidation level of the invoice, which is applicable to invoice consolidation.  It will hold one of the following values:
	// * "none": A normal invoice with no consolidation.
	// * "child": An invoice segment which has been combined into a consolidated invoice.
	// * "parent": A consolidated invoice, whose contents are composed of invoice segments.
	// "Parent" invoices do not have lines of their own, but they have subtotals and totals which aggregate the member invoice segments.
	// See also the [invoice consolidation documentation](https://chargify.zendesk.com/hc/en-us/articles/4407746391835).
	ConsolidationLevel InvoiceConsolidationLevel `json:"consolidation_level"`
	// The status of the invoice before event occurrence. See [Invoice Statuses](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405078794253-Introduction-to-Invoices#invoice-statusess) for more.
	FromStatus InvoiceStatus `json:"from_status"`
	// The status of the invoice after event occurrence. See [Invoice Statuses](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405078794253-Introduction-to-Invoices#invoice-statusess) for more.
	ToStatus InvoiceStatus `json:"to_status"`
	// Amount due on the invoice, which is `total_amount - credit_amount - paid_amount`.
	DueAmount string `json:"due_amount"`
	// The invoice total, which is `subtotal_amount - discount_amount + tax_amount`.'
	TotalAmount          string         `json:"total_amount"`
	AdditionalProperties map[string]any `json:"_"`
}

IssueInvoiceEventData represents a IssueInvoiceEventData struct. Example schema for an `issue_invoice` event

func (IssueInvoiceEventData) MarshalJSON added in v0.1.0

func (i IssueInvoiceEventData) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for IssueInvoiceEventData. It customizes the JSON marshaling process for IssueInvoiceEventData objects.

func (*IssueInvoiceEventData) UnmarshalJSON added in v0.1.0

func (i *IssueInvoiceEventData) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for IssueInvoiceEventData. It customizes the JSON unmarshaling process for IssueInvoiceEventData objects.

type IssueInvoiceRequest

type IssueInvoiceRequest struct {
	// Action taken when payment for an invoice fails:
	// - `leave_open_invoice` - prepayments and credits applied to invoice; invoice status set to "open"; email sent to the customer for the issued invoice (if setting applies); payment failure recorded in the invoice history. This is the default option.
	// - `rollback_to_pending` - prepayments and credits not applied; invoice remains in "pending" status; no email sent to the customer; payment failure recorded in the invoice history.
	// - `initiate_dunning` - prepayments and credits applied to the invoice; invoice status set to "open"; email sent to the customer for the issued invoice (if setting applies); payment failure recorded in the invoice history; subscription will  most likely go into "past_due" or "canceled" state (depending upon net terms and dunning settings).
	OnFailedPayment      *FailedPaymentAction `json:"on_failed_payment,omitempty"`
	AdditionalProperties map[string]any       `json:"_"`
}

IssueInvoiceRequest represents a IssueInvoiceRequest struct.

func (IssueInvoiceRequest) MarshalJSON

func (i IssueInvoiceRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for IssueInvoiceRequest. It customizes the JSON marshaling process for IssueInvoiceRequest objects.

func (*IssueInvoiceRequest) UnmarshalJSON

func (i *IssueInvoiceRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for IssueInvoiceRequest. It customizes the JSON unmarshaling process for IssueInvoiceRequest objects.

type IssueServiceCredit

type IssueServiceCredit struct {
	Amount               IssueServiceCreditAmount `json:"amount"`
	Memo                 *string                  `json:"memo,omitempty"`
	AdditionalProperties map[string]any           `json:"_"`
}

IssueServiceCredit represents a IssueServiceCredit struct.

func (IssueServiceCredit) MarshalJSON

func (i IssueServiceCredit) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for IssueServiceCredit. It customizes the JSON marshaling process for IssueServiceCredit objects.

func (*IssueServiceCredit) UnmarshalJSON

func (i *IssueServiceCredit) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for IssueServiceCredit. It customizes the JSON unmarshaling process for IssueServiceCredit objects.

type IssueServiceCreditAmount added in v0.1.0

type IssueServiceCreditAmount struct {
	// contains filtered or unexported fields
}

IssueServiceCreditAmount represents a IssueServiceCreditAmount struct. This is a container for one-of cases.

func (*IssueServiceCreditAmount) AsPrecision added in v0.1.0

func (i *IssueServiceCreditAmount) AsPrecision() (
	*float64,
	bool)

func (*IssueServiceCreditAmount) AsString added in v0.1.0

func (i *IssueServiceCreditAmount) AsString() (
	*string,
	bool)

func (IssueServiceCreditAmount) MarshalJSON added in v0.1.0

func (i IssueServiceCreditAmount) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for IssueServiceCreditAmount. It customizes the JSON marshaling process for IssueServiceCreditAmount objects.

func (IssueServiceCreditAmount) String added in v0.1.0

func (i IssueServiceCreditAmount) String() string

String converts the IssueServiceCreditAmount object to a string representation.

func (*IssueServiceCreditAmount) UnmarshalJSON added in v0.1.0

func (i *IssueServiceCreditAmount) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for IssueServiceCreditAmount. It customizes the JSON unmarshaling process for IssueServiceCreditAmount objects.

type IssueServiceCreditRequest

type IssueServiceCreditRequest struct {
	ServiceCredit        IssueServiceCredit `json:"service_credit"`
	AdditionalProperties map[string]any     `json:"_"`
}

IssueServiceCreditRequest represents a IssueServiceCreditRequest struct.

func (IssueServiceCreditRequest) MarshalJSON

func (i IssueServiceCreditRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for IssueServiceCreditRequest. It customizes the JSON marshaling process for IssueServiceCreditRequest objects.

func (*IssueServiceCreditRequest) UnmarshalJSON

func (i *IssueServiceCreditRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for IssueServiceCreditRequest. It customizes the JSON unmarshaling process for IssueServiceCreditRequest objects.

type ItemCategory

type ItemCategory string

ItemCategory is a string enum. One of the following: Business Software, Consumer Software, Digital Services, Physical Goods, Other

const (
	ItemCategory_ENUMBUSINESSSOFTWARE ItemCategory = "Business Software"
	ItemCategory_ENUMCONSUMERSOFTWARE ItemCategory = "Consumer Software"
	ItemCategory_ENUMDIGITALSERVICES  ItemCategory = "Digital Services"
	ItemCategory_ENUMPHYSICALGOODS    ItemCategory = "Physical Goods"
	ItemCategory_OTHER                ItemCategory = "Other"
)

func (ItemCategory) MarshalJSON added in v0.2.0

func (e ItemCategory) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ItemCategory. It customizes the JSON marshaling process for ItemCategory objects.

func (*ItemCategory) UnmarshalJSON added in v0.2.0

func (e *ItemCategory) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ItemCategory. It customizes the JSON unmarshaling process for ItemCategory objects.

type ItemPricePointChanged added in v0.1.0

type ItemPricePointChanged struct {
	ItemId               int                `json:"item_id"`
	ItemType             string             `json:"item_type"`
	ItemHandle           string             `json:"item_handle"`
	ItemName             string             `json:"item_name"`
	PreviousPricePoint   ItemPricePointData `json:"previous_price_point"`
	CurrentPricePoint    ItemPricePointData `json:"current_price_point"`
	AdditionalProperties map[string]any     `json:"_"`
}

ItemPricePointChanged represents a ItemPricePointChanged struct.

func (ItemPricePointChanged) MarshalJSON added in v0.1.0

func (i ItemPricePointChanged) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ItemPricePointChanged. It customizes the JSON marshaling process for ItemPricePointChanged objects.

func (*ItemPricePointChanged) UnmarshalJSON added in v0.1.0

func (i *ItemPricePointChanged) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ItemPricePointChanged. It customizes the JSON unmarshaling process for ItemPricePointChanged objects.

type ItemPricePointData added in v0.1.0

type ItemPricePointData struct {
	Id                   *int           `json:"id,omitempty"`
	Handle               *string        `json:"handle,omitempty"`
	Name                 *string        `json:"name,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ItemPricePointData represents a ItemPricePointData struct.

func (ItemPricePointData) MarshalJSON added in v0.1.0

func (i ItemPricePointData) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ItemPricePointData. It customizes the JSON marshaling process for ItemPricePointData objects.

func (*ItemPricePointData) UnmarshalJSON added in v0.1.0

func (i *ItemPricePointData) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ItemPricePointData. It customizes the JSON unmarshaling process for ItemPricePointData objects.

type LineItemKind

type LineItemKind string

LineItemKind is a string enum. A handle for the line item kind

const (
	LineItemKind_BASELINE               LineItemKind = "baseline"
	LineItemKind_INITIAL                LineItemKind = "initial"
	LineItemKind_TRIAL                  LineItemKind = "trial"
	LineItemKind_QUANTITYBASEDCOMPONENT LineItemKind = "quantity_based_component"
	LineItemKind_PREPAIDUSAGECOMPONENT  LineItemKind = "prepaid_usage_component"
	LineItemKind_ONOFFCOMPONENT         LineItemKind = "on_off_component"
	LineItemKind_METEREDCOMPONENT       LineItemKind = "metered_component"
	LineItemKind_EVENTBASEDCOMPONENT    LineItemKind = "event_based_component"
	LineItemKind_COUPON                 LineItemKind = "coupon"
	LineItemKind_TAX                    LineItemKind = "tax"
)

func (LineItemKind) MarshalJSON added in v0.2.0

func (e LineItemKind) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for LineItemKind. It customizes the JSON marshaling process for LineItemKind objects.

func (*LineItemKind) UnmarshalJSON added in v0.2.0

func (e *LineItemKind) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for LineItemKind. It customizes the JSON unmarshaling process for LineItemKind objects.

type LineItemTransactionType

type LineItemTransactionType string

LineItemTransactionType is a string enum. A handle for the line item transaction type

const (
	LineItemTransactionType_CHARGE               LineItemTransactionType = "charge"
	LineItemTransactionType_CREDIT               LineItemTransactionType = "credit"
	LineItemTransactionType_ADJUSTMENT           LineItemTransactionType = "adjustment"
	LineItemTransactionType_PAYMENT              LineItemTransactionType = "payment"
	LineItemTransactionType_REFUND               LineItemTransactionType = "refund"
	LineItemTransactionType_INFOTRANSACTION      LineItemTransactionType = "info_transaction"
	LineItemTransactionType_PAYMENTAUTHORIZATION LineItemTransactionType = "payment_authorization"
)

func (LineItemTransactionType) MarshalJSON added in v0.2.0

func (e LineItemTransactionType) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for LineItemTransactionType. It customizes the JSON marshaling process for LineItemTransactionType objects.

func (*LineItemTransactionType) UnmarshalJSON added in v0.2.0

func (e *LineItemTransactionType) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for LineItemTransactionType. It customizes the JSON unmarshaling process for LineItemTransactionType objects.

type ListComponentsFilter added in v0.2.0

type ListComponentsFilter struct {
	// Allows fetching components with matching id based on provided value. Use in query `filter[ids]=1,2,3`.
	Ids []int `json:"ids,omitempty"`
	// Allows fetching components with matching use_site_exchange_rate based on provided value (refers to default price point). Use in query `filter[use_site_exchange_rate]=true`.
	UseSiteExchangeRate  *bool          `json:"use_site_exchange_rate,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ListComponentsFilter represents a ListComponentsFilter struct.

func (ListComponentsFilter) MarshalJSON added in v0.2.0

func (l ListComponentsFilter) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListComponentsFilter. It customizes the JSON marshaling process for ListComponentsFilter objects.

func (*ListComponentsFilter) UnmarshalJSON added in v0.2.0

func (l *ListComponentsFilter) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListComponentsFilter. It customizes the JSON unmarshaling process for ListComponentsFilter objects.

type ListComponentsPricePointsInclude

type ListComponentsPricePointsInclude string

ListComponentsPricePointsInclude is a string enum.

const (
	ListComponentsPricePointsInclude_CURRENCYPRICES ListComponentsPricePointsInclude = "currency_prices"
)

func (ListComponentsPricePointsInclude) MarshalJSON added in v0.2.0

func (e ListComponentsPricePointsInclude) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListComponentsPricePointsInclude. It customizes the JSON marshaling process for ListComponentsPricePointsInclude objects.

func (*ListComponentsPricePointsInclude) UnmarshalJSON added in v0.2.0

func (e *ListComponentsPricePointsInclude) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListComponentsPricePointsInclude. It customizes the JSON unmarshaling process for ListComponentsPricePointsInclude objects.

type ListComponentsPricePointsResponse

type ListComponentsPricePointsResponse struct {
	PricePoints          []ComponentPricePoint `json:"price_points"`
	AdditionalProperties map[string]any        `json:"_"`
}

ListComponentsPricePointsResponse represents a ListComponentsPricePointsResponse struct.

func (ListComponentsPricePointsResponse) MarshalJSON

func (l ListComponentsPricePointsResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListComponentsPricePointsResponse. It customizes the JSON marshaling process for ListComponentsPricePointsResponse objects.

func (*ListComponentsPricePointsResponse) UnmarshalJSON

func (l *ListComponentsPricePointsResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListComponentsPricePointsResponse. It customizes the JSON unmarshaling process for ListComponentsPricePointsResponse objects.

type ListCouponsFilter added in v0.2.0

type ListCouponsFilter struct {
	// The type of filter you would like to apply to your search. Use in query `filter[date_field]=created_at`.
	DateField *BasicDateField `json:"date_field,omitempty"`
	// The start date (format YYYY-MM-DD) with which to filter the date_field. Returns coupons with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. Use in query `filter[start_date]=2011-12-17`.
	StartDate *time.Time `json:"start_date,omitempty"`
	// The end date (format YYYY-MM-DD) with which to filter the date_field. Returns coupons with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. Use in query `filter[end_date]=2011-12-15`.
	EndDate *time.Time `json:"end_date,omitempty"`
	// The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns coupons with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. Use in query `filter[start_datetime]=2011-12-19T10:15:30+01:00`.
	StartDatetime *time.Time `json:"start_datetime,omitempty"`
	// The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns coupons with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. Use in query `filter[end_datetime]=2011-12-1T10:15:30+01:00`.
	EndDatetime *time.Time `json:"end_datetime,omitempty"`
	// Allows fetching coupons with matching id based on provided values. Use in query `filter[ids]=1,2,3`.
	Ids []int `json:"ids,omitempty"`
	// Allows fetching coupons with matching codes based on provided values. Use in query `filter[codes]=free,free_trial`.
	Codes []string `json:"codes,omitempty"`
	// Allows fetching coupons with matching use_site_exchange_rate based on provided value. Use in query `filter[use_site_exchange_rate]=true`.
	UseSiteExchangeRate  *bool          `json:"use_site_exchange_rate,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ListCouponsFilter represents a ListCouponsFilter struct.

func (ListCouponsFilter) MarshalJSON added in v0.2.0

func (l ListCouponsFilter) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListCouponsFilter. It customizes the JSON marshaling process for ListCouponsFilter objects.

func (*ListCouponsFilter) UnmarshalJSON added in v0.2.0

func (l *ListCouponsFilter) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListCouponsFilter. It customizes the JSON unmarshaling process for ListCouponsFilter objects.

type ListCreditNotesResponse

type ListCreditNotesResponse struct {
	CreditNotes          []CreditNote   `json:"credit_notes"`
	AdditionalProperties map[string]any `json:"_"`
}

ListCreditNotesResponse represents a ListCreditNotesResponse struct.

func (ListCreditNotesResponse) MarshalJSON

func (l ListCreditNotesResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListCreditNotesResponse. It customizes the JSON marshaling process for ListCreditNotesResponse objects.

func (*ListCreditNotesResponse) UnmarshalJSON

func (l *ListCreditNotesResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListCreditNotesResponse. It customizes the JSON unmarshaling process for ListCreditNotesResponse objects.

type ListEventsDateField

type ListEventsDateField string

ListEventsDateField is a string enum.

const (
	ListEventsDateField_CREATEDAT ListEventsDateField = "created_at"
)

func (ListEventsDateField) MarshalJSON added in v0.2.0

func (e ListEventsDateField) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListEventsDateField. It customizes the JSON marshaling process for ListEventsDateField objects.

func (*ListEventsDateField) UnmarshalJSON added in v0.2.0

func (e *ListEventsDateField) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListEventsDateField. It customizes the JSON unmarshaling process for ListEventsDateField objects.

type ListInvoiceEventsResponse

type ListInvoiceEventsResponse struct {
	Events               []InvoiceEvent `json:"events,omitempty"`
	Page                 *int           `json:"page,omitempty"`
	PerPage              *int           `json:"per_page,omitempty"`
	TotalPages           *int           `json:"total_pages,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ListInvoiceEventsResponse represents a ListInvoiceEventsResponse struct.

func (ListInvoiceEventsResponse) MarshalJSON

func (l ListInvoiceEventsResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListInvoiceEventsResponse. It customizes the JSON marshaling process for ListInvoiceEventsResponse objects.

func (*ListInvoiceEventsResponse) UnmarshalJSON

func (l *ListInvoiceEventsResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListInvoiceEventsResponse. It customizes the JSON unmarshaling process for ListInvoiceEventsResponse objects.

type ListInvoicesResponse

type ListInvoicesResponse struct {
	Invoices             []Invoice      `json:"invoices"`
	AdditionalProperties map[string]any `json:"_"`
}

ListInvoicesResponse represents a ListInvoicesResponse struct.

func (ListInvoicesResponse) MarshalJSON

func (l ListInvoicesResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListInvoicesResponse. It customizes the JSON marshaling process for ListInvoicesResponse objects.

func (*ListInvoicesResponse) UnmarshalJSON

func (l *ListInvoicesResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListInvoicesResponse. It customizes the JSON unmarshaling process for ListInvoicesResponse objects.

type ListMRRResponse

type ListMRRResponse struct {
	Mrr                  ListMRRResponseResult `json:"mrr"`
	AdditionalProperties map[string]any        `json:"_"`
}

ListMRRResponse represents a ListMRRResponse struct.

func (ListMRRResponse) MarshalJSON

func (l ListMRRResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListMRRResponse. It customizes the JSON marshaling process for ListMRRResponse objects.

func (*ListMRRResponse) UnmarshalJSON

func (l *ListMRRResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListMRRResponse. It customizes the JSON unmarshaling process for ListMRRResponse objects.

type ListMRRResponseResult

type ListMRRResponseResult struct {
	Page                 *int           `json:"page,omitempty"`
	PerPage              *int           `json:"per_page,omitempty"`
	TotalPages           *int           `json:"total_pages,omitempty"`
	TotalEntries         *int           `json:"total_entries,omitempty"`
	Currency             *string        `json:"currency,omitempty"`
	CurrencySymbol       *string        `json:"currency_symbol,omitempty"`
	Movements            []Movement     `json:"movements,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ListMRRResponseResult represents a ListMRRResponseResult struct.

func (ListMRRResponseResult) MarshalJSON

func (l ListMRRResponseResult) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListMRRResponseResult. It customizes the JSON marshaling process for ListMRRResponseResult objects.

func (*ListMRRResponseResult) UnmarshalJSON

func (l *ListMRRResponseResult) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListMRRResponseResult. It customizes the JSON unmarshaling process for ListMRRResponseResult objects.

type ListMetafieldsResponse

type ListMetafieldsResponse struct {
	TotalCount           *int           `json:"total_count,omitempty"`
	CurrentPage          *int           `json:"current_page,omitempty"`
	TotalPages           *int           `json:"total_pages,omitempty"`
	PerPage              *int           `json:"per_page,omitempty"`
	Metafields           []Metafield    `json:"metafields,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ListMetafieldsResponse represents a ListMetafieldsResponse struct.

func (ListMetafieldsResponse) MarshalJSON

func (l ListMetafieldsResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListMetafieldsResponse. It customizes the JSON marshaling process for ListMetafieldsResponse objects.

func (*ListMetafieldsResponse) UnmarshalJSON

func (l *ListMetafieldsResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListMetafieldsResponse. It customizes the JSON unmarshaling process for ListMetafieldsResponse objects.

type ListMrrFilter added in v0.2.0

type ListMrrFilter struct {
	// Submit ids in order to limit results. Use in query: `filter[subscription_ids]=1,2,3`.
	SubscriptionIds      []int          `json:"subscription_ids,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ListMrrFilter represents a ListMrrFilter struct.

func (ListMrrFilter) MarshalJSON added in v0.2.0

func (l ListMrrFilter) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListMrrFilter. It customizes the JSON marshaling process for ListMrrFilter objects.

func (*ListMrrFilter) UnmarshalJSON added in v0.2.0

func (l *ListMrrFilter) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListMrrFilter. It customizes the JSON unmarshaling process for ListMrrFilter objects.

type ListOffersResponse

type ListOffersResponse struct {
	Offers               []Offer        `json:"offers,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ListOffersResponse represents a ListOffersResponse struct.

func (ListOffersResponse) MarshalJSON

func (l ListOffersResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListOffersResponse. It customizes the JSON marshaling process for ListOffersResponse objects.

func (*ListOffersResponse) UnmarshalJSON

func (l *ListOffersResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListOffersResponse. It customizes the JSON unmarshaling process for ListOffersResponse objects.

type ListPrepaymentDateField added in v0.2.0

type ListPrepaymentDateField string

ListPrepaymentDateField is a string enum.

const (
	ListPrepaymentDateField_CREATEDAT     ListPrepaymentDateField = "created_at"
	ListPrepaymentDateField_APPLICATIONAT ListPrepaymentDateField = "application_at"
)

func (ListPrepaymentDateField) MarshalJSON added in v0.2.0

func (e ListPrepaymentDateField) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListPrepaymentDateField. It customizes the JSON marshaling process for ListPrepaymentDateField objects.

func (*ListPrepaymentDateField) UnmarshalJSON added in v0.2.0

func (e *ListPrepaymentDateField) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListPrepaymentDateField. It customizes the JSON unmarshaling process for ListPrepaymentDateField objects.

type ListPrepaymentsFilter added in v0.2.0

type ListPrepaymentsFilter struct {
	// The type of filter you would like to apply to your search. `created_at` - Time when prepayment was created. `application_at` - Time when prepayment was applied to invoice. Use in query `filter[date_field]=created_at`.
	DateField *ListPrepaymentDateField `json:"date_field,omitempty"`
	// The start date (format YYYY-MM-DD) with which to filter the date_field. Returns prepayments with a timestamp at or after midnight (12:00:00 AM) in your site's time zone on the date specified. Use in query: `filter[start_date]=2011-12-15`.
	StartDate *time.Time `json:"start_date,omitempty"`
	// The end date (format YYYY-MM-DD) with which to filter the date_field. Returns prepayments with a timestamp up to and including 11:59:59PM in your site's time zone on the date specified. Use in query: `filter[end_date]=2011-12-15`.
	EndDate              *time.Time     `json:"end_date,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ListPrepaymentsFilter represents a ListPrepaymentsFilter struct.

func (ListPrepaymentsFilter) MarshalJSON added in v0.2.0

func (l ListPrepaymentsFilter) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListPrepaymentsFilter. It customizes the JSON marshaling process for ListPrepaymentsFilter objects.

func (*ListPrepaymentsFilter) UnmarshalJSON added in v0.2.0

func (l *ListPrepaymentsFilter) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListPrepaymentsFilter. It customizes the JSON unmarshaling process for ListPrepaymentsFilter objects.

type ListPricePointsFilter added in v0.2.0

type ListPricePointsFilter struct {
	// The type of filter you would like to apply to your search. Use in query: `filter[date_field]=created_at`.
	DateField *BasicDateField `json:"date_field,omitempty"`
	// The start date (format YYYY-MM-DD) with which to filter the date_field. Returns price points with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified.
	StartDate *time.Time `json:"start_date,omitempty"`
	// The end date (format YYYY-MM-DD) with which to filter the date_field. Returns price points with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified.
	EndDate *time.Time `json:"end_date,omitempty"`
	// The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns price points with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date.
	StartDatetime *time.Time `json:"start_datetime,omitempty"`
	// The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns price points with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date.
	EndDatetime *time.Time `json:"end_datetime,omitempty"`
	// Allows fetching price points with matching type. Use in query: `filter[type]=custom,catalog`.
	Type []PricePointType `json:"type,omitempty"`
	// Allows fetching price points with matching id based on provided values. Use in query: `filter[ids]=1,2,3`.
	Ids []int `json:"ids,omitempty"`
	// Allows fetching price points only if archived_at is present or not. Use in query: `filter[archived_at]=not_null`.
	ArchivedAt           *IncludeNullOrNotNull `json:"archived_at,omitempty"`
	AdditionalProperties map[string]any        `json:"_"`
}

ListPricePointsFilter represents a ListPricePointsFilter struct.

func (ListPricePointsFilter) MarshalJSON added in v0.2.0

func (l ListPricePointsFilter) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListPricePointsFilter. It customizes the JSON marshaling process for ListPricePointsFilter objects.

func (*ListPricePointsFilter) UnmarshalJSON added in v0.2.0

func (l *ListPricePointsFilter) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListPricePointsFilter. It customizes the JSON unmarshaling process for ListPricePointsFilter objects.

type ListProductPricePointsInputProductId added in v0.1.0

type ListProductPricePointsInputProductId struct {
	// contains filtered or unexported fields
}

ListProductPricePointsInputProductId represents a ListProductPricePointsInputProductId struct. This is a container for one-of cases.

func (*ListProductPricePointsInputProductId) AsNumber added in v0.1.0

func (l *ListProductPricePointsInputProductId) AsNumber() (
	*int,
	bool)

func (*ListProductPricePointsInputProductId) AsString added in v0.1.0

func (ListProductPricePointsInputProductId) MarshalJSON added in v0.1.0

func (l ListProductPricePointsInputProductId) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListProductPricePointsInputProductId. It customizes the JSON marshaling process for ListProductPricePointsInputProductId objects.

func (ListProductPricePointsInputProductId) String added in v0.1.0

String converts the ListProductPricePointsInputProductId object to a string representation.

func (*ListProductPricePointsInputProductId) UnmarshalJSON added in v0.1.0

func (l *ListProductPricePointsInputProductId) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListProductPricePointsInputProductId. It customizes the JSON unmarshaling process for ListProductPricePointsInputProductId objects.

type ListProductPricePointsResponse

type ListProductPricePointsResponse struct {
	PricePoints          []ProductPricePoint `json:"price_points"`
	AdditionalProperties map[string]any      `json:"_"`
}

ListProductPricePointsResponse represents a ListProductPricePointsResponse struct.

func (ListProductPricePointsResponse) MarshalJSON

func (l ListProductPricePointsResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListProductPricePointsResponse. It customizes the JSON marshaling process for ListProductPricePointsResponse objects.

func (*ListProductPricePointsResponse) UnmarshalJSON

func (l *ListProductPricePointsResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListProductPricePointsResponse. It customizes the JSON unmarshaling process for ListProductPricePointsResponse objects.

type ListProductsFilter added in v0.2.0

type ListProductsFilter struct {
	// Allows fetching products only if a prepaid product price point is present or not. To use this filter you also have to include the following param in the request `include=prepaid_product_price_point`. Use in query `filter[prepaid_product_price_point][product_price_point_id]=not_null`.
	PrepaidProductPricePoint *PrepaidProductPricePointFilter `json:"prepaid_product_price_point,omitempty"`
	// Allows fetching products with matching use_site_exchange_rate based on provided value (refers to default price point). Use in query `filter[use_site_exchange_rate]=true`.
	UseSiteExchangeRate  *bool          `json:"use_site_exchange_rate,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ListProductsFilter represents a ListProductsFilter struct.

func (ListProductsFilter) MarshalJSON added in v0.2.0

func (l ListProductsFilter) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListProductsFilter. It customizes the JSON marshaling process for ListProductsFilter objects.

func (*ListProductsFilter) UnmarshalJSON added in v0.2.0

func (l *ListProductsFilter) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListProductsFilter. It customizes the JSON unmarshaling process for ListProductsFilter objects.

type ListProductsInclude

type ListProductsInclude string

ListProductsInclude is a string enum.

const (
	ListProductsInclude_PREPAIDPRODUCTPRICEPOINT ListProductsInclude = "prepaid_product_price_point"
)

func (ListProductsInclude) MarshalJSON added in v0.2.0

func (e ListProductsInclude) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListProductsInclude. It customizes the JSON marshaling process for ListProductsInclude objects.

func (*ListProductsInclude) UnmarshalJSON added in v0.2.0

func (e *ListProductsInclude) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListProductsInclude. It customizes the JSON unmarshaling process for ListProductsInclude objects.

type ListProductsPricePointsInclude

type ListProductsPricePointsInclude string

ListProductsPricePointsInclude is a string enum.

const (
	ListProductsPricePointsInclude_CURRENCYPRICES ListProductsPricePointsInclude = "currency_prices"
)

func (ListProductsPricePointsInclude) MarshalJSON added in v0.2.0

func (e ListProductsPricePointsInclude) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListProductsPricePointsInclude. It customizes the JSON marshaling process for ListProductsPricePointsInclude objects.

func (*ListProductsPricePointsInclude) UnmarshalJSON added in v0.2.0

func (e *ListProductsPricePointsInclude) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListProductsPricePointsInclude. It customizes the JSON unmarshaling process for ListProductsPricePointsInclude objects.

type ListProformaInvoicesMeta added in v0.1.0

type ListProformaInvoicesMeta struct {
	TotalCount           *int           `json:"total_count,omitempty"`
	CurrentPage          *int           `json:"current_page,omitempty"`
	TotalPages           *int           `json:"total_pages,omitempty"`
	StatusCode           *int           `json:"status_code,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ListProformaInvoicesMeta represents a ListProformaInvoicesMeta struct.

func (ListProformaInvoicesMeta) MarshalJSON added in v0.1.0

func (l ListProformaInvoicesMeta) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListProformaInvoicesMeta. It customizes the JSON marshaling process for ListProformaInvoicesMeta objects.

func (*ListProformaInvoicesMeta) UnmarshalJSON added in v0.1.0

func (l *ListProformaInvoicesMeta) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListProformaInvoicesMeta. It customizes the JSON unmarshaling process for ListProformaInvoicesMeta objects.

type ListProformaInvoicesResponse added in v0.1.0

type ListProformaInvoicesResponse struct {
	ProformaInvoices     []ProformaInvoice         `json:"proforma_invoices,omitempty"`
	Meta                 *ListProformaInvoicesMeta `json:"meta,omitempty"`
	AdditionalProperties map[string]any            `json:"_"`
}

ListProformaInvoicesResponse represents a ListProformaInvoicesResponse struct.

func (ListProformaInvoicesResponse) MarshalJSON added in v0.1.0

func (l ListProformaInvoicesResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListProformaInvoicesResponse. It customizes the JSON marshaling process for ListProformaInvoicesResponse objects.

func (*ListProformaInvoicesResponse) UnmarshalJSON added in v0.1.0

func (l *ListProformaInvoicesResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListProformaInvoicesResponse. It customizes the JSON unmarshaling process for ListProformaInvoicesResponse objects.

type ListPublicKeysMeta

type ListPublicKeysMeta struct {
	TotalCount           *int           `json:"total_count,omitempty"`
	CurrentPage          *int           `json:"current_page,omitempty"`
	TotalPages           *int           `json:"total_pages,omitempty"`
	PerPage              *int           `json:"per_page,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ListPublicKeysMeta represents a ListPublicKeysMeta struct.

func (ListPublicKeysMeta) MarshalJSON

func (l ListPublicKeysMeta) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListPublicKeysMeta. It customizes the JSON marshaling process for ListPublicKeysMeta objects.

func (*ListPublicKeysMeta) UnmarshalJSON

func (l *ListPublicKeysMeta) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListPublicKeysMeta. It customizes the JSON unmarshaling process for ListPublicKeysMeta objects.

type ListPublicKeysResponse

type ListPublicKeysResponse struct {
	ChargifyJsKeys       []PublicKey         `json:"chargify_js_keys,omitempty"`
	Meta                 *ListPublicKeysMeta `json:"meta,omitempty"`
	AdditionalProperties map[string]any      `json:"_"`
}

ListPublicKeysResponse represents a ListPublicKeysResponse struct.

func (ListPublicKeysResponse) MarshalJSON

func (l ListPublicKeysResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListPublicKeysResponse. It customizes the JSON marshaling process for ListPublicKeysResponse objects.

func (*ListPublicKeysResponse) UnmarshalJSON

func (l *ListPublicKeysResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListPublicKeysResponse. It customizes the JSON unmarshaling process for ListPublicKeysResponse objects.

type ListSaleRepItem

type ListSaleRepItem struct {
	Id                   *int                      `json:"id,omitempty"`
	FullName             *string                   `json:"full_name,omitempty"`
	SubscriptionsCount   *int                      `json:"subscriptions_count,omitempty"`
	MrrData              map[string]SaleRepItemMrr `json:"mrr_data,omitempty"`
	TestMode             *bool                     `json:"test_mode,omitempty"`
	AdditionalProperties map[string]any            `json:"_"`
}

ListSaleRepItem represents a ListSaleRepItem struct.

func (ListSaleRepItem) MarshalJSON

func (l ListSaleRepItem) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListSaleRepItem. It customizes the JSON marshaling process for ListSaleRepItem objects.

func (*ListSaleRepItem) UnmarshalJSON

func (l *ListSaleRepItem) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListSaleRepItem. It customizes the JSON unmarshaling process for ListSaleRepItem objects.

type ListSegmentsFilter added in v0.2.0

type ListSegmentsFilter struct {
	// The value passed here would be used to filter segments. Pass a value related to `segment_property_1` on attached Metric. If empty string is passed, this filter would be rejected. Use in query `filter[segment_property_1_value]=EU`.
	SegmentProperty1Value *string `json:"segment_property_1_value,omitempty"`
	// The value passed here would be used to filter segments. Pass a value related to `segment_property_2` on attached Metric. If empty string is passed, this filter would be rejected.
	SegmentProperty2Value *string `json:"segment_property_2_value,omitempty"`
	// The value passed here would be used to filter segments. Pass a value related to `segment_property_3` on attached Metric. If empty string is passed, this filter would be rejected.
	SegmentProperty3Value *string `json:"segment_property_3_value,omitempty"`
	// The value passed here would be used to filter segments. Pass a value related to `segment_property_4` on attached Metric. If empty string is passed, this filter would be rejected.
	SegmentProperty4Value *string        `json:"segment_property_4_value,omitempty"`
	AdditionalProperties  map[string]any `json:"_"`
}

ListSegmentsFilter represents a ListSegmentsFilter struct.

func (ListSegmentsFilter) MarshalJSON added in v0.2.0

func (l ListSegmentsFilter) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListSegmentsFilter. It customizes the JSON marshaling process for ListSegmentsFilter objects.

func (*ListSegmentsFilter) UnmarshalJSON added in v0.2.0

func (l *ListSegmentsFilter) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListSegmentsFilter. It customizes the JSON unmarshaling process for ListSegmentsFilter objects.

type ListSegmentsResponse

type ListSegmentsResponse struct {
	Segments             []Segment      `json:"segments,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ListSegmentsResponse represents a ListSegmentsResponse struct.

func (ListSegmentsResponse) MarshalJSON

func (l ListSegmentsResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListSegmentsResponse. It customizes the JSON marshaling process for ListSegmentsResponse objects.

func (*ListSegmentsResponse) UnmarshalJSON

func (l *ListSegmentsResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListSegmentsResponse. It customizes the JSON unmarshaling process for ListSegmentsResponse objects.

type ListSubcriptionGroupPrepaymentItem

type ListSubcriptionGroupPrepaymentItem struct {
	Id                     *int              `json:"id,omitempty"`
	SubscriptionGroupUid   *string           `json:"subscription_group_uid,omitempty"`
	AmountInCents          *int64            `json:"amount_in_cents,omitempty"`
	RemainingAmountInCents *int64            `json:"remaining_amount_in_cents,omitempty"`
	Details                *string           `json:"details,omitempty"`
	External               *bool             `json:"external,omitempty"`
	Memo                   *string           `json:"memo,omitempty"`
	PaymentType            *PrepaymentMethod `json:"payment_type,omitempty"`
	CreatedAt              *time.Time        `json:"created_at,omitempty"`
	AdditionalProperties   map[string]any    `json:"_"`
}

ListSubcriptionGroupPrepaymentItem represents a ListSubcriptionGroupPrepaymentItem struct.

func (ListSubcriptionGroupPrepaymentItem) MarshalJSON

func (l ListSubcriptionGroupPrepaymentItem) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListSubcriptionGroupPrepaymentItem. It customizes the JSON marshaling process for ListSubcriptionGroupPrepaymentItem objects.

func (*ListSubcriptionGroupPrepaymentItem) UnmarshalJSON

func (l *ListSubcriptionGroupPrepaymentItem) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListSubcriptionGroupPrepaymentItem. It customizes the JSON unmarshaling process for ListSubcriptionGroupPrepaymentItem objects.

type ListSubscriptionComponentsFilter added in v0.2.0

type ListSubscriptionComponentsFilter struct {
	// Allows fetching components allocation with matching currency based on provided values. Use in query `filter[currencies]=EUR,USD`.
	Currencies []string `json:"currencies,omitempty"`
	// Allows fetching components allocation with matching use_site_exchange_rate based on provided value. Use in query `filter[use_site_exchange_rate]=true`.
	UseSiteExchangeRate  *bool          `json:"use_site_exchange_rate,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ListSubscriptionComponentsFilter represents a ListSubscriptionComponentsFilter struct.

func (ListSubscriptionComponentsFilter) MarshalJSON added in v0.2.0

func (l ListSubscriptionComponentsFilter) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListSubscriptionComponentsFilter. It customizes the JSON marshaling process for ListSubscriptionComponentsFilter objects.

func (*ListSubscriptionComponentsFilter) UnmarshalJSON added in v0.2.0

func (l *ListSubscriptionComponentsFilter) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListSubscriptionComponentsFilter. It customizes the JSON unmarshaling process for ListSubscriptionComponentsFilter objects.

type ListSubscriptionComponentsForSiteFilter added in v0.2.0

type ListSubscriptionComponentsForSiteFilter struct {
	// Allows fetching components allocation with matching currency based on provided values. Use in query `filter[currencies]=USD,EUR`.
	Currencies []string `json:"currencies,omitempty"`
	// Allows fetching components allocation with matching use_site_exchange_rate based on provided value. Use in query `filter[use_site_exchange_rate]=true`.
	UseSiteExchangeRate *bool `json:"use_site_exchange_rate,omitempty"`
	// Nested filter used for List Subscription Components For Site Filter
	Subscription         *SubscriptionFilter `json:"subscription,omitempty"`
	AdditionalProperties map[string]any      `json:"_"`
}

ListSubscriptionComponentsForSiteFilter represents a ListSubscriptionComponentsForSiteFilter struct.

func (ListSubscriptionComponentsForSiteFilter) MarshalJSON added in v0.2.0

func (l ListSubscriptionComponentsForSiteFilter) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListSubscriptionComponentsForSiteFilter. It customizes the JSON marshaling process for ListSubscriptionComponentsForSiteFilter objects.

func (*ListSubscriptionComponentsForSiteFilter) UnmarshalJSON added in v0.2.0

func (l *ListSubscriptionComponentsForSiteFilter) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListSubscriptionComponentsForSiteFilter. It customizes the JSON unmarshaling process for ListSubscriptionComponentsForSiteFilter objects.

type ListSubscriptionComponentsInclude

type ListSubscriptionComponentsInclude string

ListSubscriptionComponentsInclude is a string enum.

const (
	ListSubscriptionComponentsInclude_SUBSCRIPTION   ListSubscriptionComponentsInclude = "subscription"
	ListSubscriptionComponentsInclude_HISTORICUSAGES ListSubscriptionComponentsInclude = "historic_usages"
)

func (ListSubscriptionComponentsInclude) MarshalJSON added in v0.2.0

func (e ListSubscriptionComponentsInclude) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListSubscriptionComponentsInclude. It customizes the JSON marshaling process for ListSubscriptionComponentsInclude objects.

func (*ListSubscriptionComponentsInclude) UnmarshalJSON added in v0.2.0

func (e *ListSubscriptionComponentsInclude) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListSubscriptionComponentsInclude. It customizes the JSON unmarshaling process for ListSubscriptionComponentsInclude objects.

type ListSubscriptionComponentsResponse

type ListSubscriptionComponentsResponse struct {
	SubscriptionsComponents []SubscriptionComponent `json:"subscriptions_components"`
	AdditionalProperties    map[string]any          `json:"_"`
}

ListSubscriptionComponentsResponse represents a ListSubscriptionComponentsResponse struct.

func (ListSubscriptionComponentsResponse) MarshalJSON

func (l ListSubscriptionComponentsResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListSubscriptionComponentsResponse. It customizes the JSON marshaling process for ListSubscriptionComponentsResponse objects.

func (*ListSubscriptionComponentsResponse) UnmarshalJSON

func (l *ListSubscriptionComponentsResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListSubscriptionComponentsResponse. It customizes the JSON unmarshaling process for ListSubscriptionComponentsResponse objects.

type ListSubscriptionComponentsSort

type ListSubscriptionComponentsSort string

ListSubscriptionComponentsSort is a string enum.

const (
	ListSubscriptionComponentsSort_ID        ListSubscriptionComponentsSort = "id"
	ListSubscriptionComponentsSort_UPDATEDAT ListSubscriptionComponentsSort = "updated_at"
)

func (ListSubscriptionComponentsSort) MarshalJSON added in v0.2.0

func (e ListSubscriptionComponentsSort) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListSubscriptionComponentsSort. It customizes the JSON marshaling process for ListSubscriptionComponentsSort objects.

func (*ListSubscriptionComponentsSort) UnmarshalJSON added in v0.2.0

func (e *ListSubscriptionComponentsSort) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListSubscriptionComponentsSort. It customizes the JSON unmarshaling process for ListSubscriptionComponentsSort objects.

type ListSubscriptionGroupPrepayment

type ListSubscriptionGroupPrepayment struct {
	Prepayment           ListSubcriptionGroupPrepaymentItem `json:"prepayment"`
	AdditionalProperties map[string]any                     `json:"_"`
}

ListSubscriptionGroupPrepayment represents a ListSubscriptionGroupPrepayment struct.

func (ListSubscriptionGroupPrepayment) MarshalJSON

func (l ListSubscriptionGroupPrepayment) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListSubscriptionGroupPrepayment. It customizes the JSON marshaling process for ListSubscriptionGroupPrepayment objects.

func (*ListSubscriptionGroupPrepayment) UnmarshalJSON

func (l *ListSubscriptionGroupPrepayment) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListSubscriptionGroupPrepayment. It customizes the JSON unmarshaling process for ListSubscriptionGroupPrepayment objects.

type ListSubscriptionGroupPrepaymentResponse

type ListSubscriptionGroupPrepaymentResponse struct {
	Prepayments          []ListSubscriptionGroupPrepayment `json:"prepayments"`
	AdditionalProperties map[string]any                    `json:"_"`
}

ListSubscriptionGroupPrepaymentResponse represents a ListSubscriptionGroupPrepaymentResponse struct.

func (ListSubscriptionGroupPrepaymentResponse) MarshalJSON

func (l ListSubscriptionGroupPrepaymentResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListSubscriptionGroupPrepaymentResponse. It customizes the JSON marshaling process for ListSubscriptionGroupPrepaymentResponse objects.

func (*ListSubscriptionGroupPrepaymentResponse) UnmarshalJSON

func (l *ListSubscriptionGroupPrepaymentResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListSubscriptionGroupPrepaymentResponse. It customizes the JSON unmarshaling process for ListSubscriptionGroupPrepaymentResponse objects.

type ListSubscriptionGroupsItem

type ListSubscriptionGroupsItem struct {
	Uid                   *string                    `json:"uid,omitempty"`
	Scheme                *int                       `json:"scheme,omitempty"`
	CustomerId            *int                       `json:"customer_id,omitempty"`
	PaymentProfileId      *int                       `json:"payment_profile_id,omitempty"`
	SubscriptionIds       []int                      `json:"subscription_ids,omitempty"`
	PrimarySubscriptionId *int                       `json:"primary_subscription_id,omitempty"`
	NextAssessmentAt      *time.Time                 `json:"next_assessment_at,omitempty"`
	State                 *string                    `json:"state,omitempty"`
	CancelAtEndOfPeriod   *bool                      `json:"cancel_at_end_of_period,omitempty"`
	AccountBalances       *SubscriptionGroupBalances `json:"account_balances,omitempty"`
	GroupType             *GroupType                 `json:"group_type,omitempty"`
	AdditionalProperties  map[string]any             `json:"_"`
}

ListSubscriptionGroupsItem represents a ListSubscriptionGroupsItem struct.

func (ListSubscriptionGroupsItem) MarshalJSON

func (l ListSubscriptionGroupsItem) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListSubscriptionGroupsItem. It customizes the JSON marshaling process for ListSubscriptionGroupsItem objects.

func (*ListSubscriptionGroupsItem) UnmarshalJSON

func (l *ListSubscriptionGroupsItem) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListSubscriptionGroupsItem. It customizes the JSON unmarshaling process for ListSubscriptionGroupsItem objects.

type ListSubscriptionGroupsMeta

type ListSubscriptionGroupsMeta struct {
	CurrentPage          *int           `json:"current_page,omitempty"`
	TotalCount           *int           `json:"total_count,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ListSubscriptionGroupsMeta represents a ListSubscriptionGroupsMeta struct.

func (ListSubscriptionGroupsMeta) MarshalJSON

func (l ListSubscriptionGroupsMeta) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListSubscriptionGroupsMeta. It customizes the JSON marshaling process for ListSubscriptionGroupsMeta objects.

func (*ListSubscriptionGroupsMeta) UnmarshalJSON

func (l *ListSubscriptionGroupsMeta) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListSubscriptionGroupsMeta. It customizes the JSON unmarshaling process for ListSubscriptionGroupsMeta objects.

type ListSubscriptionGroupsResponse

type ListSubscriptionGroupsResponse struct {
	SubscriptionGroups   []ListSubscriptionGroupsItem `json:"subscription_groups,omitempty"`
	Meta                 *ListSubscriptionGroupsMeta  `json:"meta,omitempty"`
	AdditionalProperties map[string]any               `json:"_"`
}

ListSubscriptionGroupsResponse represents a ListSubscriptionGroupsResponse struct.

func (ListSubscriptionGroupsResponse) MarshalJSON

func (l ListSubscriptionGroupsResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListSubscriptionGroupsResponse. It customizes the JSON marshaling process for ListSubscriptionGroupsResponse objects.

func (*ListSubscriptionGroupsResponse) UnmarshalJSON

func (l *ListSubscriptionGroupsResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListSubscriptionGroupsResponse. It customizes the JSON unmarshaling process for ListSubscriptionGroupsResponse objects.

type ListUsagesInputComponentId added in v0.1.0

type ListUsagesInputComponentId struct {
	// contains filtered or unexported fields
}

ListUsagesInputComponentId represents a ListUsagesInputComponentId struct. This is a container for one-of cases.

func (*ListUsagesInputComponentId) AsNumber added in v0.1.0

func (l *ListUsagesInputComponentId) AsNumber() (
	*int,
	bool)

func (*ListUsagesInputComponentId) AsString added in v0.1.0

func (l *ListUsagesInputComponentId) AsString() (
	*string,
	bool)

func (ListUsagesInputComponentId) MarshalJSON added in v0.1.0

func (l ListUsagesInputComponentId) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ListUsagesInputComponentId. It customizes the JSON marshaling process for ListUsagesInputComponentId objects.

func (ListUsagesInputComponentId) String added in v0.1.0

String converts the ListUsagesInputComponentId object to a string representation.

func (*ListUsagesInputComponentId) UnmarshalJSON added in v0.1.0

func (l *ListUsagesInputComponentId) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ListUsagesInputComponentId. It customizes the JSON unmarshaling process for ListUsagesInputComponentId objects.

type MRR

type MRR struct {
	AmountInCents   *int64     `json:"amount_in_cents,omitempty"`
	AmountFormatted *string    `json:"amount_formatted,omitempty"`
	Currency        *string    `json:"currency,omitempty"`
	CurrencySymbol  *string    `json:"currency_symbol,omitempty"`
	Breakouts       *Breakouts `json:"breakouts,omitempty"`
	// ISO8601 timestamp
	AtTime               *time.Time     `json:"at_time,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

MRR represents a MRR struct.

func (MRR) MarshalJSON

func (m MRR) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for MRR. It customizes the JSON marshaling process for MRR objects.

func (*MRR) UnmarshalJSON

func (m *MRR) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for MRR. It customizes the JSON unmarshaling process for MRR objects.

type MRRMovement

type MRRMovement struct {
	Amount               *int           `json:"amount,omitempty"`
	Category             *string        `json:"category,omitempty"`
	SubscriberDelta      *int           `json:"subscriber_delta,omitempty"`
	LeadDelta            *int           `json:"lead_delta,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

MRRMovement represents a MRRMovement struct.

func (MRRMovement) MarshalJSON

func (m MRRMovement) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for MRRMovement. It customizes the JSON marshaling process for MRRMovement objects.

func (*MRRMovement) UnmarshalJSON

func (m *MRRMovement) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for MRRMovement. It customizes the JSON unmarshaling process for MRRMovement objects.

type MRRResponse

type MRRResponse struct {
	Mrr                  MRR            `json:"mrr"`
	AdditionalProperties map[string]any `json:"_"`
}

MRRResponse represents a MRRResponse struct.

func (MRRResponse) MarshalJSON

func (m MRRResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for MRRResponse. It customizes the JSON marshaling process for MRRResponse objects.

func (*MRRResponse) UnmarshalJSON

func (m *MRRResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for MRRResponse. It customizes the JSON unmarshaling process for MRRResponse objects.

type Metadata

type Metadata struct {
	Id                   Optional[int]       `json:"id"`
	Value                Optional[string]    `json:"value"`
	ResourceId           Optional[int]       `json:"resource_id"`
	Name                 *string             `json:"name,omitempty"`
	DeletedAt            Optional[time.Time] `json:"deleted_at"`
	MetafieldId          Optional[int]       `json:"metafield_id"`
	AdditionalProperties map[string]any      `json:"_"`
}

Metadata represents a Metadata struct.

func (Metadata) MarshalJSON

func (m Metadata) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Metadata. It customizes the JSON marshaling process for Metadata objects.

func (*Metadata) UnmarshalJSON

func (m *Metadata) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Metadata. It customizes the JSON unmarshaling process for Metadata objects.

type Metafield

type Metafield struct {
	Id   *int    `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
	// Warning: When updating a metafield's scope attribute, all scope attributes must be passed. Partially complete scope attributes will override the existing settings.
	Scope *MetafieldScope `json:"scope,omitempty"`
	// the amount of subscriptions this metafield has been applied to in Chargify
	DataCount *int `json:"data_count,omitempty"`
	// Indicates how data should be added to the metafield. For example, a text type is just a string, so a given metafield of this type can have any value attached. On the other hand, dropdown and radio have a set of allowed values that can be input, and appear differently on a Public Signup Page. Defaults to 'text'
	InputType            *MetafieldInput         `json:"input_type,omitempty"`
	Enum                 Optional[MetafieldEnum] `json:"enum"`
	AdditionalProperties map[string]any          `json:"_"`
}

Metafield represents a Metafield struct.

func (Metafield) MarshalJSON

func (m Metafield) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Metafield. It customizes the JSON marshaling process for Metafield objects.

func (*Metafield) UnmarshalJSON

func (m *Metafield) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Metafield. It customizes the JSON unmarshaling process for Metafield objects.

type MetafieldEnum added in v0.1.0

type MetafieldEnum struct {
	// contains filtered or unexported fields
}

MetafieldEnum represents a MetafieldEnum struct. This is a container for one-of cases.

func (*MetafieldEnum) AsArrayOfString added in v0.1.0

func (m *MetafieldEnum) AsArrayOfString() (
	*[]string,
	bool)

func (*MetafieldEnum) AsString added in v0.1.0

func (m *MetafieldEnum) AsString() (
	*string,
	bool)

func (MetafieldEnum) MarshalJSON added in v0.1.0

func (m MetafieldEnum) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for MetafieldEnum. It customizes the JSON marshaling process for MetafieldEnum objects.

func (MetafieldEnum) String added in v0.1.0

func (m MetafieldEnum) String() string

String converts the MetafieldEnum object to a string representation.

func (*MetafieldEnum) UnmarshalJSON added in v0.1.0

func (m *MetafieldEnum) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for MetafieldEnum. It customizes the JSON unmarshaling process for MetafieldEnum objects.

type MetafieldInput added in v0.1.0

type MetafieldInput string

MetafieldInput is a string enum. Indicates how data should be added to the metafield. For example, a text type is just a string, so a given metafield of this type can have any value attached. On the other hand, dropdown and radio have a set of allowed values that can be input, and appear differently on a Public Signup Page. Defaults to 'text'

const (
	MetafieldInput_BALANCETRACKER MetafieldInput = "balance_tracker"
	MetafieldInput_TEXT           MetafieldInput = "text"
	MetafieldInput_RADIO          MetafieldInput = "radio"
	MetafieldInput_DROPDOWN       MetafieldInput = "dropdown"
)

func (MetafieldInput) MarshalJSON added in v0.2.0

func (e MetafieldInput) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for MetafieldInput. It customizes the JSON marshaling process for MetafieldInput objects.

func (*MetafieldInput) UnmarshalJSON added in v0.2.0

func (e *MetafieldInput) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for MetafieldInput. It customizes the JSON unmarshaling process for MetafieldInput objects.

type MetafieldScope

type MetafieldScope struct {
	// Include (1) or exclude (0) metafields from the csv export.
	Csv *IncludeOption `json:"csv,omitempty"`
	// Include (1) or exclude (0) metafields from invoices.
	Invoices *IncludeOption `json:"invoices,omitempty"`
	// Include (1) or exclude (0) metafields from statements.
	Statements *IncludeOption `json:"statements,omitempty"`
	// Include (1) or exclude (0) metafields from the portal.
	Portal *IncludeOption `json:"portal,omitempty"`
	// Include (1) or exclude (0) metafields from being viewable by your ecosystem.
	PublicShow *IncludeOption `json:"public_show,omitempty"`
	// Include (1) or exclude (0) metafields from being edited by your ecosystem.
	PublicEdit           *IncludeOption `json:"public_edit,omitempty"`
	Hosted               []string       `json:"hosted,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

MetafieldScope represents a MetafieldScope struct. Warning: When updating a metafield's scope attribute, all scope attributes must be passed. Partially complete scope attributes will override the existing settings.

func (MetafieldScope) MarshalJSON

func (m MetafieldScope) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for MetafieldScope. It customizes the JSON marshaling process for MetafieldScope objects.

func (*MetafieldScope) UnmarshalJSON

func (m *MetafieldScope) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for MetafieldScope. It customizes the JSON unmarshaling process for MetafieldScope objects.

type MeteredComponent added in v0.1.0

type MeteredComponent struct {
	// A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes".
	Name string `json:"name"`
	// The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. i.e. “message”, which may then be shown as “5 messages” on a subscription’s component line-item
	UnitName string `json:"unit_name"`
	// A description for the component that will be displayed to the user on the hosted signup page.
	Description *string `json:"description,omitempty"`
	// A unique identifier for your use that can be used to retrieve this component is subsequent requests.  Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.
	Handle *string `json:"handle,omitempty"`
	// Boolean flag describing whether a component is taxable or not.
	Taxable *bool `json:"taxable,omitempty"`
	// The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes.
	PricingScheme PricingScheme `json:"pricing_scheme"`
	// (Not required for ‘per_unit’ pricing schemes) One or more price brackets. See [Price Bracket Rules](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405020625677#price-bracket-rules) for an overview of how price brackets work for different pricing schemes.
	Prices []Price `json:"prices,omitempty"`
	// The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
	// Available values: `full`, `prorated`, `none`.
	UpgradeCharge Optional[CreditType] `json:"upgrade_charge"`
	// The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
	// Available values: `full`, `prorated`, `none`.
	DowngradeCredit Optional[CreditType]      `json:"downgrade_credit"`
	PricePoints     []ComponentPricePointItem `json:"price_points,omitempty"`
	// The amount the customer will be charged per unit when the pricing scheme is “per_unit”. For On/Off Components, this is the amount that the customer will be charged when they turn the component on for the subscription. The price can contain up to 8 decimal places. i.e. 1.00 or 0.0012 or 0.00000065
	UnitPrice *MeteredComponentUnitPrice `json:"unit_price,omitempty"`
	// A string representing the tax code related to the component type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters.
	TaxCode *string `json:"tax_code,omitempty"`
	// (Only available on Relationship Invoicing sites) Boolean flag describing if the service date range should show for the component on generated invoices.
	HideDateRangeOnInvoice *bool `json:"hide_date_range_on_invoice,omitempty"`
	// deprecated May 2011 - use unit_price instead
	PriceInCents              *string `json:"price_in_cents,omitempty"`
	DisplayOnHostedPage       *bool   `json:"display_on_hosted_page,omitempty"`
	AllowFractionalQuantities *bool   `json:"allow_fractional_quantities,omitempty"`
	PublicSignupPageIds       []int   `json:"public_signup_page_ids,omitempty"`
	// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component's default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled.
	Interval *int `json:"interval,omitempty"`
	// A string representing the interval unit for this component's default price point, either month or day. This property is only available for sites with Multifrequency enabled.
	IntervalUnit         *IntervalUnit  `json:"interval_unit,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

MeteredComponent represents a MeteredComponent struct.

func (MeteredComponent) MarshalJSON added in v0.1.0

func (m MeteredComponent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for MeteredComponent. It customizes the JSON marshaling process for MeteredComponent objects.

func (*MeteredComponent) UnmarshalJSON added in v0.1.0

func (m *MeteredComponent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for MeteredComponent. It customizes the JSON unmarshaling process for MeteredComponent objects.

type MeteredComponentUnitPrice added in v0.1.0

type MeteredComponentUnitPrice struct {
	// contains filtered or unexported fields
}

MeteredComponentUnitPrice represents a MeteredComponentUnitPrice struct. This is a container for one-of cases.

func (*MeteredComponentUnitPrice) AsPrecision added in v0.1.0

func (m *MeteredComponentUnitPrice) AsPrecision() (
	*float64,
	bool)

func (*MeteredComponentUnitPrice) AsString added in v0.1.0

func (m *MeteredComponentUnitPrice) AsString() (
	*string,
	bool)

func (MeteredComponentUnitPrice) MarshalJSON added in v0.1.0

func (m MeteredComponentUnitPrice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for MeteredComponentUnitPrice. It customizes the JSON marshaling process for MeteredComponentUnitPrice objects.

func (MeteredComponentUnitPrice) String added in v0.1.0

func (m MeteredComponentUnitPrice) String() string

String converts the MeteredComponentUnitPrice object to a string representation.

func (*MeteredComponentUnitPrice) UnmarshalJSON added in v0.1.0

func (m *MeteredComponentUnitPrice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for MeteredComponentUnitPrice. It customizes the JSON unmarshaling process for MeteredComponentUnitPrice objects.

type MeteredUsage added in v0.1.0

type MeteredUsage struct {
	PreviousUnitBalance  string         `json:"previous_unit_balance"`
	NewUnitBalance       int            `json:"new_unit_balance"`
	UsageQuantity        int            `json:"usage_quantity"`
	ComponentId          int            `json:"component_id"`
	ComponentHandle      string         `json:"component_handle"`
	Memo                 string         `json:"memo"`
	AdditionalProperties map[string]any `json:"_"`
}

MeteredUsage represents a MeteredUsage struct.

func (MeteredUsage) MarshalJSON added in v0.1.0

func (m MeteredUsage) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for MeteredUsage. It customizes the JSON marshaling process for MeteredUsage objects.

func (*MeteredUsage) UnmarshalJSON added in v0.1.0

func (m *MeteredUsage) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for MeteredUsage. It customizes the JSON unmarshaling process for MeteredUsage objects.

type Movement

type Movement struct {
	Timestamp            *time.Time         `json:"timestamp,omitempty"`
	AmountInCents        *int64             `json:"amount_in_cents,omitempty"`
	AmountFormatted      *string            `json:"amount_formatted,omitempty"`
	Description          *string            `json:"description,omitempty"`
	Category             *string            `json:"category,omitempty"`
	Breakouts            *Breakouts         `json:"breakouts,omitempty"`
	LineItems            []MovementLineItem `json:"line_items,omitempty"`
	SubscriptionId       *int               `json:"subscription_id,omitempty"`
	SubscriberName       *string            `json:"subscriber_name,omitempty"`
	AdditionalProperties map[string]any     `json:"_"`
}

Movement represents a Movement struct.

func (Movement) MarshalJSON

func (m Movement) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Movement. It customizes the JSON marshaling process for Movement objects.

func (*Movement) UnmarshalJSON

func (m *Movement) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Movement. It customizes the JSON unmarshaling process for Movement objects.

type MovementLineItem

type MovementLineItem struct {
	ProductId *int `json:"product_id,omitempty"`
	// For Product (or "baseline") line items, this field will have a value of `0`.
	ComponentId  *int          `json:"component_id,omitempty"`
	PricePointId *int          `json:"price_point_id,omitempty"`
	Name         *string       `json:"name,omitempty"`
	Mrr          *int          `json:"mrr,omitempty"`
	MrrMovements []MRRMovement `json:"mrr_movements,omitempty"`
	Quantity     *int          `json:"quantity,omitempty"`
	PrevQuantity *int          `json:"prev_quantity,omitempty"`
	// When `true`, the line item's MRR value will contribute to the `plan` breakout. When `false`, the line item contributes to the `usage` breakout.
	Recurring            *bool          `json:"recurring,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

MovementLineItem represents a MovementLineItem struct.

func (MovementLineItem) MarshalJSON

func (m MovementLineItem) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for MovementLineItem. It customizes the JSON marshaling process for MovementLineItem objects.

func (*MovementLineItem) UnmarshalJSON

func (m *MovementLineItem) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for MovementLineItem. It customizes the JSON unmarshaling process for MovementLineItem objects.

type MultiInvoicePayment

type MultiInvoicePayment struct {
	// The numeric ID of the transaction.
	TransactionId *int `json:"transaction_id,omitempty"`
	// Dollar amount of the sum of the paid invoices.
	TotalAmount *string `json:"total_amount,omitempty"`
	// The ISO 4217 currency code (3 character string) representing the currency of invoice transaction.
	CurrencyCode         *string                     `json:"currency_code,omitempty"`
	Applications         []InvoicePaymentApplication `json:"applications,omitempty"`
	AdditionalProperties map[string]any              `json:"_"`
}

MultiInvoicePayment represents a MultiInvoicePayment struct.

func (MultiInvoicePayment) MarshalJSON

func (m MultiInvoicePayment) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for MultiInvoicePayment. It customizes the JSON marshaling process for MultiInvoicePayment objects.

func (*MultiInvoicePayment) UnmarshalJSON

func (m *MultiInvoicePayment) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for MultiInvoicePayment. It customizes the JSON unmarshaling process for MultiInvoicePayment objects.

type MultiInvoicePaymentResponse

type MultiInvoicePaymentResponse struct {
	Payment              MultiInvoicePayment `json:"payment"`
	AdditionalProperties map[string]any      `json:"_"`
}

MultiInvoicePaymentResponse represents a MultiInvoicePaymentResponse struct.

func (MultiInvoicePaymentResponse) MarshalJSON

func (m MultiInvoicePaymentResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for MultiInvoicePaymentResponse. It customizes the JSON marshaling process for MultiInvoicePaymentResponse objects.

func (*MultiInvoicePaymentResponse) UnmarshalJSON

func (m *MultiInvoicePaymentResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for MultiInvoicePaymentResponse. It customizes the JSON unmarshaling process for MultiInvoicePaymentResponse objects.

type NestedSubscriptionGroup

type NestedSubscriptionGroup struct {
	// The UID for the group
	Uid *string `json:"uid,omitempty"`
	// Whether the group is configured to rely on a primary subscription for billing. At this time, it will always be 1.
	Scheme *int `json:"scheme,omitempty"`
	// The subscription ID of the primary within the group. Applicable to scheme 1.
	PrimarySubscriptionId *int `json:"primary_subscription_id,omitempty"`
	// A boolean indicating whether the subscription is the primary in the group. Applicable to scheme 1.
	Primary              *bool          `json:"primary,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

NestedSubscriptionGroup represents a NestedSubscriptionGroup struct.

func (NestedSubscriptionGroup) MarshalJSON

func (n NestedSubscriptionGroup) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for NestedSubscriptionGroup. It customizes the JSON marshaling process for NestedSubscriptionGroup objects.

func (*NestedSubscriptionGroup) UnmarshalJSON

func (n *NestedSubscriptionGroup) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for NestedSubscriptionGroup. It customizes the JSON unmarshaling process for NestedSubscriptionGroup objects.

type NetTerms

type NetTerms struct {
	DefaultNetTerms                    *int           `json:"default_net_terms,omitempty"`
	AutomaticNetTerms                  *int           `json:"automatic_net_terms,omitempty"`
	RemittanceNetTerms                 *int           `json:"remittance_net_terms,omitempty"`
	NetTermsOnRemittanceSignupsEnabled *bool          `json:"net_terms_on_remittance_signups_enabled,omitempty"`
	CustomNetTermsEnabled              *bool          `json:"custom_net_terms_enabled,omitempty"`
	AdditionalProperties               map[string]any `json:"_"`
}

NetTerms represents a NetTerms struct.

func (NetTerms) MarshalJSON

func (n NetTerms) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for NetTerms. It customizes the JSON marshaling process for NetTerms objects.

func (*NetTerms) UnmarshalJSON

func (n *NetTerms) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for NetTerms. It customizes the JSON unmarshaling process for NetTerms objects.

type Offer

type Offer struct {
	Id                     *int                `json:"id,omitempty"`
	SiteId                 *int                `json:"site_id,omitempty"`
	ProductFamilyId        *int                `json:"product_family_id,omitempty"`
	ProductId              *int                `json:"product_id,omitempty"`
	ProductPricePointId    *int                `json:"product_price_point_id,omitempty"`
	ProductRevisableNumber *int                `json:"product_revisable_number,omitempty"`
	Name                   *string             `json:"name,omitempty"`
	Handle                 *string             `json:"handle,omitempty"`
	Description            Optional[string]    `json:"description"`
	CreatedAt              *time.Time          `json:"created_at,omitempty"`
	UpdatedAt              *time.Time          `json:"updated_at,omitempty"`
	ArchivedAt             Optional[time.Time] `json:"archived_at"`
	OfferItems             []OfferItem         `json:"offer_items,omitempty"`
	OfferDiscounts         []OfferDiscount     `json:"offer_discounts,omitempty"`
	ProductFamilyName      *string             `json:"product_family_name,omitempty"`
	ProductName            *string             `json:"product_name,omitempty"`
	ProductPricePointName  *string             `json:"product_price_point_name,omitempty"`
	ProductPriceInCents    *int64              `json:"product_price_in_cents,omitempty"`
	OfferSignupPages       []OfferSignupPage   `json:"offer_signup_pages,omitempty"`
	AdditionalProperties   map[string]any      `json:"_"`
}

Offer represents a Offer struct.

func (Offer) MarshalJSON

func (o Offer) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Offer. It customizes the JSON marshaling process for Offer objects.

func (*Offer) UnmarshalJSON

func (o *Offer) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Offer. It customizes the JSON unmarshaling process for Offer objects.

type OfferDiscount

type OfferDiscount struct {
	CouponCode           *string        `json:"coupon_code,omitempty"`
	CouponId             *int           `json:"coupon_id,omitempty"`
	CouponName           *string        `json:"coupon_name,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

OfferDiscount represents a OfferDiscount struct.

func (OfferDiscount) MarshalJSON

func (o OfferDiscount) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for OfferDiscount. It customizes the JSON marshaling process for OfferDiscount objects.

func (*OfferDiscount) UnmarshalJSON

func (o *OfferDiscount) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for OfferDiscount. It customizes the JSON unmarshaling process for OfferDiscount objects.

type OfferItem

type OfferItem struct {
	ComponentId        *int            `json:"component_id,omitempty"`
	PricePointId       *int            `json:"price_point_id,omitempty"`
	StartingQuantity   *string         `json:"starting_quantity,omitempty"`
	Editable           *bool           `json:"editable,omitempty"`
	ComponentUnitPrice *string         `json:"component_unit_price,omitempty"`
	ComponentName      *string         `json:"component_name,omitempty"`
	PricePointName     *string         `json:"price_point_name,omitempty"`
	CurrencyPrices     []CurrencyPrice `json:"currency_prices,omitempty"`
	// The numerical interval. i.e. an interval of '30' coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled.
	Interval *int `json:"interval,omitempty"`
	// A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled.
	IntervalUnit         *IntervalUnit  `json:"interval_unit,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

OfferItem represents a OfferItem struct.

func (OfferItem) MarshalJSON

func (o OfferItem) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for OfferItem. It customizes the JSON marshaling process for OfferItem objects.

func (*OfferItem) UnmarshalJSON

func (o *OfferItem) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for OfferItem. It customizes the JSON unmarshaling process for OfferItem objects.

type OfferResponse

type OfferResponse struct {
	Offer                *Offer         `json:"offer,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

OfferResponse represents a OfferResponse struct.

func (OfferResponse) MarshalJSON

func (o OfferResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for OfferResponse. It customizes the JSON marshaling process for OfferResponse objects.

func (*OfferResponse) UnmarshalJSON

func (o *OfferResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for OfferResponse. It customizes the JSON unmarshaling process for OfferResponse objects.

type OfferSignupPage

type OfferSignupPage struct {
	Id                   *int           `json:"id,omitempty"`
	Nickname             *string        `json:"nickname,omitempty"`
	Enabled              *bool          `json:"enabled,omitempty"`
	ReturnUrl            *string        `json:"return_url,omitempty"`
	ReturnParams         *string        `json:"return_params,omitempty"`
	Url                  *string        `json:"url,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

OfferSignupPage represents a OfferSignupPage struct.

func (OfferSignupPage) MarshalJSON

func (o OfferSignupPage) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for OfferSignupPage. It customizes the JSON marshaling process for OfferSignupPage objects.

func (*OfferSignupPage) UnmarshalJSON

func (o *OfferSignupPage) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for OfferSignupPage. It customizes the JSON unmarshaling process for OfferSignupPage objects.

type OnOffComponent added in v0.1.0

type OnOffComponent struct {
	// A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes".
	Name string `json:"name"`
	// A description for the component that will be displayed to the user on the hosted signup page.
	Description *string `json:"description,omitempty"`
	// A unique identifier for your use that can be used to retrieve this component is subsequent requests.  Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.
	Handle *string `json:"handle,omitempty"`
	// Boolean flag describing whether a component is taxable or not.
	Taxable *bool `json:"taxable,omitempty"`
	// (Not required for ‘per_unit’ pricing schemes) One or more price brackets. See [Price Bracket Rules](https://chargify.zendesk.com/hc/en-us/articles/4407755865883#price-bracket-rules) for an overview of how price brackets work for different pricing schemes.
	Prices []Price `json:"prices,omitempty"`
	// The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
	// Available values: `full`, `prorated`, `none`.
	UpgradeCharge Optional[CreditType] `json:"upgrade_charge"`
	// The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
	// Available values: `full`, `prorated`, `none`.
	DowngradeCredit Optional[CreditType]      `json:"downgrade_credit"`
	PricePoints     []ComponentPricePointItem `json:"price_points,omitempty"`
	// The amount the customer will be charged per unit when the pricing scheme is “per_unit”. For On/Off Components, this is the amount that the customer will be charged when they turn the component on for the subscription. The price can contain up to 8 decimal places. i.e. 1.00 or 0.0012 or 0.00000065
	UnitPrice *OnOffComponentUnitPrice `json:"unit_price,omitempty"`
	// A string representing the tax code related to the component type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters.
	TaxCode *string `json:"tax_code,omitempty"`
	// (Only available on Relationship Invoicing sites) Boolean flag describing if the service date range should show for the component on generated invoices.
	HideDateRangeOnInvoice *bool `json:"hide_date_range_on_invoice,omitempty"`
	// deprecated May 2011 - use unit_price instead
	PriceInCents              *string `json:"price_in_cents,omitempty"`
	DisplayOnHostedPage       *bool   `json:"display_on_hosted_page,omitempty"`
	AllowFractionalQuantities *bool   `json:"allow_fractional_quantities,omitempty"`
	PublicSignupPageIds       []int   `json:"public_signup_page_ids,omitempty"`
	// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component's default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled.
	Interval *int `json:"interval,omitempty"`
	// A string representing the interval unit for this component's default price point, either month or day. This property is only available for sites with Multifrequency enabled.
	IntervalUnit         *IntervalUnit  `json:"interval_unit,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

OnOffComponent represents a OnOffComponent struct.

func (OnOffComponent) MarshalJSON added in v0.1.0

func (o OnOffComponent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for OnOffComponent. It customizes the JSON marshaling process for OnOffComponent objects.

func (*OnOffComponent) UnmarshalJSON added in v0.1.0

func (o *OnOffComponent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for OnOffComponent. It customizes the JSON unmarshaling process for OnOffComponent objects.

type OnOffComponentUnitPrice added in v0.1.0

type OnOffComponentUnitPrice struct {
	// contains filtered or unexported fields
}

OnOffComponentUnitPrice represents a OnOffComponentUnitPrice struct. This is a container for one-of cases.

func (*OnOffComponentUnitPrice) AsPrecision added in v0.1.0

func (o *OnOffComponentUnitPrice) AsPrecision() (
	*float64,
	bool)

func (*OnOffComponentUnitPrice) AsString added in v0.1.0

func (o *OnOffComponentUnitPrice) AsString() (
	*string,
	bool)

func (OnOffComponentUnitPrice) MarshalJSON added in v0.1.0

func (o OnOffComponentUnitPrice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for OnOffComponentUnitPrice. It customizes the JSON marshaling process for OnOffComponentUnitPrice objects.

func (OnOffComponentUnitPrice) String added in v0.1.0

func (o OnOffComponentUnitPrice) String() string

String converts the OnOffComponentUnitPrice object to a string representation.

func (*OnOffComponentUnitPrice) UnmarshalJSON added in v0.1.0

func (o *OnOffComponentUnitPrice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for OnOffComponentUnitPrice. It customizes the JSON unmarshaling process for OnOffComponentUnitPrice objects.

type Optional

type Optional[T any] struct {
	types.Optional[T]
}

Optional is a generic struct that allows any type to be used as optional and nullable. Optional.set is true when Optional.value is to be used.

func EmptyOptional added in v0.1.0

func EmptyOptional[T any]() Optional[T]

EmptyOptional creates and returns an Optional instance with empty value.

func NewOptional

func NewOptional[T any](value *T) Optional[T]

NewOptional creates and returns an Optional instance with the given value set.

func (*Optional[T]) IsValueSet

func (o *Optional[T]) IsValueSet() bool

IsValueSet returns true if a value is set in the Optional, false otherwise.

func (*Optional[T]) SetValue

func (o *Optional[T]) SetValue(value *T)

SetValue sets the value of the Optional.

func (*Optional[T]) ShouldSetValue

func (o *Optional[T]) ShouldSetValue(set bool)

ShouldSetValue sets whether the value should be used or not.

func (*Optional[T]) Value

func (o *Optional[T]) Value() *T

Value returns the value stored in the Optional. It returns nil if no value is set.

type OrganizationAddress

type OrganizationAddress struct {
	Street               Optional[string] `json:"street"`
	Line2                Optional[string] `json:"line2"`
	City                 Optional[string] `json:"city"`
	State                Optional[string] `json:"state"`
	Zip                  Optional[string] `json:"zip"`
	Country              Optional[string] `json:"country"`
	Name                 Optional[string] `json:"name"`
	Phone                Optional[string] `json:"phone"`
	AdditionalProperties map[string]any   `json:"_"`
}

OrganizationAddress represents a OrganizationAddress struct.

func (OrganizationAddress) MarshalJSON

func (o OrganizationAddress) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for OrganizationAddress. It customizes the JSON marshaling process for OrganizationAddress objects.

func (*OrganizationAddress) UnmarshalJSON

func (o *OrganizationAddress) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for OrganizationAddress. It customizes the JSON unmarshaling process for OrganizationAddress objects.

type OriginInvoice

type OriginInvoice struct {
	// The UID of the invoice serving as an origin invoice.
	Uid *string `json:"uid,omitempty"`
	// The number of the invoice serving as an origin invoice.
	Number               *string        `json:"number,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

OriginInvoice represents a OriginInvoice struct.

func (OriginInvoice) MarshalJSON

func (o OriginInvoice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for OriginInvoice. It customizes the JSON marshaling process for OriginInvoice objects.

func (*OriginInvoice) UnmarshalJSON

func (o *OriginInvoice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for OriginInvoice. It customizes the JSON unmarshaling process for OriginInvoice objects.

type OveragePricing

type OveragePricing struct {
	// The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes.
	PricingScheme        PricingScheme  `json:"pricing_scheme"`
	Prices               []Price        `json:"prices,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

OveragePricing represents a OveragePricing struct.

func (OveragePricing) MarshalJSON

func (o OveragePricing) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for OveragePricing. It customizes the JSON marshaling process for OveragePricing objects.

func (*OveragePricing) UnmarshalJSON

func (o *OveragePricing) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for OveragePricing. It customizes the JSON unmarshaling process for OveragePricing objects.

type OverrideSubscription

type OverrideSubscription struct {
	// Can be used to record an external signup date. Chargify uses this field to record when a subscription first goes active (either at signup or at trial end). Only ISO8601 format is supported.
	ActivatedAt *time.Time `json:"activated_at,omitempty"`
	// Can be used to record an external cancellation date. Chargify sets this field automatically when a subscription is canceled, whether by request or via dunning. Only ISO8601 format is supported.
	CanceledAt *time.Time `json:"canceled_at,omitempty"`
	// Can be used to record a reason for the original cancellation.
	CancellationMessage *string `json:"cancellation_message,omitempty"`
	// Can be used to record an external expiration date. Chargify sets this field automatically when a subscription expires (ceases billing) after a prescribed amount of time. Only ISO8601 format is supported.
	ExpiresAt *time.Time `json:"expires_at,omitempty"`
	// Can only be used when a subscription is unbilled, which happens when a future initial billing date is passed at subscription creation. The value passed must be before the current date and time. Allows you to set when the period started so mid period component allocations have the correct proration. Only ISO8601 format is supported.
	CurrentPeriodStartsAt *time.Time     `json:"current_period_starts_at,omitempty"`
	AdditionalProperties  map[string]any `json:"_"`
}

OverrideSubscription represents a OverrideSubscription struct.

func (OverrideSubscription) MarshalJSON

func (o OverrideSubscription) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for OverrideSubscription. It customizes the JSON marshaling process for OverrideSubscription objects.

func (*OverrideSubscription) UnmarshalJSON

func (o *OverrideSubscription) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for OverrideSubscription. It customizes the JSON unmarshaling process for OverrideSubscription objects.

type OverrideSubscriptionRequest

type OverrideSubscriptionRequest struct {
	Subscription         OverrideSubscription `json:"subscription"`
	AdditionalProperties map[string]any       `json:"_"`
}

OverrideSubscriptionRequest represents a OverrideSubscriptionRequest struct.

func (OverrideSubscriptionRequest) MarshalJSON

func (o OverrideSubscriptionRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for OverrideSubscriptionRequest. It customizes the JSON marshaling process for OverrideSubscriptionRequest objects.

func (*OverrideSubscriptionRequest) UnmarshalJSON

func (o *OverrideSubscriptionRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for OverrideSubscriptionRequest. It customizes the JSON unmarshaling process for OverrideSubscriptionRequest objects.

type PaginatedMetadata

type PaginatedMetadata struct {
	TotalCount           *int           `json:"total_count,omitempty"`
	CurrentPage          *int           `json:"current_page,omitempty"`
	TotalPages           *int           `json:"total_pages,omitempty"`
	PerPage              *int           `json:"per_page,omitempty"`
	Metadata             []Metadata     `json:"metadata,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

PaginatedMetadata represents a PaginatedMetadata struct.

func (PaginatedMetadata) MarshalJSON

func (p PaginatedMetadata) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PaginatedMetadata. It customizes the JSON marshaling process for PaginatedMetadata objects.

func (*PaginatedMetadata) UnmarshalJSON

func (p *PaginatedMetadata) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PaginatedMetadata. It customizes the JSON unmarshaling process for PaginatedMetadata objects.

type PaidInvoice added in v0.1.0

type PaidInvoice struct {
	// The uid of the paid invoice
	InvoiceId *string `json:"invoice_id,omitempty"`
	// The current status of the invoice. See [Invoice Statuses](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405078794253-Introduction-to-Invoices#invoice-statuses) for more.
	Status *InvoiceStatus `json:"status,omitempty"`
	// The remaining due amount on the invoice
	DueAmount *string `json:"due_amount,omitempty"`
	// The total amount paid on this invoice (including any prior payments)
	PaidAmount           *string        `json:"paid_amount,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

PaidInvoice represents a PaidInvoice struct.

func (PaidInvoice) MarshalJSON added in v0.1.0

func (p PaidInvoice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PaidInvoice. It customizes the JSON marshaling process for PaidInvoice objects.

func (*PaidInvoice) UnmarshalJSON added in v0.1.0

func (p *PaidInvoice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PaidInvoice. It customizes the JSON unmarshaling process for PaidInvoice objects.

type PauseRequest

type PauseRequest struct {
	Hold                 *AutoResume    `json:"hold,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

PauseRequest represents a PauseRequest struct. Allows to pause a Subscription

func (PauseRequest) MarshalJSON

func (p PauseRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PauseRequest. It customizes the JSON marshaling process for PauseRequest objects.

func (*PauseRequest) UnmarshalJSON

func (p *PauseRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PauseRequest. It customizes the JSON unmarshaling process for PauseRequest objects.

type PayerAttributes

type PayerAttributes struct {
	FirstName       *string `json:"first_name,omitempty"`
	LastName        *string `json:"last_name,omitempty"`
	Email           *string `json:"email,omitempty"`
	CcEmails        *string `json:"cc_emails,omitempty"`
	Organization    *string `json:"organization,omitempty"`
	Reference       *string `json:"reference,omitempty"`
	Address         *string `json:"address,omitempty"`
	Address2        *string `json:"address_2,omitempty"`
	City            *string `json:"city,omitempty"`
	State           *string `json:"state,omitempty"`
	Zip             *string `json:"zip,omitempty"`
	Country         *string `json:"country,omitempty"`
	Phone           *string `json:"phone,omitempty"`
	Locale          *string `json:"locale,omitempty"`
	VatNumber       *string `json:"vat_number,omitempty"`
	TaxExempt       *bool   `json:"tax_exempt,omitempty"`
	TaxExemptReason *string `json:"tax_exempt_reason,omitempty"`
	// (Optional) A set of key/value pairs representing custom fields and their values. Metafields will be created “on-the-fly” in your site for a given key, if they have not been created yet.
	Metafields           map[string]string `json:"metafields,omitempty"`
	AdditionalProperties map[string]any    `json:"_"`
}

PayerAttributes represents a PayerAttributes struct.

func (PayerAttributes) MarshalJSON

func (p PayerAttributes) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PayerAttributes. It customizes the JSON marshaling process for PayerAttributes objects.

func (*PayerAttributes) UnmarshalJSON

func (p *PayerAttributes) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PayerAttributes. It customizes the JSON unmarshaling process for PayerAttributes objects.

type PayerError

type PayerError struct {
	LastName             []string       `json:"last_name,omitempty"`
	FirstName            []string       `json:"first_name,omitempty"`
	Email                []string       `json:"email,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

PayerError represents a PayerError struct.

func (PayerError) MarshalJSON

func (p PayerError) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PayerError. It customizes the JSON marshaling process for PayerError objects.

func (*PayerError) UnmarshalJSON

func (p *PayerError) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PayerError. It customizes the JSON unmarshaling process for PayerError objects.

type PaymentCollectionMethodChanged added in v0.1.0

type PaymentCollectionMethodChanged struct {
	PreviousValue        string         `json:"previous_value"`
	CurrentValue         string         `json:"current_value"`
	AdditionalProperties map[string]any `json:"_"`
}

PaymentCollectionMethodChanged represents a PaymentCollectionMethodChanged struct.

func (PaymentCollectionMethodChanged) MarshalJSON added in v0.1.0

func (p PaymentCollectionMethodChanged) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PaymentCollectionMethodChanged. It customizes the JSON marshaling process for PaymentCollectionMethodChanged objects.

func (*PaymentCollectionMethodChanged) UnmarshalJSON added in v0.1.0

func (p *PaymentCollectionMethodChanged) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PaymentCollectionMethodChanged. It customizes the JSON unmarshaling process for PaymentCollectionMethodChanged objects.

type PaymentForAllocation

type PaymentForAllocation struct {
	Id                   *int           `json:"id,omitempty"`
	AmountInCents        *int64         `json:"amount_in_cents,omitempty"`
	Success              *bool          `json:"success,omitempty"`
	Memo                 *string        `json:"memo,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

PaymentForAllocation represents a PaymentForAllocation struct. Information for captured payment, if applicable

func (PaymentForAllocation) MarshalJSON

func (p PaymentForAllocation) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PaymentForAllocation. It customizes the JSON marshaling process for PaymentForAllocation objects.

func (*PaymentForAllocation) UnmarshalJSON

func (p *PaymentForAllocation) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PaymentForAllocation. It customizes the JSON unmarshaling process for PaymentForAllocation objects.

type PaymentMethodApplePay added in v0.1.0

type PaymentMethodApplePay struct {
	Type                 InvoiceEventPaymentMethod `json:"type"`
	AdditionalProperties map[string]any            `json:"_"`
}

PaymentMethodApplePay represents a PaymentMethodApplePay struct.

func (PaymentMethodApplePay) MarshalJSON added in v0.1.0

func (p PaymentMethodApplePay) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PaymentMethodApplePay. It customizes the JSON marshaling process for PaymentMethodApplePay objects.

func (*PaymentMethodApplePay) UnmarshalJSON added in v0.1.0

func (p *PaymentMethodApplePay) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PaymentMethodApplePay. It customizes the JSON unmarshaling process for PaymentMethodApplePay objects.

type PaymentMethodBankAccount added in v0.1.0

type PaymentMethodBankAccount struct {
	MaskedAccountNumber  string                    `json:"masked_account_number"`
	MaskedRoutingNumber  string                    `json:"masked_routing_number"`
	Type                 InvoiceEventPaymentMethod `json:"type"`
	AdditionalProperties map[string]any            `json:"_"`
}

PaymentMethodBankAccount represents a PaymentMethodBankAccount struct.

func (PaymentMethodBankAccount) MarshalJSON added in v0.1.0

func (p PaymentMethodBankAccount) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PaymentMethodBankAccount. It customizes the JSON marshaling process for PaymentMethodBankAccount objects.

func (*PaymentMethodBankAccount) UnmarshalJSON added in v0.1.0

func (p *PaymentMethodBankAccount) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PaymentMethodBankAccount. It customizes the JSON unmarshaling process for PaymentMethodBankAccount objects.

type PaymentMethodCreditCard added in v0.1.0

type PaymentMethodCreditCard struct {
	CardBrand            string                    `json:"card_brand"`
	CardExpiration       *string                   `json:"card_expiration,omitempty"`
	LastFour             Optional[string]          `json:"last_four"`
	MaskedCardNumber     string                    `json:"masked_card_number"`
	Type                 InvoiceEventPaymentMethod `json:"type"`
	AdditionalProperties map[string]any            `json:"_"`
}

PaymentMethodCreditCard represents a PaymentMethodCreditCard struct.

func (PaymentMethodCreditCard) MarshalJSON added in v0.1.0

func (p PaymentMethodCreditCard) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PaymentMethodCreditCard. It customizes the JSON marshaling process for PaymentMethodCreditCard objects.

func (*PaymentMethodCreditCard) UnmarshalJSON added in v0.1.0

func (p *PaymentMethodCreditCard) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PaymentMethodCreditCard. It customizes the JSON unmarshaling process for PaymentMethodCreditCard objects.

type PaymentMethodExternal added in v0.1.0

type PaymentMethodExternal struct {
	Details              *string                   `json:"details"`
	Kind                 string                    `json:"kind"`
	Memo                 *string                   `json:"memo"`
	Type                 InvoiceEventPaymentMethod `json:"type"`
	AdditionalProperties map[string]any            `json:"_"`
}

PaymentMethodExternal represents a PaymentMethodExternal struct.

func (PaymentMethodExternal) MarshalJSON added in v0.1.0

func (p PaymentMethodExternal) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PaymentMethodExternal. It customizes the JSON marshaling process for PaymentMethodExternal objects.

func (*PaymentMethodExternal) UnmarshalJSON added in v0.1.0

func (p *PaymentMethodExternal) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PaymentMethodExternal. It customizes the JSON unmarshaling process for PaymentMethodExternal objects.

type PaymentMethodPaypal added in v0.1.0

type PaymentMethodPaypal struct {
	Email                string                    `json:"email"`
	Type                 InvoiceEventPaymentMethod `json:"type"`
	AdditionalProperties map[string]any            `json:"_"`
}

PaymentMethodPaypal represents a PaymentMethodPaypal struct.

func (PaymentMethodPaypal) MarshalJSON added in v0.1.0

func (p PaymentMethodPaypal) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PaymentMethodPaypal. It customizes the JSON marshaling process for PaymentMethodPaypal objects.

func (*PaymentMethodPaypal) UnmarshalJSON added in v0.1.0

func (p *PaymentMethodPaypal) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PaymentMethodPaypal. It customizes the JSON unmarshaling process for PaymentMethodPaypal objects.

type PaymentProfileAttributes

type PaymentProfileAttributes struct {
	// (Optional) Token received after sending billing informations using chargify.js. This token must be passed as a sole attribute of `payment_profile_attributes` (i.e. tok_9g6hw85pnpt6knmskpwp4ttt)
	ChargifyToken *string `json:"chargify_token,omitempty"`
	Id            *int    `json:"id,omitempty"`
	PaymentType   *string `json:"payment_type,omitempty"`
	// (Optional) First name on card or bank account. If omitted, the first_name from customer attributes will be used.
	FirstName *string `json:"first_name,omitempty"`
	// (Optional) Last name on card or bank account. If omitted, the last_name from customer attributes will be used.
	LastName         *string `json:"last_name,omitempty"`
	MaskedCardNumber *string `json:"masked_card_number,omitempty"`
	// The full credit card number (string representation, i.e. 5424000000000015)
	FullNumber *string `json:"full_number,omitempty"`
	// (Optional, used only for Subscription Import) If you know the card type (i.e. Visa, MC, etc) you may supply it here so that we may display the card type in the UI.
	CardType *CardType `json:"card_type,omitempty"`
	// (Optional when performing a Subscription Import via vault_token, required otherwise) The 1- or 2-digit credit card expiration month, as an integer or string, i.e. 5
	ExpirationMonth *PaymentProfileAttributesExpirationMonth `json:"expiration_month,omitempty"`
	// (Optional when performing a Subscription Import via vault_token, required otherwise) The 4-digit credit card expiration year, as an integer or string, i.e. 2012
	ExpirationYear *PaymentProfileAttributesExpirationYear `json:"expiration_year,omitempty"`
	// (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing street address (i.e. 123 Main St.). This value is merely passed through to the payment gateway.
	BillingAddress *string `json:"billing_address,omitempty"`
	// (Optional) Second line of the customer’s billing address i.e. Apt. 100
	BillingAddress2 Optional[string] `json:"billing_address_2"`
	// (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address city (i.e. “Boston”). This value is merely passed through to the payment gateway.
	BillingCity *string `json:"billing_city,omitempty"`
	// (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address state (i.e. MA). This value is merely passed through to the payment gateway. This must conform to the [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes.
	BillingState *string `json:"billing_state,omitempty"`
	// (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (i.e. “US”). This value is merely passed through to the payment gateway. Some gateways require country codes in a specific format. Please check your gateway’s documentation. If creating an ACH subscription, only US is supported at this time.
	BillingCountry *string `json:"billing_country,omitempty"`
	// (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address zip code (i.e. 12345). This value is merely passed through to the payment gateway.
	BillingZip *string `json:"billing_zip,omitempty"`
	// (Optional, used only for Subscription Import) The vault that stores the payment profile with the provided vault_token.
	CurrentVault *CurrentVault `json:"current_vault,omitempty"`
	// (Optional, used only for Subscription Import) The “token” provided by your vault storage for an already stored payment profile
	VaultToken *string `json:"vault_token,omitempty"`
	// (Optional, used only for Subscription Import) (only for Authorize.Net CIM storage or Square) The customerProfileId for the owner of the customerPaymentProfileId provided as the vault_token
	CustomerVaultToken *string `json:"customer_vault_token,omitempty"`
	CustomerId         *int    `json:"customer_id,omitempty"`
	PaypalEmail        *string `json:"paypal_email,omitempty"`
	// (Required for Square unless importing with vault_token and customer_vault_token) The nonce generated by the Square Javascript library (SqPaymentForm)
	PaymentMethodNonce *string `json:"payment_method_nonce,omitempty"`
	// (Optional) This attribute is only available if MultiGateway feature is enabled for your Site. This feature is in the Private Beta currently. gateway_handle is used to directly select a gateway where a payment profile will be stored in. Every connected gateway must have a unique gateway handle specified. Read [Multigateway description](https://chargify.zendesk.com/hc/en-us/articles/4407761759643#connecting-with-multiple-gateways) to learn more about new concepts that MultiGateway introduces and the default behavior when this attribute is not passed.
	GatewayHandle *string `json:"gateway_handle,omitempty"`
	// (Optional, may be required by your gateway settings) The 3- or 4-digit Card Verification Value. This value is merely passed through to the payment gateway.
	Cvv *string `json:"cvv,omitempty"`
	// (Optional, used only for Subscription Import) If you have the last 4 digits of the credit card number, you may supply them here so that we may create a masked card number (i.e. XXXX-XXXX-XXXX-1234) for display in the UI. Last 4 digits are required for refunds in Auth.Net.
	LastFour             *string        `json:"last_four,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

PaymentProfileAttributes represents a PaymentProfileAttributes struct. alias to credit_card_attributes

func (PaymentProfileAttributes) MarshalJSON

func (p PaymentProfileAttributes) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PaymentProfileAttributes. It customizes the JSON marshaling process for PaymentProfileAttributes objects.

func (*PaymentProfileAttributes) UnmarshalJSON

func (p *PaymentProfileAttributes) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PaymentProfileAttributes. It customizes the JSON unmarshaling process for PaymentProfileAttributes objects.

type PaymentProfileAttributesExpirationMonth added in v0.1.0

type PaymentProfileAttributesExpirationMonth struct {
	// contains filtered or unexported fields
}

PaymentProfileAttributesExpirationMonth represents a PaymentProfileAttributesExpirationMonth struct. This is a container for one-of cases.

func (*PaymentProfileAttributesExpirationMonth) AsNumber added in v0.1.0

func (*PaymentProfileAttributesExpirationMonth) AsString added in v0.1.0

func (PaymentProfileAttributesExpirationMonth) MarshalJSON added in v0.1.0

func (p PaymentProfileAttributesExpirationMonth) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PaymentProfileAttributesExpirationMonth. It customizes the JSON marshaling process for PaymentProfileAttributesExpirationMonth objects.

func (PaymentProfileAttributesExpirationMonth) String added in v0.1.0

String converts the PaymentProfileAttributesExpirationMonth object to a string representation.

func (*PaymentProfileAttributesExpirationMonth) UnmarshalJSON added in v0.1.0

func (p *PaymentProfileAttributesExpirationMonth) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PaymentProfileAttributesExpirationMonth. It customizes the JSON unmarshaling process for PaymentProfileAttributesExpirationMonth objects.

type PaymentProfileAttributesExpirationYear added in v0.1.0

type PaymentProfileAttributesExpirationYear struct {
	// contains filtered or unexported fields
}

PaymentProfileAttributesExpirationYear represents a PaymentProfileAttributesExpirationYear struct. This is a container for one-of cases.

func (*PaymentProfileAttributesExpirationYear) AsNumber added in v0.1.0

func (p *PaymentProfileAttributesExpirationYear) AsNumber() (
	*int,
	bool)

func (*PaymentProfileAttributesExpirationYear) AsString added in v0.1.0

func (PaymentProfileAttributesExpirationYear) MarshalJSON added in v0.1.0

func (p PaymentProfileAttributesExpirationYear) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PaymentProfileAttributesExpirationYear. It customizes the JSON marshaling process for PaymentProfileAttributesExpirationYear objects.

func (PaymentProfileAttributesExpirationYear) String added in v0.1.0

String converts the PaymentProfileAttributesExpirationYear object to a string representation.

func (*PaymentProfileAttributesExpirationYear) UnmarshalJSON added in v0.1.0

func (p *PaymentProfileAttributesExpirationYear) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PaymentProfileAttributesExpirationYear. It customizes the JSON unmarshaling process for PaymentProfileAttributesExpirationYear objects.

type PaymentProfileResponse

type PaymentProfileResponse struct {
	PaymentProfile       PaymentProfileResponsePaymentProfile `json:"payment_profile"`
	AdditionalProperties map[string]any                       `json:"_"`
}

PaymentProfileResponse represents a PaymentProfileResponse struct.

func (PaymentProfileResponse) MarshalJSON

func (p PaymentProfileResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PaymentProfileResponse. It customizes the JSON marshaling process for PaymentProfileResponse objects.

func (*PaymentProfileResponse) UnmarshalJSON

func (p *PaymentProfileResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PaymentProfileResponse. It customizes the JSON unmarshaling process for PaymentProfileResponse objects.

type PaymentProfileResponsePaymentProfile added in v0.1.0

type PaymentProfileResponsePaymentProfile struct {
	// contains filtered or unexported fields
}

PaymentProfileResponsePaymentProfile represents a PaymentProfileResponsePaymentProfile struct. This is a container for one-of cases.

func (*PaymentProfileResponsePaymentProfile) AsBankAccountPaymentProfile added in v0.1.0

func (p *PaymentProfileResponsePaymentProfile) AsBankAccountPaymentProfile() (
	*BankAccountPaymentProfile,
	bool)

func (*PaymentProfileResponsePaymentProfile) AsCreditCardPaymentProfile added in v0.1.0

func (p *PaymentProfileResponsePaymentProfile) AsCreditCardPaymentProfile() (
	*CreditCardPaymentProfile,
	bool)

func (PaymentProfileResponsePaymentProfile) MarshalJSON added in v0.1.0

func (p PaymentProfileResponsePaymentProfile) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PaymentProfileResponsePaymentProfile. It customizes the JSON marshaling process for PaymentProfileResponsePaymentProfile objects.

func (PaymentProfileResponsePaymentProfile) String added in v0.1.0

String converts the PaymentProfileResponsePaymentProfile object to a string representation.

func (*PaymentProfileResponsePaymentProfile) UnmarshalJSON added in v0.1.0

func (p *PaymentProfileResponsePaymentProfile) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PaymentProfileResponsePaymentProfile. It customizes the JSON unmarshaling process for PaymentProfileResponsePaymentProfile objects.

type PaymentRelatedEvents added in v0.1.0

type PaymentRelatedEvents struct {
	ProductId            int            `json:"product_id"`
	AccountTransactionId int            `json:"account_transaction_id"`
	AdditionalProperties map[string]any `json:"_"`
}

PaymentRelatedEvents represents a PaymentRelatedEvents struct.

func (PaymentRelatedEvents) MarshalJSON added in v0.1.0

func (p PaymentRelatedEvents) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PaymentRelatedEvents. It customizes the JSON marshaling process for PaymentRelatedEvents objects.

func (*PaymentRelatedEvents) UnmarshalJSON added in v0.1.0

func (p *PaymentRelatedEvents) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PaymentRelatedEvents. It customizes the JSON unmarshaling process for PaymentRelatedEvents objects.

type PaymentType

type PaymentType string

PaymentType is a string enum.

const (
	PaymentType_CREDITCARD    PaymentType = "credit_card"
	PaymentType_BANKACCOUNT   PaymentType = "bank_account"
	PaymentType_PAYPALACCOUNT PaymentType = "paypal_account"
)

func (PaymentType) MarshalJSON added in v0.2.0

func (e PaymentType) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PaymentType. It customizes the JSON marshaling process for PaymentType objects.

func (*PaymentType) UnmarshalJSON added in v0.2.0

func (e *PaymentType) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PaymentType. It customizes the JSON unmarshaling process for PaymentType objects.

type PendingCancellationChange added in v0.1.0

type PendingCancellationChange struct {
	CancellationState    string         `json:"cancellation_state"`
	CancelsAt            time.Time      `json:"cancels_at"`
	AdditionalProperties map[string]any `json:"_"`
}

PendingCancellationChange represents a PendingCancellationChange struct.

func (PendingCancellationChange) MarshalJSON added in v0.1.0

func (p PendingCancellationChange) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PendingCancellationChange. It customizes the JSON marshaling process for PendingCancellationChange objects.

func (*PendingCancellationChange) UnmarshalJSON added in v0.1.0

func (p *PendingCancellationChange) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PendingCancellationChange. It customizes the JSON unmarshaling process for PendingCancellationChange objects.

type PortalManagementLink struct {
	Url                  *string             `json:"url,omitempty"`
	FetchCount           *int                `json:"fetch_count,omitempty"`
	CreatedAt            *time.Time          `json:"created_at,omitempty"`
	NewLinkAvailableAt   *time.Time          `json:"new_link_available_at,omitempty"`
	ExpiresAt            *time.Time          `json:"expires_at,omitempty"`
	LastInviteSentAt     Optional[time.Time] `json:"last_invite_sent_at"`
	AdditionalProperties map[string]any      `json:"_"`
}

PortalManagementLink represents a PortalManagementLink struct.

func (PortalManagementLink) MarshalJSON

func (p PortalManagementLink) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PortalManagementLink. It customizes the JSON marshaling process for PortalManagementLink objects.

func (*PortalManagementLink) UnmarshalJSON

func (p *PortalManagementLink) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PortalManagementLink. It customizes the JSON unmarshaling process for PortalManagementLink objects.

type PrepaidComponentPricePoint added in v0.1.0

type PrepaidComponentPricePoint struct {
	Name   *string `json:"name,omitempty"`
	Handle *string `json:"handle,omitempty"`
	// The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes.
	PricingScheme        *PricingScheme  `json:"pricing_scheme,omitempty"`
	Prices               []Price         `json:"prices,omitempty"`
	OveragePricing       *OveragePricing `json:"overage_pricing,omitempty"`
	AdditionalProperties map[string]any  `json:"_"`
}

PrepaidComponentPricePoint represents a PrepaidComponentPricePoint struct.

func (PrepaidComponentPricePoint) MarshalJSON added in v0.1.0

func (p PrepaidComponentPricePoint) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PrepaidComponentPricePoint. It customizes the JSON marshaling process for PrepaidComponentPricePoint objects.

func (*PrepaidComponentPricePoint) UnmarshalJSON added in v0.1.0

func (p *PrepaidComponentPricePoint) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PrepaidComponentPricePoint. It customizes the JSON unmarshaling process for PrepaidComponentPricePoint objects.

type PrepaidConfiguration

type PrepaidConfiguration struct {
	Id                              *int           `json:"id,omitempty"`
	InitialFundingAmountInCents     *int64         `json:"initial_funding_amount_in_cents,omitempty"`
	ReplenishToAmountInCents        *int64         `json:"replenish_to_amount_in_cents,omitempty"`
	AutoReplenish                   *bool          `json:"auto_replenish,omitempty"`
	ReplenishThresholdAmountInCents *int64         `json:"replenish_threshold_amount_in_cents,omitempty"`
	AdditionalProperties            map[string]any `json:"_"`
}

PrepaidConfiguration represents a PrepaidConfiguration struct.

func (PrepaidConfiguration) MarshalJSON

func (p PrepaidConfiguration) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PrepaidConfiguration. It customizes the JSON marshaling process for PrepaidConfiguration objects.

func (*PrepaidConfiguration) UnmarshalJSON

func (p *PrepaidConfiguration) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PrepaidConfiguration. It customizes the JSON unmarshaling process for PrepaidConfiguration objects.

type PrepaidConfigurationResponse

type PrepaidConfigurationResponse struct {
	PrepaidConfiguration PrepaidConfiguration `json:"prepaid_configuration"`
	AdditionalProperties map[string]any       `json:"_"`
}

PrepaidConfigurationResponse represents a PrepaidConfigurationResponse struct.

func (PrepaidConfigurationResponse) MarshalJSON

func (p PrepaidConfigurationResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PrepaidConfigurationResponse. It customizes the JSON marshaling process for PrepaidConfigurationResponse objects.

func (*PrepaidConfigurationResponse) UnmarshalJSON

func (p *PrepaidConfigurationResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PrepaidConfigurationResponse. It customizes the JSON unmarshaling process for PrepaidConfigurationResponse objects.

type PrepaidProductPricePointFilter added in v0.2.0

type PrepaidProductPricePointFilter struct {
	// Passed as a parameter to list methods to return only non null values.
	ProductPricePointId  string         `json:"product_price_point_id"`
	AdditionalProperties map[string]any `json:"_"`
}

PrepaidProductPricePointFilter represents a PrepaidProductPricePointFilter struct.

func (PrepaidProductPricePointFilter) MarshalJSON added in v0.2.0

func (p PrepaidProductPricePointFilter) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PrepaidProductPricePointFilter. It customizes the JSON marshaling process for PrepaidProductPricePointFilter objects.

func (*PrepaidProductPricePointFilter) UnmarshalJSON added in v0.2.0

func (p *PrepaidProductPricePointFilter) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PrepaidProductPricePointFilter. It customizes the JSON unmarshaling process for PrepaidProductPricePointFilter objects.

type PrepaidSubscriptionBalanceChanged added in v0.1.0

type PrepaidSubscriptionBalanceChanged struct {
	Reason                          string         `json:"reason"`
	CurrentAccountBalanceInCents    int64          `json:"current_account_balance_in_cents"`
	PrepaymentAccountBalanceInCents int64          `json:"prepayment_account_balance_in_cents"`
	CurrentUsageAmountInCents       int64          `json:"current_usage_amount_in_cents"`
	AdditionalProperties            map[string]any `json:"_"`
}

PrepaidSubscriptionBalanceChanged represents a PrepaidSubscriptionBalanceChanged struct.

func (PrepaidSubscriptionBalanceChanged) MarshalJSON added in v0.1.0

func (p PrepaidSubscriptionBalanceChanged) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PrepaidSubscriptionBalanceChanged. It customizes the JSON marshaling process for PrepaidSubscriptionBalanceChanged objects.

func (*PrepaidSubscriptionBalanceChanged) UnmarshalJSON added in v0.1.0

func (p *PrepaidSubscriptionBalanceChanged) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PrepaidSubscriptionBalanceChanged. It customizes the JSON unmarshaling process for PrepaidSubscriptionBalanceChanged objects.

type PrepaidUsage added in v0.1.0

type PrepaidUsage struct {
	PreviousUnitBalance        string                         `json:"previous_unit_balance"`
	PreviousOverageUnitBalance string                         `json:"previous_overage_unit_balance"`
	NewUnitBalance             int                            `json:"new_unit_balance"`
	NewOverageUnitBalance      int                            `json:"new_overage_unit_balance"`
	UsageQuantity              int                            `json:"usage_quantity"`
	OverageUsageQuantity       int                            `json:"overage_usage_quantity"`
	ComponentId                int                            `json:"component_id"`
	ComponentHandle            string                         `json:"component_handle"`
	Memo                       string                         `json:"memo"`
	AllocationDetails          []PrepaidUsageAllocationDetail `json:"allocation_details"`
	AdditionalProperties       map[string]any                 `json:"_"`
}

PrepaidUsage represents a PrepaidUsage struct.

func (PrepaidUsage) MarshalJSON added in v0.1.0

func (p PrepaidUsage) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PrepaidUsage. It customizes the JSON marshaling process for PrepaidUsage objects.

func (*PrepaidUsage) UnmarshalJSON added in v0.1.0

func (p *PrepaidUsage) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PrepaidUsage. It customizes the JSON unmarshaling process for PrepaidUsage objects.

type PrepaidUsageAllocationDetail added in v0.1.0

type PrepaidUsageAllocationDetail struct {
	AllocationId         *int           `json:"allocation_id,omitempty"`
	ChargeId             *int           `json:"charge_id,omitempty"`
	UsageQuantity        *int           `json:"usage_quantity,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

PrepaidUsageAllocationDetail represents a PrepaidUsageAllocationDetail struct.

func (PrepaidUsageAllocationDetail) MarshalJSON added in v0.1.0

func (p PrepaidUsageAllocationDetail) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PrepaidUsageAllocationDetail. It customizes the JSON marshaling process for PrepaidUsageAllocationDetail objects.

func (*PrepaidUsageAllocationDetail) UnmarshalJSON added in v0.1.0

func (p *PrepaidUsageAllocationDetail) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PrepaidUsageAllocationDetail. It customizes the JSON unmarshaling process for PrepaidUsageAllocationDetail objects.

type PrepaidUsageComponent added in v0.1.0

type PrepaidUsageComponent struct {
	// A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes".
	Name string `json:"name"`
	// The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. i.e. “message”, which may then be shown as “5 messages” on a subscription’s component line-item
	UnitName *string `json:"unit_name,omitempty"`
	// A description for the component that will be displayed to the user on the hosted signup page.
	Description *string `json:"description,omitempty"`
	// A unique identifier for your use that can be used to retrieve this component is subsequent requests.  Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.
	Handle *string `json:"handle,omitempty"`
	// Boolean flag describing whether a component is taxable or not.
	Taxable *bool `json:"taxable,omitempty"`
	// The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes.
	PricingScheme *PricingScheme `json:"pricing_scheme,omitempty"`
	// (Not required for ‘per_unit’ pricing schemes) One or more price brackets. See [Price Bracket Rules](https://chargify.zendesk.com/hc/en-us/articles/4407755865883#general-price-bracket-rules) for an overview of how price brackets work for different pricing schemes.
	Prices []Price `json:"prices,omitempty"`
	// The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
	// Available values: `full`, `prorated`, `none`.
	UpgradeCharge Optional[CreditType] `json:"upgrade_charge"`
	// The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
	// Available values: `full`, `prorated`, `none`.
	DowngradeCredit Optional[CreditType]         `json:"downgrade_credit"`
	PricePoints     []PrepaidComponentPricePoint `json:"price_points,omitempty"`
	// The amount the customer will be charged per unit when the pricing scheme is “per_unit”. For On/Off Components, this is the amount that the customer will be charged when they turn the component on for the subscription. The price can contain up to 8 decimal places. i.e. 1.00 or 0.0012 or 0.00000065
	UnitPrice *PrepaidUsageComponentUnitPrice `json:"unit_price,omitempty"`
	// A string representing the tax code related to the component type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters.
	TaxCode *string `json:"tax_code,omitempty"`
	// (Only available on Relationship Invoicing sites) Boolean flag describing if the service date range should show for the component on generated invoices.
	HideDateRangeOnInvoice *bool `json:"hide_date_range_on_invoice,omitempty"`
	// deprecated May 2011 - use unit_price instead
	PriceInCents   *string         `json:"price_in_cents,omitempty"`
	OveragePricing *OveragePricing `json:"overage_pricing,omitempty"`
	// Boolean which controls whether or not remaining units should be rolled over to the next period
	RolloverPrepaidRemainder *bool `json:"rollover_prepaid_remainder,omitempty"`
	// Boolean which controls whether or not the allocated quantity should be renewed at the beginning of each period
	RenewPrepaidAllocation *bool `json:"renew_prepaid_allocation,omitempty"`
	// (only for prepaid usage components where rollover_prepaid_remainder is true) The number of `expiration_interval_unit`s after which rollover amounts should expire
	ExpirationInterval        *float64       `json:"expiration_interval,omitempty"`
	ExpirationIntervalUnit    *IntervalUnit  `json:"expiration_interval_unit,omitempty"`
	DisplayOnHostedPage       *bool          `json:"display_on_hosted_page,omitempty"`
	AllowFractionalQuantities *bool          `json:"allow_fractional_quantities,omitempty"`
	PublicSignupPageIds       []int          `json:"public_signup_page_ids,omitempty"`
	AdditionalProperties      map[string]any `json:"_"`
}

PrepaidUsageComponent represents a PrepaidUsageComponent struct.

func (PrepaidUsageComponent) MarshalJSON added in v0.1.0

func (p PrepaidUsageComponent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PrepaidUsageComponent. It customizes the JSON marshaling process for PrepaidUsageComponent objects.

func (*PrepaidUsageComponent) UnmarshalJSON added in v0.1.0

func (p *PrepaidUsageComponent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PrepaidUsageComponent. It customizes the JSON unmarshaling process for PrepaidUsageComponent objects.

type PrepaidUsageComponentUnitPrice added in v0.1.0

type PrepaidUsageComponentUnitPrice struct {
	// contains filtered or unexported fields
}

PrepaidUsageComponentUnitPrice represents a PrepaidUsageComponentUnitPrice struct. This is a container for one-of cases.

func (*PrepaidUsageComponentUnitPrice) AsPrecision added in v0.1.0

func (p *PrepaidUsageComponentUnitPrice) AsPrecision() (
	*float64,
	bool)

func (*PrepaidUsageComponentUnitPrice) AsString added in v0.1.0

func (p *PrepaidUsageComponentUnitPrice) AsString() (
	*string,
	bool)

func (PrepaidUsageComponentUnitPrice) MarshalJSON added in v0.1.0

func (p PrepaidUsageComponentUnitPrice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PrepaidUsageComponentUnitPrice. It customizes the JSON marshaling process for PrepaidUsageComponentUnitPrice objects.

func (PrepaidUsageComponentUnitPrice) String added in v0.1.0

String converts the PrepaidUsageComponentUnitPrice object to a string representation.

func (*PrepaidUsageComponentUnitPrice) UnmarshalJSON added in v0.1.0

func (p *PrepaidUsageComponentUnitPrice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PrepaidUsageComponentUnitPrice. It customizes the JSON unmarshaling process for PrepaidUsageComponentUnitPrice objects.

type Prepayment

type Prepayment struct {
	Id                     int     `json:"id"`
	SubscriptionId         int     `json:"subscription_id"`
	AmountInCents          int64   `json:"amount_in_cents"`
	RemainingAmountInCents int64   `json:"remaining_amount_in_cents"`
	RefundedAmountInCents  *int64  `json:"refunded_amount_in_cents,omitempty"`
	Details                *string `json:"details,omitempty"`
	External               bool    `json:"external"`
	Memo                   string  `json:"memo"`
	// The payment type of the prepayment.
	PaymentType          *PrepaymentMethod `json:"payment_type,omitempty"`
	CreatedAt            time.Time         `json:"created_at"`
	AdditionalProperties map[string]any    `json:"_"`
}

Prepayment represents a Prepayment struct.

func (Prepayment) MarshalJSON

func (p Prepayment) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Prepayment. It customizes the JSON marshaling process for Prepayment objects.

func (*Prepayment) UnmarshalJSON

func (p *Prepayment) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Prepayment. It customizes the JSON unmarshaling process for Prepayment objects.

type PrepaymentAccountBalanceChanged added in v0.1.0

type PrepaymentAccountBalanceChanged struct {
	Reason                          string         `json:"reason"`
	PrepaymentAccountBalanceInCents int64          `json:"prepayment_account_balance_in_cents"`
	PrepaymentBalanceChangeInCents  int64          `json:"prepayment_balance_change_in_cents"`
	CurrencyCode                    string         `json:"currency_code"`
	AdditionalProperties            map[string]any `json:"_"`
}

PrepaymentAccountBalanceChanged represents a PrepaymentAccountBalanceChanged struct.

func (PrepaymentAccountBalanceChanged) MarshalJSON added in v0.1.0

func (p PrepaymentAccountBalanceChanged) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PrepaymentAccountBalanceChanged. It customizes the JSON marshaling process for PrepaymentAccountBalanceChanged objects.

func (*PrepaymentAccountBalanceChanged) UnmarshalJSON added in v0.1.0

func (p *PrepaymentAccountBalanceChanged) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PrepaymentAccountBalanceChanged. It customizes the JSON unmarshaling process for PrepaymentAccountBalanceChanged objects.

type PrepaymentMethod

type PrepaymentMethod string

PrepaymentMethod is a string enum.

const (
	PrepaymentMethod_CHECK         PrepaymentMethod = "check"
	PrepaymentMethod_CASH          PrepaymentMethod = "cash"
	PrepaymentMethod_MONEYORDER    PrepaymentMethod = "money_order"
	PrepaymentMethod_ACH           PrepaymentMethod = "ach"
	PrepaymentMethod_PAYPALACCOUNT PrepaymentMethod = "paypal_account"
	PrepaymentMethod_CREDITCARD    PrepaymentMethod = "credit_card"
	PrepaymentMethod_OTHER         PrepaymentMethod = "other"
)

func (PrepaymentMethod) MarshalJSON added in v0.2.0

func (e PrepaymentMethod) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PrepaymentMethod. It customizes the JSON marshaling process for PrepaymentMethod objects.

func (*PrepaymentMethod) UnmarshalJSON added in v0.2.0

func (e *PrepaymentMethod) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PrepaymentMethod. It customizes the JSON unmarshaling process for PrepaymentMethod objects.

type PrepaymentResponse

type PrepaymentResponse struct {
	Prepayment           Prepayment     `json:"prepayment"`
	AdditionalProperties map[string]any `json:"_"`
}

PrepaymentResponse represents a PrepaymentResponse struct.

func (PrepaymentResponse) MarshalJSON

func (p PrepaymentResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PrepaymentResponse. It customizes the JSON marshaling process for PrepaymentResponse objects.

func (*PrepaymentResponse) UnmarshalJSON

func (p *PrepaymentResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PrepaymentResponse. It customizes the JSON unmarshaling process for PrepaymentResponse objects.

type PrepaymentsResponse

type PrepaymentsResponse struct {
	Prepayments          []Prepayment   `json:"prepayments,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

PrepaymentsResponse represents a PrepaymentsResponse struct.

func (PrepaymentsResponse) MarshalJSON

func (p PrepaymentsResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PrepaymentsResponse. It customizes the JSON marshaling process for PrepaymentsResponse objects.

func (*PrepaymentsResponse) UnmarshalJSON

func (p *PrepaymentsResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PrepaymentsResponse. It customizes the JSON unmarshaling process for PrepaymentsResponse objects.

type PreviewAllocationsRequest

type PreviewAllocationsRequest struct {
	Allocations []CreateAllocation `json:"allocations"`
	// To calculate proration amounts for a future time. Only within a current subscription period. Only ISO8601 format is supported.
	EffectiveProrationDate *time.Time `json:"effective_proration_date,omitempty"`
	// The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
	// Available values: `full`, `prorated`, `none`.
	UpgradeCharge Optional[CreditType] `json:"upgrade_charge"`
	// The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
	// Available values: `full`, `prorated`, `none`.
	DowngradeCredit      Optional[CreditType] `json:"downgrade_credit"`
	AdditionalProperties map[string]any       `json:"_"`
}

PreviewAllocationsRequest represents a PreviewAllocationsRequest struct.

func (PreviewAllocationsRequest) MarshalJSON

func (p PreviewAllocationsRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PreviewAllocationsRequest. It customizes the JSON marshaling process for PreviewAllocationsRequest objects.

func (*PreviewAllocationsRequest) UnmarshalJSON

func (p *PreviewAllocationsRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PreviewAllocationsRequest. It customizes the JSON unmarshaling process for PreviewAllocationsRequest objects.

type Price

type Price struct {
	StartingQuantity PriceStartingQuantity         `json:"starting_quantity"`
	EndingQuantity   Optional[PriceEndingQuantity] `json:"ending_quantity"`
	// The price can contain up to 8 decimal places. i.e. 1.00 or 0.0012 or 0.00000065
	UnitPrice            PriceUnitPrice `json:"unit_price"`
	AdditionalProperties map[string]any `json:"_"`
}

Price represents a Price struct.

func (Price) MarshalJSON

func (p Price) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Price. It customizes the JSON marshaling process for Price objects.

func (*Price) UnmarshalJSON

func (p *Price) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Price. It customizes the JSON unmarshaling process for Price objects.

type PriceEndingQuantity added in v0.1.0

type PriceEndingQuantity struct {
	// contains filtered or unexported fields
}

PriceEndingQuantity represents a PriceEndingQuantity struct. This is a container for one-of cases.

func (*PriceEndingQuantity) AsNumber added in v0.1.0

func (p *PriceEndingQuantity) AsNumber() (
	*int,
	bool)

func (*PriceEndingQuantity) AsString added in v0.1.0

func (p *PriceEndingQuantity) AsString() (
	*string,
	bool)

func (PriceEndingQuantity) MarshalJSON added in v0.1.0

func (p PriceEndingQuantity) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PriceEndingQuantity. It customizes the JSON marshaling process for PriceEndingQuantity objects.

func (PriceEndingQuantity) String added in v0.1.0

func (p PriceEndingQuantity) String() string

String converts the PriceEndingQuantity object to a string representation.

func (*PriceEndingQuantity) UnmarshalJSON added in v0.1.0

func (p *PriceEndingQuantity) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PriceEndingQuantity. It customizes the JSON unmarshaling process for PriceEndingQuantity objects.

type PricePointType

type PricePointType string

PricePointType is a string enum. Price point type. We expose the following types: 1. **default**: a price point that is marked as a default price for a certain product. 2. **custom**: a custom price point. 3. **catalog**: a price point that is **not** marked as a default price for a certain product and is **not** a custom one.

const (
	PricePointType_CATALOG     PricePointType = "catalog"
	PricePointType_ENUMDEFAULT PricePointType = "default"
	PricePointType_CUSTOM      PricePointType = "custom"
)

func (PricePointType) MarshalJSON added in v0.2.0

func (e PricePointType) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PricePointType. It customizes the JSON marshaling process for PricePointType objects.

func (*PricePointType) UnmarshalJSON added in v0.2.0

func (e *PricePointType) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PricePointType. It customizes the JSON unmarshaling process for PricePointType objects.

type PriceStartingQuantity added in v0.1.0

type PriceStartingQuantity struct {
	// contains filtered or unexported fields
}

PriceStartingQuantity represents a PriceStartingQuantity struct. This is a container for one-of cases.

func (*PriceStartingQuantity) AsNumber added in v0.1.0

func (p *PriceStartingQuantity) AsNumber() (
	*int,
	bool)

func (*PriceStartingQuantity) AsString added in v0.1.0

func (p *PriceStartingQuantity) AsString() (
	*string,
	bool)

func (PriceStartingQuantity) MarshalJSON added in v0.1.0

func (p PriceStartingQuantity) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PriceStartingQuantity. It customizes the JSON marshaling process for PriceStartingQuantity objects.

func (PriceStartingQuantity) String added in v0.1.0

func (p PriceStartingQuantity) String() string

String converts the PriceStartingQuantity object to a string representation.

func (*PriceStartingQuantity) UnmarshalJSON added in v0.1.0

func (p *PriceStartingQuantity) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PriceStartingQuantity. It customizes the JSON unmarshaling process for PriceStartingQuantity objects.

type PriceUnitPrice added in v0.1.0

type PriceUnitPrice struct {
	// contains filtered or unexported fields
}

PriceUnitPrice represents a PriceUnitPrice struct. This is a container for one-of cases.

func (*PriceUnitPrice) AsPrecision added in v0.1.0

func (p *PriceUnitPrice) AsPrecision() (
	*float64,
	bool)

func (*PriceUnitPrice) AsString added in v0.1.0

func (p *PriceUnitPrice) AsString() (
	*string,
	bool)

func (PriceUnitPrice) MarshalJSON added in v0.1.0

func (p PriceUnitPrice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PriceUnitPrice. It customizes the JSON marshaling process for PriceUnitPrice objects.

func (PriceUnitPrice) String added in v0.1.0

func (p PriceUnitPrice) String() string

String converts the PriceUnitPrice object to a string representation.

func (*PriceUnitPrice) UnmarshalJSON added in v0.1.0

func (p *PriceUnitPrice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PriceUnitPrice. It customizes the JSON unmarshaling process for PriceUnitPrice objects.

type PricingScheme

type PricingScheme string

PricingScheme is a string enum. The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes.

const (
	PricingScheme_STAIRSTEP PricingScheme = "stairstep"
	PricingScheme_VOLUME    PricingScheme = "volume"
	PricingScheme_PERUNIT   PricingScheme = "per_unit"
	PricingScheme_TIERED    PricingScheme = "tiered"
)

func (PricingScheme) MarshalJSON added in v0.2.0

func (e PricingScheme) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PricingScheme. It customizes the JSON marshaling process for PricingScheme objects.

func (*PricingScheme) UnmarshalJSON added in v0.2.0

func (e *PricingScheme) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PricingScheme. It customizes the JSON unmarshaling process for PricingScheme objects.

type Product

type Product struct {
	Id *int `json:"id,omitempty"`
	// The product name
	Name *string `json:"name,omitempty"`
	// The product API handle
	Handle Optional[string] `json:"handle"`
	// The product description
	Description Optional[string] `json:"description"`
	// E.g. Internal ID or SKU Number
	AccountingCode Optional[string] `json:"accounting_code"`
	// Deprecated value that can be ignored unless you have legacy hosted pages. For Public Signup Page users, please read this attribute from under the signup page.
	RequestCreditCard *bool `json:"request_credit_card,omitempty"`
	// A numerical interval for the length a subscription to this product will run before it expires. See the description of interval for a description of how this value is coupled with an interval unit to calculate the full interval
	ExpirationInterval Optional[int] `json:"expiration_interval"`
	// A string representing the expiration interval unit for this product, either month or day
	ExpirationIntervalUnit Optional[ExtendedIntervalUnit] `json:"expiration_interval_unit"`
	// Timestamp indicating when this product was created
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// Timestamp indicating when this product was last updated
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
	// The product price, in integer cents
	PriceInCents *int64 `json:"price_in_cents,omitempty"`
	// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this product would renew every 30 days
	Interval *int `json:"interval,omitempty"`
	// A string representing the interval unit for this product, either month or day
	IntervalUnit *IntervalUnit `json:"interval_unit,omitempty"`
	// The up front charge you have specified.
	InitialChargeInCents Optional[int64] `json:"initial_charge_in_cents"`
	// The price of the trial period for a subscription to this product, in integer cents.
	TrialPriceInCents Optional[int64] `json:"trial_price_in_cents"`
	// A numerical interval for the length of the trial period of a subscription to this product. See the description of interval for a description of how this value is coupled with an interval unit to calculate the full interval
	TrialInterval Optional[int] `json:"trial_interval"`
	// A string representing the trial interval unit for this product, either month or day
	TrialIntervalUnit Optional[IntervalUnit] `json:"trial_interval_unit"`
	// Timestamp indicating when this product was archived
	ArchivedAt Optional[time.Time] `json:"archived_at"`
	// Boolean that controls whether a payment profile is required to be entered for customers wishing to sign up on this product.
	RequireCreditCard *bool            `json:"require_credit_card,omitempty"`
	ReturnParams      Optional[string] `json:"return_params"`
	Taxable           *bool            `json:"taxable,omitempty"`
	// The url to which a customer will be returned after a successful account update
	UpdateReturnUrl         Optional[string] `json:"update_return_url"`
	InitialChargeAfterTrial Optional[bool]   `json:"initial_charge_after_trial"`
	// The version of the product
	VersionNumber *int `json:"version_number,omitempty"`
	// The parameters will append to the url after a successful account update. See [help documentation](https://help.chargify.com/products/product-editing.html#return-parameters-after-account-update)
	UpdateReturnParams    Optional[string]   `json:"update_return_params"`
	ProductFamily         *ProductFamily     `json:"product_family,omitempty"`
	PublicSignupPages     []PublicSignupPage `json:"public_signup_pages,omitempty"`
	ProductPricePointName *string            `json:"product_price_point_name,omitempty"`
	// A boolean indicating whether to request a billing address on any Self-Service Pages that are used by subscribers of this product.
	RequestBillingAddress *bool `json:"request_billing_address,omitempty"`
	// A boolean indicating whether a billing address is required to add a payment profile, especially at signup.
	RequireBillingAddress *bool `json:"require_billing_address,omitempty"`
	// A boolean indicating whether a shipping address is required for the customer, especially at signup.
	RequireShippingAddress *bool `json:"require_shipping_address,omitempty"`
	// A string representing the tax code related to the product type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters.
	TaxCode                    Optional[string] `json:"tax_code"`
	DefaultProductPricePointId *int             `json:"default_product_price_point_id,omitempty"`
	UseSiteExchangeRate        Optional[bool]   `json:"use_site_exchange_rate"`
	// One of the following: Business Software, Consumer Software, Digital Services, Physical Goods, Other
	ItemCategory            Optional[string] `json:"item_category"`
	ProductPricePointId     *int             `json:"product_price_point_id,omitempty"`
	ProductPricePointHandle Optional[string] `json:"product_price_point_handle"`
	AdditionalProperties    map[string]any   `json:"_"`
}

Product represents a Product struct.

func (Product) MarshalJSON

func (p Product) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Product. It customizes the JSON marshaling process for Product objects.

func (*Product) UnmarshalJSON

func (p *Product) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Product. It customizes the JSON unmarshaling process for Product objects.

type ProductFamily

type ProductFamily struct {
	Id                   *int             `json:"id,omitempty"`
	Name                 *string          `json:"name,omitempty"`
	Handle               *string          `json:"handle,omitempty"`
	AccountingCode       Optional[string] `json:"accounting_code"`
	Description          Optional[string] `json:"description"`
	CreatedAt            *time.Time       `json:"created_at,omitempty"`
	UpdatedAt            *time.Time       `json:"updated_at,omitempty"`
	AdditionalProperties map[string]any   `json:"_"`
}

ProductFamily represents a ProductFamily struct.

func (ProductFamily) MarshalJSON

func (p ProductFamily) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ProductFamily. It customizes the JSON marshaling process for ProductFamily objects.

func (*ProductFamily) UnmarshalJSON

func (p *ProductFamily) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ProductFamily. It customizes the JSON unmarshaling process for ProductFamily objects.

type ProductFamilyResponse

type ProductFamilyResponse struct {
	ProductFamily        *ProductFamily `json:"product_family,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ProductFamilyResponse represents a ProductFamilyResponse struct.

func (ProductFamilyResponse) MarshalJSON

func (p ProductFamilyResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ProductFamilyResponse. It customizes the JSON marshaling process for ProductFamilyResponse objects.

func (*ProductFamilyResponse) UnmarshalJSON

func (p *ProductFamilyResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ProductFamilyResponse. It customizes the JSON unmarshaling process for ProductFamilyResponse objects.

type ProductPricePoint

type ProductPricePoint struct {
	Id *int `json:"id,omitempty"`
	// The product price point name
	Name *string `json:"name,omitempty"`
	// The product price point API handle
	Handle Optional[string] `json:"handle"`
	// The product price point price, in integer cents
	PriceInCents *int64 `json:"price_in_cents,omitempty"`
	// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this product price point would renew every 30 days
	Interval *int `json:"interval,omitempty"`
	// A string representing the interval unit for this product price point, either month or day
	IntervalUnit *IntervalUnit `json:"interval_unit,omitempty"`
	// The product price point trial price, in integer cents
	TrialPriceInCents Optional[int64] `json:"trial_price_in_cents"`
	// The numerical trial interval. i.e. an interval of ‘30’ coupled with a trial_interval_unit of day would mean this product price point trial would last 30 days
	TrialInterval Optional[int] `json:"trial_interval"`
	// A string representing the trial interval unit for this product price point, either month or day
	TrialIntervalUnit Optional[IntervalUnit] `json:"trial_interval_unit"`
	TrialType         *string                `json:"trial_type,omitempty"`
	// reserved for future use
	IntroductoryOffer Optional[bool] `json:"introductory_offer"`
	// The product price point initial charge, in integer cents
	InitialChargeInCents    Optional[int64] `json:"initial_charge_in_cents"`
	InitialChargeAfterTrial Optional[bool]  `json:"initial_charge_after_trial"`
	// The numerical expiration interval. i.e. an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product price point would expire after 30 days
	ExpirationInterval Optional[int] `json:"expiration_interval"`
	// A string representing the expiration interval unit for this product price point, either month or day
	ExpirationIntervalUnit Optional[IntervalUnit] `json:"expiration_interval_unit"`
	// The product id this price point belongs to
	ProductId *int `json:"product_id,omitempty"`
	// Timestamp indicating when this price point was archived
	ArchivedAt Optional[time.Time] `json:"archived_at"`
	// Timestamp indicating when this price point was created
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// Timestamp indicating when this price point was last updated
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
	// Whether or not to use the site's exchange rate or define your own pricing when your site has multiple currencies defined.
	UseSiteExchangeRate *bool `json:"use_site_exchange_rate,omitempty"`
	// The type of price point
	Type *PricePointType `json:"type,omitempty"`
	// Whether or not the price point includes tax
	TaxIncluded *bool `json:"tax_included,omitempty"`
	// The subscription id this price point belongs to
	SubscriptionId Optional[int] `json:"subscription_id"`
	// An array of currency pricing data is available when multiple currencies are defined for the site. It varies based on the use_site_exchange_rate setting for the price point. This parameter is present only in the response of read endpoints, after including the appropriate query parameter.
	CurrencyPrices       []CurrencyPrice `json:"currency_prices,omitempty"`
	AdditionalProperties map[string]any  `json:"_"`
}

ProductPricePoint represents a ProductPricePoint struct.

func (ProductPricePoint) MarshalJSON

func (p ProductPricePoint) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ProductPricePoint. It customizes the JSON marshaling process for ProductPricePoint objects.

func (*ProductPricePoint) UnmarshalJSON

func (p *ProductPricePoint) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ProductPricePoint. It customizes the JSON unmarshaling process for ProductPricePoint objects.

type ProductPricePointErrors

type ProductPricePointErrors struct {
	PricePoint           *string        `json:"price_point,omitempty"`
	Interval             []string       `json:"interval,omitempty"`
	IntervalUnit         []string       `json:"interval_unit,omitempty"`
	Name                 []string       `json:"name,omitempty"`
	Price                []string       `json:"price,omitempty"`
	PriceInCents         []string       `json:"price_in_cents,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ProductPricePointErrors represents a ProductPricePointErrors struct.

func (ProductPricePointErrors) MarshalJSON

func (p ProductPricePointErrors) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ProductPricePointErrors. It customizes the JSON marshaling process for ProductPricePointErrors objects.

func (*ProductPricePointErrors) UnmarshalJSON

func (p *ProductPricePointErrors) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ProductPricePointErrors. It customizes the JSON unmarshaling process for ProductPricePointErrors objects.

type ProductPricePointResponse

type ProductPricePointResponse struct {
	PricePoint           ProductPricePoint `json:"price_point"`
	AdditionalProperties map[string]any    `json:"_"`
}

ProductPricePointResponse represents a ProductPricePointResponse struct.

func (ProductPricePointResponse) MarshalJSON

func (p ProductPricePointResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ProductPricePointResponse. It customizes the JSON marshaling process for ProductPricePointResponse objects.

func (*ProductPricePointResponse) UnmarshalJSON

func (p *ProductPricePointResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ProductPricePointResponse. It customizes the JSON unmarshaling process for ProductPricePointResponse objects.

type ProductResponse

type ProductResponse struct {
	Product              Product        `json:"product"`
	AdditionalProperties map[string]any `json:"_"`
}

ProductResponse represents a ProductResponse struct.

func (ProductResponse) MarshalJSON

func (p ProductResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ProductResponse. It customizes the JSON marshaling process for ProductResponse objects.

func (*ProductResponse) UnmarshalJSON

func (p *ProductResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ProductResponse. It customizes the JSON unmarshaling process for ProductResponse objects.

type ProformaError

type ProformaError struct {
	// The error is base if it is not directly associated with a single attribute.
	Subscription         *BaseStringError `json:"subscription,omitempty"`
	AdditionalProperties map[string]any   `json:"_"`
}

ProformaError represents a ProformaError struct.

func (ProformaError) MarshalJSON

func (p ProformaError) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ProformaError. It customizes the JSON marshaling process for ProformaError objects.

func (*ProformaError) UnmarshalJSON

func (p *ProformaError) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ProformaError. It customizes the JSON unmarshaling process for ProformaError objects.

type ProformaInvoice

type ProformaInvoice struct {
	Uid            *string                `json:"uid,omitempty"`
	SiteId         *int                   `json:"site_id,omitempty"`
	CustomerId     Optional[int]          `json:"customer_id"`
	SubscriptionId Optional[int]          `json:"subscription_id"`
	Number         Optional[int]          `json:"number"`
	SequenceNumber Optional[int]          `json:"sequence_number"`
	CreatedAt      *time.Time             `json:"created_at,omitempty"`
	DeliveryDate   *time.Time             `json:"delivery_date,omitempty"`
	Status         *ProformaInvoiceStatus `json:"status,omitempty"`
	// The type of payment collection to be used in the subscription. For legacy Statements Architecture valid options are - `invoice`, `automatic`. For current Relationship Invoicing Architecture valid options are - `remittance`, `automatic`, `prepaid`.
	CollectionMethod    *CollectionMethod `json:"collection_method,omitempty"`
	PaymentInstructions *string           `json:"payment_instructions,omitempty"`
	Currency            *string           `json:"currency,omitempty"`
	// Consolidation level of the invoice, which is applicable to invoice consolidation.  It will hold one of the following values:
	// * "none": A normal invoice with no consolidation.
	// * "child": An invoice segment which has been combined into a consolidated invoice.
	// * "parent": A consolidated invoice, whose contents are composed of invoice segments.
	// "Parent" invoices do not have lines of their own, but they have subtotals and totals which aggregate the member invoice segments.
	// See also the [invoice consolidation documentation](https://chargify.zendesk.com/hc/en-us/articles/4407746391835).
	ConsolidationLevel *InvoiceConsolidationLevel `json:"consolidation_level,omitempty"`
	ProductName        *string                    `json:"product_name,omitempty"`
	ProductFamilyName  *string                    `json:"product_family_name,omitempty"`
	// 'proforma' value is deprecated in favor of proforma_adhoc and proforma_automatic
	Role *ProformaInvoiceRole `json:"role,omitempty"`
	// Information about the seller (merchant) listed on the masthead of the invoice.
	Seller *InvoiceSeller `json:"seller,omitempty"`
	// Information about the customer who is owner or recipient the invoiced subscription.
	Customer             *InvoiceCustomer          `json:"customer,omitempty"`
	Memo                 *string                   `json:"memo,omitempty"`
	BillingAddress       *InvoiceAddress           `json:"billing_address,omitempty"`
	ShippingAddress      *InvoiceAddress           `json:"shipping_address,omitempty"`
	SubtotalAmount       *string                   `json:"subtotal_amount,omitempty"`
	DiscountAmount       *string                   `json:"discount_amount,omitempty"`
	TaxAmount            *string                   `json:"tax_amount,omitempty"`
	TotalAmount          *string                   `json:"total_amount,omitempty"`
	CreditAmount         *string                   `json:"credit_amount,omitempty"`
	PaidAmount           *string                   `json:"paid_amount,omitempty"`
	RefundAmount         *string                   `json:"refund_amount,omitempty"`
	DueAmount            *string                   `json:"due_amount,omitempty"`
	LineItems            []InvoiceLineItem         `json:"line_items,omitempty"`
	Discounts            []ProformaInvoiceDiscount `json:"discounts,omitempty"`
	Taxes                []ProformaInvoiceTax      `json:"taxes,omitempty"`
	Credits              []ProformaInvoiceCredit   `json:"credits,omitempty"`
	Payments             []ProformaInvoicePayment  `json:"payments,omitempty"`
	CustomFields         []InvoiceCustomField      `json:"custom_fields,omitempty"`
	PublicUrl            Optional[string]          `json:"public_url"`
	AdditionalProperties map[string]any            `json:"_"`
}

ProformaInvoice represents a ProformaInvoice struct.

func (ProformaInvoice) MarshalJSON

func (p ProformaInvoice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ProformaInvoice. It customizes the JSON marshaling process for ProformaInvoice objects.

func (*ProformaInvoice) UnmarshalJSON

func (p *ProformaInvoice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ProformaInvoice. It customizes the JSON unmarshaling process for ProformaInvoice objects.

type ProformaInvoiceCredit

type ProformaInvoiceCredit struct {
	Uid                  *string        `json:"uid,omitempty"`
	Memo                 *string        `json:"memo,omitempty"`
	OriginalAmount       *string        `json:"original_amount,omitempty"`
	AppliedAmount        *string        `json:"applied_amount,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ProformaInvoiceCredit represents a ProformaInvoiceCredit struct.

func (ProformaInvoiceCredit) MarshalJSON

func (p ProformaInvoiceCredit) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ProformaInvoiceCredit. It customizes the JSON marshaling process for ProformaInvoiceCredit objects.

func (*ProformaInvoiceCredit) UnmarshalJSON

func (p *ProformaInvoiceCredit) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ProformaInvoiceCredit. It customizes the JSON unmarshaling process for ProformaInvoiceCredit objects.

type ProformaInvoiceDiscount

type ProformaInvoiceDiscount struct {
	Uid                  *string                            `json:"uid,omitempty"`
	Title                *string                            `json:"title,omitempty"`
	Code                 *string                            `json:"code,omitempty"`
	SourceType           *ProformaInvoiceDiscountSourceType `json:"source_type,omitempty"`
	DiscountType         *InvoiceDiscountType               `json:"discount_type,omitempty"`
	EligibleAmount       *string                            `json:"eligible_amount,omitempty"`
	DiscountAmount       *string                            `json:"discount_amount,omitempty"`
	LineItemBreakouts    []InvoiceDiscountBreakout          `json:"line_item_breakouts,omitempty"`
	AdditionalProperties map[string]any                     `json:"_"`
}

ProformaInvoiceDiscount represents a ProformaInvoiceDiscount struct.

func (ProformaInvoiceDiscount) MarshalJSON

func (p ProformaInvoiceDiscount) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ProformaInvoiceDiscount. It customizes the JSON marshaling process for ProformaInvoiceDiscount objects.

func (*ProformaInvoiceDiscount) UnmarshalJSON

func (p *ProformaInvoiceDiscount) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ProformaInvoiceDiscount. It customizes the JSON unmarshaling process for ProformaInvoiceDiscount objects.

type ProformaInvoiceDiscountSourceType added in v0.1.0

type ProformaInvoiceDiscountSourceType string

ProformaInvoiceDiscountSourceType is a string enum.

const (
	ProformaInvoiceDiscountSourceType_COUPON   ProformaInvoiceDiscountSourceType = "Coupon"
	ProformaInvoiceDiscountSourceType_REFERRAL ProformaInvoiceDiscountSourceType = "Referral"
)

func (ProformaInvoiceDiscountSourceType) MarshalJSON added in v0.2.0

func (e ProformaInvoiceDiscountSourceType) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ProformaInvoiceDiscountSourceType. It customizes the JSON marshaling process for ProformaInvoiceDiscountSourceType objects.

func (*ProformaInvoiceDiscountSourceType) UnmarshalJSON added in v0.2.0

func (e *ProformaInvoiceDiscountSourceType) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ProformaInvoiceDiscountSourceType. It customizes the JSON unmarshaling process for ProformaInvoiceDiscountSourceType objects.

type ProformaInvoiceIssued added in v0.1.0

type ProformaInvoiceIssued struct {
	Uid                  string                     `json:"uid"`
	Number               string                     `json:"number"`
	Role                 string                     `json:"role"`
	DeliveryDate         time.Time                  `json:"delivery_date"`
	CreatedAt            time.Time                  `json:"created_at"`
	DueAmount            string                     `json:"due_amount"`
	PaidAmount           string                     `json:"paid_amount"`
	TaxAmount            string                     `json:"tax_amount"`
	TotalAmount          string                     `json:"total_amount"`
	ProductName          string                     `json:"product_name"`
	LineItems            []InvoiceLineItemEventData `json:"line_items"`
	AdditionalProperties map[string]any             `json:"_"`
}

ProformaInvoiceIssued represents a ProformaInvoiceIssued struct.

func (ProformaInvoiceIssued) MarshalJSON added in v0.1.0

func (p ProformaInvoiceIssued) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ProformaInvoiceIssued. It customizes the JSON marshaling process for ProformaInvoiceIssued objects.

func (*ProformaInvoiceIssued) UnmarshalJSON added in v0.1.0

func (p *ProformaInvoiceIssued) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ProformaInvoiceIssued. It customizes the JSON unmarshaling process for ProformaInvoiceIssued objects.

type ProformaInvoicePayment

type ProformaInvoicePayment struct {
	Memo                 *string        `json:"memo,omitempty"`
	OriginalAmount       *string        `json:"original_amount,omitempty"`
	AppliedAmount        *string        `json:"applied_amount,omitempty"`
	Prepayment           *bool          `json:"prepayment,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ProformaInvoicePayment represents a ProformaInvoicePayment struct.

func (ProformaInvoicePayment) MarshalJSON

func (p ProformaInvoicePayment) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ProformaInvoicePayment. It customizes the JSON marshaling process for ProformaInvoicePayment objects.

func (*ProformaInvoicePayment) UnmarshalJSON

func (p *ProformaInvoicePayment) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ProformaInvoicePayment. It customizes the JSON unmarshaling process for ProformaInvoicePayment objects.

type ProformaInvoiceRole added in v0.1.0

type ProformaInvoiceRole string

ProformaInvoiceRole is a string enum. 'proforma' value is deprecated in favor of proforma_adhoc and proforma_automatic

const (
	ProformaInvoiceRole_UNSET             ProformaInvoiceRole = "unset"
	ProformaInvoiceRole_PROFORMA          ProformaInvoiceRole = "proforma"
	ProformaInvoiceRole_PROFORMAADHOC     ProformaInvoiceRole = "proforma_adhoc"
	ProformaInvoiceRole_PROFORMAAUTOMATIC ProformaInvoiceRole = "proforma_automatic"
)

func (ProformaInvoiceRole) MarshalJSON added in v0.2.0

func (e ProformaInvoiceRole) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ProformaInvoiceRole. It customizes the JSON marshaling process for ProformaInvoiceRole objects.

func (*ProformaInvoiceRole) UnmarshalJSON added in v0.2.0

func (e *ProformaInvoiceRole) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ProformaInvoiceRole. It customizes the JSON unmarshaling process for ProformaInvoiceRole objects.

type ProformaInvoiceStatus added in v0.1.0

type ProformaInvoiceStatus string

ProformaInvoiceStatus is a string enum.

const (
	ProformaInvoiceStatus_DRAFT    ProformaInvoiceStatus = "draft"
	ProformaInvoiceStatus_VOIDED   ProformaInvoiceStatus = "voided"
	ProformaInvoiceStatus_ARCHIVED ProformaInvoiceStatus = "archived"
)

func (ProformaInvoiceStatus) MarshalJSON added in v0.2.0

func (e ProformaInvoiceStatus) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ProformaInvoiceStatus. It customizes the JSON marshaling process for ProformaInvoiceStatus objects.

func (*ProformaInvoiceStatus) UnmarshalJSON added in v0.2.0

func (e *ProformaInvoiceStatus) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ProformaInvoiceStatus. It customizes the JSON unmarshaling process for ProformaInvoiceStatus objects.

type ProformaInvoiceTax

type ProformaInvoiceTax struct {
	Uid                  *string                       `json:"uid,omitempty"`
	Title                *string                       `json:"title,omitempty"`
	SourceType           *ProformaInvoiceTaxSourceType `json:"source_type,omitempty"`
	Percentage           *string                       `json:"percentage,omitempty"`
	TaxableAmount        *string                       `json:"taxable_amount,omitempty"`
	TaxAmount            *string                       `json:"tax_amount,omitempty"`
	LineItemBreakouts    []InvoiceTaxBreakout          `json:"line_item_breakouts,omitempty"`
	AdditionalProperties map[string]any                `json:"_"`
}

ProformaInvoiceTax represents a ProformaInvoiceTax struct.

func (ProformaInvoiceTax) MarshalJSON

func (p ProformaInvoiceTax) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ProformaInvoiceTax. It customizes the JSON marshaling process for ProformaInvoiceTax objects.

func (*ProformaInvoiceTax) UnmarshalJSON

func (p *ProformaInvoiceTax) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ProformaInvoiceTax. It customizes the JSON unmarshaling process for ProformaInvoiceTax objects.

type ProformaInvoiceTaxSourceType added in v0.1.0

type ProformaInvoiceTaxSourceType string

ProformaInvoiceTaxSourceType is a string enum.

const (
	ProformaInvoiceTaxSourceType_TAX     ProformaInvoiceTaxSourceType = "Tax"
	ProformaInvoiceTaxSourceType_AVALARA ProformaInvoiceTaxSourceType = "Avalara"
)

func (ProformaInvoiceTaxSourceType) MarshalJSON added in v0.2.0

func (e ProformaInvoiceTaxSourceType) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ProformaInvoiceTaxSourceType. It customizes the JSON marshaling process for ProformaInvoiceTaxSourceType objects.

func (*ProformaInvoiceTaxSourceType) UnmarshalJSON added in v0.2.0

func (e *ProformaInvoiceTaxSourceType) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ProformaInvoiceTaxSourceType. It customizes the JSON unmarshaling process for ProformaInvoiceTaxSourceType objects.

type Proration

type Proration struct {
	// The alternative to sending preserve_period as a direct attribute to migration
	PreservePeriod       *bool          `json:"preserve_period,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

Proration represents a Proration struct.

func (Proration) MarshalJSON

func (p Proration) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Proration. It customizes the JSON marshaling process for Proration objects.

func (*Proration) UnmarshalJSON

func (p *Proration) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Proration. It customizes the JSON unmarshaling process for Proration objects.

type PublicKey

type PublicKey struct {
	PublicKey             *string        `json:"public_key,omitempty"`
	RequiresSecurityToken *bool          `json:"requires_security_token,omitempty"`
	CreatedAt             *time.Time     `json:"created_at,omitempty"`
	AdditionalProperties  map[string]any `json:"_"`
}

PublicKey represents a PublicKey struct.

func (PublicKey) MarshalJSON

func (p PublicKey) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PublicKey. It customizes the JSON marshaling process for PublicKey objects.

func (*PublicKey) UnmarshalJSON

func (p *PublicKey) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PublicKey. It customizes the JSON unmarshaling process for PublicKey objects.

type PublicSignupPage

type PublicSignupPage struct {
	// The id of the signup page (public_signup_pages only)
	Id *int `json:"id,omitempty"`
	// The url to which a customer will be returned after a successful signup (public_signup_pages only)
	ReturnUrl Optional[string] `json:"return_url"`
	// The params to be appended to the return_url (public_signup_pages only)
	ReturnParams Optional[string] `json:"return_params"`
	// The url where the signup page can be viewed (public_signup_pages only)
	Url                  *string        `json:"url,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

PublicSignupPage represents a PublicSignupPage struct.

func (PublicSignupPage) MarshalJSON

func (p PublicSignupPage) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for PublicSignupPage. It customizes the JSON marshaling process for PublicSignupPage objects.

func (*PublicSignupPage) UnmarshalJSON

func (p *PublicSignupPage) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for PublicSignupPage. It customizes the JSON unmarshaling process for PublicSignupPage objects.

type QuantityBasedComponent added in v0.1.0

type QuantityBasedComponent struct {
	// A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes".
	Name string `json:"name"`
	// The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. i.e. “message”, which may then be shown as “5 messages” on a subscription’s component line-item
	UnitName string `json:"unit_name"`
	// A description for the component that will be displayed to the user on the hosted signup page.
	Description *string `json:"description,omitempty"`
	// A unique identifier for your use that can be used to retrieve this component is subsequent requests.  Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.
	Handle *string `json:"handle,omitempty"`
	// Boolean flag describing whether a component is taxable or not.
	Taxable *bool `json:"taxable,omitempty"`
	// The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes.
	PricingScheme PricingScheme `json:"pricing_scheme"`
	// (Not required for ‘per_unit’ pricing schemes) One or more price brackets. See [Price Bracket Rules](https://chargify.zendesk.com/hc/en-us/articles/4407755865883#price-bracket-rules) for an overview of how price brackets work for different pricing schemes.
	Prices []Price `json:"prices,omitempty"`
	// The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
	// Available values: `full`, `prorated`, `none`.
	UpgradeCharge Optional[CreditType] `json:"upgrade_charge"`
	// The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
	// Available values: `full`, `prorated`, `none`.
	DowngradeCredit Optional[CreditType]      `json:"downgrade_credit"`
	PricePoints     []ComponentPricePointItem `json:"price_points,omitempty"`
	// The amount the customer will be charged per unit when the pricing scheme is “per_unit”. For On/Off Components, this is the amount that the customer will be charged when they turn the component on for the subscription. The price can contain up to 8 decimal places. i.e. 1.00 or 0.0012 or 0.00000065
	UnitPrice *QuantityBasedComponentUnitPrice `json:"unit_price,omitempty"`
	// A string representing the tax code related to the component type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters.
	TaxCode *string `json:"tax_code,omitempty"`
	// (Only available on Relationship Invoicing sites) Boolean flag describing if the service date range should show for the component on generated invoices.
	HideDateRangeOnInvoice *bool `json:"hide_date_range_on_invoice,omitempty"`
	// deprecated May 2011 - use unit_price instead
	PriceInCents              *string `json:"price_in_cents,omitempty"`
	Recurring                 *bool   `json:"recurring,omitempty"`
	DisplayOnHostedPage       *bool   `json:"display_on_hosted_page,omitempty"`
	AllowFractionalQuantities *bool   `json:"allow_fractional_quantities,omitempty"`
	PublicSignupPageIds       []int   `json:"public_signup_page_ids,omitempty"`
	// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component's default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled.
	Interval *int `json:"interval,omitempty"`
	// A string representing the interval unit for this component's default price point, either month or day. This property is only available for sites with Multifrequency enabled.
	IntervalUnit         *IntervalUnit  `json:"interval_unit,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

QuantityBasedComponent represents a QuantityBasedComponent struct.

func (QuantityBasedComponent) MarshalJSON added in v0.1.0

func (q QuantityBasedComponent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for QuantityBasedComponent. It customizes the JSON marshaling process for QuantityBasedComponent objects.

func (*QuantityBasedComponent) UnmarshalJSON added in v0.1.0

func (q *QuantityBasedComponent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for QuantityBasedComponent. It customizes the JSON unmarshaling process for QuantityBasedComponent objects.

type QuantityBasedComponentUnitPrice added in v0.1.0

type QuantityBasedComponentUnitPrice struct {
	// contains filtered or unexported fields
}

QuantityBasedComponentUnitPrice represents a QuantityBasedComponentUnitPrice struct. This is a container for one-of cases.

func (*QuantityBasedComponentUnitPrice) AsPrecision added in v0.1.0

func (q *QuantityBasedComponentUnitPrice) AsPrecision() (
	*float64,
	bool)

func (*QuantityBasedComponentUnitPrice) AsString added in v0.1.0

func (q *QuantityBasedComponentUnitPrice) AsString() (
	*string,
	bool)

func (QuantityBasedComponentUnitPrice) MarshalJSON added in v0.1.0

func (q QuantityBasedComponentUnitPrice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for QuantityBasedComponentUnitPrice. It customizes the JSON marshaling process for QuantityBasedComponentUnitPrice objects.

func (QuantityBasedComponentUnitPrice) String added in v0.1.0

String converts the QuantityBasedComponentUnitPrice object to a string representation.

func (*QuantityBasedComponentUnitPrice) UnmarshalJSON added in v0.1.0

func (q *QuantityBasedComponentUnitPrice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for QuantityBasedComponentUnitPrice. It customizes the JSON unmarshaling process for QuantityBasedComponentUnitPrice objects.

type ReactivateSubscriptionGroupRequest

type ReactivateSubscriptionGroupRequest struct {
	Resume               *bool          `json:"resume,omitempty"`
	ResumeMembers        *bool          `json:"resume_members,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ReactivateSubscriptionGroupRequest represents a ReactivateSubscriptionGroupRequest struct.

func (ReactivateSubscriptionGroupRequest) MarshalJSON

func (r ReactivateSubscriptionGroupRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ReactivateSubscriptionGroupRequest. It customizes the JSON marshaling process for ReactivateSubscriptionGroupRequest objects.

func (*ReactivateSubscriptionGroupRequest) UnmarshalJSON

func (r *ReactivateSubscriptionGroupRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ReactivateSubscriptionGroupRequest. It customizes the JSON unmarshaling process for ReactivateSubscriptionGroupRequest objects.

type ReactivateSubscriptionGroupResponse

type ReactivateSubscriptionGroupResponse struct {
	Uid                   *string        `json:"uid,omitempty"`
	Scheme                *int           `json:"scheme,omitempty"`
	CustomerId            *int           `json:"customer_id,omitempty"`
	PaymentProfileId      *int           `json:"payment_profile_id,omitempty"`
	SubscriptionIds       []int          `json:"subscription_ids,omitempty"`
	PrimarySubscriptionId *int           `json:"primary_subscription_id,omitempty"`
	NextAssessmentAt      *time.Time     `json:"next_assessment_at,omitempty"`
	State                 *string        `json:"state,omitempty"`
	CancelAtEndOfPeriod   *bool          `json:"cancel_at_end_of_period,omitempty"`
	AdditionalProperties  map[string]any `json:"_"`
}

ReactivateSubscriptionGroupResponse represents a ReactivateSubscriptionGroupResponse struct.

func (ReactivateSubscriptionGroupResponse) MarshalJSON

func (r ReactivateSubscriptionGroupResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ReactivateSubscriptionGroupResponse. It customizes the JSON marshaling process for ReactivateSubscriptionGroupResponse objects.

func (*ReactivateSubscriptionGroupResponse) UnmarshalJSON

func (r *ReactivateSubscriptionGroupResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ReactivateSubscriptionGroupResponse. It customizes the JSON unmarshaling process for ReactivateSubscriptionGroupResponse objects.

type ReactivateSubscriptionRequest

type ReactivateSubscriptionRequest struct {
	// These values are only applicable to subscriptions using calendar billing
	CalendarBilling *ReactivationBilling `json:"calendar_billing,omitempty"`
	// If `true` is sent, the reactivated Subscription will include a trial if one is available. If `false` is sent, the trial period will be ignored.
	IncludeTrial *bool `json:"include_trial,omitempty"`
	// If `true` is passed, the existing subscription balance will NOT be cleared/reset before adding the additional reactivation charges.
	PreserveBalance *bool `json:"preserve_balance,omitempty"`
	// The coupon code to be applied during reactivation.
	CouponCode *string `json:"coupon_code,omitempty"`
	// If true is sent, Chargify will use service credits and prepayments upon reactivation. If false is sent, the service credits and prepayments will be ignored.
	UseCreditsAndPrepayments *bool `json:"use_credits_and_prepayments,omitempty"`
	// If `true`, Chargify will attempt to resume the subscription's billing period. if not resumable, the subscription will be reactivated with a new billing period. If `false`: Chargify will only attempt to reactivate the subscription.
	Resume               *ReactivateSubscriptionRequestResume `json:"resume,omitempty"`
	AdditionalProperties map[string]any                       `json:"_"`
}

ReactivateSubscriptionRequest represents a ReactivateSubscriptionRequest struct.

func (ReactivateSubscriptionRequest) MarshalJSON

func (r ReactivateSubscriptionRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ReactivateSubscriptionRequest. It customizes the JSON marshaling process for ReactivateSubscriptionRequest objects.

func (*ReactivateSubscriptionRequest) UnmarshalJSON

func (r *ReactivateSubscriptionRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ReactivateSubscriptionRequest. It customizes the JSON unmarshaling process for ReactivateSubscriptionRequest objects.

type ReactivateSubscriptionRequestResume added in v0.1.0

type ReactivateSubscriptionRequestResume struct {
	// contains filtered or unexported fields
}

ReactivateSubscriptionRequestResume represents a ReactivateSubscriptionRequestResume struct. This is a container for one-of cases.

func (*ReactivateSubscriptionRequestResume) AsBoolean added in v0.1.0

func (r *ReactivateSubscriptionRequestResume) AsBoolean() (
	*bool,
	bool)

func (*ReactivateSubscriptionRequestResume) AsResumeOptions added in v0.1.0

func (r *ReactivateSubscriptionRequestResume) AsResumeOptions() (
	*ResumeOptions,
	bool)

func (ReactivateSubscriptionRequestResume) MarshalJSON added in v0.1.0

func (r ReactivateSubscriptionRequestResume) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ReactivateSubscriptionRequestResume. It customizes the JSON marshaling process for ReactivateSubscriptionRequestResume objects.

func (ReactivateSubscriptionRequestResume) String added in v0.1.0

String converts the ReactivateSubscriptionRequestResume object to a string representation.

func (*ReactivateSubscriptionRequestResume) UnmarshalJSON added in v0.1.0

func (r *ReactivateSubscriptionRequestResume) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ReactivateSubscriptionRequestResume. It customizes the JSON unmarshaling process for ReactivateSubscriptionRequestResume objects.

type ReactivationBilling

type ReactivationBilling struct {
	// You may choose how to handle the reactivation charge for that subscription: 1) `prorated` A prorated charge for the product price will be attempted for to complete the period 2) `immediate` A full-price charge for the product price will be attempted immediately 3) `delayed` A full-price charge for the product price will be attempted at the next renewal
	ReactivationCharge   *ReactivationCharge `json:"reactivation_charge,omitempty"`
	AdditionalProperties map[string]any      `json:"_"`
}

ReactivationBilling represents a ReactivationBilling struct. These values are only applicable to subscriptions using calendar billing

func (ReactivationBilling) MarshalJSON

func (r ReactivationBilling) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ReactivationBilling. It customizes the JSON marshaling process for ReactivationBilling objects.

func (*ReactivationBilling) UnmarshalJSON

func (r *ReactivationBilling) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ReactivationBilling. It customizes the JSON unmarshaling process for ReactivationBilling objects.

type ReactivationCharge

type ReactivationCharge string

ReactivationCharge is a string enum. You may choose how to handle the reactivation charge for that subscription: 1) `prorated` A prorated charge for the product price will be attempted for to complete the period 2) `immediate` A full-price charge for the product price will be attempted immediately 3) `delayed` A full-price charge for the product price will be attempted at the next renewal

const (
	ReactivationCharge_PRORATED  ReactivationCharge = "prorated"
	ReactivationCharge_IMMEDIATE ReactivationCharge = "immediate"
	ReactivationCharge_DELAYED   ReactivationCharge = "delayed"
)

func (ReactivationCharge) MarshalJSON added in v0.2.0

func (e ReactivationCharge) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ReactivationCharge. It customizes the JSON marshaling process for ReactivationCharge objects.

func (*ReactivationCharge) UnmarshalJSON added in v0.2.0

func (e *ReactivationCharge) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ReactivationCharge. It customizes the JSON unmarshaling process for ReactivationCharge objects.

type ReadProductPricePointPricePointId added in v0.1.0

type ReadProductPricePointPricePointId struct {
	// contains filtered or unexported fields
}

ReadProductPricePointPricePointId represents a ReadProductPricePointPricePointId struct. This is a container for one-of cases.

func (*ReadProductPricePointPricePointId) AsNumber added in v0.1.0

func (r *ReadProductPricePointPricePointId) AsNumber() (
	*int,
	bool)

func (*ReadProductPricePointPricePointId) AsString added in v0.1.0

func (r *ReadProductPricePointPricePointId) AsString() (
	*string,
	bool)

func (ReadProductPricePointPricePointId) MarshalJSON added in v0.1.0

func (r ReadProductPricePointPricePointId) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ReadProductPricePointPricePointId. It customizes the JSON marshaling process for ReadProductPricePointPricePointId objects.

func (ReadProductPricePointPricePointId) String added in v0.1.0

String converts the ReadProductPricePointPricePointId object to a string representation.

func (*ReadProductPricePointPricePointId) UnmarshalJSON added in v0.1.0

func (r *ReadProductPricePointPricePointId) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ReadProductPricePointPricePointId. It customizes the JSON unmarshaling process for ReadProductPricePointPricePointId objects.

type ReadProductPricePointProductId added in v0.1.0

type ReadProductPricePointProductId struct {
	// contains filtered or unexported fields
}

ReadProductPricePointProductId represents a ReadProductPricePointProductId struct. This is a container for one-of cases.

func (*ReadProductPricePointProductId) AsNumber added in v0.1.0

func (r *ReadProductPricePointProductId) AsNumber() (
	*int,
	bool)

func (*ReadProductPricePointProductId) AsString added in v0.1.0

func (r *ReadProductPricePointProductId) AsString() (
	*string,
	bool)

func (ReadProductPricePointProductId) MarshalJSON added in v0.1.0

func (r ReadProductPricePointProductId) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ReadProductPricePointProductId. It customizes the JSON marshaling process for ReadProductPricePointProductId objects.

func (ReadProductPricePointProductId) String added in v0.1.0

String converts the ReadProductPricePointProductId object to a string representation.

func (*ReadProductPricePointProductId) UnmarshalJSON added in v0.1.0

func (r *ReadProductPricePointProductId) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ReadProductPricePointProductId. It customizes the JSON unmarshaling process for ReadProductPricePointProductId objects.

type ReasonCode

type ReasonCode struct {
	Id                   *int           `json:"id,omitempty"`
	SiteId               *int           `json:"site_id,omitempty"`
	Code                 *string        `json:"code,omitempty"`
	Description          *string        `json:"description,omitempty"`
	Position             *int           `json:"position,omitempty"`
	CreatedAt            *time.Time     `json:"created_at,omitempty"`
	UpdatedAt            *time.Time     `json:"updated_at,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ReasonCode represents a ReasonCode struct.

func (ReasonCode) MarshalJSON

func (r ReasonCode) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ReasonCode. It customizes the JSON marshaling process for ReasonCode objects.

func (*ReasonCode) UnmarshalJSON

func (r *ReasonCode) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ReasonCode. It customizes the JSON unmarshaling process for ReasonCode objects.

type ReasonCodeResponse

type ReasonCodeResponse struct {
	ReasonCode           ReasonCode     `json:"reason_code"`
	AdditionalProperties map[string]any `json:"_"`
}

ReasonCodeResponse represents a ReasonCodeResponse struct.

func (ReasonCodeResponse) MarshalJSON

func (r ReasonCodeResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ReasonCodeResponse. It customizes the JSON marshaling process for ReasonCodeResponse objects.

func (*ReasonCodeResponse) UnmarshalJSON

func (r *ReasonCodeResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ReasonCodeResponse. It customizes the JSON unmarshaling process for ReasonCodeResponse objects.

type ReasonCodesJsonResponse

type ReasonCodesJsonResponse struct {
	Ok                   *string        `json:"ok,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ReasonCodesJsonResponse represents a ReasonCodesJsonResponse struct.

func (ReasonCodesJsonResponse) MarshalJSON

func (r ReasonCodesJsonResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ReasonCodesJsonResponse. It customizes the JSON marshaling process for ReasonCodesJsonResponse objects.

func (*ReasonCodesJsonResponse) UnmarshalJSON

func (r *ReasonCodesJsonResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ReasonCodesJsonResponse. It customizes the JSON unmarshaling process for ReasonCodesJsonResponse objects.

type RecordPaymentRequest

type RecordPaymentRequest struct {
	Payment              CreatePayment  `json:"payment"`
	AdditionalProperties map[string]any `json:"_"`
}

RecordPaymentRequest represents a RecordPaymentRequest struct.

func (RecordPaymentRequest) MarshalJSON

func (r RecordPaymentRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RecordPaymentRequest. It customizes the JSON marshaling process for RecordPaymentRequest objects.

func (*RecordPaymentRequest) UnmarshalJSON

func (r *RecordPaymentRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RecordPaymentRequest. It customizes the JSON unmarshaling process for RecordPaymentRequest objects.

type RecordPaymentResponse added in v0.1.0

type RecordPaymentResponse struct {
	PaidInvoices         []PaidInvoice               `json:"paid_invoices,omitempty"`
	Prepayment           Optional[InvoicePrePayment] `json:"prepayment"`
	AdditionalProperties map[string]any              `json:"_"`
}

RecordPaymentResponse represents a RecordPaymentResponse struct.

func (RecordPaymentResponse) MarshalJSON added in v0.1.0

func (r RecordPaymentResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RecordPaymentResponse. It customizes the JSON marshaling process for RecordPaymentResponse objects.

func (*RecordPaymentResponse) UnmarshalJSON added in v0.1.0

func (r *RecordPaymentResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RecordPaymentResponse. It customizes the JSON unmarshaling process for RecordPaymentResponse objects.

type RecurringScheme

type RecurringScheme string

RecurringScheme is a string enum.

const (
	RecurringScheme_DONOTRECUR        RecurringScheme = "do_not_recur"
	RecurringScheme_RECURINDEFINITELY RecurringScheme = "recur_indefinitely"
	RecurringScheme_RECURWITHDURATION RecurringScheme = "recur_with_duration"
)

func (RecurringScheme) MarshalJSON added in v0.2.0

func (e RecurringScheme) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RecurringScheme. It customizes the JSON marshaling process for RecurringScheme objects.

func (*RecurringScheme) UnmarshalJSON added in v0.2.0

func (e *RecurringScheme) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RecurringScheme. It customizes the JSON unmarshaling process for RecurringScheme objects.

type ReferralCode

type ReferralCode struct {
	Id                   *int           `json:"id,omitempty"`
	SiteId               *int           `json:"site_id,omitempty"`
	SubscriptionId       *int           `json:"subscription_id,omitempty"`
	Code                 *string        `json:"code,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ReferralCode represents a ReferralCode struct.

func (ReferralCode) MarshalJSON

func (r ReferralCode) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ReferralCode. It customizes the JSON marshaling process for ReferralCode objects.

func (*ReferralCode) UnmarshalJSON

func (r *ReferralCode) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ReferralCode. It customizes the JSON unmarshaling process for ReferralCode objects.

type ReferralValidationResponse

type ReferralValidationResponse struct {
	ReferralCode         *ReferralCode  `json:"referral_code,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ReferralValidationResponse represents a ReferralValidationResponse struct.

func (ReferralValidationResponse) MarshalJSON

func (r ReferralValidationResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ReferralValidationResponse. It customizes the JSON marshaling process for ReferralValidationResponse objects.

func (*ReferralValidationResponse) UnmarshalJSON

func (r *ReferralValidationResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ReferralValidationResponse. It customizes the JSON unmarshaling process for ReferralValidationResponse objects.

type RefundConsolidatedInvoice added in v0.1.0

type RefundConsolidatedInvoice struct {
	// A description for the refund
	Memo string `json:"memo"`
	// The ID of the payment to be refunded
	PaymentId int `json:"payment_id"`
	// An array of segment uids to refund or the string 'all' to indicate that all segments should be refunded
	SegmentUids RefundConsolidatedInvoiceSegmentUids `json:"segment_uids"`
	// Flag that marks refund as external (no money is returned to the customer). Defaults to `false`.
	External *bool `json:"external,omitempty"`
	// If set to true, creates credit and applies it to an invoice. Defaults to `false`.
	ApplyCredit *bool `json:"apply_credit,omitempty"`
	// The amount of payment to be refunded in decimal format. Example: "10.50". This will default to the full amount of the payment if not provided.
	Amount               *string        `json:"amount,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

RefundConsolidatedInvoice represents a RefundConsolidatedInvoice struct. Refund consolidated invoice

func (RefundConsolidatedInvoice) MarshalJSON added in v0.1.0

func (r RefundConsolidatedInvoice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RefundConsolidatedInvoice. It customizes the JSON marshaling process for RefundConsolidatedInvoice objects.

func (*RefundConsolidatedInvoice) UnmarshalJSON added in v0.1.0

func (r *RefundConsolidatedInvoice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RefundConsolidatedInvoice. It customizes the JSON unmarshaling process for RefundConsolidatedInvoice objects.

type RefundConsolidatedInvoiceSegmentUids added in v0.1.0

type RefundConsolidatedInvoiceSegmentUids struct {
	// contains filtered or unexported fields
}

RefundConsolidatedInvoiceSegmentUids represents a RefundConsolidatedInvoiceSegmentUids struct. This is a container for one-of cases.

func (*RefundConsolidatedInvoiceSegmentUids) AsArrayOfString added in v0.1.0

func (r *RefundConsolidatedInvoiceSegmentUids) AsArrayOfString() (
	*[]string,
	bool)

func (*RefundConsolidatedInvoiceSegmentUids) AsString added in v0.1.0

func (RefundConsolidatedInvoiceSegmentUids) MarshalJSON added in v0.1.0

func (r RefundConsolidatedInvoiceSegmentUids) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RefundConsolidatedInvoiceSegmentUids. It customizes the JSON marshaling process for RefundConsolidatedInvoiceSegmentUids objects.

func (RefundConsolidatedInvoiceSegmentUids) String added in v0.1.0

String converts the RefundConsolidatedInvoiceSegmentUids object to a string representation.

func (*RefundConsolidatedInvoiceSegmentUids) UnmarshalJSON added in v0.1.0

func (r *RefundConsolidatedInvoiceSegmentUids) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RefundConsolidatedInvoiceSegmentUids. It customizes the JSON unmarshaling process for RefundConsolidatedInvoiceSegmentUids objects.

type RefundInvoice added in v0.1.0

type RefundInvoice struct {
	// The amount to be refunded in decimal format as a string. Example: "10.50". Must not exceed the remaining refundable balance of the payment.
	Amount string `json:"amount"`
	// A description that will be attached to the refund
	Memo string `json:"memo"`
	// The ID of the payment to be refunded
	PaymentId int `json:"payment_id"`
	// Flag that marks refund as external (no money is returned to the customer). Defaults to `false`.
	External *bool `json:"external,omitempty"`
	// If set to true, creates credit and applies it to an invoice. Defaults to `false`.
	ApplyCredit *bool `json:"apply_credit,omitempty"`
	// If `apply_credit` set to false and refunding full amount, if `void_invoice` set to true, invoice will be voided after refund. Defaults to `false`.
	VoidInvoice          *bool          `json:"void_invoice,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

RefundInvoice represents a RefundInvoice struct. Refund an invoice or a segment of a consolidated invoice.

func (RefundInvoice) MarshalJSON added in v0.1.0

func (r RefundInvoice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RefundInvoice. It customizes the JSON marshaling process for RefundInvoice objects.

func (*RefundInvoice) UnmarshalJSON added in v0.1.0

func (r *RefundInvoice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RefundInvoice. It customizes the JSON unmarshaling process for RefundInvoice objects.

type RefundInvoiceEvent added in v0.2.0

type RefundInvoiceEvent struct {
	Id        int64            `json:"id"`
	Timestamp time.Time        `json:"timestamp"`
	Invoice   Invoice          `json:"invoice"`
	EventType InvoiceEventType `json:"event_type"`
	// Example schema for an `refund_invoice` event
	EventData            RefundInvoiceEventData `json:"event_data"`
	AdditionalProperties map[string]any         `json:"_"`
}

RefundInvoiceEvent represents a RefundInvoiceEvent struct.

func (RefundInvoiceEvent) MarshalJSON added in v0.2.0

func (r RefundInvoiceEvent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RefundInvoiceEvent. It customizes the JSON marshaling process for RefundInvoiceEvent objects.

func (*RefundInvoiceEvent) UnmarshalJSON added in v0.2.0

func (r *RefundInvoiceEvent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RefundInvoiceEvent. It customizes the JSON unmarshaling process for RefundInvoiceEvent objects.

type RefundInvoiceEventData added in v0.1.0

type RefundInvoiceEventData struct {
	// If true, credit was created and applied it to the invoice.
	ApplyCredit bool `json:"apply_credit"`
	// Consolidation level of the invoice, which is applicable to invoice consolidation.  It will hold one of the following values:
	// * "none": A normal invoice with no consolidation.
	// * "child": An invoice segment which has been combined into a consolidated invoice.
	// * "parent": A consolidated invoice, whose contents are composed of invoice segments.
	// "Parent" invoices do not have lines of their own, but they have subtotals and totals which aggregate the member invoice segments.
	// See also the [invoice consolidation documentation](https://chargify.zendesk.com/hc/en-us/articles/4407746391835).
	ConsolidationLevel   *InvoiceConsolidationLevel `json:"consolidation_level,omitempty"`
	CreditNoteAttributes CreditNote                 `json:"credit_note_attributes"`
	// The refund memo.
	Memo *string `json:"memo,omitempty"`
	// The full, original amount of the refund.
	OriginalAmount *string `json:"original_amount,omitempty"`
	// The ID of the payment transaction to be refunded.
	PaymentId int `json:"payment_id"`
	// The amount of the refund.
	RefundAmount string `json:"refund_amount"`
	// The ID of the refund transaction.
	RefundId int `json:"refund_id"`
	// The time the refund was applied, in ISO 8601 format, i.e. "2019-06-07T17:20:06Z"
	TransactionTime      time.Time      `json:"transaction_time"`
	AdditionalProperties map[string]any `json:"_"`
}

RefundInvoiceEventData represents a RefundInvoiceEventData struct. Example schema for an `refund_invoice` event

func (RefundInvoiceEventData) MarshalJSON added in v0.1.0

func (r RefundInvoiceEventData) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RefundInvoiceEventData. It customizes the JSON marshaling process for RefundInvoiceEventData objects.

func (*RefundInvoiceEventData) UnmarshalJSON added in v0.1.0

func (r *RefundInvoiceEventData) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RefundInvoiceEventData. It customizes the JSON unmarshaling process for RefundInvoiceEventData objects.

type RefundInvoiceRequest

type RefundInvoiceRequest struct {
	Refund               RefundInvoiceRequestRefund `json:"refund"`
	AdditionalProperties map[string]any             `json:"_"`
}

RefundInvoiceRequest represents a RefundInvoiceRequest struct.

func (RefundInvoiceRequest) MarshalJSON

func (r RefundInvoiceRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RefundInvoiceRequest. It customizes the JSON marshaling process for RefundInvoiceRequest objects.

func (*RefundInvoiceRequest) UnmarshalJSON

func (r *RefundInvoiceRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RefundInvoiceRequest. It customizes the JSON unmarshaling process for RefundInvoiceRequest objects.

type RefundInvoiceRequestRefund added in v0.1.0

type RefundInvoiceRequestRefund struct {
	// contains filtered or unexported fields
}

RefundInvoiceRequestRefund represents a RefundInvoiceRequestRefund struct. This is a container for any-of cases.

func (*RefundInvoiceRequestRefund) AsRefundConsolidatedInvoice added in v0.1.0

func (r *RefundInvoiceRequestRefund) AsRefundConsolidatedInvoice() (
	*RefundConsolidatedInvoice,
	bool)

func (*RefundInvoiceRequestRefund) AsRefundInvoice added in v0.1.0

func (r *RefundInvoiceRequestRefund) AsRefundInvoice() (
	*RefundInvoice,
	bool)

func (RefundInvoiceRequestRefund) MarshalJSON added in v0.1.0

func (r RefundInvoiceRequestRefund) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RefundInvoiceRequestRefund. It customizes the JSON marshaling process for RefundInvoiceRequestRefund objects.

func (RefundInvoiceRequestRefund) String added in v0.1.0

String converts the RefundInvoiceRequestRefund object to a string representation.

func (*RefundInvoiceRequestRefund) UnmarshalJSON added in v0.1.0

func (r *RefundInvoiceRequestRefund) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RefundInvoiceRequestRefund. It customizes the JSON unmarshaling process for RefundInvoiceRequestRefund objects.

type RefundPrepayment

type RefundPrepayment struct {
	// `amount` is not required if you pass `amount_in_cents`.
	AmountInCents *int64 `json:"amount_in_cents"`
	// `amount_in_cents` is not required if you pass `amount`.
	Amount RefundPrepaymentAmount `json:"amount"`
	Memo   string                 `json:"memo"`
	// Specify the type of refund you wish to initiate. When the prepayment is external, the `external` flag is optional. But if the prepayment was made through a payment profile, the `external` flag is required.
	External             *bool          `json:"external,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

RefundPrepayment represents a RefundPrepayment struct.

func (RefundPrepayment) MarshalJSON

func (r RefundPrepayment) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RefundPrepayment. It customizes the JSON marshaling process for RefundPrepayment objects.

func (*RefundPrepayment) UnmarshalJSON

func (r *RefundPrepayment) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RefundPrepayment. It customizes the JSON unmarshaling process for RefundPrepayment objects.

type RefundPrepaymentAmount added in v0.1.0

type RefundPrepaymentAmount struct {
	// contains filtered or unexported fields
}

RefundPrepaymentAmount represents a RefundPrepaymentAmount struct. This is a container for one-of cases.

func (*RefundPrepaymentAmount) AsPrecision added in v0.1.0

func (r *RefundPrepaymentAmount) AsPrecision() (
	*float64,
	bool)

func (*RefundPrepaymentAmount) AsString added in v0.1.0

func (r *RefundPrepaymentAmount) AsString() (
	*string,
	bool)

func (RefundPrepaymentAmount) MarshalJSON added in v0.1.0

func (r RefundPrepaymentAmount) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RefundPrepaymentAmount. It customizes the JSON marshaling process for RefundPrepaymentAmount objects.

func (RefundPrepaymentAmount) String added in v0.1.0

func (r RefundPrepaymentAmount) String() string

String converts the RefundPrepaymentAmount object to a string representation.

func (*RefundPrepaymentAmount) UnmarshalJSON added in v0.1.0

func (r *RefundPrepaymentAmount) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RefundPrepaymentAmount. It customizes the JSON unmarshaling process for RefundPrepaymentAmount objects.

type RefundPrepaymentBaseRefundError

type RefundPrepaymentBaseRefundError struct {
	Refund               *BaseRefundError `json:"refund,omitempty"`
	AdditionalProperties map[string]any   `json:"_"`
}

RefundPrepaymentBaseRefundError represents a RefundPrepaymentBaseRefundError struct.

func (RefundPrepaymentBaseRefundError) MarshalJSON

func (r RefundPrepaymentBaseRefundError) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RefundPrepaymentBaseRefundError. It customizes the JSON marshaling process for RefundPrepaymentBaseRefundError objects.

func (*RefundPrepaymentBaseRefundError) UnmarshalJSON

func (r *RefundPrepaymentBaseRefundError) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RefundPrepaymentBaseRefundError. It customizes the JSON unmarshaling process for RefundPrepaymentBaseRefundError objects.

type RefundPrepaymentRequest

type RefundPrepaymentRequest struct {
	Refund               RefundPrepayment `json:"refund"`
	AdditionalProperties map[string]any   `json:"_"`
}

RefundPrepaymentRequest represents a RefundPrepaymentRequest struct.

func (RefundPrepaymentRequest) MarshalJSON

func (r RefundPrepaymentRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RefundPrepaymentRequest. It customizes the JSON marshaling process for RefundPrepaymentRequest objects.

func (*RefundPrepaymentRequest) UnmarshalJSON

func (r *RefundPrepaymentRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RefundPrepaymentRequest. It customizes the JSON unmarshaling process for RefundPrepaymentRequest objects.

type RefundSuccess added in v0.1.0

type RefundSuccess struct {
	RefundId             int            `json:"refund_id"`
	GatewayTransactionId int            `json:"gateway_transaction_id"`
	ProductId            int            `json:"product_id"`
	AdditionalProperties map[string]any `json:"_"`
}

RefundSuccess represents a RefundSuccess struct.

func (RefundSuccess) MarshalJSON added in v0.1.0

func (r RefundSuccess) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RefundSuccess. It customizes the JSON marshaling process for RefundSuccess objects.

func (*RefundSuccess) UnmarshalJSON added in v0.1.0

func (r *RefundSuccess) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RefundSuccess. It customizes the JSON unmarshaling process for RefundSuccess objects.

type RemovePaymentEvent added in v0.2.0

type RemovePaymentEvent struct {
	Id        int64            `json:"id"`
	Timestamp time.Time        `json:"timestamp"`
	Invoice   Invoice          `json:"invoice"`
	EventType InvoiceEventType `json:"event_type"`
	// Example schema for an `remove_payment` event
	EventData            RemovePaymentEventData `json:"event_data"`
	AdditionalProperties map[string]any         `json:"_"`
}

RemovePaymentEvent represents a RemovePaymentEvent struct.

func (RemovePaymentEvent) MarshalJSON added in v0.2.0

func (r RemovePaymentEvent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RemovePaymentEvent. It customizes the JSON marshaling process for RemovePaymentEvent objects.

func (*RemovePaymentEvent) UnmarshalJSON added in v0.2.0

func (r *RemovePaymentEvent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RemovePaymentEvent. It customizes the JSON unmarshaling process for RemovePaymentEvent objects.

type RemovePaymentEventData added in v0.1.0

type RemovePaymentEventData struct {
	// Transaction ID of the original payment that was removed
	TransactionId int `json:"transaction_id"`
	// Memo of the original payment
	Memo string `json:"memo"`
	// Full amount of the original payment
	OriginalAmount *string `json:"original_amount,omitempty"`
	// Applied amount of the original payment
	AppliedAmount string `json:"applied_amount"`
	// Transaction time of the original payment, in ISO 8601 format, i.e. "2019-06-07T17:20:06Z"
	TransactionTime time.Time `json:"transaction_time"`
	// A nested data structure detailing the method of payment
	PaymentMethod InvoiceEventPayment `json:"payment_method"`
	// The flag that shows whether the original payment was a prepayment or not
	Prepayment           bool           `json:"prepayment"`
	AdditionalProperties map[string]any `json:"_"`
}

RemovePaymentEventData represents a RemovePaymentEventData struct. Example schema for an `remove_payment` event

func (RemovePaymentEventData) MarshalJSON added in v0.1.0

func (r RemovePaymentEventData) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RemovePaymentEventData. It customizes the JSON marshaling process for RemovePaymentEventData objects.

func (*RemovePaymentEventData) UnmarshalJSON added in v0.1.0

func (r *RemovePaymentEventData) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RemovePaymentEventData. It customizes the JSON unmarshaling process for RemovePaymentEventData objects.

type RenewalPreview

type RenewalPreview struct {
	// The timestamp for the subscription’s next renewal
	NextAssessmentAt *time.Time `json:"next_assessment_at,omitempty"`
	// An integer representing the amount of the total pre-tax, pre-discount charges that will be assessed at the next renewal
	SubtotalInCents *int64 `json:"subtotal_in_cents,omitempty"`
	// An integer representing the total tax charges that will be assessed at the next renewal
	TotalTaxInCents *int64 `json:"total_tax_in_cents,omitempty"`
	// An integer representing the amount of the coupon discounts that will be applied to the next renewal
	TotalDiscountInCents *int64 `json:"total_discount_in_cents,omitempty"`
	// An integer representing the total amount owed, less any discounts, that will be assessed at the next renewal
	TotalInCents *int64 `json:"total_in_cents,omitempty"`
	// An integer representing the amount of the subscription’s current balance
	ExistingBalanceInCents *int64 `json:"existing_balance_in_cents,omitempty"`
	// An integer representing the existing_balance_in_cents plus the total_in_cents
	TotalAmountDueInCents *int64 `json:"total_amount_due_in_cents,omitempty"`
	// A boolean indicating whether or not additional taxes will be calculated at the time of renewal. This will be true if you are using Avalara and the address of the subscription is in one of your defined taxable regions.
	UncalculatedTaxes *bool `json:"uncalculated_taxes,omitempty"`
	// An array of objects representing the individual transactions that will be created at the next renewal
	LineItems            []RenewalPreviewLineItem `json:"line_items,omitempty"`
	AdditionalProperties map[string]any           `json:"_"`
}

RenewalPreview represents a RenewalPreview struct.

func (RenewalPreview) MarshalJSON

func (r RenewalPreview) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RenewalPreview. It customizes the JSON marshaling process for RenewalPreview objects.

func (*RenewalPreview) UnmarshalJSON

func (r *RenewalPreview) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RenewalPreview. It customizes the JSON unmarshaling process for RenewalPreview objects.

type RenewalPreviewComponent

type RenewalPreviewComponent struct {
	// Either the component's Chargify id or its handle prefixed with `handle:`
	ComponentId *RenewalPreviewComponentComponentId `json:"component_id,omitempty"`
	// The quantity for which you wish to preview billing. This is useful if you want to preview a predicted, higher usage value than is currently present on the subscription.
	// This quantity represents:
	// - Whether or not an on/off component is enabled - use 0 for disabled or 1 for enabled
	// - The desired allocated_quantity for a quantity-based component
	// - The desired unit_balance for a metered component
	// - The desired metric quantity for an events-based component
	Quantity *int `json:"quantity,omitempty"`
	// Either the component price point's Chargify id or its handle prefixed with `handle:`
	PricePointId         *RenewalPreviewComponentPricePointId `json:"price_point_id,omitempty"`
	AdditionalProperties map[string]any                       `json:"_"`
}

RenewalPreviewComponent represents a RenewalPreviewComponent struct.

func (RenewalPreviewComponent) MarshalJSON

func (r RenewalPreviewComponent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RenewalPreviewComponent. It customizes the JSON marshaling process for RenewalPreviewComponent objects.

func (*RenewalPreviewComponent) UnmarshalJSON

func (r *RenewalPreviewComponent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RenewalPreviewComponent. It customizes the JSON unmarshaling process for RenewalPreviewComponent objects.

type RenewalPreviewComponentComponentId added in v0.1.0

type RenewalPreviewComponentComponentId struct {
	// contains filtered or unexported fields
}

RenewalPreviewComponentComponentId represents a RenewalPreviewComponentComponentId struct. This is a container for one-of cases.

func (*RenewalPreviewComponentComponentId) AsNumber added in v0.1.0

func (r *RenewalPreviewComponentComponentId) AsNumber() (
	*int,
	bool)

func (*RenewalPreviewComponentComponentId) AsString added in v0.1.0

func (r *RenewalPreviewComponentComponentId) AsString() (
	*string,
	bool)

func (RenewalPreviewComponentComponentId) MarshalJSON added in v0.1.0

func (r RenewalPreviewComponentComponentId) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RenewalPreviewComponentComponentId. It customizes the JSON marshaling process for RenewalPreviewComponentComponentId objects.

func (RenewalPreviewComponentComponentId) String added in v0.1.0

String converts the RenewalPreviewComponentComponentId object to a string representation.

func (*RenewalPreviewComponentComponentId) UnmarshalJSON added in v0.1.0

func (r *RenewalPreviewComponentComponentId) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RenewalPreviewComponentComponentId. It customizes the JSON unmarshaling process for RenewalPreviewComponentComponentId objects.

type RenewalPreviewComponentPricePointId added in v0.1.0

type RenewalPreviewComponentPricePointId struct {
	// contains filtered or unexported fields
}

RenewalPreviewComponentPricePointId represents a RenewalPreviewComponentPricePointId struct. This is a container for one-of cases.

func (*RenewalPreviewComponentPricePointId) AsNumber added in v0.1.0

func (r *RenewalPreviewComponentPricePointId) AsNumber() (
	*int,
	bool)

func (*RenewalPreviewComponentPricePointId) AsString added in v0.1.0

func (r *RenewalPreviewComponentPricePointId) AsString() (
	*string,
	bool)

func (RenewalPreviewComponentPricePointId) MarshalJSON added in v0.1.0

func (r RenewalPreviewComponentPricePointId) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RenewalPreviewComponentPricePointId. It customizes the JSON marshaling process for RenewalPreviewComponentPricePointId objects.

func (RenewalPreviewComponentPricePointId) String added in v0.1.0

String converts the RenewalPreviewComponentPricePointId object to a string representation.

func (*RenewalPreviewComponentPricePointId) UnmarshalJSON added in v0.1.0

func (r *RenewalPreviewComponentPricePointId) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RenewalPreviewComponentPricePointId. It customizes the JSON unmarshaling process for RenewalPreviewComponentPricePointId objects.

type RenewalPreviewLineItem

type RenewalPreviewLineItem struct {
	// A handle for the line item transaction type
	TransactionType *LineItemTransactionType `json:"transaction_type,omitempty"`
	// A handle for the line item kind
	Kind                  *LineItemKind  `json:"kind,omitempty"`
	AmountInCents         *int64         `json:"amount_in_cents,omitempty"`
	Memo                  *string        `json:"memo,omitempty"`
	DiscountAmountInCents *int64         `json:"discount_amount_in_cents,omitempty"`
	TaxableAmountInCents  *int64         `json:"taxable_amount_in_cents,omitempty"`
	ProductId             *int           `json:"product_id,omitempty"`
	ProductName           *string        `json:"product_name,omitempty"`
	ComponentId           *int           `json:"component_id,omitempty"`
	ComponentHandle       *string        `json:"component_handle,omitempty"`
	ComponentName         *string        `json:"component_name,omitempty"`
	ProductHandle         *string        `json:"product_handle,omitempty"`
	PeriodRangeStart      *string        `json:"period_range_start,omitempty"`
	PeriodRangeEnd        *string        `json:"period_range_end,omitempty"`
	AdditionalProperties  map[string]any `json:"_"`
}

RenewalPreviewLineItem represents a RenewalPreviewLineItem struct.

func (RenewalPreviewLineItem) MarshalJSON

func (r RenewalPreviewLineItem) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RenewalPreviewLineItem. It customizes the JSON marshaling process for RenewalPreviewLineItem objects.

func (*RenewalPreviewLineItem) UnmarshalJSON

func (r *RenewalPreviewLineItem) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RenewalPreviewLineItem. It customizes the JSON unmarshaling process for RenewalPreviewLineItem objects.

type RenewalPreviewRequest

type RenewalPreviewRequest struct {
	// An optional array of component definitions to preview. Providing any component definitions here will override the actual components on the subscription (and their quantities), and the billing preview will contain only these components (in addition to any product base fees).
	Components           []RenewalPreviewComponent `json:"components,omitempty"`
	AdditionalProperties map[string]any            `json:"_"`
}

RenewalPreviewRequest represents a RenewalPreviewRequest struct.

func (RenewalPreviewRequest) MarshalJSON

func (r RenewalPreviewRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RenewalPreviewRequest. It customizes the JSON marshaling process for RenewalPreviewRequest objects.

func (*RenewalPreviewRequest) UnmarshalJSON

func (r *RenewalPreviewRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RenewalPreviewRequest. It customizes the JSON unmarshaling process for RenewalPreviewRequest objects.

type RenewalPreviewResponse

type RenewalPreviewResponse struct {
	RenewalPreview       RenewalPreview `json:"renewal_preview"`
	AdditionalProperties map[string]any `json:"_"`
}

RenewalPreviewResponse represents a RenewalPreviewResponse struct.

func (RenewalPreviewResponse) MarshalJSON

func (r RenewalPreviewResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RenewalPreviewResponse. It customizes the JSON marshaling process for RenewalPreviewResponse objects.

func (*RenewalPreviewResponse) UnmarshalJSON

func (r *RenewalPreviewResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RenewalPreviewResponse. It customizes the JSON unmarshaling process for RenewalPreviewResponse objects.

type ReplayWebhooksRequest

type ReplayWebhooksRequest struct {
	Ids                  []int64        `json:"ids"`
	AdditionalProperties map[string]any `json:"_"`
}

ReplayWebhooksRequest represents a ReplayWebhooksRequest struct.

func (ReplayWebhooksRequest) MarshalJSON

func (r ReplayWebhooksRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ReplayWebhooksRequest. It customizes the JSON marshaling process for ReplayWebhooksRequest objects.

func (*ReplayWebhooksRequest) UnmarshalJSON

func (r *ReplayWebhooksRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ReplayWebhooksRequest. It customizes the JSON unmarshaling process for ReplayWebhooksRequest objects.

type ReplayWebhooksResponse

type ReplayWebhooksResponse struct {
	Status               *string        `json:"status,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ReplayWebhooksResponse represents a ReplayWebhooksResponse struct.

func (ReplayWebhooksResponse) MarshalJSON

func (r ReplayWebhooksResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ReplayWebhooksResponse. It customizes the JSON marshaling process for ReplayWebhooksResponse objects.

func (*ReplayWebhooksResponse) UnmarshalJSON

func (r *ReplayWebhooksResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ReplayWebhooksResponse. It customizes the JSON unmarshaling process for ReplayWebhooksResponse objects.

type ResentInvitation

type ResentInvitation struct {
	LastSentAt           *string        `json:"last_sent_at,omitempty"`
	LastAcceptedAt       *string        `json:"last_accepted_at,omitempty"`
	SendInviteLinkText   *string        `json:"send_invite_link_text,omitempty"`
	UninvitedCount       *int           `json:"uninvited_count,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ResentInvitation represents a ResentInvitation struct.

func (ResentInvitation) MarshalJSON

func (r ResentInvitation) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ResentInvitation. It customizes the JSON marshaling process for ResentInvitation objects.

func (*ResentInvitation) UnmarshalJSON

func (r *ResentInvitation) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ResentInvitation. It customizes the JSON unmarshaling process for ResentInvitation objects.

type ResourceType

type ResourceType string

ResourceType is a string enum.

const (
	ResourceType_SUBSCRIPTIONS ResourceType = "subscriptions"
	ResourceType_CUSTOMERS     ResourceType = "customers"
)

func (ResourceType) MarshalJSON added in v0.2.0

func (e ResourceType) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ResourceType. It customizes the JSON marshaling process for ResourceType objects.

func (*ResourceType) UnmarshalJSON added in v0.2.0

func (e *ResourceType) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ResourceType. It customizes the JSON unmarshaling process for ResourceType objects.

type RestrictionType

type RestrictionType string

RestrictionType is a string enum.

const (
	RestrictionType_COMPONENT RestrictionType = "Component"
	RestrictionType_PRODUCT   RestrictionType = "Product"
)

func (RestrictionType) MarshalJSON added in v0.2.0

func (e RestrictionType) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RestrictionType. It customizes the JSON marshaling process for RestrictionType objects.

func (*RestrictionType) UnmarshalJSON added in v0.2.0

func (e *RestrictionType) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RestrictionType. It customizes the JSON unmarshaling process for RestrictionType objects.

type ResumeOptions added in v0.1.0

type ResumeOptions struct {
	// Chargify will only attempt to resume the subscription's billing period. If not resumable, the subscription will be left in it's current state.
	RequireResume *bool `json:"require_resume,omitempty"`
	// Indicates whether or not Chargify should clear the subscription's existing balance before attempting to resume the subscription. If subscription cannot be resumed, the balance will remain as it was before the attempt to resume was made.
	ForgiveBalance       *bool          `json:"forgive_balance,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ResumeOptions represents a ResumeOptions struct.

func (ResumeOptions) MarshalJSON added in v0.1.0

func (r ResumeOptions) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ResumeOptions. It customizes the JSON marshaling process for ResumeOptions objects.

func (*ResumeOptions) UnmarshalJSON added in v0.1.0

func (r *ResumeOptions) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ResumeOptions. It customizes the JSON unmarshaling process for ResumeOptions objects.

type ResumptionCharge

type ResumptionCharge string

ResumptionCharge is a string enum. (For calendar billing subscriptions only) The way that the resumed subscription's charge should be handled

const (
	ResumptionCharge_PRORATED  ResumptionCharge = "prorated"
	ResumptionCharge_IMMEDIATE ResumptionCharge = "immediate"
	ResumptionCharge_DELAYED   ResumptionCharge = "delayed"
)

func (ResumptionCharge) MarshalJSON added in v0.2.0

func (e ResumptionCharge) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ResumptionCharge. It customizes the JSON marshaling process for ResumptionCharge objects.

func (*ResumptionCharge) UnmarshalJSON added in v0.2.0

func (e *ResumptionCharge) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ResumptionCharge. It customizes the JSON unmarshaling process for ResumptionCharge objects.

type RevokedInvitation

type RevokedInvitation struct {
	LastSentAt           *string        `json:"last_sent_at,omitempty"`
	LastAcceptedAt       *string        `json:"last_accepted_at,omitempty"`
	UninvitedCount       *int           `json:"uninvited_count,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

RevokedInvitation represents a RevokedInvitation struct.

func (RevokedInvitation) MarshalJSON

func (r RevokedInvitation) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for RevokedInvitation. It customizes the JSON marshaling process for RevokedInvitation objects.

func (*RevokedInvitation) UnmarshalJSON

func (r *RevokedInvitation) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for RevokedInvitation. It customizes the JSON unmarshaling process for RevokedInvitation objects.

type SaleRep

type SaleRep struct {
	Id                   *int                  `json:"id,omitempty"`
	FullName             *string               `json:"full_name,omitempty"`
	SubscriptionsCount   *int                  `json:"subscriptions_count,omitempty"`
	TestMode             *bool                 `json:"test_mode,omitempty"`
	Subscriptions        []SaleRepSubscription `json:"subscriptions,omitempty"`
	AdditionalProperties map[string]any        `json:"_"`
}

SaleRep represents a SaleRep struct.

func (SaleRep) MarshalJSON

func (s SaleRep) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SaleRep. It customizes the JSON marshaling process for SaleRep objects.

func (*SaleRep) UnmarshalJSON

func (s *SaleRep) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SaleRep. It customizes the JSON unmarshaling process for SaleRep objects.

type SaleRepItemMrr

type SaleRepItemMrr struct {
	Mrr                  *string        `json:"mrr,omitempty"`
	Usage                *string        `json:"usage,omitempty"`
	Recurring            *string        `json:"recurring,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

SaleRepItemMrr represents a SaleRepItemMrr struct.

func (SaleRepItemMrr) MarshalJSON

func (s SaleRepItemMrr) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SaleRepItemMrr. It customizes the JSON marshaling process for SaleRepItemMrr objects.

func (*SaleRepItemMrr) UnmarshalJSON

func (s *SaleRepItemMrr) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SaleRepItemMrr. It customizes the JSON unmarshaling process for SaleRepItemMrr objects.

type SaleRepSettings

type SaleRepSettings struct {
	CustomerName         *string        `json:"customer_name,omitempty"`
	SubscriptionId       *int           `json:"subscription_id,omitempty"`
	SiteLink             *string        `json:"site_link,omitempty"`
	SiteName             *string        `json:"site_name,omitempty"`
	SubscriptionMrr      *string        `json:"subscription_mrr,omitempty"`
	SalesRepId           *int           `json:"sales_rep_id,omitempty"`
	SalesRepName         *string        `json:"sales_rep_name,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

SaleRepSettings represents a SaleRepSettings struct.

func (SaleRepSettings) MarshalJSON

func (s SaleRepSettings) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SaleRepSettings. It customizes the JSON marshaling process for SaleRepSettings objects.

func (*SaleRepSettings) UnmarshalJSON

func (s *SaleRepSettings) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SaleRepSettings. It customizes the JSON unmarshaling process for SaleRepSettings objects.

type SaleRepSubscription

type SaleRepSubscription struct {
	Id                   *int             `json:"id,omitempty"`
	SiteName             *string          `json:"site_name,omitempty"`
	SubscriptionUrl      *string          `json:"subscription_url,omitempty"`
	CustomerName         *string          `json:"customer_name,omitempty"`
	CreatedAt            *string          `json:"created_at,omitempty"`
	Mrr                  *string          `json:"mrr,omitempty"`
	Usage                *string          `json:"usage,omitempty"`
	Recurring            *string          `json:"recurring,omitempty"`
	LastPayment          *string          `json:"last_payment,omitempty"`
	ChurnDate            Optional[string] `json:"churn_date"`
	AdditionalProperties map[string]any   `json:"_"`
}

SaleRepSubscription represents a SaleRepSubscription struct.

func (SaleRepSubscription) MarshalJSON

func (s SaleRepSubscription) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SaleRepSubscription. It customizes the JSON marshaling process for SaleRepSubscription objects.

func (*SaleRepSubscription) UnmarshalJSON

func (s *SaleRepSubscription) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SaleRepSubscription. It customizes the JSON unmarshaling process for SaleRepSubscription objects.

type Segment

type Segment struct {
	Id                        *int `json:"id,omitempty"`
	ComponentId               *int `json:"component_id,omitempty"`
	PricePointId              *int `json:"price_point_id,omitempty"`
	EventBasedBillingMetricId *int `json:"event_based_billing_metric_id,omitempty"`
	// The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes.
	PricingScheme         *PricingScheme                `json:"pricing_scheme,omitempty"`
	SegmentProperty1Value *SegmentSegmentProperty1Value `json:"segment_property_1_value,omitempty"`
	SegmentProperty2Value *SegmentSegmentProperty2Value `json:"segment_property_2_value,omitempty"`
	SegmentProperty3Value *SegmentSegmentProperty3Value `json:"segment_property_3_value,omitempty"`
	SegmentProperty4Value *SegmentSegmentProperty4Value `json:"segment_property_4_value,omitempty"`
	CreatedAt             *time.Time                    `json:"created_at,omitempty"`
	UpdatedAt             *time.Time                    `json:"updated_at,omitempty"`
	Prices                []SegmentPrice                `json:"prices,omitempty"`
	AdditionalProperties  map[string]any                `json:"_"`
}

Segment represents a Segment struct.

func (Segment) MarshalJSON

func (s Segment) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Segment. It customizes the JSON marshaling process for Segment objects.

func (*Segment) UnmarshalJSON

func (s *Segment) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Segment. It customizes the JSON unmarshaling process for Segment objects.

type SegmentPrice

type SegmentPrice struct {
	Id                   *int           `json:"id,omitempty"`
	ComponentId          *int           `json:"component_id,omitempty"`
	StartingQuantity     *int           `json:"starting_quantity,omitempty"`
	EndingQuantity       Optional[int]  `json:"ending_quantity"`
	UnitPrice            *string        `json:"unit_price,omitempty"`
	PricePointId         *int           `json:"price_point_id,omitempty"`
	FormattedUnitPrice   *string        `json:"formatted_unit_price,omitempty"`
	SegmentId            *int           `json:"segment_id,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

SegmentPrice represents a SegmentPrice struct.

func (SegmentPrice) MarshalJSON

func (s SegmentPrice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SegmentPrice. It customizes the JSON marshaling process for SegmentPrice objects.

func (*SegmentPrice) UnmarshalJSON

func (s *SegmentPrice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SegmentPrice. It customizes the JSON unmarshaling process for SegmentPrice objects.

type SegmentResponse

type SegmentResponse struct {
	Segment              *Segment       `json:"segment,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

SegmentResponse represents a SegmentResponse struct.

func (SegmentResponse) MarshalJSON

func (s SegmentResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SegmentResponse. It customizes the JSON marshaling process for SegmentResponse objects.

func (*SegmentResponse) UnmarshalJSON

func (s *SegmentResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SegmentResponse. It customizes the JSON unmarshaling process for SegmentResponse objects.

type SegmentSegmentProperty1Value added in v0.1.0

type SegmentSegmentProperty1Value struct {
	// contains filtered or unexported fields
}

SegmentSegmentProperty1Value represents a SegmentSegmentProperty1Value struct. This is a container for one-of cases.

func (*SegmentSegmentProperty1Value) AsBoolean added in v0.1.0

func (s *SegmentSegmentProperty1Value) AsBoolean() (
	*bool,
	bool)

func (*SegmentSegmentProperty1Value) AsNumber added in v0.1.0

func (s *SegmentSegmentProperty1Value) AsNumber() (
	*int,
	bool)

func (*SegmentSegmentProperty1Value) AsPrecision added in v0.1.0

func (s *SegmentSegmentProperty1Value) AsPrecision() (
	*float64,
	bool)

func (*SegmentSegmentProperty1Value) AsString added in v0.1.0

func (s *SegmentSegmentProperty1Value) AsString() (
	*string,
	bool)

func (SegmentSegmentProperty1Value) MarshalJSON added in v0.1.0

func (s SegmentSegmentProperty1Value) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SegmentSegmentProperty1Value. It customizes the JSON marshaling process for SegmentSegmentProperty1Value objects.

func (SegmentSegmentProperty1Value) String added in v0.1.0

String converts the SegmentSegmentProperty1Value object to a string representation.

func (*SegmentSegmentProperty1Value) UnmarshalJSON added in v0.1.0

func (s *SegmentSegmentProperty1Value) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SegmentSegmentProperty1Value. It customizes the JSON unmarshaling process for SegmentSegmentProperty1Value objects.

type SegmentSegmentProperty2Value added in v0.1.0

type SegmentSegmentProperty2Value struct {
	// contains filtered or unexported fields
}

SegmentSegmentProperty2Value represents a SegmentSegmentProperty2Value struct. This is a container for one-of cases.

func (*SegmentSegmentProperty2Value) AsBoolean added in v0.1.0

func (s *SegmentSegmentProperty2Value) AsBoolean() (
	*bool,
	bool)

func (*SegmentSegmentProperty2Value) AsNumber added in v0.1.0

func (s *SegmentSegmentProperty2Value) AsNumber() (
	*int,
	bool)

func (*SegmentSegmentProperty2Value) AsPrecision added in v0.1.0

func (s *SegmentSegmentProperty2Value) AsPrecision() (
	*float64,
	bool)

func (*SegmentSegmentProperty2Value) AsString added in v0.1.0

func (s *SegmentSegmentProperty2Value) AsString() (
	*string,
	bool)

func (SegmentSegmentProperty2Value) MarshalJSON added in v0.1.0

func (s SegmentSegmentProperty2Value) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SegmentSegmentProperty2Value. It customizes the JSON marshaling process for SegmentSegmentProperty2Value objects.

func (SegmentSegmentProperty2Value) String added in v0.1.0

String converts the SegmentSegmentProperty2Value object to a string representation.

func (*SegmentSegmentProperty2Value) UnmarshalJSON added in v0.1.0

func (s *SegmentSegmentProperty2Value) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SegmentSegmentProperty2Value. It customizes the JSON unmarshaling process for SegmentSegmentProperty2Value objects.

type SegmentSegmentProperty3Value added in v0.1.0

type SegmentSegmentProperty3Value struct {
	// contains filtered or unexported fields
}

SegmentSegmentProperty3Value represents a SegmentSegmentProperty3Value struct. This is a container for one-of cases.

func (*SegmentSegmentProperty3Value) AsBoolean added in v0.1.0

func (s *SegmentSegmentProperty3Value) AsBoolean() (
	*bool,
	bool)

func (*SegmentSegmentProperty3Value) AsNumber added in v0.1.0

func (s *SegmentSegmentProperty3Value) AsNumber() (
	*int,
	bool)

func (*SegmentSegmentProperty3Value) AsPrecision added in v0.1.0

func (s *SegmentSegmentProperty3Value) AsPrecision() (
	*float64,
	bool)

func (*SegmentSegmentProperty3Value) AsString added in v0.1.0

func (s *SegmentSegmentProperty3Value) AsString() (
	*string,
	bool)

func (SegmentSegmentProperty3Value) MarshalJSON added in v0.1.0

func (s SegmentSegmentProperty3Value) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SegmentSegmentProperty3Value. It customizes the JSON marshaling process for SegmentSegmentProperty3Value objects.

func (SegmentSegmentProperty3Value) String added in v0.1.0

String converts the SegmentSegmentProperty3Value object to a string representation.

func (*SegmentSegmentProperty3Value) UnmarshalJSON added in v0.1.0

func (s *SegmentSegmentProperty3Value) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SegmentSegmentProperty3Value. It customizes the JSON unmarshaling process for SegmentSegmentProperty3Value objects.

type SegmentSegmentProperty4Value added in v0.1.0

type SegmentSegmentProperty4Value struct {
	// contains filtered or unexported fields
}

SegmentSegmentProperty4Value represents a SegmentSegmentProperty4Value struct. This is a container for one-of cases.

func (*SegmentSegmentProperty4Value) AsBoolean added in v0.1.0

func (s *SegmentSegmentProperty4Value) AsBoolean() (
	*bool,
	bool)

func (*SegmentSegmentProperty4Value) AsNumber added in v0.1.0

func (s *SegmentSegmentProperty4Value) AsNumber() (
	*int,
	bool)

func (*SegmentSegmentProperty4Value) AsPrecision added in v0.1.0

func (s *SegmentSegmentProperty4Value) AsPrecision() (
	*float64,
	bool)

func (*SegmentSegmentProperty4Value) AsString added in v0.1.0

func (s *SegmentSegmentProperty4Value) AsString() (
	*string,
	bool)

func (SegmentSegmentProperty4Value) MarshalJSON added in v0.1.0

func (s SegmentSegmentProperty4Value) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SegmentSegmentProperty4Value. It customizes the JSON marshaling process for SegmentSegmentProperty4Value objects.

func (SegmentSegmentProperty4Value) String added in v0.1.0

String converts the SegmentSegmentProperty4Value object to a string representation.

func (*SegmentSegmentProperty4Value) UnmarshalJSON added in v0.1.0

func (s *SegmentSegmentProperty4Value) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SegmentSegmentProperty4Value. It customizes the JSON unmarshaling process for SegmentSegmentProperty4Value objects.

type SendInvoiceRequest

type SendInvoiceRequest struct {
	RecipientEmails      []string       `json:"recipient_emails,omitempty"`
	CcRecipientEmails    []string       `json:"cc_recipient_emails,omitempty"`
	BccRecipientEmails   []string       `json:"bcc_recipient_emails,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

SendInvoiceRequest represents a SendInvoiceRequest struct.

func (SendInvoiceRequest) MarshalJSON

func (s SendInvoiceRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SendInvoiceRequest. It customizes the JSON marshaling process for SendInvoiceRequest objects.

func (*SendInvoiceRequest) UnmarshalJSON

func (s *SendInvoiceRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SendInvoiceRequest. It customizes the JSON unmarshaling process for SendInvoiceRequest objects.

type ServiceCredit

type ServiceCredit struct {
	Id *int `json:"id,omitempty"`
	// The amount in cents of the entry
	AmountInCents *int64 `json:"amount_in_cents,omitempty"`
	// The new balance for the credit account
	EndingBalanceInCents *int64 `json:"ending_balance_in_cents,omitempty"`
	// The type of entry
	EntryType *ServiceCreditType `json:"entry_type,omitempty"`
	// The memo attached to the entry
	Memo                 *string        `json:"memo,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

ServiceCredit represents a ServiceCredit struct.

func (ServiceCredit) MarshalJSON

func (s ServiceCredit) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ServiceCredit. It customizes the JSON marshaling process for ServiceCredit objects.

func (*ServiceCredit) UnmarshalJSON

func (s *ServiceCredit) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ServiceCredit. It customizes the JSON unmarshaling process for ServiceCredit objects.

type ServiceCreditResponse

type ServiceCreditResponse struct {
	ServiceCredit        ServiceCredit  `json:"service_credit"`
	AdditionalProperties map[string]any `json:"_"`
}

ServiceCreditResponse represents a ServiceCreditResponse struct.

func (ServiceCreditResponse) MarshalJSON

func (s ServiceCreditResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ServiceCreditResponse. It customizes the JSON marshaling process for ServiceCreditResponse objects.

func (*ServiceCreditResponse) UnmarshalJSON

func (s *ServiceCreditResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ServiceCreditResponse. It customizes the JSON unmarshaling process for ServiceCreditResponse objects.

type ServiceCreditType

type ServiceCreditType string

ServiceCreditType is a string enum. The type of entry

const (
	ServiceCreditType_CREDIT ServiceCreditType = "Credit"
	ServiceCreditType_DEBIT  ServiceCreditType = "Debit"
)

func (ServiceCreditType) MarshalJSON added in v0.2.0

func (e ServiceCreditType) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for ServiceCreditType. It customizes the JSON marshaling process for ServiceCreditType objects.

func (*ServiceCreditType) UnmarshalJSON added in v0.2.0

func (e *ServiceCreditType) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ServiceCreditType. It customizes the JSON unmarshaling process for ServiceCreditType objects.

type SignupProformaPreview

type SignupProformaPreview struct {
	CurrentProformaInvoice *ProformaInvoice `json:"current_proforma_invoice,omitempty"`
	NextProformaInvoice    *ProformaInvoice `json:"next_proforma_invoice,omitempty"`
	AdditionalProperties   map[string]any   `json:"_"`
}

SignupProformaPreview represents a SignupProformaPreview struct.

func (SignupProformaPreview) MarshalJSON

func (s SignupProformaPreview) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SignupProformaPreview. It customizes the JSON marshaling process for SignupProformaPreview objects.

func (*SignupProformaPreview) UnmarshalJSON

func (s *SignupProformaPreview) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SignupProformaPreview. It customizes the JSON unmarshaling process for SignupProformaPreview objects.

type SignupProformaPreviewResponse

type SignupProformaPreviewResponse struct {
	ProformaInvoicePreview SignupProformaPreview `json:"proforma_invoice_preview"`
	AdditionalProperties   map[string]any        `json:"_"`
}

SignupProformaPreviewResponse represents a SignupProformaPreviewResponse struct.

func (SignupProformaPreviewResponse) MarshalJSON

func (s SignupProformaPreviewResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SignupProformaPreviewResponse. It customizes the JSON marshaling process for SignupProformaPreviewResponse objects.

func (*SignupProformaPreviewResponse) UnmarshalJSON

func (s *SignupProformaPreviewResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SignupProformaPreviewResponse. It customizes the JSON unmarshaling process for SignupProformaPreviewResponse objects.

type Site

type Site struct {
	Id                             *int                 `json:"id,omitempty"`
	Name                           *string              `json:"name,omitempty"`
	Subdomain                      *string              `json:"subdomain,omitempty"`
	Currency                       *string              `json:"currency,omitempty"`
	SellerId                       *int                 `json:"seller_id,omitempty"`
	NonPrimaryCurrencies           []string             `json:"non_primary_currencies,omitempty"`
	RelationshipInvoicingEnabled   *bool                `json:"relationship_invoicing_enabled,omitempty"`
	CustomerHierarchyEnabled       *bool                `json:"customer_hierarchy_enabled,omitempty"`
	WhopaysEnabled                 *bool                `json:"whopays_enabled,omitempty"`
	WhopaysDefaultPayer            *string              `json:"whopays_default_payer,omitempty"`
	AllocationSettings             *AllocationSettings  `json:"allocation_settings,omitempty"`
	DefaultPaymentCollectionMethod *string              `json:"default_payment_collection_method,omitempty"`
	OrganizationAddress            *OrganizationAddress `json:"organization_address,omitempty"`
	TaxConfiguration               *TaxConfiguration    `json:"tax_configuration,omitempty"`
	NetTerms                       *NetTerms            `json:"net_terms,omitempty"`
	Test                           *bool                `json:"test,omitempty"`
	AdditionalProperties           map[string]any       `json:"_"`
}

Site represents a Site struct.

func (Site) MarshalJSON

func (s Site) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Site. It customizes the JSON marshaling process for Site objects.

func (*Site) UnmarshalJSON

func (s *Site) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Site. It customizes the JSON unmarshaling process for Site objects.

type SiteResponse

type SiteResponse struct {
	Site                 Site           `json:"site"`
	AdditionalProperties map[string]any `json:"_"`
}

SiteResponse represents a SiteResponse struct.

func (SiteResponse) MarshalJSON

func (s SiteResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SiteResponse. It customizes the JSON marshaling process for SiteResponse objects.

func (*SiteResponse) UnmarshalJSON

func (s *SiteResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SiteResponse. It customizes the JSON unmarshaling process for SiteResponse objects.

type SiteStatistics

type SiteStatistics struct {
	TotalSubscriptions         *int           `json:"total_subscriptions,omitempty"`
	SubscriptionsToday         *int           `json:"subscriptions_today,omitempty"`
	TotalRevenue               *string        `json:"total_revenue,omitempty"`
	RevenueToday               *string        `json:"revenue_today,omitempty"`
	RevenueThisMonth           *string        `json:"revenue_this_month,omitempty"`
	RevenueThisYear            *string        `json:"revenue_this_year,omitempty"`
	TotalCanceledSubscriptions *int           `json:"total_canceled_subscriptions,omitempty"`
	TotalActiveSubscriptions   *int           `json:"total_active_subscriptions,omitempty"`
	TotalPastDueSubscriptions  *int           `json:"total_past_due_subscriptions,omitempty"`
	TotalUnpaidSubscriptions   *int           `json:"total_unpaid_subscriptions,omitempty"`
	TotalDunningSubscriptions  *int           `json:"total_dunning_subscriptions,omitempty"`
	AdditionalProperties       map[string]any `json:"_"`
}

SiteStatistics represents a SiteStatistics struct.

func (SiteStatistics) MarshalJSON

func (s SiteStatistics) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SiteStatistics. It customizes the JSON marshaling process for SiteStatistics objects.

func (*SiteStatistics) UnmarshalJSON

func (s *SiteStatistics) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SiteStatistics. It customizes the JSON unmarshaling process for SiteStatistics objects.

type SiteSummary

type SiteSummary struct {
	SellerName           *string         `json:"seller_name,omitempty"`
	SiteName             *string         `json:"site_name,omitempty"`
	SiteId               *int            `json:"site_id,omitempty"`
	SiteCurrency         *string         `json:"site_currency,omitempty"`
	Stats                *SiteStatistics `json:"stats,omitempty"`
	AdditionalProperties map[string]any  `json:"_"`
}

SiteSummary represents a SiteSummary struct.

func (SiteSummary) MarshalJSON

func (s SiteSummary) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SiteSummary. It customizes the JSON marshaling process for SiteSummary objects.

func (*SiteSummary) UnmarshalJSON

func (s *SiteSummary) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SiteSummary. It customizes the JSON unmarshaling process for SiteSummary objects.

type SnapDay added in v0.1.0

type SnapDay string

SnapDay is a string enum. Use for subscriptions with product eligible for calendar billing only. Value can be 1-28 or 'end'.

const (
	SnapDay_END SnapDay = "end"
)

func (SnapDay) MarshalJSON added in v0.2.0

func (e SnapDay) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SnapDay. It customizes the JSON marshaling process for SnapDay objects.

func (*SnapDay) UnmarshalJSON added in v0.2.0

func (e *SnapDay) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SnapDay. It customizes the JSON unmarshaling process for SnapDay objects.

type SortingDirection

type SortingDirection string

SortingDirection is a string enum. Used for sorting results.

const (
	SortingDirection_ASC  SortingDirection = "asc"
	SortingDirection_DESC SortingDirection = "desc"
)

func (SortingDirection) MarshalJSON added in v0.2.0

func (e SortingDirection) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SortingDirection. It customizes the JSON marshaling process for SortingDirection objects.

func (*SortingDirection) UnmarshalJSON added in v0.2.0

func (e *SortingDirection) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SortingDirection. It customizes the JSON unmarshaling process for SortingDirection objects.

type Subscription

type Subscription struct {
	// The subscription unique id within Chargify.
	Id *int `json:"id,omitempty"`
	// The state of a subscription.
	// * **Live States**
	//     * `active` - A normal, active subscription. It is not in a trial and is paid and up to date.
	//     * `assessing` - An internal (transient) state that indicates a subscription is in the middle of periodic assessment. Do not base any access decisions in your app on this state, as it may not always be exposed.
	//     * `pending` - An internal (transient) state that indicates a subscription is in the creation process. Do not base any access decisions in your app on this state, as it may not always be exposed.
	//     * `trialing` - A subscription in trialing state has a valid trial subscription. This type of subscription may transition to active once payment is received when the trial has ended. Otherwise, it may go to a Problem or End of Life state.
	//     * `paused` - An internal state that indicates that your account with Advanced Billing is in arrears.
	// * **Problem States**
	//     * `past_due` - Indicates that the most recent payment has failed, and payment is past due for this subscription. If you have enabled our automated dunning, this subscription will be in the dunning process (additional status and callbacks from the dunning process will be available in the future). If you are handling dunning and payment updates yourself, you will want to use this state to initiate a payment update from your customers.
	//     * `soft_failure` - Indicates that normal assessment/processing of the subscription has failed for a reason that cannot be fixed by the Customer. For example, a Soft Fail may result from a timeout at the gateway or incorrect credentials on your part. The subscriptions should be retried automatically. An interface is being built for you to review problems resulting from these events to take manual action when needed.
	//     * `unpaid` - Indicates an unpaid subscription. A subscription is marked unpaid if the retry period expires and you have configured your [Dunning](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405505141005) settings to have a Final Action of `mark the subscription unpaid`.
	// * **End of Life States**
	//     * `canceled` - Indicates a canceled subscription. This may happen at your request (via the API or the web interface) or due to the expiration of the [Dunning](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405505141005) process without payment. See the [Reactivation](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404559291021) documentation for info on how to restart a canceled subscription.
	//     While a subscription is canceled, its period will not advance, it will not accrue any new charges, and Advanced Billing will not attempt to collect the overdue balance.
	//     * `expired` - Indicates a subscription that has expired due to running its normal life cycle. Some products may be configured to have an expiration period. An expired subscription then is one that stayed active until it fulfilled its full period.
	//     * `failed_to_create` - Indicates that signup has failed. (You may see this state in a signup_failure webhook.)
	//     * `on_hold` - Indicates that a subscription’s billing has been temporarily stopped. While it is expected that the subscription will resume and return to active status, this is still treated as an “End of Life” state because the customer is not paying for services during this time.
	//     * `suspended` - Indicates that a prepaid subscription has used up all their prepayment balance. If a prepayment is applied, it will return to an active state.
	//     * `trial_ended` - A subscription in a trial_ended state is a subscription that completed a no-obligation trial and did not have a card on file at the expiration of the trial period. See [Product Pricing – No Obligation Trials](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405246782221) for more details.
	// See [Subscription States](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404222005773) for more info about subscription states and state transitions.
	State *SubscriptionState `json:"state,omitempty"`
	// Gives the current outstanding subscription balance in the number of cents.
	BalanceInCents *int64 `json:"balance_in_cents,omitempty"`
	// Gives the total revenue from the subscription in the number of cents.
	TotalRevenueInCents *int64 `json:"total_revenue_in_cents,omitempty"`
	// (Added Nov 5 2013) The recurring amount of the product (and version),currently subscribed. NOTE: this may differ from the current price of,the product, if you’ve changed the price of the product but haven’t,moved this subscription to a newer version.
	ProductPriceInCents *int64 `json:"product_price_in_cents,omitempty"`
	// The version of the product for the subscription. Note that this is a deprecated field kept for backwards-compatibility.
	ProductVersionNumber *int `json:"product_version_number,omitempty"`
	// Timestamp relating to the end of the current (recurring) period (i.e.,when the next regularly scheduled attempted charge will occur)
	CurrentPeriodEndsAt Optional[time.Time] `json:"current_period_ends_at"`
	// Timestamp that indicates when capture of payment will be tried or,retried. This value will usually track the current_period_ends_at, but,will diverge if a renewal payment fails and must be retried. In that,case, the current_period_ends_at will advance to the end of the next,period (time doesn’t stop because a payment was missed) but the,next_assessment_at will be scheduled for the auto-retry time (i.e. 24,hours in the future, in some cases)
	NextAssessmentAt Optional[time.Time] `json:"next_assessment_at"`
	// Timestamp for when the trial period (if any) began
	TrialStartedAt Optional[time.Time] `json:"trial_started_at"`
	// Timestamp for when the trial period (if any) ended
	TrialEndedAt Optional[time.Time] `json:"trial_ended_at"`
	// Timestamp for when the subscription began (i.e. when it came out of trial, or when it began in the case of no trial)
	ActivatedAt Optional[time.Time] `json:"activated_at"`
	// Timestamp giving the expiration date of this subscription (if any)
	ExpiresAt Optional[time.Time] `json:"expires_at"`
	// The creation date for this subscription
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// The date of last update for this subscription
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
	// Seller-provided reason for, or note about, the cancellation.
	CancellationMessage Optional[string] `json:"cancellation_message"`
	// The process used to cancel the subscription, if the subscription has been canceled. It is nil if the subscription's state is not canceled.
	CancellationMethod Optional[CancellationMethod] `json:"cancellation_method"`
	// Whether or not the subscription will (or has) canceled at the end of the period.
	CancelAtEndOfPeriod Optional[bool] `json:"cancel_at_end_of_period"`
	// The timestamp of the most recent cancellation
	CanceledAt Optional[time.Time] `json:"canceled_at"`
	// Timestamp relating to the start of the current (recurring) period
	CurrentPeriodStartedAt Optional[time.Time] `json:"current_period_started_at"`
	// Only valid for webhook payloads The previous state for webhooks that have indicated a change in state. For normal API calls, this will always be the same as the state (current state)
	PreviousState *SubscriptionState `json:"previous_state,omitempty"`
	// The ID of the transaction that generated the revenue
	SignupPaymentId *int `json:"signup_payment_id,omitempty"`
	// The revenue, formatted as a string of decimal separated dollars and,cents, from the subscription signup ($50.00 would be formatted as,50.00)
	SignupRevenue *string `json:"signup_revenue,omitempty"`
	// Timestamp for when the subscription is currently set to cancel.
	DelayedCancelAt Optional[time.Time] `json:"delayed_cancel_at"`
	// (deprecated) The coupon code of the single coupon currently applied to the subscription. See coupon_codes instead as subscriptions can now have more than one coupon.
	CouponCode Optional[string] `json:"coupon_code"` // Deprecated
	// The day of the month that the subscription will charge according to calendar billing rules, if used.
	SnapDay Optional[string] `json:"snap_day"`
	// The type of payment collection to be used in the subscription. For legacy Statements Architecture valid options are - `invoice`, `automatic`. For current Relationship Invoicing Architecture valid options are - `remittance`, `automatic`, `prepaid`.
	PaymentCollectionMethod *CollectionMethod                 `json:"payment_collection_method,omitempty"`
	Customer                *Customer                         `json:"customer,omitempty"`
	Product                 *Product                          `json:"product,omitempty"`
	CreditCard              *CreditCardPaymentProfile         `json:"credit_card,omitempty"`
	Group                   Optional[NestedSubscriptionGroup] `json:"group"`
	BankAccount             *BankAccountPaymentProfile        `json:"bank_account,omitempty"`
	// The payment profile type for the active profile on file.
	PaymentType Optional[string] `json:"payment_type"`
	// The subscription's unique code that can be given to referrals.
	ReferralCode Optional[string] `json:"referral_code"`
	// If a delayed product change is scheduled, the ID of the product that the subscription will be changed to at the next renewal.
	NextProductId Optional[int] `json:"next_product_id"`
	// If a delayed product change is scheduled, the handle of the product that the subscription will be changed to at the next renewal.
	NextProductHandle Optional[string] `json:"next_product_handle"`
	// (deprecated) How many times the subscription's single coupon has been used. This field has no replacement for multiple coupons.
	CouponUseCount Optional[int] `json:"coupon_use_count"` // Deprecated
	// (deprecated) How many times the subscription's single coupon may be used. This field has no replacement for multiple coupons.
	CouponUsesAllowed Optional[int] `json:"coupon_uses_allowed"` // Deprecated
	// If the subscription is canceled, this is their churn code.
	ReasonCode Optional[string] `json:"reason_code"`
	// The date the subscription is scheduled to automatically resume from the on_hold state.
	AutomaticallyResumeAt Optional[time.Time] `json:"automatically_resume_at"`
	// An array for all the coupons attached to the subscription.
	CouponCodes []string `json:"coupon_codes,omitempty"`
	// The ID of the offer associated with the subscription.
	OfferId Optional[int] `json:"offer_id"`
	// On Relationship Invoicing, the ID of the individual paying for the subscription. Defaults to the Customer ID unless the 'Customer Hierarchies & WhoPays' feature is enabled.
	PayerId Optional[int] `json:"payer_id"`
	// The balance in cents plus the estimated renewal amount in cents. Returned ONLY for readSubscription operation as it's compute intensive operation.
	CurrentBillingAmountInCents *int64 `json:"current_billing_amount_in_cents,omitempty"`
	// The product price point currently subscribed to.
	ProductPricePointId *int `json:"product_price_point_id,omitempty"`
	// Price point type. We expose the following types:
	// 1. **default**: a price point that is marked as a default price for a certain product.
	// 2. **custom**: a custom price point.
	// 3. **catalog**: a price point that is **not** marked as a default price for a certain product and is **not** a custom one.
	ProductPricePointType *PricePointType `json:"product_price_point_type,omitempty"`
	// If a delayed product change is scheduled, the ID of the product price point that the subscription will be changed to at the next renewal.
	NextProductPricePointId Optional[int] `json:"next_product_price_point_id"`
	// On Relationship Invoicing, the number of days before a renewal invoice is due.
	NetTerms Optional[int] `json:"net_terms"`
	// For European sites subject to PSD2 and using 3D Secure, this can be used to reference a previous transaction for the customer. This will ensure the card will be charged successfully at renewal.
	StoredCredentialTransactionId Optional[int] `json:"stored_credential_transaction_id"`
	// The reference value (provided by your app) for the subscription itelf.
	Reference Optional[string] `json:"reference"`
	// The timestamp of the most recent on hold action.
	OnHoldAt Optional[time.Time] `json:"on_hold_at"`
	// Boolean representing whether the subscription is prepaid and currently in dunning. Only returned for Relationship Invoicing sites with the feature enabled
	PrepaidDunning *bool `json:"prepaid_dunning,omitempty"`
	// Additional coupon data. To use this data you also have to include the following param in the request`include[]=coupons`.
	// Only in Read Subscription Endpoint.
	Coupons []SubscriptionIncludedCoupon `json:"coupons,omitempty"`
	// Enable Communication Delay feature, making sure no communication (email or SMS) is sent to the Customer between 9PM and 8AM in time zone set by the `dunning_communication_delay_time_zone` attribute.
	DunningCommunicationDelayEnabled *bool `json:"dunning_communication_delay_enabled,omitempty"`
	// Time zone for the Dunning Communication Delay feature.
	DunningCommunicationDelayTimeZone Optional[string]               `json:"dunning_communication_delay_time_zone"`
	ReceivesInvoiceEmails             Optional[bool]                 `json:"receives_invoice_emails"`
	Locale                            Optional[string]               `json:"locale"`
	Currency                          *string                        `json:"currency,omitempty"`
	ScheduledCancellationAt           Optional[time.Time]            `json:"scheduled_cancellation_at"`
	CreditBalanceInCents              *int64                         `json:"credit_balance_in_cents,omitempty"`
	PrepaymentBalanceInCents          *int64                         `json:"prepayment_balance_in_cents,omitempty"`
	PrepaidConfiguration              Optional[PrepaidConfiguration] `json:"prepaid_configuration"`
	// Returned only for list/read Subscription operation when `include[]=self_service_page_token` parameter is provided.
	SelfServicePageToken *string        `json:"self_service_page_token,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

Subscription represents a Subscription struct.

func (Subscription) MarshalJSON

func (s Subscription) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Subscription. It customizes the JSON marshaling process for Subscription objects.

func (*Subscription) UnmarshalJSON

func (s *Subscription) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Subscription. It customizes the JSON unmarshaling process for Subscription objects.

type SubscriptionComponent

type SubscriptionComponent struct {
	Id   *int    `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
	// A handle for the component type
	Kind     *ComponentKind `json:"kind,omitempty"`
	UnitName *string        `json:"unit_name,omitempty"`
	// (for on/off components) indicates if the component is enabled for the subscription
	Enabled     *bool   `json:"enabled,omitempty"`
	UnitBalance *int    `json:"unit_balance,omitempty"`
	Currency    *string `json:"currency,omitempty"`
	// For Quantity-based components: The current allocation for the component on the given subscription. For On/Off components: Use 1 for on. Use 0 for off.
	AllocatedQuantity *SubscriptionComponentAllocatedQuantity `json:"allocated_quantity,omitempty"`
	PricingScheme     Optional[PricingScheme]                 `json:"pricing_scheme"`
	ComponentId       *int                                    `json:"component_id,omitempty"`
	ComponentHandle   Optional[string]                        `json:"component_handle"`
	SubscriptionId    *int                                    `json:"subscription_id,omitempty"`
	Recurring         *bool                                   `json:"recurring,omitempty"`
	// The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
	// Available values: `full`, `prorated`, `none`.
	UpgradeCharge Optional[CreditType] `json:"upgrade_charge"`
	// The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
	// Available values: `full`, `prorated`, `none`.
	DowngradeCredit           Optional[CreditType]     `json:"downgrade_credit"`
	ArchivedAt                Optional[time.Time]      `json:"archived_at"`
	PricePointId              Optional[int]            `json:"price_point_id"`
	PricePointHandle          Optional[string]         `json:"price_point_handle"`
	PricePointType            Optional[PricePointType] `json:"price_point_type"`
	PricePointName            Optional[string]         `json:"price_point_name"`
	ProductFamilyId           *int                     `json:"product_family_id,omitempty"`
	ProductFamilyHandle       *string                  `json:"product_family_handle,omitempty"`
	CreatedAt                 *time.Time               `json:"created_at,omitempty"`
	UpdatedAt                 *time.Time               `json:"updated_at,omitempty"`
	UseSiteExchangeRate       Optional[bool]           `json:"use_site_exchange_rate"`
	Description               Optional[string]         `json:"description"`
	AllowFractionalQuantities *bool                    `json:"allow_fractional_quantities,omitempty"`
	// An optional object, will be returned if provided `include=subscription` query param.
	Subscription        *SubscriptionComponentSubscription `json:"subscription,omitempty"`
	HistoricUsages      []HistoricUsage                    `json:"historic_usages,omitempty"`
	DisplayOnHostedPage *bool                              `json:"display_on_hosted_page,omitempty"`
	// The numerical interval. i.e. an interval of '30' coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled.
	Interval *int `json:"interval,omitempty"`
	// A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled.
	IntervalUnit         *IntervalUnit  `json:"interval_unit,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

SubscriptionComponent represents a SubscriptionComponent struct.

func (SubscriptionComponent) MarshalJSON

func (s SubscriptionComponent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionComponent. It customizes the JSON marshaling process for SubscriptionComponent objects.

func (*SubscriptionComponent) UnmarshalJSON

func (s *SubscriptionComponent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionComponent. It customizes the JSON unmarshaling process for SubscriptionComponent objects.

type SubscriptionComponentAllocatedQuantity added in v0.1.0

type SubscriptionComponentAllocatedQuantity struct {
	// contains filtered or unexported fields
}

SubscriptionComponentAllocatedQuantity represents a SubscriptionComponentAllocatedQuantity struct. This is a container for one-of cases.

func (*SubscriptionComponentAllocatedQuantity) AsNumber added in v0.1.0

func (s *SubscriptionComponentAllocatedQuantity) AsNumber() (
	*int,
	bool)

func (*SubscriptionComponentAllocatedQuantity) AsString added in v0.1.0

func (SubscriptionComponentAllocatedQuantity) MarshalJSON added in v0.1.0

func (s SubscriptionComponentAllocatedQuantity) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionComponentAllocatedQuantity. It customizes the JSON marshaling process for SubscriptionComponentAllocatedQuantity objects.

func (SubscriptionComponentAllocatedQuantity) String added in v0.1.0

String converts the SubscriptionComponentAllocatedQuantity object to a string representation.

func (*SubscriptionComponentAllocatedQuantity) UnmarshalJSON added in v0.1.0

func (s *SubscriptionComponentAllocatedQuantity) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionComponentAllocatedQuantity. It customizes the JSON unmarshaling process for SubscriptionComponentAllocatedQuantity objects.

type SubscriptionComponentAllocationErrorItem

type SubscriptionComponentAllocationErrorItem struct {
	Kind                 *string        `json:"kind,omitempty"`
	Message              *string        `json:"message,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

SubscriptionComponentAllocationErrorItem represents a SubscriptionComponentAllocationErrorItem struct.

func (SubscriptionComponentAllocationErrorItem) MarshalJSON

func (s SubscriptionComponentAllocationErrorItem) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionComponentAllocationErrorItem. It customizes the JSON marshaling process for SubscriptionComponentAllocationErrorItem objects.

func (*SubscriptionComponentAllocationErrorItem) UnmarshalJSON

func (s *SubscriptionComponentAllocationErrorItem) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionComponentAllocationErrorItem. It customizes the JSON unmarshaling process for SubscriptionComponentAllocationErrorItem objects.

type SubscriptionComponentResponse

type SubscriptionComponentResponse struct {
	Component            *SubscriptionComponent `json:"component,omitempty"`
	AdditionalProperties map[string]any         `json:"_"`
}

SubscriptionComponentResponse represents a SubscriptionComponentResponse struct.

func (SubscriptionComponentResponse) MarshalJSON

func (s SubscriptionComponentResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionComponentResponse. It customizes the JSON marshaling process for SubscriptionComponentResponse objects.

func (*SubscriptionComponentResponse) UnmarshalJSON

func (s *SubscriptionComponentResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionComponentResponse. It customizes the JSON unmarshaling process for SubscriptionComponentResponse objects.

type SubscriptionComponentSubscription

type SubscriptionComponentSubscription struct {
	// The state of a subscription.
	// * **Live States**
	//     * `active` - A normal, active subscription. It is not in a trial and is paid and up to date.
	//     * `assessing` - An internal (transient) state that indicates a subscription is in the middle of periodic assessment. Do not base any access decisions in your app on this state, as it may not always be exposed.
	//     * `pending` - An internal (transient) state that indicates a subscription is in the creation process. Do not base any access decisions in your app on this state, as it may not always be exposed.
	//     * `trialing` - A subscription in trialing state has a valid trial subscription. This type of subscription may transition to active once payment is received when the trial has ended. Otherwise, it may go to a Problem or End of Life state.
	//     * `paused` - An internal state that indicates that your account with Advanced Billing is in arrears.
	// * **Problem States**
	//     * `past_due` - Indicates that the most recent payment has failed, and payment is past due for this subscription. If you have enabled our automated dunning, this subscription will be in the dunning process (additional status and callbacks from the dunning process will be available in the future). If you are handling dunning and payment updates yourself, you will want to use this state to initiate a payment update from your customers.
	//     * `soft_failure` - Indicates that normal assessment/processing of the subscription has failed for a reason that cannot be fixed by the Customer. For example, a Soft Fail may result from a timeout at the gateway or incorrect credentials on your part. The subscriptions should be retried automatically. An interface is being built for you to review problems resulting from these events to take manual action when needed.
	//     * `unpaid` - Indicates an unpaid subscription. A subscription is marked unpaid if the retry period expires and you have configured your [Dunning](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405505141005) settings to have a Final Action of `mark the subscription unpaid`.
	// * **End of Life States**
	//     * `canceled` - Indicates a canceled subscription. This may happen at your request (via the API or the web interface) or due to the expiration of the [Dunning](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405505141005) process without payment. See the [Reactivation](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404559291021) documentation for info on how to restart a canceled subscription.
	//     While a subscription is canceled, its period will not advance, it will not accrue any new charges, and Advanced Billing will not attempt to collect the overdue balance.
	//     * `expired` - Indicates a subscription that has expired due to running its normal life cycle. Some products may be configured to have an expiration period. An expired subscription then is one that stayed active until it fulfilled its full period.
	//     * `failed_to_create` - Indicates that signup has failed. (You may see this state in a signup_failure webhook.)
	//     * `on_hold` - Indicates that a subscription’s billing has been temporarily stopped. While it is expected that the subscription will resume and return to active status, this is still treated as an “End of Life” state because the customer is not paying for services during this time.
	//     * `suspended` - Indicates that a prepaid subscription has used up all their prepayment balance. If a prepayment is applied, it will return to an active state.
	//     * `trial_ended` - A subscription in a trial_ended state is a subscription that completed a no-obligation trial and did not have a card on file at the expiration of the trial period. See [Product Pricing – No Obligation Trials](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405246782221) for more details.
	// See [Subscription States](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404222005773) for more info about subscription states and state transitions.
	State                *SubscriptionState `json:"state,omitempty"`
	UpdatedAt            *time.Time         `json:"updated_at,omitempty"`
	AdditionalProperties map[string]any     `json:"_"`
}

SubscriptionComponentSubscription represents a SubscriptionComponentSubscription struct. An optional object, will be returned if provided `include=subscription` query param.

func (SubscriptionComponentSubscription) MarshalJSON

func (s SubscriptionComponentSubscription) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionComponentSubscription. It customizes the JSON marshaling process for SubscriptionComponentSubscription objects.

func (*SubscriptionComponentSubscription) UnmarshalJSON

func (s *SubscriptionComponentSubscription) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionComponentSubscription. It customizes the JSON unmarshaling process for SubscriptionComponentSubscription objects.

type SubscriptionCustomPrice

type SubscriptionCustomPrice struct {
	// (Optional)
	Name *string `json:"name,omitempty"`
	// (Optional)
	Handle *string `json:"handle,omitempty"`
	// Required if using `custom_price` attribute.
	PriceInCents SubscriptionCustomPricePriceInCents `json:"price_in_cents"`
	// Required if using `custom_price` attribute.
	Interval SubscriptionCustomPriceInterval `json:"interval"`
	// Required if using `custom_price` attribute.
	IntervalUnit IntervalUnit `json:"interval_unit"`
	// (Optional)
	TrialPriceInCents *SubscriptionCustomPriceTrialPriceInCents `json:"trial_price_in_cents,omitempty"`
	// (Optional)
	TrialInterval *SubscriptionCustomPriceTrialInterval `json:"trial_interval,omitempty"`
	// (Optional)
	TrialIntervalUnit *IntervalUnit `json:"trial_interval_unit,omitempty"`
	// (Optional)
	InitialChargeInCents *SubscriptionCustomPriceInitialChargeInCents `json:"initial_charge_in_cents,omitempty"`
	// (Optional)
	InitialChargeAfterTrial *bool `json:"initial_charge_after_trial,omitempty"`
	// (Optional)
	ExpirationInterval *SubscriptionCustomPriceExpirationInterval `json:"expiration_interval,omitempty"`
	// (Optional)
	ExpirationIntervalUnit *IntervalUnit `json:"expiration_interval_unit,omitempty"`
	// (Optional)
	TaxIncluded          *bool          `json:"tax_included,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

SubscriptionCustomPrice represents a SubscriptionCustomPrice struct. (Optional) Used in place of `product_price_point_id` to define a custom price point unique to the subscription

func (SubscriptionCustomPrice) MarshalJSON

func (s SubscriptionCustomPrice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionCustomPrice. It customizes the JSON marshaling process for SubscriptionCustomPrice objects.

func (*SubscriptionCustomPrice) UnmarshalJSON

func (s *SubscriptionCustomPrice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionCustomPrice. It customizes the JSON unmarshaling process for SubscriptionCustomPrice objects.

type SubscriptionCustomPriceExpirationInterval added in v0.1.0

type SubscriptionCustomPriceExpirationInterval struct {
	// contains filtered or unexported fields
}

SubscriptionCustomPriceExpirationInterval represents a SubscriptionCustomPriceExpirationInterval struct. This is a container for one-of cases.

func (*SubscriptionCustomPriceExpirationInterval) AsNumber added in v0.1.0

func (*SubscriptionCustomPriceExpirationInterval) AsString added in v0.1.0

func (SubscriptionCustomPriceExpirationInterval) MarshalJSON added in v0.1.0

MarshalJSON implements the json.Marshaler interface for SubscriptionCustomPriceExpirationInterval. It customizes the JSON marshaling process for SubscriptionCustomPriceExpirationInterval objects.

func (SubscriptionCustomPriceExpirationInterval) String added in v0.1.0

String converts the SubscriptionCustomPriceExpirationInterval object to a string representation.

func (*SubscriptionCustomPriceExpirationInterval) UnmarshalJSON added in v0.1.0

func (s *SubscriptionCustomPriceExpirationInterval) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionCustomPriceExpirationInterval. It customizes the JSON unmarshaling process for SubscriptionCustomPriceExpirationInterval objects.

type SubscriptionCustomPriceInitialChargeInCents added in v0.1.0

type SubscriptionCustomPriceInitialChargeInCents struct {
	// contains filtered or unexported fields
}

SubscriptionCustomPriceInitialChargeInCents represents a SubscriptionCustomPriceInitialChargeInCents struct. This is a container for one-of cases.

func (*SubscriptionCustomPriceInitialChargeInCents) AsLong added in v0.1.0

func (*SubscriptionCustomPriceInitialChargeInCents) AsString added in v0.1.0

func (SubscriptionCustomPriceInitialChargeInCents) MarshalJSON added in v0.1.0

MarshalJSON implements the json.Marshaler interface for SubscriptionCustomPriceInitialChargeInCents. It customizes the JSON marshaling process for SubscriptionCustomPriceInitialChargeInCents objects.

func (SubscriptionCustomPriceInitialChargeInCents) String added in v0.1.0

String converts the SubscriptionCustomPriceInitialChargeInCents object to a string representation.

func (*SubscriptionCustomPriceInitialChargeInCents) UnmarshalJSON added in v0.1.0

func (s *SubscriptionCustomPriceInitialChargeInCents) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionCustomPriceInitialChargeInCents. It customizes the JSON unmarshaling process for SubscriptionCustomPriceInitialChargeInCents objects.

type SubscriptionCustomPriceInterval added in v0.1.0

type SubscriptionCustomPriceInterval struct {
	// contains filtered or unexported fields
}

SubscriptionCustomPriceInterval represents a SubscriptionCustomPriceInterval struct. This is a container for one-of cases.

func (*SubscriptionCustomPriceInterval) AsNumber added in v0.1.0

func (s *SubscriptionCustomPriceInterval) AsNumber() (
	*int,
	bool)

func (*SubscriptionCustomPriceInterval) AsString added in v0.1.0

func (s *SubscriptionCustomPriceInterval) AsString() (
	*string,
	bool)

func (SubscriptionCustomPriceInterval) MarshalJSON added in v0.1.0

func (s SubscriptionCustomPriceInterval) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionCustomPriceInterval. It customizes the JSON marshaling process for SubscriptionCustomPriceInterval objects.

func (SubscriptionCustomPriceInterval) String added in v0.1.0

String converts the SubscriptionCustomPriceInterval object to a string representation.

func (*SubscriptionCustomPriceInterval) UnmarshalJSON added in v0.1.0

func (s *SubscriptionCustomPriceInterval) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionCustomPriceInterval. It customizes the JSON unmarshaling process for SubscriptionCustomPriceInterval objects.

type SubscriptionCustomPricePriceInCents added in v0.1.0

type SubscriptionCustomPricePriceInCents struct {
	// contains filtered or unexported fields
}

SubscriptionCustomPricePriceInCents represents a SubscriptionCustomPricePriceInCents struct. This is a container for one-of cases.

func (*SubscriptionCustomPricePriceInCents) AsLong added in v0.1.0

func (*SubscriptionCustomPricePriceInCents) AsString added in v0.1.0

func (s *SubscriptionCustomPricePriceInCents) AsString() (
	*string,
	bool)

func (SubscriptionCustomPricePriceInCents) MarshalJSON added in v0.1.0

func (s SubscriptionCustomPricePriceInCents) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionCustomPricePriceInCents. It customizes the JSON marshaling process for SubscriptionCustomPricePriceInCents objects.

func (SubscriptionCustomPricePriceInCents) String added in v0.1.0

String converts the SubscriptionCustomPricePriceInCents object to a string representation.

func (*SubscriptionCustomPricePriceInCents) UnmarshalJSON added in v0.1.0

func (s *SubscriptionCustomPricePriceInCents) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionCustomPricePriceInCents. It customizes the JSON unmarshaling process for SubscriptionCustomPricePriceInCents objects.

type SubscriptionCustomPriceTrialInterval added in v0.1.0

type SubscriptionCustomPriceTrialInterval struct {
	// contains filtered or unexported fields
}

SubscriptionCustomPriceTrialInterval represents a SubscriptionCustomPriceTrialInterval struct. This is a container for one-of cases.

func (*SubscriptionCustomPriceTrialInterval) AsNumber added in v0.1.0

func (s *SubscriptionCustomPriceTrialInterval) AsNumber() (
	*int,
	bool)

func (*SubscriptionCustomPriceTrialInterval) AsString added in v0.1.0

func (SubscriptionCustomPriceTrialInterval) MarshalJSON added in v0.1.0

func (s SubscriptionCustomPriceTrialInterval) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionCustomPriceTrialInterval. It customizes the JSON marshaling process for SubscriptionCustomPriceTrialInterval objects.

func (SubscriptionCustomPriceTrialInterval) String added in v0.1.0

String converts the SubscriptionCustomPriceTrialInterval object to a string representation.

func (*SubscriptionCustomPriceTrialInterval) UnmarshalJSON added in v0.1.0

func (s *SubscriptionCustomPriceTrialInterval) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionCustomPriceTrialInterval. It customizes the JSON unmarshaling process for SubscriptionCustomPriceTrialInterval objects.

type SubscriptionCustomPriceTrialPriceInCents added in v0.1.0

type SubscriptionCustomPriceTrialPriceInCents struct {
	// contains filtered or unexported fields
}

SubscriptionCustomPriceTrialPriceInCents represents a SubscriptionCustomPriceTrialPriceInCents struct. This is a container for one-of cases.

func (*SubscriptionCustomPriceTrialPriceInCents) AsLong added in v0.1.0

func (*SubscriptionCustomPriceTrialPriceInCents) AsString added in v0.1.0

func (SubscriptionCustomPriceTrialPriceInCents) MarshalJSON added in v0.1.0

func (s SubscriptionCustomPriceTrialPriceInCents) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionCustomPriceTrialPriceInCents. It customizes the JSON marshaling process for SubscriptionCustomPriceTrialPriceInCents objects.

func (SubscriptionCustomPriceTrialPriceInCents) String added in v0.1.0

String converts the SubscriptionCustomPriceTrialPriceInCents object to a string representation.

func (*SubscriptionCustomPriceTrialPriceInCents) UnmarshalJSON added in v0.1.0

func (s *SubscriptionCustomPriceTrialPriceInCents) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionCustomPriceTrialPriceInCents. It customizes the JSON unmarshaling process for SubscriptionCustomPriceTrialPriceInCents objects.

type SubscriptionDateField

type SubscriptionDateField string

SubscriptionDateField is a string enum.

const (
	SubscriptionDateField_CURRENTPERIODENDSAT   SubscriptionDateField = "current_period_ends_at"
	SubscriptionDateField_CURRENTPERIODSTARTSAT SubscriptionDateField = "current_period_starts_at"
	SubscriptionDateField_CREATEDAT             SubscriptionDateField = "created_at"
	SubscriptionDateField_ACTIVATEDAT           SubscriptionDateField = "activated_at"
	SubscriptionDateField_CANCELEDAT            SubscriptionDateField = "canceled_at"
	SubscriptionDateField_EXPIRESAT             SubscriptionDateField = "expires_at"
	SubscriptionDateField_TRIALSTARTEDAT        SubscriptionDateField = "trial_started_at"
	SubscriptionDateField_TRIALENDEDAT          SubscriptionDateField = "trial_ended_at"
	SubscriptionDateField_UPDATEDAT             SubscriptionDateField = "updated_at"
)

func (SubscriptionDateField) MarshalJSON added in v0.2.0

func (e SubscriptionDateField) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionDateField. It customizes the JSON marshaling process for SubscriptionDateField objects.

func (*SubscriptionDateField) UnmarshalJSON added in v0.2.0

func (e *SubscriptionDateField) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionDateField. It customizes the JSON unmarshaling process for SubscriptionDateField objects.

type SubscriptionFilter added in v0.2.0

type SubscriptionFilter struct {
	// Allows fetching components allocations that belong to the subscription with matching states based on provided values. To use this filter you also have to include the following param in the request `include=subscription`. Use in query `filter[subscription][states]=active,canceled&include=subscription`.
	States []SubscriptionStateFilter `json:"states,omitempty"`
	// The type of filter you'd like to apply to your search. To use this filter you also have to include the following param in the request `include=subscription`.
	DateField *SubscriptionListDateField `json:"date_field,omitempty"`
	// The start date (format YYYY-MM-DD) with which to filter the date_field. Returns components that belong to the subscription with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. To use this filter you also have to include the following param in the request `include=subscription`.
	StartDate *time.Time `json:"start_date,omitempty"`
	// The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components that belong to the subscription with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. To use this filter you also have to include the following param in the request `include=subscription`.
	EndDate *time.Time `json:"end_date,omitempty"`
	// The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components that belong to the subscription with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site”s time zone will be used. If provided, this parameter will be used instead of start_date. To use this filter you also have to include the following param in the request `include=subscription`.
	StartDatetime *time.Time `json:"start_datetime,omitempty"`
	// The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components that belong to the subscription with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site”s time zone will be used. If provided, this parameter will be used instead of end_date. To use this filter you also have to include the following param in the request `include=subscription`.
	EndDatetime          *time.Time     `json:"end_datetime,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

SubscriptionFilter represents a SubscriptionFilter struct. Nested filter used for List Subscription Components For Site Filter

func (SubscriptionFilter) MarshalJSON added in v0.2.0

func (s SubscriptionFilter) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionFilter. It customizes the JSON marshaling process for SubscriptionFilter objects.

func (*SubscriptionFilter) UnmarshalJSON added in v0.2.0

func (s *SubscriptionFilter) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionFilter. It customizes the JSON unmarshaling process for SubscriptionFilter objects.

type SubscriptionGroup

type SubscriptionGroup struct {
	CustomerId     *int                             `json:"customer_id,omitempty"`
	PaymentProfile *SubscriptionGroupPaymentProfile `json:"payment_profile,omitempty"`
	// The type of payment collection to be used in the subscription. For legacy Statements Architecture valid options are - `invoice`, `automatic`. For current Relationship Invoicing Architecture valid options are - `remittance`, `automatic`, `prepaid`.
	PaymentCollectionMethod *CollectionMethod `json:"payment_collection_method,omitempty"`
	SubscriptionIds         []int             `json:"subscription_ids,omitempty"`
	CreatedAt               *time.Time        `json:"created_at,omitempty"`
	AdditionalProperties    map[string]any    `json:"_"`
}

SubscriptionGroup represents a SubscriptionGroup struct.

func (SubscriptionGroup) MarshalJSON

func (s SubscriptionGroup) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroup. It customizes the JSON marshaling process for SubscriptionGroup objects.

func (*SubscriptionGroup) UnmarshalJSON

func (s *SubscriptionGroup) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroup. It customizes the JSON unmarshaling process for SubscriptionGroup objects.

type SubscriptionGroupBalances

type SubscriptionGroupBalances struct {
	Prepayments          *AccountBalance `json:"prepayments,omitempty"`
	ServiceCredits       *AccountBalance `json:"service_credits,omitempty"`
	OpenInvoices         *AccountBalance `json:"open_invoices,omitempty"`
	PendingDiscounts     *AccountBalance `json:"pending_discounts,omitempty"`
	AdditionalProperties map[string]any  `json:"_"`
}

SubscriptionGroupBalances represents a SubscriptionGroupBalances struct.

func (SubscriptionGroupBalances) MarshalJSON

func (s SubscriptionGroupBalances) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupBalances. It customizes the JSON marshaling process for SubscriptionGroupBalances objects.

func (*SubscriptionGroupBalances) UnmarshalJSON

func (s *SubscriptionGroupBalances) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupBalances. It customizes the JSON unmarshaling process for SubscriptionGroupBalances objects.

type SubscriptionGroupBankAccount

type SubscriptionGroupBankAccount struct {
	// (Required when creating a subscription with ACH or GoCardless) The name of the bank where the customer’s account resides
	BankName *string `json:"bank_name,omitempty"`
	// (Required when creating a subscription with ACH. Required when creating a subscription with GoCardless and bank_iban is blank) The customerʼs bank account number
	BankAccountNumber *string `json:"bank_account_number,omitempty"`
	// (Required when creating a subscription with ACH. Optional when creating a subscription with GoCardless). The routing number of the bank. It becomes bank_code while passing via GoCardless API
	BankRoutingNumber *string `json:"bank_routing_number,omitempty"`
	// (Optional when creating a subscription with GoCardless). International Bank Account Number. Alternatively, local bank details can be provided
	BankIban *string `json:"bank_iban,omitempty"`
	// (Optional when creating a subscription with GoCardless) Branch code. Alternatively, an IBAN can be provided
	BankBranchCode *string `json:"bank_branch_code,omitempty"`
	// Defaults to checking
	BankAccountType *BankAccountType `json:"bank_account_type,omitempty"`
	// Defaults to personal
	BankAccountHolderType *BankAccountHolderType `json:"bank_account_holder_type,omitempty"`
	PaymentType           *PaymentType           `json:"payment_type,omitempty"`
	BillingAddress        *string                `json:"billing_address,omitempty"`
	BillingCity           *string                `json:"billing_city,omitempty"`
	BillingState          *string                `json:"billing_state,omitempty"`
	BillingZip            *string                `json:"billing_zip,omitempty"`
	BillingCountry        *string                `json:"billing_country,omitempty"`
	ChargifyToken         *string                `json:"chargify_token,omitempty"`
	// The vault that stores the payment profile with the provided vault_token.
	CurrentVault         *BankAccountVault `json:"current_vault,omitempty"`
	GatewayHandle        *string           `json:"gateway_handle,omitempty"`
	AdditionalProperties map[string]any    `json:"_"`
}

SubscriptionGroupBankAccount represents a SubscriptionGroupBankAccount struct.

func (SubscriptionGroupBankAccount) MarshalJSON

func (s SubscriptionGroupBankAccount) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupBankAccount. It customizes the JSON marshaling process for SubscriptionGroupBankAccount objects.

func (*SubscriptionGroupBankAccount) UnmarshalJSON

func (s *SubscriptionGroupBankAccount) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupBankAccount. It customizes the JSON unmarshaling process for SubscriptionGroupBankAccount objects.

type SubscriptionGroupComponentCustomPrice

type SubscriptionGroupComponentCustomPrice struct {
	// The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes.
	PricingScheme        *PricingScheme         `json:"pricing_scheme,omitempty"`
	Prices               []Price                `json:"prices,omitempty"`
	OveragePricing       []ComponentCustomPrice `json:"overage_pricing,omitempty"`
	AdditionalProperties map[string]any         `json:"_"`
}

SubscriptionGroupComponentCustomPrice represents a SubscriptionGroupComponentCustomPrice struct. Used in place of `price_point_id` to define a custom price point unique to the subscription. You still need to provide `component_id`.

func (SubscriptionGroupComponentCustomPrice) MarshalJSON

func (s SubscriptionGroupComponentCustomPrice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupComponentCustomPrice. It customizes the JSON marshaling process for SubscriptionGroupComponentCustomPrice objects.

func (*SubscriptionGroupComponentCustomPrice) UnmarshalJSON

func (s *SubscriptionGroupComponentCustomPrice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupComponentCustomPrice. It customizes the JSON unmarshaling process for SubscriptionGroupComponentCustomPrice objects.

type SubscriptionGroupCreateErrorResponseErrors added in v0.1.0

type SubscriptionGroupCreateErrorResponseErrors struct {
	// contains filtered or unexported fields
}

SubscriptionGroupCreateErrorResponseErrors represents a SubscriptionGroupCreateErrorResponseErrors struct. This is a container for one-of cases.

func (*SubscriptionGroupCreateErrorResponseErrors) AsString added in v0.1.0

func (*SubscriptionGroupCreateErrorResponseErrors) AsSubscriptionGroupMembersArrayError added in v0.1.0

func (s *SubscriptionGroupCreateErrorResponseErrors) AsSubscriptionGroupMembersArrayError() (
	*SubscriptionGroupMembersArrayError,
	bool)

func (*SubscriptionGroupCreateErrorResponseErrors) AsSubscriptionGroupSingleError added in v0.1.0

func (s *SubscriptionGroupCreateErrorResponseErrors) AsSubscriptionGroupSingleError() (
	*SubscriptionGroupSingleError,
	bool)

func (SubscriptionGroupCreateErrorResponseErrors) MarshalJSON added in v0.1.0

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupCreateErrorResponseErrors. It customizes the JSON marshaling process for SubscriptionGroupCreateErrorResponseErrors objects.

func (SubscriptionGroupCreateErrorResponseErrors) String added in v0.1.0

String converts the SubscriptionGroupCreateErrorResponseErrors object to a string representation.

func (*SubscriptionGroupCreateErrorResponseErrors) UnmarshalJSON added in v0.1.0

func (s *SubscriptionGroupCreateErrorResponseErrors) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupCreateErrorResponseErrors. It customizes the JSON unmarshaling process for SubscriptionGroupCreateErrorResponseErrors objects.

type SubscriptionGroupCreditCard

type SubscriptionGroupCreditCard struct {
	FullNumber      *SubscriptionGroupCreditCardFullNumber      `json:"full_number,omitempty"`
	ExpirationMonth *SubscriptionGroupCreditCardExpirationMonth `json:"expiration_month,omitempty"`
	ExpirationYear  *SubscriptionGroupCreditCardExpirationYear  `json:"expiration_year,omitempty"`
	ChargifyToken   *string                                     `json:"chargify_token,omitempty"`
	VaultToken      *string                                     `json:"vault_token,omitempty"`
	// The vault that stores the payment profile with the provided `vault_token`. Use `bogus` for testing.
	CurrentVault    *CurrentVault `json:"current_vault,omitempty"`
	GatewayHandle   *string       `json:"gateway_handle,omitempty"`
	FirstName       *string       `json:"first_name,omitempty"`
	LastName        *string       `json:"last_name,omitempty"`
	BillingAddress  *string       `json:"billing_address,omitempty"`
	BillingAddress2 *string       `json:"billing_address_2,omitempty"`
	BillingCity     *string       `json:"billing_city,omitempty"`
	BillingState    *string       `json:"billing_state,omitempty"`
	BillingZip      *string       `json:"billing_zip,omitempty"`
	BillingCountry  *string       `json:"billing_country,omitempty"`
	LastFour        *string       `json:"last_four,omitempty"`
	// The type of card used.
	CardType             *CardType      `json:"card_type,omitempty"`
	CustomerVaultToken   *string        `json:"customer_vault_token,omitempty"`
	Cvv                  *string        `json:"cvv,omitempty"`
	PaymentType          *string        `json:"payment_type,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

SubscriptionGroupCreditCard represents a SubscriptionGroupCreditCard struct.

func (SubscriptionGroupCreditCard) MarshalJSON

func (s SubscriptionGroupCreditCard) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupCreditCard. It customizes the JSON marshaling process for SubscriptionGroupCreditCard objects.

func (*SubscriptionGroupCreditCard) UnmarshalJSON

func (s *SubscriptionGroupCreditCard) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupCreditCard. It customizes the JSON unmarshaling process for SubscriptionGroupCreditCard objects.

type SubscriptionGroupCreditCardExpirationMonth added in v0.1.0

type SubscriptionGroupCreditCardExpirationMonth struct {
	// contains filtered or unexported fields
}

SubscriptionGroupCreditCardExpirationMonth represents a SubscriptionGroupCreditCardExpirationMonth struct. This is a container for one-of cases.

func (*SubscriptionGroupCreditCardExpirationMonth) AsNumber added in v0.1.0

func (*SubscriptionGroupCreditCardExpirationMonth) AsString added in v0.1.0

func (SubscriptionGroupCreditCardExpirationMonth) MarshalJSON added in v0.1.0

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupCreditCardExpirationMonth. It customizes the JSON marshaling process for SubscriptionGroupCreditCardExpirationMonth objects.

func (SubscriptionGroupCreditCardExpirationMonth) String added in v0.1.0

String converts the SubscriptionGroupCreditCardExpirationMonth object to a string representation.

func (*SubscriptionGroupCreditCardExpirationMonth) UnmarshalJSON added in v0.1.0

func (s *SubscriptionGroupCreditCardExpirationMonth) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupCreditCardExpirationMonth. It customizes the JSON unmarshaling process for SubscriptionGroupCreditCardExpirationMonth objects.

type SubscriptionGroupCreditCardExpirationYear added in v0.1.0

type SubscriptionGroupCreditCardExpirationYear struct {
	// contains filtered or unexported fields
}

SubscriptionGroupCreditCardExpirationYear represents a SubscriptionGroupCreditCardExpirationYear struct. This is a container for one-of cases.

func (*SubscriptionGroupCreditCardExpirationYear) AsNumber added in v0.1.0

func (*SubscriptionGroupCreditCardExpirationYear) AsString added in v0.1.0

func (SubscriptionGroupCreditCardExpirationYear) MarshalJSON added in v0.1.0

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupCreditCardExpirationYear. It customizes the JSON marshaling process for SubscriptionGroupCreditCardExpirationYear objects.

func (SubscriptionGroupCreditCardExpirationYear) String added in v0.1.0

String converts the SubscriptionGroupCreditCardExpirationYear object to a string representation.

func (*SubscriptionGroupCreditCardExpirationYear) UnmarshalJSON added in v0.1.0

func (s *SubscriptionGroupCreditCardExpirationYear) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupCreditCardExpirationYear. It customizes the JSON unmarshaling process for SubscriptionGroupCreditCardExpirationYear objects.

type SubscriptionGroupCreditCardFullNumber added in v0.1.0

type SubscriptionGroupCreditCardFullNumber struct {
	// contains filtered or unexported fields
}

SubscriptionGroupCreditCardFullNumber represents a SubscriptionGroupCreditCardFullNumber struct. This is a container for one-of cases.

func (*SubscriptionGroupCreditCardFullNumber) AsNumber added in v0.1.0

func (s *SubscriptionGroupCreditCardFullNumber) AsNumber() (
	*int,
	bool)

func (*SubscriptionGroupCreditCardFullNumber) AsString added in v0.1.0

func (SubscriptionGroupCreditCardFullNumber) MarshalJSON added in v0.1.0

func (s SubscriptionGroupCreditCardFullNumber) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupCreditCardFullNumber. It customizes the JSON marshaling process for SubscriptionGroupCreditCardFullNumber objects.

func (SubscriptionGroupCreditCardFullNumber) String added in v0.1.0

String converts the SubscriptionGroupCreditCardFullNumber object to a string representation.

func (*SubscriptionGroupCreditCardFullNumber) UnmarshalJSON added in v0.1.0

func (s *SubscriptionGroupCreditCardFullNumber) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupCreditCardFullNumber. It customizes the JSON unmarshaling process for SubscriptionGroupCreditCardFullNumber objects.

type SubscriptionGroupCustomer

type SubscriptionGroupCustomer struct {
	FirstName            *string        `json:"first_name,omitempty"`
	LastName             *string        `json:"last_name,omitempty"`
	Organization         *string        `json:"organization,omitempty"`
	Email                *string        `json:"email,omitempty"`
	Reference            *string        `json:"reference,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

SubscriptionGroupCustomer represents a SubscriptionGroupCustomer struct.

func (SubscriptionGroupCustomer) MarshalJSON

func (s SubscriptionGroupCustomer) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupCustomer. It customizes the JSON marshaling process for SubscriptionGroupCustomer objects.

func (*SubscriptionGroupCustomer) UnmarshalJSON

func (s *SubscriptionGroupCustomer) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupCustomer. It customizes the JSON unmarshaling process for SubscriptionGroupCustomer objects.

type SubscriptionGroupInclude added in v0.1.0

type SubscriptionGroupInclude string

SubscriptionGroupInclude is a string enum.

const (
	SubscriptionGroupInclude_CURRENTBILLINGAMOUNTINCENTS SubscriptionGroupInclude = "current_billing_amount_in_cents"
)

func (SubscriptionGroupInclude) MarshalJSON added in v0.2.0

func (e SubscriptionGroupInclude) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupInclude. It customizes the JSON marshaling process for SubscriptionGroupInclude objects.

func (*SubscriptionGroupInclude) UnmarshalJSON added in v0.2.0

func (e *SubscriptionGroupInclude) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupInclude. It customizes the JSON unmarshaling process for SubscriptionGroupInclude objects.

type SubscriptionGroupItem

type SubscriptionGroupItem struct {
	Id                      *int             `json:"id,omitempty"`
	Reference               Optional[string] `json:"reference"`
	ProductId               *int             `json:"product_id,omitempty"`
	ProductHandle           Optional[string] `json:"product_handle"`
	ProductPricePointId     *int             `json:"product_price_point_id,omitempty"`
	ProductPricePointHandle *string          `json:"product_price_point_handle,omitempty"`
	Currency                *string          `json:"currency,omitempty"`
	CouponCode              Optional[string] `json:"coupon_code"`
	TotalRevenueInCents     *int64           `json:"total_revenue_in_cents,omitempty"`
	BalanceInCents          *int64           `json:"balance_in_cents,omitempty"`
	AdditionalProperties    map[string]any   `json:"_"`
}

SubscriptionGroupItem represents a SubscriptionGroupItem struct.

func (SubscriptionGroupItem) MarshalJSON

func (s SubscriptionGroupItem) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupItem. It customizes the JSON marshaling process for SubscriptionGroupItem objects.

func (*SubscriptionGroupItem) UnmarshalJSON

func (s *SubscriptionGroupItem) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupItem. It customizes the JSON unmarshaling process for SubscriptionGroupItem objects.

type SubscriptionGroupMemberError

type SubscriptionGroupMemberError struct {
	Id                   *int           `json:"id,omitempty"`
	Type                 *string        `json:"type,omitempty"`
	Message              *string        `json:"message,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

SubscriptionGroupMemberError represents a SubscriptionGroupMemberError struct.

func (SubscriptionGroupMemberError) MarshalJSON

func (s SubscriptionGroupMemberError) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupMemberError. It customizes the JSON marshaling process for SubscriptionGroupMemberError objects.

func (*SubscriptionGroupMemberError) UnmarshalJSON

func (s *SubscriptionGroupMemberError) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupMemberError. It customizes the JSON unmarshaling process for SubscriptionGroupMemberError objects.

type SubscriptionGroupMembersArrayError added in v0.1.0

type SubscriptionGroupMembersArrayError struct {
	Members              []string       `json:"members"`
	AdditionalProperties map[string]any `json:"_"`
}

SubscriptionGroupMembersArrayError represents a SubscriptionGroupMembersArrayError struct.

func (SubscriptionGroupMembersArrayError) MarshalJSON added in v0.1.0

func (s SubscriptionGroupMembersArrayError) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupMembersArrayError. It customizes the JSON marshaling process for SubscriptionGroupMembersArrayError objects.

func (*SubscriptionGroupMembersArrayError) UnmarshalJSON added in v0.1.0

func (s *SubscriptionGroupMembersArrayError) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupMembersArrayError. It customizes the JSON unmarshaling process for SubscriptionGroupMembersArrayError objects.

type SubscriptionGroupPaymentProfile

type SubscriptionGroupPaymentProfile struct {
	Id                   *int           `json:"id,omitempty"`
	FirstName            *string        `json:"first_name,omitempty"`
	LastName             *string        `json:"last_name,omitempty"`
	MaskedCardNumber     *string        `json:"masked_card_number,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

SubscriptionGroupPaymentProfile represents a SubscriptionGroupPaymentProfile struct.

func (SubscriptionGroupPaymentProfile) MarshalJSON

func (s SubscriptionGroupPaymentProfile) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupPaymentProfile. It customizes the JSON marshaling process for SubscriptionGroupPaymentProfile objects.

func (*SubscriptionGroupPaymentProfile) UnmarshalJSON

func (s *SubscriptionGroupPaymentProfile) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupPaymentProfile. It customizes the JSON unmarshaling process for SubscriptionGroupPaymentProfile objects.

type SubscriptionGroupPrepayment

type SubscriptionGroupPrepayment struct {
	Amount               int                               `json:"amount"`
	Details              string                            `json:"details"`
	Memo                 string                            `json:"memo"`
	Method               SubscriptionGroupPrepaymentMethod `json:"method"`
	AdditionalProperties map[string]any                    `json:"_"`
}

SubscriptionGroupPrepayment represents a SubscriptionGroupPrepayment struct.

func (SubscriptionGroupPrepayment) MarshalJSON

func (s SubscriptionGroupPrepayment) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupPrepayment. It customizes the JSON marshaling process for SubscriptionGroupPrepayment objects.

func (*SubscriptionGroupPrepayment) UnmarshalJSON

func (s *SubscriptionGroupPrepayment) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupPrepayment. It customizes the JSON unmarshaling process for SubscriptionGroupPrepayment objects.

type SubscriptionGroupPrepaymentMethod

type SubscriptionGroupPrepaymentMethod string

SubscriptionGroupPrepaymentMethod is a string enum.

const (
	SubscriptionGroupPrepaymentMethod_CHECK         SubscriptionGroupPrepaymentMethod = "check"
	SubscriptionGroupPrepaymentMethod_CASH          SubscriptionGroupPrepaymentMethod = "cash"
	SubscriptionGroupPrepaymentMethod_MONEYORDER    SubscriptionGroupPrepaymentMethod = "money_order"
	SubscriptionGroupPrepaymentMethod_ACH           SubscriptionGroupPrepaymentMethod = "ach"
	SubscriptionGroupPrepaymentMethod_PAYPALACCOUNT SubscriptionGroupPrepaymentMethod = "paypal_account"
	SubscriptionGroupPrepaymentMethod_OTHER         SubscriptionGroupPrepaymentMethod = "other"
)

func (SubscriptionGroupPrepaymentMethod) MarshalJSON added in v0.2.0

func (e SubscriptionGroupPrepaymentMethod) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupPrepaymentMethod. It customizes the JSON marshaling process for SubscriptionGroupPrepaymentMethod objects.

func (*SubscriptionGroupPrepaymentMethod) UnmarshalJSON added in v0.2.0

func (e *SubscriptionGroupPrepaymentMethod) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupPrepaymentMethod. It customizes the JSON unmarshaling process for SubscriptionGroupPrepaymentMethod objects.

type SubscriptionGroupPrepaymentRequest

type SubscriptionGroupPrepaymentRequest struct {
	Prepayment           SubscriptionGroupPrepayment `json:"prepayment"`
	AdditionalProperties map[string]any              `json:"_"`
}

SubscriptionGroupPrepaymentRequest represents a SubscriptionGroupPrepaymentRequest struct.

func (SubscriptionGroupPrepaymentRequest) MarshalJSON

func (s SubscriptionGroupPrepaymentRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupPrepaymentRequest. It customizes the JSON marshaling process for SubscriptionGroupPrepaymentRequest objects.

func (*SubscriptionGroupPrepaymentRequest) UnmarshalJSON

func (s *SubscriptionGroupPrepaymentRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupPrepaymentRequest. It customizes the JSON unmarshaling process for SubscriptionGroupPrepaymentRequest objects.

type SubscriptionGroupPrepaymentResponse

type SubscriptionGroupPrepaymentResponse struct {
	Id *int `json:"id,omitempty"`
	// The amount in cents of the entry.
	AmountInCents *int64 `json:"amount_in_cents,omitempty"`
	// The ending balance in cents of the account.
	EndingBalanceInCents *int64 `json:"ending_balance_in_cents,omitempty"`
	// The type of entry
	EntryType *ServiceCreditType `json:"entry_type,omitempty"`
	// A memo attached to the entry.
	Memo                 Optional[string] `json:"memo"`
	AdditionalProperties map[string]any   `json:"_"`
}

SubscriptionGroupPrepaymentResponse represents a SubscriptionGroupPrepaymentResponse struct.

func (SubscriptionGroupPrepaymentResponse) MarshalJSON

func (s SubscriptionGroupPrepaymentResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupPrepaymentResponse. It customizes the JSON marshaling process for SubscriptionGroupPrepaymentResponse objects.

func (*SubscriptionGroupPrepaymentResponse) UnmarshalJSON

func (s *SubscriptionGroupPrepaymentResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupPrepaymentResponse. It customizes the JSON unmarshaling process for SubscriptionGroupPrepaymentResponse objects.

type SubscriptionGroupResponse

type SubscriptionGroupResponse struct {
	SubscriptionGroup    SubscriptionGroup `json:"subscription_group"`
	AdditionalProperties map[string]any    `json:"_"`
}

SubscriptionGroupResponse represents a SubscriptionGroupResponse struct.

func (SubscriptionGroupResponse) MarshalJSON

func (s SubscriptionGroupResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupResponse. It customizes the JSON marshaling process for SubscriptionGroupResponse objects.

func (*SubscriptionGroupResponse) UnmarshalJSON

func (s *SubscriptionGroupResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupResponse. It customizes the JSON unmarshaling process for SubscriptionGroupResponse objects.

type SubscriptionGroupSignup

type SubscriptionGroupSignup struct {
	PaymentProfileId *int    `json:"payment_profile_id,omitempty"`
	PayerId          *int    `json:"payer_id,omitempty"`
	PayerReference   *string `json:"payer_reference,omitempty"`
	// The type of payment collection to be used in the subscription. For legacy Statements Architecture valid options are - `invoice`, `automatic`. For current Relationship Invoicing Architecture valid options are - `remittance`, `automatic`, `prepaid`.
	PaymentCollectionMethod *CollectionMethod             `json:"payment_collection_method,omitempty"`
	PayerAttributes         *PayerAttributes              `json:"payer_attributes,omitempty"`
	CreditCardAttributes    *SubscriptionGroupCreditCard  `json:"credit_card_attributes,omitempty"`
	BankAccountAttributes   *SubscriptionGroupBankAccount `json:"bank_account_attributes,omitempty"`
	Subscriptions           []SubscriptionGroupSignupItem `json:"subscriptions"`
	AdditionalProperties    map[string]any                `json:"_"`
}

SubscriptionGroupSignup represents a SubscriptionGroupSignup struct.

func (SubscriptionGroupSignup) MarshalJSON

func (s SubscriptionGroupSignup) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupSignup. It customizes the JSON marshaling process for SubscriptionGroupSignup objects.

func (*SubscriptionGroupSignup) UnmarshalJSON

func (s *SubscriptionGroupSignup) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupSignup. It customizes the JSON unmarshaling process for SubscriptionGroupSignup objects.

type SubscriptionGroupSignupComponent

type SubscriptionGroupSignupComponent struct {
	// Required if passing any component to `components` attribute.
	ComponentId       *SubscriptionGroupSignupComponentComponentId       `json:"component_id,omitempty"`
	AllocatedQuantity *SubscriptionGroupSignupComponentAllocatedQuantity `json:"allocated_quantity,omitempty"`
	UnitBalance       *SubscriptionGroupSignupComponentUnitBalance       `json:"unit_balance,omitempty"`
	PricePointId      *SubscriptionGroupSignupComponentPricePointId      `json:"price_point_id,omitempty"`
	// Used in place of `price_point_id` to define a custom price point unique to the subscription. You still need to provide `component_id`.
	CustomPrice          *SubscriptionGroupComponentCustomPrice `json:"custom_price,omitempty"`
	AdditionalProperties map[string]any                         `json:"_"`
}

SubscriptionGroupSignupComponent represents a SubscriptionGroupSignupComponent struct.

func (SubscriptionGroupSignupComponent) MarshalJSON

func (s SubscriptionGroupSignupComponent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupSignupComponent. It customizes the JSON marshaling process for SubscriptionGroupSignupComponent objects.

func (*SubscriptionGroupSignupComponent) UnmarshalJSON

func (s *SubscriptionGroupSignupComponent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupSignupComponent. It customizes the JSON unmarshaling process for SubscriptionGroupSignupComponent objects.

type SubscriptionGroupSignupComponentAllocatedQuantity added in v0.1.0

type SubscriptionGroupSignupComponentAllocatedQuantity struct {
	// contains filtered or unexported fields
}

SubscriptionGroupSignupComponentAllocatedQuantity represents a SubscriptionGroupSignupComponentAllocatedQuantity struct. This is a container for one-of cases.

func (*SubscriptionGroupSignupComponentAllocatedQuantity) AsNumber added in v0.1.0

func (*SubscriptionGroupSignupComponentAllocatedQuantity) AsString added in v0.1.0

func (SubscriptionGroupSignupComponentAllocatedQuantity) MarshalJSON added in v0.1.0

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupSignupComponentAllocatedQuantity. It customizes the JSON marshaling process for SubscriptionGroupSignupComponentAllocatedQuantity objects.

func (SubscriptionGroupSignupComponentAllocatedQuantity) String added in v0.1.0

String converts the SubscriptionGroupSignupComponentAllocatedQuantity object to a string representation.

func (*SubscriptionGroupSignupComponentAllocatedQuantity) UnmarshalJSON added in v0.1.0

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupSignupComponentAllocatedQuantity. It customizes the JSON unmarshaling process for SubscriptionGroupSignupComponentAllocatedQuantity objects.

type SubscriptionGroupSignupComponentComponentId added in v0.1.0

type SubscriptionGroupSignupComponentComponentId struct {
	// contains filtered or unexported fields
}

SubscriptionGroupSignupComponentComponentId represents a SubscriptionGroupSignupComponentComponentId struct. This is a container for one-of cases.

func (*SubscriptionGroupSignupComponentComponentId) AsNumber added in v0.1.0

func (*SubscriptionGroupSignupComponentComponentId) AsString added in v0.1.0

func (SubscriptionGroupSignupComponentComponentId) MarshalJSON added in v0.1.0

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupSignupComponentComponentId. It customizes the JSON marshaling process for SubscriptionGroupSignupComponentComponentId objects.

func (SubscriptionGroupSignupComponentComponentId) String added in v0.1.0

String converts the SubscriptionGroupSignupComponentComponentId object to a string representation.

func (*SubscriptionGroupSignupComponentComponentId) UnmarshalJSON added in v0.1.0

func (s *SubscriptionGroupSignupComponentComponentId) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupSignupComponentComponentId. It customizes the JSON unmarshaling process for SubscriptionGroupSignupComponentComponentId objects.

type SubscriptionGroupSignupComponentPricePointId added in v0.1.0

type SubscriptionGroupSignupComponentPricePointId struct {
	// contains filtered or unexported fields
}

SubscriptionGroupSignupComponentPricePointId represents a SubscriptionGroupSignupComponentPricePointId struct. This is a container for one-of cases.

func (*SubscriptionGroupSignupComponentPricePointId) AsNumber added in v0.1.0

func (*SubscriptionGroupSignupComponentPricePointId) AsString added in v0.1.0

func (SubscriptionGroupSignupComponentPricePointId) MarshalJSON added in v0.1.0

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupSignupComponentPricePointId. It customizes the JSON marshaling process for SubscriptionGroupSignupComponentPricePointId objects.

func (SubscriptionGroupSignupComponentPricePointId) String added in v0.1.0

String converts the SubscriptionGroupSignupComponentPricePointId object to a string representation.

func (*SubscriptionGroupSignupComponentPricePointId) UnmarshalJSON added in v0.1.0

func (s *SubscriptionGroupSignupComponentPricePointId) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupSignupComponentPricePointId. It customizes the JSON unmarshaling process for SubscriptionGroupSignupComponentPricePointId objects.

type SubscriptionGroupSignupComponentUnitBalance added in v0.1.0

type SubscriptionGroupSignupComponentUnitBalance struct {
	// contains filtered or unexported fields
}

SubscriptionGroupSignupComponentUnitBalance represents a SubscriptionGroupSignupComponentUnitBalance struct. This is a container for one-of cases.

func (*SubscriptionGroupSignupComponentUnitBalance) AsNumber added in v0.1.0

func (*SubscriptionGroupSignupComponentUnitBalance) AsString added in v0.1.0

func (SubscriptionGroupSignupComponentUnitBalance) MarshalJSON added in v0.1.0

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupSignupComponentUnitBalance. It customizes the JSON marshaling process for SubscriptionGroupSignupComponentUnitBalance objects.

func (SubscriptionGroupSignupComponentUnitBalance) String added in v0.1.0

String converts the SubscriptionGroupSignupComponentUnitBalance object to a string representation.

func (*SubscriptionGroupSignupComponentUnitBalance) UnmarshalJSON added in v0.1.0

func (s *SubscriptionGroupSignupComponentUnitBalance) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupSignupComponentUnitBalance. It customizes the JSON unmarshaling process for SubscriptionGroupSignupComponentUnitBalance objects.

type SubscriptionGroupSignupError

type SubscriptionGroupSignupError struct {
	// Object that as key have subscription position in request subscriptions array and as value subscription errors object.
	Subscriptions        map[string]SubscriptionGroupSubscriptionError `json:"subscriptions,omitempty"`
	PayerReference       *string                                       `json:"payer_reference,omitempty"`
	Payer                *PayerError                                   `json:"payer,omitempty"`
	SubscriptionGroup    []string                                      `json:"subscription_group,omitempty"`
	PaymentProfileId     *string                                       `json:"payment_profile_id,omitempty"`
	PayerId              *string                                       `json:"payer_id,omitempty"`
	AdditionalProperties map[string]any                                `json:"_"`
}

SubscriptionGroupSignupError represents a SubscriptionGroupSignupError struct.

func (SubscriptionGroupSignupError) MarshalJSON

func (s SubscriptionGroupSignupError) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupSignupError. It customizes the JSON marshaling process for SubscriptionGroupSignupError objects.

func (*SubscriptionGroupSignupError) UnmarshalJSON

func (s *SubscriptionGroupSignupError) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupSignupError. It customizes the JSON unmarshaling process for SubscriptionGroupSignupError objects.

type SubscriptionGroupSignupFailure added in v0.1.0

type SubscriptionGroupSignupFailure struct {
	SubscriptionGroup    SubscriptionGroupSignupFailureData `json:"subscription_group"`
	Customer             *string                            `json:"customer"`
	AdditionalProperties map[string]any                     `json:"_"`
}

SubscriptionGroupSignupFailure represents a SubscriptionGroupSignupFailure struct.

func (SubscriptionGroupSignupFailure) MarshalJSON added in v0.1.0

func (s SubscriptionGroupSignupFailure) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupSignupFailure. It customizes the JSON marshaling process for SubscriptionGroupSignupFailure objects.

func (*SubscriptionGroupSignupFailure) UnmarshalJSON added in v0.1.0

func (s *SubscriptionGroupSignupFailure) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupSignupFailure. It customizes the JSON unmarshaling process for SubscriptionGroupSignupFailure objects.

type SubscriptionGroupSignupFailureData added in v0.1.0

type SubscriptionGroupSignupFailureData struct {
	PayerId                 *int                          `json:"payer_id,omitempty"`
	PayerReference          *string                       `json:"payer_reference,omitempty"`
	PaymentProfileId        *int                          `json:"payment_profile_id,omitempty"`
	PaymentCollectionMethod *string                       `json:"payment_collection_method,omitempty"`
	PayerAttributes         *PayerAttributes              `json:"payer_attributes,omitempty"`
	CreditCardAttributes    *SubscriptionGroupCreditCard  `json:"credit_card_attributes,omitempty"`
	BankAccountAttributes   *SubscriptionGroupBankAccount `json:"bank_account_attributes,omitempty"`
	Subscriptions           []SubscriptionGroupSignupItem `json:"subscriptions,omitempty"`
	AdditionalProperties    map[string]any                `json:"_"`
}

SubscriptionGroupSignupFailureData represents a SubscriptionGroupSignupFailureData struct.

func (SubscriptionGroupSignupFailureData) MarshalJSON added in v0.1.0

func (s SubscriptionGroupSignupFailureData) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupSignupFailureData. It customizes the JSON marshaling process for SubscriptionGroupSignupFailureData objects.

func (*SubscriptionGroupSignupFailureData) UnmarshalJSON added in v0.1.0

func (s *SubscriptionGroupSignupFailureData) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupSignupFailureData. It customizes the JSON unmarshaling process for SubscriptionGroupSignupFailureData objects.

type SubscriptionGroupSignupItem

type SubscriptionGroupSignupItem struct {
	// The API Handle of the product for which you are creating a subscription. Required, unless a `product_id` is given instead.
	ProductHandle *string `json:"product_handle,omitempty"`
	// The Product ID of the product for which you are creating a subscription. You can pass either `product_id` or `product_handle`.
	ProductId *int `json:"product_id,omitempty"`
	// The ID of the particular price point on the product.
	ProductPricePointId *int `json:"product_price_point_id,omitempty"`
	// The user-friendly API handle of a product's particular price point.
	ProductPricePointHandle *string `json:"product_price_point_handle,omitempty"`
	// Use in place of passing product and component information to set up the subscription with an existing offer. May be either the Chargify ID of the offer or its handle prefixed with `handle:`
	OfferId *int `json:"offer_id,omitempty"`
	// The reference value (provided by your app) for the subscription itelf.
	Reference *string `json:"reference,omitempty"`
	// One of the subscriptions must be marked as primary in the group.
	Primary *bool `json:"primary,omitempty"`
	// (Optional) If Multi-Currency is enabled and the currency is configured in Chargify, pass it at signup to create a subscription on a non-default currency. Note that you cannot update the currency of an existing subscription.
	Currency *string `json:"currency,omitempty"`
	// An array for all the coupons attached to the subscription.
	CouponCodes []string                           `json:"coupon_codes,omitempty"`
	Components  []SubscriptionGroupSignupComponent `json:"components,omitempty"`
	// (Optional) Used in place of `product_price_point_id` to define a custom price point unique to the subscription
	CustomPrice *SubscriptionCustomPrice `json:"custom_price,omitempty"`
	// (Optional). Cannot be used when also specifying next_billing_at
	CalendarBilling *CalendarBilling `json:"calendar_billing,omitempty"`
	// (Optional) A set of key/value pairs representing custom fields and their values. Metafields will be created “on-the-fly” in your site for a given key, if they have not been created yet.
	Metafields           map[string]string `json:"metafields,omitempty"`
	AdditionalProperties map[string]any    `json:"_"`
}

SubscriptionGroupSignupItem represents a SubscriptionGroupSignupItem struct.

func (SubscriptionGroupSignupItem) MarshalJSON

func (s SubscriptionGroupSignupItem) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupSignupItem. It customizes the JSON marshaling process for SubscriptionGroupSignupItem objects.

func (*SubscriptionGroupSignupItem) UnmarshalJSON

func (s *SubscriptionGroupSignupItem) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupSignupItem. It customizes the JSON unmarshaling process for SubscriptionGroupSignupItem objects.

type SubscriptionGroupSignupRequest

type SubscriptionGroupSignupRequest struct {
	SubscriptionGroup    SubscriptionGroupSignup `json:"subscription_group"`
	AdditionalProperties map[string]any          `json:"_"`
}

SubscriptionGroupSignupRequest represents a SubscriptionGroupSignupRequest struct.

func (SubscriptionGroupSignupRequest) MarshalJSON

func (s SubscriptionGroupSignupRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupSignupRequest. It customizes the JSON marshaling process for SubscriptionGroupSignupRequest objects.

func (*SubscriptionGroupSignupRequest) UnmarshalJSON

func (s *SubscriptionGroupSignupRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupSignupRequest. It customizes the JSON unmarshaling process for SubscriptionGroupSignupRequest objects.

type SubscriptionGroupSignupResponse

type SubscriptionGroupSignupResponse struct {
	Uid                   *string    `json:"uid,omitempty"`
	Scheme                *int       `json:"scheme,omitempty"`
	CustomerId            *int       `json:"customer_id,omitempty"`
	PaymentProfileId      *int       `json:"payment_profile_id,omitempty"`
	SubscriptionIds       []int      `json:"subscription_ids,omitempty"`
	PrimarySubscriptionId *int       `json:"primary_subscription_id,omitempty"`
	NextAssessmentAt      *time.Time `json:"next_assessment_at,omitempty"`
	// The state of a subscription.
	// * **Live States**
	//     * `active` - A normal, active subscription. It is not in a trial and is paid and up to date.
	//     * `assessing` - An internal (transient) state that indicates a subscription is in the middle of periodic assessment. Do not base any access decisions in your app on this state, as it may not always be exposed.
	//     * `pending` - An internal (transient) state that indicates a subscription is in the creation process. Do not base any access decisions in your app on this state, as it may not always be exposed.
	//     * `trialing` - A subscription in trialing state has a valid trial subscription. This type of subscription may transition to active once payment is received when the trial has ended. Otherwise, it may go to a Problem or End of Life state.
	//     * `paused` - An internal state that indicates that your account with Advanced Billing is in arrears.
	// * **Problem States**
	//     * `past_due` - Indicates that the most recent payment has failed, and payment is past due for this subscription. If you have enabled our automated dunning, this subscription will be in the dunning process (additional status and callbacks from the dunning process will be available in the future). If you are handling dunning and payment updates yourself, you will want to use this state to initiate a payment update from your customers.
	//     * `soft_failure` - Indicates that normal assessment/processing of the subscription has failed for a reason that cannot be fixed by the Customer. For example, a Soft Fail may result from a timeout at the gateway or incorrect credentials on your part. The subscriptions should be retried automatically. An interface is being built for you to review problems resulting from these events to take manual action when needed.
	//     * `unpaid` - Indicates an unpaid subscription. A subscription is marked unpaid if the retry period expires and you have configured your [Dunning](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405505141005) settings to have a Final Action of `mark the subscription unpaid`.
	// * **End of Life States**
	//     * `canceled` - Indicates a canceled subscription. This may happen at your request (via the API or the web interface) or due to the expiration of the [Dunning](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405505141005) process without payment. See the [Reactivation](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404559291021) documentation for info on how to restart a canceled subscription.
	//     While a subscription is canceled, its period will not advance, it will not accrue any new charges, and Advanced Billing will not attempt to collect the overdue balance.
	//     * `expired` - Indicates a subscription that has expired due to running its normal life cycle. Some products may be configured to have an expiration period. An expired subscription then is one that stayed active until it fulfilled its full period.
	//     * `failed_to_create` - Indicates that signup has failed. (You may see this state in a signup_failure webhook.)
	//     * `on_hold` - Indicates that a subscription’s billing has been temporarily stopped. While it is expected that the subscription will resume and return to active status, this is still treated as an “End of Life” state because the customer is not paying for services during this time.
	//     * `suspended` - Indicates that a prepaid subscription has used up all their prepayment balance. If a prepayment is applied, it will return to an active state.
	//     * `trial_ended` - A subscription in a trial_ended state is a subscription that completed a no-obligation trial and did not have a card on file at the expiration of the trial period. See [Product Pricing – No Obligation Trials](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405246782221) for more details.
	// See [Subscription States](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404222005773) for more info about subscription states and state transitions.
	State               *SubscriptionState      `json:"state,omitempty"`
	CancelAtEndOfPeriod *bool                   `json:"cancel_at_end_of_period,omitempty"`
	Subscriptions       []SubscriptionGroupItem `json:"subscriptions,omitempty"`
	// The type of payment collection to be used in the subscription. For legacy Statements Architecture valid options are - `invoice`, `automatic`. For current Relationship Invoicing Architecture valid options are - `remittance`, `automatic`, `prepaid`.
	PaymentCollectionMethod *CollectionMethod `json:"payment_collection_method,omitempty"`
	AdditionalProperties    map[string]any    `json:"_"`
}

SubscriptionGroupSignupResponse represents a SubscriptionGroupSignupResponse struct.

func (SubscriptionGroupSignupResponse) MarshalJSON

func (s SubscriptionGroupSignupResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupSignupResponse. It customizes the JSON marshaling process for SubscriptionGroupSignupResponse objects.

func (*SubscriptionGroupSignupResponse) UnmarshalJSON

func (s *SubscriptionGroupSignupResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupSignupResponse. It customizes the JSON unmarshaling process for SubscriptionGroupSignupResponse objects.

type SubscriptionGroupSignupSuccess added in v0.1.0

type SubscriptionGroupSignupSuccess struct {
	SubscriptionGroup    SubscriptionGroupSignupSuccessData `json:"subscription_group"`
	Customer             Customer                           `json:"customer"`
	AdditionalProperties map[string]any                     `json:"_"`
}

SubscriptionGroupSignupSuccess represents a SubscriptionGroupSignupSuccess struct.

func (SubscriptionGroupSignupSuccess) MarshalJSON added in v0.1.0

func (s SubscriptionGroupSignupSuccess) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupSignupSuccess. It customizes the JSON marshaling process for SubscriptionGroupSignupSuccess objects.

func (*SubscriptionGroupSignupSuccess) UnmarshalJSON added in v0.1.0

func (s *SubscriptionGroupSignupSuccess) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupSignupSuccess. It customizes the JSON unmarshaling process for SubscriptionGroupSignupSuccess objects.

type SubscriptionGroupSignupSuccessData added in v0.1.0

type SubscriptionGroupSignupSuccessData struct {
	Uid                   string         `json:"uid"`
	Scheme                int            `json:"scheme"`
	CustomerId            int            `json:"customer_id"`
	PaymentProfileId      int            `json:"payment_profile_id"`
	SubscriptionIds       []int          `json:"subscription_ids"`
	PrimarySubscriptionId int            `json:"primary_subscription_id"`
	NextAssessmentAt      time.Time      `json:"next_assessment_at"`
	State                 string         `json:"state"`
	CancelAtEndOfPeriod   bool           `json:"cancel_at_end_of_period"`
	AdditionalProperties  map[string]any `json:"_"`
}

SubscriptionGroupSignupSuccessData represents a SubscriptionGroupSignupSuccessData struct.

func (SubscriptionGroupSignupSuccessData) MarshalJSON added in v0.1.0

func (s SubscriptionGroupSignupSuccessData) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupSignupSuccessData. It customizes the JSON marshaling process for SubscriptionGroupSignupSuccessData objects.

func (*SubscriptionGroupSignupSuccessData) UnmarshalJSON added in v0.1.0

func (s *SubscriptionGroupSignupSuccessData) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupSignupSuccessData. It customizes the JSON unmarshaling process for SubscriptionGroupSignupSuccessData objects.

type SubscriptionGroupSingleError added in v0.1.0

type SubscriptionGroupSingleError struct {
	SubscriptionGroup    string         `json:"subscription_group"`
	AdditionalProperties map[string]any `json:"_"`
}

SubscriptionGroupSingleError represents a SubscriptionGroupSingleError struct.

func (SubscriptionGroupSingleError) MarshalJSON added in v0.1.0

func (s SubscriptionGroupSingleError) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupSingleError. It customizes the JSON marshaling process for SubscriptionGroupSingleError objects.

func (*SubscriptionGroupSingleError) UnmarshalJSON added in v0.1.0

func (s *SubscriptionGroupSingleError) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupSingleError. It customizes the JSON unmarshaling process for SubscriptionGroupSingleError objects.

type SubscriptionGroupSubscriptionError

type SubscriptionGroupSubscriptionError struct {
	Product                       []string       `json:"product,omitempty"`
	ProductPricePointId           []string       `json:"product_price_point_id,omitempty"`
	PaymentProfile                []string       `json:"payment_profile,omitempty"`
	PaymentProfileChargifyToken   []string       `json:"payment_profile.chargify_token,omitempty"`
	Base                          []string       `json:"base,omitempty"`
	PaymentProfileExpirationMonth []string       `json:"payment_profile.expiration_month,omitempty"`
	PaymentProfileExpirationYear  []string       `json:"payment_profile.expiration_year,omitempty"`
	PaymentProfileFullNumber      []string       `json:"payment_profile.full_number,omitempty"`
	AdditionalProperties          map[string]any `json:"_"`
}

SubscriptionGroupSubscriptionError represents a SubscriptionGroupSubscriptionError struct. Object which contains subscription errors.

func (SubscriptionGroupSubscriptionError) MarshalJSON

func (s SubscriptionGroupSubscriptionError) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupSubscriptionError. It customizes the JSON marshaling process for SubscriptionGroupSubscriptionError objects.

func (*SubscriptionGroupSubscriptionError) UnmarshalJSON

func (s *SubscriptionGroupSubscriptionError) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupSubscriptionError. It customizes the JSON unmarshaling process for SubscriptionGroupSubscriptionError objects.

type SubscriptionGroupUpdateError

type SubscriptionGroupUpdateError struct {
	Members              []SubscriptionGroupMemberError `json:"members,omitempty"`
	AdditionalProperties map[string]any                 `json:"_"`
}

SubscriptionGroupUpdateError represents a SubscriptionGroupUpdateError struct.

func (SubscriptionGroupUpdateError) MarshalJSON

func (s SubscriptionGroupUpdateError) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupUpdateError. It customizes the JSON marshaling process for SubscriptionGroupUpdateError objects.

func (*SubscriptionGroupUpdateError) UnmarshalJSON

func (s *SubscriptionGroupUpdateError) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupUpdateError. It customizes the JSON unmarshaling process for SubscriptionGroupUpdateError objects.

type SubscriptionGroupsListInclude added in v0.1.0

type SubscriptionGroupsListInclude string

SubscriptionGroupsListInclude is a string enum.

const (
	SubscriptionGroupsListInclude_ACCOUNTBALANCES SubscriptionGroupsListInclude = "account_balances"
)

func (SubscriptionGroupsListInclude) MarshalJSON added in v0.2.0

func (e SubscriptionGroupsListInclude) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionGroupsListInclude. It customizes the JSON marshaling process for SubscriptionGroupsListInclude objects.

func (*SubscriptionGroupsListInclude) UnmarshalJSON added in v0.2.0

func (e *SubscriptionGroupsListInclude) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionGroupsListInclude. It customizes the JSON unmarshaling process for SubscriptionGroupsListInclude objects.

type SubscriptionInclude

type SubscriptionInclude string

SubscriptionInclude is a string enum.

const (
	SubscriptionInclude_COUPONS              SubscriptionInclude = "coupons"
	SubscriptionInclude_SELFSERVICEPAGETOKEN SubscriptionInclude = "self_service_page_token"
)

func (SubscriptionInclude) MarshalJSON added in v0.2.0

func (e SubscriptionInclude) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionInclude. It customizes the JSON marshaling process for SubscriptionInclude objects.

func (*SubscriptionInclude) UnmarshalJSON added in v0.2.0

func (e *SubscriptionInclude) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionInclude. It customizes the JSON unmarshaling process for SubscriptionInclude objects.

type SubscriptionIncludedCoupon

type SubscriptionIncludedCoupon struct {
	Code                 *string          `json:"code,omitempty"`
	UseCount             *int             `json:"use_count,omitempty"`
	UsesAllowed          *int             `json:"uses_allowed,omitempty"`
	ExpiresAt            Optional[string] `json:"expires_at"`
	Recurring            *bool            `json:"recurring,omitempty"`
	AmountInCents        Optional[int64]  `json:"amount_in_cents"`
	Percentage           Optional[string] `json:"percentage"`
	AdditionalProperties map[string]any   `json:"_"`
}

SubscriptionIncludedCoupon represents a SubscriptionIncludedCoupon struct.

func (SubscriptionIncludedCoupon) MarshalJSON

func (s SubscriptionIncludedCoupon) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionIncludedCoupon. It customizes the JSON marshaling process for SubscriptionIncludedCoupon objects.

func (*SubscriptionIncludedCoupon) UnmarshalJSON

func (s *SubscriptionIncludedCoupon) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionIncludedCoupon. It customizes the JSON unmarshaling process for SubscriptionIncludedCoupon objects.

type SubscriptionListDateField

type SubscriptionListDateField string

SubscriptionListDateField is a string enum.

const (
	SubscriptionListDateField_UPDATEDAT SubscriptionListDateField = "updated_at"
)

func (SubscriptionListDateField) MarshalJSON added in v0.2.0

func (e SubscriptionListDateField) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionListDateField. It customizes the JSON marshaling process for SubscriptionListDateField objects.

func (*SubscriptionListDateField) UnmarshalJSON added in v0.2.0

func (e *SubscriptionListDateField) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionListDateField. It customizes the JSON unmarshaling process for SubscriptionListDateField objects.

type SubscriptionListInclude

type SubscriptionListInclude string

SubscriptionListInclude is a string enum.

const (
	SubscriptionListInclude_SELFSERVICEPAGETOKEN SubscriptionListInclude = "self_service_page_token"
)

func (SubscriptionListInclude) MarshalJSON added in v0.2.0

func (e SubscriptionListInclude) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionListInclude. It customizes the JSON marshaling process for SubscriptionListInclude objects.

func (*SubscriptionListInclude) UnmarshalJSON added in v0.2.0

func (e *SubscriptionListInclude) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionListInclude. It customizes the JSON unmarshaling process for SubscriptionListInclude objects.

type SubscriptionMRR

type SubscriptionMRR struct {
	SubscriptionId       int                      `json:"subscription_id"`
	MrrAmountInCents     int64                    `json:"mrr_amount_in_cents"`
	Breakouts            *SubscriptionMRRBreakout `json:"breakouts,omitempty"`
	AdditionalProperties map[string]any           `json:"_"`
}

SubscriptionMRR represents a SubscriptionMRR struct.

func (SubscriptionMRR) MarshalJSON

func (s SubscriptionMRR) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionMRR. It customizes the JSON marshaling process for SubscriptionMRR objects.

func (*SubscriptionMRR) UnmarshalJSON

func (s *SubscriptionMRR) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionMRR. It customizes the JSON unmarshaling process for SubscriptionMRR objects.

type SubscriptionMRRBreakout

type SubscriptionMRRBreakout struct {
	PlanAmountInCents    int64          `json:"plan_amount_in_cents"`
	UsageAmountInCents   int64          `json:"usage_amount_in_cents"`
	AdditionalProperties map[string]any `json:"_"`
}

SubscriptionMRRBreakout represents a SubscriptionMRRBreakout struct.

func (SubscriptionMRRBreakout) MarshalJSON

func (s SubscriptionMRRBreakout) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionMRRBreakout. It customizes the JSON marshaling process for SubscriptionMRRBreakout objects.

func (*SubscriptionMRRBreakout) UnmarshalJSON

func (s *SubscriptionMRRBreakout) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionMRRBreakout. It customizes the JSON unmarshaling process for SubscriptionMRRBreakout objects.

type SubscriptionMRRResponse

type SubscriptionMRRResponse struct {
	SubscriptionsMrr     []SubscriptionMRR `json:"subscriptions_mrr"`
	AdditionalProperties map[string]any    `json:"_"`
}

SubscriptionMRRResponse represents a SubscriptionMRRResponse struct.

func (SubscriptionMRRResponse) MarshalJSON

func (s SubscriptionMRRResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionMRRResponse. It customizes the JSON marshaling process for SubscriptionMRRResponse objects.

func (*SubscriptionMRRResponse) UnmarshalJSON

func (s *SubscriptionMRRResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionMRRResponse. It customizes the JSON unmarshaling process for SubscriptionMRRResponse objects.

type SubscriptionMigrationPreview

type SubscriptionMigrationPreview struct {
	// The amount of the prorated adjustment that would be issued for the current subscription.
	ProratedAdjustmentInCents *int64 `json:"prorated_adjustment_in_cents,omitempty"`
	// The amount of the charge that would be created for the new product.
	ChargeInCents *int64 `json:"charge_in_cents,omitempty"`
	// The amount of the payment due in the case of an upgrade.
	PaymentDueInCents *int64 `json:"payment_due_in_cents,omitempty"`
	// Represents a credit in cents that is applied to your subscription as part of a migration process for a specific product, which reduces the amount owed for the subscription.
	CreditAppliedInCents *int64         `json:"credit_applied_in_cents,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

SubscriptionMigrationPreview represents a SubscriptionMigrationPreview struct.

func (SubscriptionMigrationPreview) MarshalJSON

func (s SubscriptionMigrationPreview) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionMigrationPreview. It customizes the JSON marshaling process for SubscriptionMigrationPreview objects.

func (*SubscriptionMigrationPreview) UnmarshalJSON

func (s *SubscriptionMigrationPreview) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionMigrationPreview. It customizes the JSON unmarshaling process for SubscriptionMigrationPreview objects.

type SubscriptionMigrationPreviewOptions

type SubscriptionMigrationPreviewOptions struct {
	// The ID of the target Product. Either a product_id or product_handle must be present. A Subscription can be migrated to another product for both the current Product Family and another Product Family. Note: Going to another Product Family, components will not be migrated as well.
	ProductId *int `json:"product_id,omitempty"`
	// The ID of the specified product's price point. This can be passed to migrate to a non-default price point.
	ProductPricePointId *int `json:"product_price_point_id,omitempty"`
	// Whether to include the trial period configured for the product price point when starting a new billing period. Note that if preserve_period is set, then include_trial will be ignored.
	IncludeTrial *bool `json:"include_trial,omitempty"`
	// If `true` is sent initial charges will be assessed.
	IncludeInitialCharge *bool `json:"include_initial_charge,omitempty"`
	// If `true` is sent, any coupons associated with the subscription will be applied to the migration. If `false` is sent, coupons will not be applied. Note: When migrating to a new product family, the coupon cannot migrate.
	IncludeCoupons *bool `json:"include_coupons,omitempty"`
	// If `false` is sent, the subscription's billing period will be reset to today and the full price of the new product will be charged. If `true` is sent, the billing period will not change and a prorated charge will be issued for the new product.
	PreservePeriod *bool `json:"preserve_period,omitempty"`
	// The handle of the target Product. Either a product_id or product_handle must be present. A Subscription can be migrated to another product for both the current Product Family and another Product Family. Note: Going to another Product Family, components will not be migrated as well.
	ProductHandle *string `json:"product_handle,omitempty"`
	// The ID or handle of the specified product's price point. This can be passed to migrate to a non-default price point.
	ProductPricePointHandle *string    `json:"product_price_point_handle,omitempty"`
	Proration               *Proration `json:"proration,omitempty"`
	// The date that the proration is calculated from for the preview
	ProrationDate        *time.Time     `json:"proration_date,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

SubscriptionMigrationPreviewOptions represents a SubscriptionMigrationPreviewOptions struct.

func (SubscriptionMigrationPreviewOptions) MarshalJSON

func (s SubscriptionMigrationPreviewOptions) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionMigrationPreviewOptions. It customizes the JSON marshaling process for SubscriptionMigrationPreviewOptions objects.

func (*SubscriptionMigrationPreviewOptions) UnmarshalJSON

func (s *SubscriptionMigrationPreviewOptions) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionMigrationPreviewOptions. It customizes the JSON unmarshaling process for SubscriptionMigrationPreviewOptions objects.

type SubscriptionMigrationPreviewRequest

type SubscriptionMigrationPreviewRequest struct {
	Migration            SubscriptionMigrationPreviewOptions `json:"migration"`
	AdditionalProperties map[string]any                      `json:"_"`
}

SubscriptionMigrationPreviewRequest represents a SubscriptionMigrationPreviewRequest struct.

func (SubscriptionMigrationPreviewRequest) MarshalJSON

func (s SubscriptionMigrationPreviewRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionMigrationPreviewRequest. It customizes the JSON marshaling process for SubscriptionMigrationPreviewRequest objects.

func (*SubscriptionMigrationPreviewRequest) UnmarshalJSON

func (s *SubscriptionMigrationPreviewRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionMigrationPreviewRequest. It customizes the JSON unmarshaling process for SubscriptionMigrationPreviewRequest objects.

type SubscriptionMigrationPreviewResponse

type SubscriptionMigrationPreviewResponse struct {
	Migration            SubscriptionMigrationPreview `json:"migration"`
	AdditionalProperties map[string]any               `json:"_"`
}

SubscriptionMigrationPreviewResponse represents a SubscriptionMigrationPreviewResponse struct.

func (SubscriptionMigrationPreviewResponse) MarshalJSON

func (s SubscriptionMigrationPreviewResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionMigrationPreviewResponse. It customizes the JSON marshaling process for SubscriptionMigrationPreviewResponse objects.

func (*SubscriptionMigrationPreviewResponse) UnmarshalJSON

func (s *SubscriptionMigrationPreviewResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionMigrationPreviewResponse. It customizes the JSON unmarshaling process for SubscriptionMigrationPreviewResponse objects.

type SubscriptionNote

type SubscriptionNote struct {
	Id                   *int           `json:"id,omitempty"`
	Body                 *string        `json:"body,omitempty"`
	SubscriptionId       *int           `json:"subscription_id,omitempty"`
	CreatedAt            *time.Time     `json:"created_at,omitempty"`
	UpdatedAt            *time.Time     `json:"updated_at,omitempty"`
	Sticky               *bool          `json:"sticky,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

SubscriptionNote represents a SubscriptionNote struct.

func (SubscriptionNote) MarshalJSON

func (s SubscriptionNote) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionNote. It customizes the JSON marshaling process for SubscriptionNote objects.

func (*SubscriptionNote) UnmarshalJSON

func (s *SubscriptionNote) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionNote. It customizes the JSON unmarshaling process for SubscriptionNote objects.

type SubscriptionNoteResponse

type SubscriptionNoteResponse struct {
	Note                 SubscriptionNote `json:"note"`
	AdditionalProperties map[string]any   `json:"_"`
}

SubscriptionNoteResponse represents a SubscriptionNoteResponse struct.

func (SubscriptionNoteResponse) MarshalJSON

func (s SubscriptionNoteResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionNoteResponse. It customizes the JSON marshaling process for SubscriptionNoteResponse objects.

func (*SubscriptionNoteResponse) UnmarshalJSON

func (s *SubscriptionNoteResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionNoteResponse. It customizes the JSON unmarshaling process for SubscriptionNoteResponse objects.

type SubscriptionPreview

type SubscriptionPreview struct {
	CurrentBillingManifest *BillingManifest `json:"current_billing_manifest,omitempty"`
	NextBillingManifest    *BillingManifest `json:"next_billing_manifest,omitempty"`
	AdditionalProperties   map[string]any   `json:"_"`
}

SubscriptionPreview represents a SubscriptionPreview struct.

func (SubscriptionPreview) MarshalJSON

func (s SubscriptionPreview) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionPreview. It customizes the JSON marshaling process for SubscriptionPreview objects.

func (*SubscriptionPreview) UnmarshalJSON

func (s *SubscriptionPreview) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionPreview. It customizes the JSON unmarshaling process for SubscriptionPreview objects.

type SubscriptionPreviewResponse

type SubscriptionPreviewResponse struct {
	SubscriptionPreview  SubscriptionPreview `json:"subscription_preview"`
	AdditionalProperties map[string]any      `json:"_"`
}

SubscriptionPreviewResponse represents a SubscriptionPreviewResponse struct.

func (SubscriptionPreviewResponse) MarshalJSON

func (s SubscriptionPreviewResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionPreviewResponse. It customizes the JSON marshaling process for SubscriptionPreviewResponse objects.

func (*SubscriptionPreviewResponse) UnmarshalJSON

func (s *SubscriptionPreviewResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionPreviewResponse. It customizes the JSON unmarshaling process for SubscriptionPreviewResponse objects.

type SubscriptionProductChange added in v0.1.0

type SubscriptionProductChange struct {
	PreviousProductId    int            `json:"previous_product_id"`
	NewProductId         int            `json:"new_product_id"`
	AdditionalProperties map[string]any `json:"_"`
}

SubscriptionProductChange represents a SubscriptionProductChange struct.

func (SubscriptionProductChange) MarshalJSON added in v0.1.0

func (s SubscriptionProductChange) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionProductChange. It customizes the JSON marshaling process for SubscriptionProductChange objects.

func (*SubscriptionProductChange) UnmarshalJSON added in v0.1.0

func (s *SubscriptionProductChange) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionProductChange. It customizes the JSON unmarshaling process for SubscriptionProductChange objects.

type SubscriptionProductMigration

type SubscriptionProductMigration struct {
	// The ID of the target Product. Either a product_id or product_handle must be present. A Subscription can be migrated to another product for both the current Product Family and another Product Family. Note: Going to another Product Family, components will not be migrated as well.
	ProductId *int `json:"product_id,omitempty"`
	// The ID of the specified product's price point. This can be passed to migrate to a non-default price point.
	ProductPricePointId *int `json:"product_price_point_id,omitempty"`
	// Whether to include the trial period configured for the product price point when starting a new billing period. Note that if preserve_period is set, then include_trial will be ignored.
	IncludeTrial *bool `json:"include_trial,omitempty"`
	// If `true` is sent initial charges will be assessed.
	IncludeInitialCharge *bool `json:"include_initial_charge,omitempty"`
	// If `true` is sent, any coupons associated with the subscription will be applied to the migration. If `false` is sent, coupons will not be applied. Note: When migrating to a new product family, the coupon cannot migrate.
	IncludeCoupons *bool `json:"include_coupons,omitempty"`
	// If `false` is sent, the subscription's billing period will be reset to today and the full price of the new product will be charged. If `true` is sent, the billing period will not change and a prorated charge will be issued for the new product.
	PreservePeriod *bool `json:"preserve_period,omitempty"`
	// The handle of the target Product. Either a product_id or product_handle must be present. A Subscription can be migrated to another product for both the current Product Family and another Product Family. Note: Going to another Product Family, components will not be migrated as well.
	ProductHandle *string `json:"product_handle,omitempty"`
	// The ID or handle of the specified product's price point. This can be passed to migrate to a non-default price point.
	ProductPricePointHandle *string        `json:"product_price_point_handle,omitempty"`
	Proration               *Proration     `json:"proration,omitempty"`
	AdditionalProperties    map[string]any `json:"_"`
}

SubscriptionProductMigration represents a SubscriptionProductMigration struct.

func (SubscriptionProductMigration) MarshalJSON

func (s SubscriptionProductMigration) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionProductMigration. It customizes the JSON marshaling process for SubscriptionProductMigration objects.

func (*SubscriptionProductMigration) UnmarshalJSON

func (s *SubscriptionProductMigration) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionProductMigration. It customizes the JSON unmarshaling process for SubscriptionProductMigration objects.

type SubscriptionProductMigrationRequest

type SubscriptionProductMigrationRequest struct {
	Migration            SubscriptionProductMigration `json:"migration"`
	AdditionalProperties map[string]any               `json:"_"`
}

SubscriptionProductMigrationRequest represents a SubscriptionProductMigrationRequest struct.

func (SubscriptionProductMigrationRequest) MarshalJSON

func (s SubscriptionProductMigrationRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionProductMigrationRequest. It customizes the JSON marshaling process for SubscriptionProductMigrationRequest objects.

func (*SubscriptionProductMigrationRequest) UnmarshalJSON

func (s *SubscriptionProductMigrationRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionProductMigrationRequest. It customizes the JSON unmarshaling process for SubscriptionProductMigrationRequest objects.

type SubscriptionPurgeType

type SubscriptionPurgeType string

SubscriptionPurgeType is a string enum.

const (
	SubscriptionPurgeType_CUSTOMER       SubscriptionPurgeType = "customer"
	SubscriptionPurgeType_PAYMENTPROFILE SubscriptionPurgeType = "payment_profile"
)

func (SubscriptionPurgeType) MarshalJSON added in v0.2.0

func (e SubscriptionPurgeType) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionPurgeType. It customizes the JSON marshaling process for SubscriptionPurgeType objects.

func (*SubscriptionPurgeType) UnmarshalJSON added in v0.2.0

func (e *SubscriptionPurgeType) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionPurgeType. It customizes the JSON unmarshaling process for SubscriptionPurgeType objects.

type SubscriptionResponse

type SubscriptionResponse struct {
	Subscription         *Subscription  `json:"subscription,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

SubscriptionResponse represents a SubscriptionResponse struct.

func (SubscriptionResponse) MarshalJSON

func (s SubscriptionResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionResponse. It customizes the JSON marshaling process for SubscriptionResponse objects.

func (*SubscriptionResponse) UnmarshalJSON

func (s *SubscriptionResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionResponse. It customizes the JSON unmarshaling process for SubscriptionResponse objects.

type SubscriptionSort

type SubscriptionSort string

SubscriptionSort is a string enum.

const (
	SubscriptionSort_SIGNUPDATE     SubscriptionSort = "signup_date"
	SubscriptionSort_PERIODSTART    SubscriptionSort = "period_start"
	SubscriptionSort_PERIODEND      SubscriptionSort = "period_end"
	SubscriptionSort_NEXTASSESSMENT SubscriptionSort = "next_assessment"
	SubscriptionSort_UPDATEDAT      SubscriptionSort = "updated_at"
	SubscriptionSort_CREATEDAT      SubscriptionSort = "created_at"
)

func (SubscriptionSort) MarshalJSON added in v0.2.0

func (e SubscriptionSort) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionSort. It customizes the JSON marshaling process for SubscriptionSort objects.

func (*SubscriptionSort) UnmarshalJSON added in v0.2.0

func (e *SubscriptionSort) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionSort. It customizes the JSON unmarshaling process for SubscriptionSort objects.

type SubscriptionState

type SubscriptionState string

SubscriptionState is a string enum. The state of a subscription. * **Live States**

  • `active` - A normal, active subscription. It is not in a trial and is paid and up to date.
  • `assessing` - An internal (transient) state that indicates a subscription is in the middle of periodic assessment. Do not base any access decisions in your app on this state, as it may not always be exposed.
  • `pending` - An internal (transient) state that indicates a subscription is in the creation process. Do not base any access decisions in your app on this state, as it may not always be exposed.
  • `trialing` - A subscription in trialing state has a valid trial subscription. This type of subscription may transition to active once payment is received when the trial has ended. Otherwise, it may go to a Problem or End of Life state.
  • `paused` - An internal state that indicates that your account with Advanced Billing is in arrears.

* **Problem States**

  • `past_due` - Indicates that the most recent payment has failed, and payment is past due for this subscription. If you have enabled our automated dunning, this subscription will be in the dunning process (additional status and callbacks from the dunning process will be available in the future). If you are handling dunning and payment updates yourself, you will want to use this state to initiate a payment update from your customers.
  • `soft_failure` - Indicates that normal assessment/processing of the subscription has failed for a reason that cannot be fixed by the Customer. For example, a Soft Fail may result from a timeout at the gateway or incorrect credentials on your part. The subscriptions should be retried automatically. An interface is being built for you to review problems resulting from these events to take manual action when needed.
  • `unpaid` - Indicates an unpaid subscription. A subscription is marked unpaid if the retry period expires and you have configured your [Dunning](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405505141005) settings to have a Final Action of `mark the subscription unpaid`.

* **End of Life States**

  • `canceled` - Indicates a canceled subscription. This may happen at your request (via the API or the web interface) or due to the expiration of the [Dunning](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405505141005) process without payment. See the [Reactivation](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404559291021) documentation for info on how to restart a canceled subscription. While a subscription is canceled, its period will not advance, it will not accrue any new charges, and Advanced Billing will not attempt to collect the overdue balance.
  • `expired` - Indicates a subscription that has expired due to running its normal life cycle. Some products may be configured to have an expiration period. An expired subscription then is one that stayed active until it fulfilled its full period.
  • `failed_to_create` - Indicates that signup has failed. (You may see this state in a signup_failure webhook.)
  • `on_hold` - Indicates that a subscription’s billing has been temporarily stopped. While it is expected that the subscription will resume and return to active status, this is still treated as an “End of Life” state because the customer is not paying for services during this time.
  • `suspended` - Indicates that a prepaid subscription has used up all their prepayment balance. If a prepayment is applied, it will return to an active state.
  • `trial_ended` - A subscription in a trial_ended state is a subscription that completed a no-obligation trial and did not have a card on file at the expiration of the trial period. See [Product Pricing – No Obligation Trials](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405246782221) for more details.

See [Subscription States](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404222005773) for more info about subscription states and state transitions.

const (
	SubscriptionState_PENDING        SubscriptionState = "pending"
	SubscriptionState_FAILEDTOCREATE SubscriptionState = "failed_to_create"
	SubscriptionState_TRIALING       SubscriptionState = "trialing"
	SubscriptionState_ASSESSING      SubscriptionState = "assessing"
	SubscriptionState_ACTIVE         SubscriptionState = "active"
	SubscriptionState_SOFTFAILURE    SubscriptionState = "soft_failure"
	SubscriptionState_PASTDUE        SubscriptionState = "past_due"
	SubscriptionState_SUSPENDED      SubscriptionState = "suspended"
	SubscriptionState_CANCELED       SubscriptionState = "canceled"
	SubscriptionState_EXPIRED        SubscriptionState = "expired"
	SubscriptionState_PAUSED         SubscriptionState = "paused"
	SubscriptionState_UNPAID         SubscriptionState = "unpaid"
	SubscriptionState_TRIALENDED     SubscriptionState = "trial_ended"
	SubscriptionState_ONHOLD         SubscriptionState = "on_hold"
	SubscriptionState_AWAITINGSIGNUP SubscriptionState = "awaiting_signup"
)

func (SubscriptionState) MarshalJSON added in v0.2.0

func (e SubscriptionState) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionState. It customizes the JSON marshaling process for SubscriptionState objects.

func (*SubscriptionState) UnmarshalJSON added in v0.2.0

func (e *SubscriptionState) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionState. It customizes the JSON unmarshaling process for SubscriptionState objects.

type SubscriptionStateChange added in v0.1.0

type SubscriptionStateChange struct {
	PreviousSubscriptionState string         `json:"previous_subscription_state"`
	NewSubscriptionState      string         `json:"new_subscription_state"`
	AdditionalProperties      map[string]any `json:"_"`
}

SubscriptionStateChange represents a SubscriptionStateChange struct.

func (SubscriptionStateChange) MarshalJSON added in v0.1.0

func (s SubscriptionStateChange) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionStateChange. It customizes the JSON marshaling process for SubscriptionStateChange objects.

func (*SubscriptionStateChange) UnmarshalJSON added in v0.1.0

func (s *SubscriptionStateChange) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionStateChange. It customizes the JSON unmarshaling process for SubscriptionStateChange objects.

type SubscriptionStateFilter

type SubscriptionStateFilter string

SubscriptionStateFilter is a string enum. Allowed values for filtering by the current state of the subscription.

const (
	SubscriptionStateFilter_ACTIVE              SubscriptionStateFilter = "active"
	SubscriptionStateFilter_CANCELED            SubscriptionStateFilter = "canceled"
	SubscriptionStateFilter_EXPIRED             SubscriptionStateFilter = "expired"
	SubscriptionStateFilter_EXPIREDCARDS        SubscriptionStateFilter = "expired_cards"
	SubscriptionStateFilter_ONHOLD              SubscriptionStateFilter = "on_hold"
	SubscriptionStateFilter_PASTDUE             SubscriptionStateFilter = "past_due"
	SubscriptionStateFilter_PENDINGCANCELLATION SubscriptionStateFilter = "pending_cancellation"
	SubscriptionStateFilter_PENDINGRENEWAL      SubscriptionStateFilter = "pending_renewal"
	SubscriptionStateFilter_SUSPENDED           SubscriptionStateFilter = "suspended"
	SubscriptionStateFilter_TRIALENDED          SubscriptionStateFilter = "trial_ended"
	SubscriptionStateFilter_TRIALING            SubscriptionStateFilter = "trialing"
	SubscriptionStateFilter_UNPAID              SubscriptionStateFilter = "unpaid"
)

func (SubscriptionStateFilter) MarshalJSON added in v0.2.0

func (e SubscriptionStateFilter) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for SubscriptionStateFilter. It customizes the JSON marshaling process for SubscriptionStateFilter objects.

func (*SubscriptionStateFilter) UnmarshalJSON added in v0.2.0

func (e *SubscriptionStateFilter) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for SubscriptionStateFilter. It customizes the JSON unmarshaling process for SubscriptionStateFilter objects.

type TaxConfiguration

type TaxConfiguration struct {
	Kind               *TaxConfigurationKind  `json:"kind,omitempty"`
	DestinationAddress *TaxDestinationAddress `json:"destination_address,omitempty"`
	// Returns `true` when Chargify has been properly configured to charge tax using the specified tax system. More details about taxes: https://maxio-chargify.zendesk.com/hc/en-us/articles/5405488905869-Taxes-Introduction
	FullyConfigured      *bool          `json:"fully_configured,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

TaxConfiguration represents a TaxConfiguration struct.

func (TaxConfiguration) MarshalJSON

func (t TaxConfiguration) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for TaxConfiguration. It customizes the JSON marshaling process for TaxConfiguration objects.

func (*TaxConfiguration) UnmarshalJSON

func (t *TaxConfiguration) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for TaxConfiguration. It customizes the JSON unmarshaling process for TaxConfiguration objects.

type TaxConfigurationKind

type TaxConfigurationKind string

TaxConfigurationKind is a string enum.

const (
	TaxConfigurationKind_CUSTOM             TaxConfigurationKind = "custom"
	TaxConfigurationKind_ENUMMANAGEDAVALARA TaxConfigurationKind = "managed avalara"
	TaxConfigurationKind_ENUMLINKEDAVALARA  TaxConfigurationKind = "linked avalara"
	TaxConfigurationKind_ENUMDIGITALRIVER   TaxConfigurationKind = "digital river"
)

func (TaxConfigurationKind) MarshalJSON added in v0.2.0

func (e TaxConfigurationKind) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for TaxConfigurationKind. It customizes the JSON marshaling process for TaxConfigurationKind objects.

func (*TaxConfigurationKind) UnmarshalJSON added in v0.2.0

func (e *TaxConfigurationKind) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for TaxConfigurationKind. It customizes the JSON unmarshaling process for TaxConfigurationKind objects.

type TaxDestinationAddress

type TaxDestinationAddress string

TaxDestinationAddress is a string enum.

const (
	TaxDestinationAddress_SHIPPINGTHENBILLING TaxDestinationAddress = "shipping_then_billing"
	TaxDestinationAddress_BILLINGTHENSHIPPING TaxDestinationAddress = "billing_then_shipping"
	TaxDestinationAddress_SHIPPINGONLY        TaxDestinationAddress = "shipping_only"
	TaxDestinationAddress_BILLINGONLY         TaxDestinationAddress = "billing_only"
)

func (TaxDestinationAddress) MarshalJSON added in v0.2.0

func (e TaxDestinationAddress) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for TaxDestinationAddress. It customizes the JSON marshaling process for TaxDestinationAddress objects.

func (*TaxDestinationAddress) UnmarshalJSON added in v0.2.0

func (e *TaxDestinationAddress) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for TaxDestinationAddress. It customizes the JSON unmarshaling process for TaxDestinationAddress objects.

type TooManyManagementLinkRequests

type TooManyManagementLinkRequests struct {
	Error                string         `json:"error"`
	NewLinkAvailableAt   time.Time      `json:"new_link_available_at"`
	AdditionalProperties map[string]any `json:"_"`
}

TooManyManagementLinkRequests represents a TooManyManagementLinkRequests struct.

func (TooManyManagementLinkRequests) MarshalJSON

func (t TooManyManagementLinkRequests) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for TooManyManagementLinkRequests. It customizes the JSON marshaling process for TooManyManagementLinkRequests objects.

func (*TooManyManagementLinkRequests) UnmarshalJSON

func (t *TooManyManagementLinkRequests) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for TooManyManagementLinkRequests. It customizes the JSON unmarshaling process for TooManyManagementLinkRequests objects.

type UpdateAllocationExpirationDate

type UpdateAllocationExpirationDate struct {
	Allocation           *AllocationExpirationDate `json:"allocation,omitempty"`
	AdditionalProperties map[string]any            `json:"_"`
}

UpdateAllocationExpirationDate represents a UpdateAllocationExpirationDate struct.

func (UpdateAllocationExpirationDate) MarshalJSON

func (u UpdateAllocationExpirationDate) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateAllocationExpirationDate. It customizes the JSON marshaling process for UpdateAllocationExpirationDate objects.

func (*UpdateAllocationExpirationDate) UnmarshalJSON

func (u *UpdateAllocationExpirationDate) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateAllocationExpirationDate. It customizes the JSON unmarshaling process for UpdateAllocationExpirationDate objects.

type UpdateComponent

type UpdateComponent struct {
	Handle *string `json:"handle,omitempty"`
	// The name of the Component, suitable for display on statements. i.e. Text Messages.
	Name *string `json:"name,omitempty"`
	// The description of the component.
	Description    Optional[string] `json:"description"`
	AccountingCode Optional[string] `json:"accounting_code"`
	// Boolean flag describing whether a component is taxable or not.
	Taxable *bool `json:"taxable,omitempty"`
	// A string representing the tax code related to the component type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters.
	TaxCode Optional[string] `json:"tax_code"`
	// One of the following: Business Software, Consumer Software, Digital Services, Physical Goods, Other
	ItemCategory        Optional[ItemCategory] `json:"item_category"`
	DisplayOnHostedPage *bool                  `json:"display_on_hosted_page,omitempty"`
	// The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
	// Available values: `full`, `prorated`, `none`.
	UpgradeCharge        Optional[CreditType] `json:"upgrade_charge"`
	AdditionalProperties map[string]any       `json:"_"`
}

UpdateComponent represents a UpdateComponent struct.

func (UpdateComponent) MarshalJSON

func (u UpdateComponent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateComponent. It customizes the JSON marshaling process for UpdateComponent objects.

func (*UpdateComponent) UnmarshalJSON

func (u *UpdateComponent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateComponent. It customizes the JSON unmarshaling process for UpdateComponent objects.

type UpdateComponentPricePoint

type UpdateComponentPricePoint struct {
	Name   *string `json:"name,omitempty"`
	Handle *string `json:"handle,omitempty"`
	// The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes.
	PricingScheme *PricingScheme `json:"pricing_scheme,omitempty"`
	// Whether to use the site level exchange rate or define your own prices for each currency if you have multiple currencies defined on the site.
	UseSiteExchangeRate *bool `json:"use_site_exchange_rate,omitempty"`
	// Whether or not the price point includes tax
	TaxIncluded *bool `json:"tax_included,omitempty"`
	// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled.
	Interval *int `json:"interval,omitempty"`
	// A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled.
	IntervalUnit         *IntervalUnit  `json:"interval_unit,omitempty"`
	Prices               []UpdatePrice  `json:"prices,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

UpdateComponentPricePoint represents a UpdateComponentPricePoint struct.

func (UpdateComponentPricePoint) MarshalJSON

func (u UpdateComponentPricePoint) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateComponentPricePoint. It customizes the JSON marshaling process for UpdateComponentPricePoint objects.

func (*UpdateComponentPricePoint) UnmarshalJSON

func (u *UpdateComponentPricePoint) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateComponentPricePoint. It customizes the JSON unmarshaling process for UpdateComponentPricePoint objects.

type UpdateComponentPricePointRequest

type UpdateComponentPricePointRequest struct {
	PricePoint           *UpdateComponentPricePoint `json:"price_point,omitempty"`
	AdditionalProperties map[string]any             `json:"_"`
}

UpdateComponentPricePointRequest represents a UpdateComponentPricePointRequest struct.

func (UpdateComponentPricePointRequest) MarshalJSON

func (u UpdateComponentPricePointRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateComponentPricePointRequest. It customizes the JSON marshaling process for UpdateComponentPricePointRequest objects.

func (*UpdateComponentPricePointRequest) UnmarshalJSON

func (u *UpdateComponentPricePointRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateComponentPricePointRequest. It customizes the JSON unmarshaling process for UpdateComponentPricePointRequest objects.

type UpdateComponentRequest

type UpdateComponentRequest struct {
	Component            UpdateComponent `json:"component"`
	AdditionalProperties map[string]any  `json:"_"`
}

UpdateComponentRequest represents a UpdateComponentRequest struct.

func (UpdateComponentRequest) MarshalJSON

func (u UpdateComponentRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateComponentRequest. It customizes the JSON marshaling process for UpdateComponentRequest objects.

func (*UpdateComponentRequest) UnmarshalJSON

func (u *UpdateComponentRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateComponentRequest. It customizes the JSON unmarshaling process for UpdateComponentRequest objects.

type UpdateCouponCurrency

type UpdateCouponCurrency struct {
	// ISO code for the site defined currency.
	Currency string `json:"currency"`
	// Price for the given currency.
	Price                int            `json:"price"`
	AdditionalProperties map[string]any `json:"_"`
}

UpdateCouponCurrency represents a UpdateCouponCurrency struct.

func (UpdateCouponCurrency) MarshalJSON

func (u UpdateCouponCurrency) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateCouponCurrency. It customizes the JSON marshaling process for UpdateCouponCurrency objects.

func (*UpdateCouponCurrency) UnmarshalJSON

func (u *UpdateCouponCurrency) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateCouponCurrency. It customizes the JSON unmarshaling process for UpdateCouponCurrency objects.

type UpdateCurrencyPrice

type UpdateCurrencyPrice struct {
	// ID of the currency price record being updated
	Id int `json:"id"`
	// New price for the given currency
	Price                int            `json:"price"`
	AdditionalProperties map[string]any `json:"_"`
}

UpdateCurrencyPrice represents a UpdateCurrencyPrice struct.

func (UpdateCurrencyPrice) MarshalJSON

func (u UpdateCurrencyPrice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateCurrencyPrice. It customizes the JSON marshaling process for UpdateCurrencyPrice objects.

func (*UpdateCurrencyPrice) UnmarshalJSON

func (u *UpdateCurrencyPrice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateCurrencyPrice. It customizes the JSON unmarshaling process for UpdateCurrencyPrice objects.

type UpdateCurrencyPricesRequest

type UpdateCurrencyPricesRequest struct {
	CurrencyPrices       []UpdateCurrencyPrice `json:"currency_prices"`
	AdditionalProperties map[string]any        `json:"_"`
}

UpdateCurrencyPricesRequest represents a UpdateCurrencyPricesRequest struct.

func (UpdateCurrencyPricesRequest) MarshalJSON

func (u UpdateCurrencyPricesRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateCurrencyPricesRequest. It customizes the JSON marshaling process for UpdateCurrencyPricesRequest objects.

func (*UpdateCurrencyPricesRequest) UnmarshalJSON

func (u *UpdateCurrencyPricesRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateCurrencyPricesRequest. It customizes the JSON unmarshaling process for UpdateCurrencyPricesRequest objects.

type UpdateCustomer

type UpdateCustomer struct {
	FirstName    *string `json:"first_name,omitempty"`
	LastName     *string `json:"last_name,omitempty"`
	Email        *string `json:"email,omitempty"`
	CcEmails     *string `json:"cc_emails,omitempty"`
	Organization *string `json:"organization,omitempty"`
	Reference    *string `json:"reference,omitempty"`
	Address      *string `json:"address,omitempty"`
	Address2     *string `json:"address_2,omitempty"`
	City         *string `json:"city,omitempty"`
	State        *string `json:"state,omitempty"`
	Zip          *string `json:"zip,omitempty"`
	Country      *string `json:"country,omitempty"`
	Phone        *string `json:"phone,omitempty"`
	// Set a specific language on a customer record.
	Locale          *string       `json:"locale,omitempty"`
	VatNumber       *string       `json:"vat_number,omitempty"`
	TaxExempt       *bool         `json:"tax_exempt,omitempty"`
	TaxExemptReason *string       `json:"tax_exempt_reason,omitempty"`
	ParentId        Optional[int] `json:"parent_id"`
	// Is the customer verified to use ACH as a payment method. Available only on Authorize.Net gateway
	Verified             Optional[bool] `json:"verified"`
	AdditionalProperties map[string]any `json:"_"`
}

UpdateCustomer represents a UpdateCustomer struct.

func (UpdateCustomer) MarshalJSON

func (u UpdateCustomer) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateCustomer. It customizes the JSON marshaling process for UpdateCustomer objects.

func (*UpdateCustomer) UnmarshalJSON

func (u *UpdateCustomer) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateCustomer. It customizes the JSON unmarshaling process for UpdateCustomer objects.

type UpdateCustomerRequest

type UpdateCustomerRequest struct {
	Customer             UpdateCustomer `json:"customer"`
	AdditionalProperties map[string]any `json:"_"`
}

UpdateCustomerRequest represents a UpdateCustomerRequest struct.

func (UpdateCustomerRequest) MarshalJSON

func (u UpdateCustomerRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateCustomerRequest. It customizes the JSON marshaling process for UpdateCustomerRequest objects.

func (*UpdateCustomerRequest) UnmarshalJSON

func (u *UpdateCustomerRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateCustomerRequest. It customizes the JSON unmarshaling process for UpdateCustomerRequest objects.

type UpdateMetadata

type UpdateMetadata struct {
	CurrentName          *string        `json:"current_name,omitempty"`
	Name                 *string        `json:"name,omitempty"`
	Value                *string        `json:"value,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

UpdateMetadata represents a UpdateMetadata struct.

func (UpdateMetadata) MarshalJSON

func (u UpdateMetadata) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateMetadata. It customizes the JSON marshaling process for UpdateMetadata objects.

func (*UpdateMetadata) UnmarshalJSON

func (u *UpdateMetadata) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateMetadata. It customizes the JSON unmarshaling process for UpdateMetadata objects.

type UpdateMetadataRequest

type UpdateMetadataRequest struct {
	Metadata             *UpdateMetadata `json:"metadata,omitempty"`
	AdditionalProperties map[string]any  `json:"_"`
}

UpdateMetadataRequest represents a UpdateMetadataRequest struct.

func (UpdateMetadataRequest) MarshalJSON

func (u UpdateMetadataRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateMetadataRequest. It customizes the JSON marshaling process for UpdateMetadataRequest objects.

func (*UpdateMetadataRequest) UnmarshalJSON

func (u *UpdateMetadataRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateMetadataRequest. It customizes the JSON unmarshaling process for UpdateMetadataRequest objects.

type UpdateMetafield added in v0.1.0

type UpdateMetafield struct {
	CurrentName *string `json:"current_name,omitempty"`
	Name        *string `json:"name,omitempty"`
	// Warning: When updating a metafield's scope attribute, all scope attributes must be passed. Partially complete scope attributes will override the existing settings.
	Scope *MetafieldScope `json:"scope,omitempty"`
	// Indicates how data should be added to the metafield. For example, a text type is just a string, so a given metafield of this type can have any value attached. On the other hand, dropdown and radio have a set of allowed values that can be input, and appear differently on a Public Signup Page. Defaults to 'text'
	InputType *MetafieldInput `json:"input_type,omitempty"`
	// Only applicable when input_type is radio or dropdown
	Enum                 []string       `json:"enum,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

UpdateMetafield represents a UpdateMetafield struct.

func (UpdateMetafield) MarshalJSON added in v0.1.0

func (u UpdateMetafield) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateMetafield. It customizes the JSON marshaling process for UpdateMetafield objects.

func (*UpdateMetafield) UnmarshalJSON added in v0.1.0

func (u *UpdateMetafield) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateMetafield. It customizes the JSON unmarshaling process for UpdateMetafield objects.

type UpdateMetafieldsRequest

type UpdateMetafieldsRequest struct {
	Metafields           *UpdateMetafieldsRequestMetafields `json:"metafields,omitempty"`
	AdditionalProperties map[string]any                     `json:"_"`
}

UpdateMetafieldsRequest represents a UpdateMetafieldsRequest struct.

func (UpdateMetafieldsRequest) MarshalJSON

func (u UpdateMetafieldsRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateMetafieldsRequest. It customizes the JSON marshaling process for UpdateMetafieldsRequest objects.

func (*UpdateMetafieldsRequest) UnmarshalJSON

func (u *UpdateMetafieldsRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateMetafieldsRequest. It customizes the JSON unmarshaling process for UpdateMetafieldsRequest objects.

type UpdateMetafieldsRequestMetafields added in v0.1.0

type UpdateMetafieldsRequestMetafields struct {
	// contains filtered or unexported fields
}

UpdateMetafieldsRequestMetafields represents a UpdateMetafieldsRequestMetafields struct. This is a container for one-of cases.

func (*UpdateMetafieldsRequestMetafields) AsArrayOfUpdateMetafield added in v0.1.0

func (u *UpdateMetafieldsRequestMetafields) AsArrayOfUpdateMetafield() (
	*[]UpdateMetafield,
	bool)

func (*UpdateMetafieldsRequestMetafields) AsUpdateMetafield added in v0.1.0

func (u *UpdateMetafieldsRequestMetafields) AsUpdateMetafield() (
	*UpdateMetafield,
	bool)

func (UpdateMetafieldsRequestMetafields) MarshalJSON added in v0.1.0

func (u UpdateMetafieldsRequestMetafields) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateMetafieldsRequestMetafields. It customizes the JSON marshaling process for UpdateMetafieldsRequestMetafields objects.

func (UpdateMetafieldsRequestMetafields) String added in v0.1.0

String converts the UpdateMetafieldsRequestMetafields object to a string representation.

func (*UpdateMetafieldsRequestMetafields) UnmarshalJSON added in v0.1.0

func (u *UpdateMetafieldsRequestMetafields) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateMetafieldsRequestMetafields. It customizes the JSON unmarshaling process for UpdateMetafieldsRequestMetafields objects.

type UpdatePaymentProfile

type UpdatePaymentProfile struct {
	// The first name of the card holder.
	FirstName *string `json:"first_name,omitempty"`
	// The last name of the card holder.
	LastName *string `json:"last_name,omitempty"`
	// The full credit card number
	FullNumber *string `json:"full_number,omitempty"`
	// The type of card used.
	CardType *CardType `json:"card_type,omitempty"`
	// (Optional when performing an Import via vault_token, required otherwise) The 1- or 2-digit credit card expiration month, as an integer or string, i.e. 5
	ExpirationMonth *string `json:"expiration_month,omitempty"`
	// (Optional when performing a Import via vault_token, required otherwise) The 4-digit credit card expiration year, as an integer or string, i.e. 2012
	ExpirationYear *string `json:"expiration_year,omitempty"`
	// The vault that stores the payment profile with the provided `vault_token`. Use `bogus` for testing.
	CurrentVault *CurrentVault `json:"current_vault,omitempty"`
	// The credit card or bank account billing street address (i.e. 123 Main St.). This value is merely passed through to the payment gateway.
	BillingAddress *string `json:"billing_address,omitempty"`
	// The credit card or bank account billing address city (i.e. “Boston”). This value is merely passed through to the payment gateway.
	BillingCity *string `json:"billing_city,omitempty"`
	// The credit card or bank account billing address state (i.e. MA). This value is merely passed through to the payment gateway. This must conform to the [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes.
	BillingState *string `json:"billing_state,omitempty"`
	// The credit card or bank account billing address zip code (i.e. 12345). This value is merely passed through to the payment gateway.
	BillingZip *string `json:"billing_zip,omitempty"`
	// The credit card or bank account billing address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (i.e. “US”). This value is merely passed through to the payment gateway. Some gateways require country codes in a specific format. Please check your gateway’s documentation. If creating an ACH subscription, only US is supported at this time.
	BillingCountry *string `json:"billing_country,omitempty"`
	// Second line of the customer’s billing address i.e. Apt. 100
	BillingAddress2      Optional[string] `json:"billing_address_2"`
	AdditionalProperties map[string]any   `json:"_"`
}

UpdatePaymentProfile represents a UpdatePaymentProfile struct.

func (UpdatePaymentProfile) MarshalJSON

func (u UpdatePaymentProfile) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdatePaymentProfile. It customizes the JSON marshaling process for UpdatePaymentProfile objects.

func (*UpdatePaymentProfile) UnmarshalJSON

func (u *UpdatePaymentProfile) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdatePaymentProfile. It customizes the JSON unmarshaling process for UpdatePaymentProfile objects.

type UpdatePaymentProfileRequest

type UpdatePaymentProfileRequest struct {
	PaymentProfile       UpdatePaymentProfile `json:"payment_profile"`
	AdditionalProperties map[string]any       `json:"_"`
}

UpdatePaymentProfileRequest represents a UpdatePaymentProfileRequest struct.

func (UpdatePaymentProfileRequest) MarshalJSON

func (u UpdatePaymentProfileRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdatePaymentProfileRequest. It customizes the JSON marshaling process for UpdatePaymentProfileRequest objects.

func (*UpdatePaymentProfileRequest) UnmarshalJSON

func (u *UpdatePaymentProfileRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdatePaymentProfileRequest. It customizes the JSON unmarshaling process for UpdatePaymentProfileRequest objects.

type UpdatePrice

type UpdatePrice struct {
	Id             *int                       `json:"id,omitempty"`
	EndingQuantity *UpdatePriceEndingQuantity `json:"ending_quantity,omitempty"`
	// The price can contain up to 8 decimal places. i.e. 1.00 or 0.0012 or 0.00000065
	UnitPrice            *UpdatePriceUnitPrice        `json:"unit_price,omitempty"`
	Destroy              *bool                        `json:"_destroy,omitempty"`
	StartingQuantity     *UpdatePriceStartingQuantity `json:"starting_quantity,omitempty"`
	AdditionalProperties map[string]any               `json:"_"`
}

UpdatePrice represents a UpdatePrice struct.

func (UpdatePrice) MarshalJSON

func (u UpdatePrice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdatePrice. It customizes the JSON marshaling process for UpdatePrice objects.

func (*UpdatePrice) UnmarshalJSON

func (u *UpdatePrice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdatePrice. It customizes the JSON unmarshaling process for UpdatePrice objects.

type UpdatePriceEndingQuantity added in v0.1.0

type UpdatePriceEndingQuantity struct {
	// contains filtered or unexported fields
}

UpdatePriceEndingQuantity represents a UpdatePriceEndingQuantity struct. This is a container for one-of cases.

func (*UpdatePriceEndingQuantity) AsNumber added in v0.1.0

func (u *UpdatePriceEndingQuantity) AsNumber() (
	*int,
	bool)

func (*UpdatePriceEndingQuantity) AsString added in v0.1.0

func (u *UpdatePriceEndingQuantity) AsString() (
	*string,
	bool)

func (UpdatePriceEndingQuantity) MarshalJSON added in v0.1.0

func (u UpdatePriceEndingQuantity) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdatePriceEndingQuantity. It customizes the JSON marshaling process for UpdatePriceEndingQuantity objects.

func (UpdatePriceEndingQuantity) String added in v0.1.0

func (u UpdatePriceEndingQuantity) String() string

String converts the UpdatePriceEndingQuantity object to a string representation.

func (*UpdatePriceEndingQuantity) UnmarshalJSON added in v0.1.0

func (u *UpdatePriceEndingQuantity) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdatePriceEndingQuantity. It customizes the JSON unmarshaling process for UpdatePriceEndingQuantity objects.

type UpdatePriceStartingQuantity added in v0.1.0

type UpdatePriceStartingQuantity struct {
	// contains filtered or unexported fields
}

UpdatePriceStartingQuantity represents a UpdatePriceStartingQuantity struct. This is a container for one-of cases.

func (*UpdatePriceStartingQuantity) AsNumber added in v0.1.0

func (u *UpdatePriceStartingQuantity) AsNumber() (
	*int,
	bool)

func (*UpdatePriceStartingQuantity) AsString added in v0.1.0

func (u *UpdatePriceStartingQuantity) AsString() (
	*string,
	bool)

func (UpdatePriceStartingQuantity) MarshalJSON added in v0.1.0

func (u UpdatePriceStartingQuantity) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdatePriceStartingQuantity. It customizes the JSON marshaling process for UpdatePriceStartingQuantity objects.

func (UpdatePriceStartingQuantity) String added in v0.1.0

String converts the UpdatePriceStartingQuantity object to a string representation.

func (*UpdatePriceStartingQuantity) UnmarshalJSON added in v0.1.0

func (u *UpdatePriceStartingQuantity) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdatePriceStartingQuantity. It customizes the JSON unmarshaling process for UpdatePriceStartingQuantity objects.

type UpdatePriceUnitPrice added in v0.1.0

type UpdatePriceUnitPrice struct {
	// contains filtered or unexported fields
}

UpdatePriceUnitPrice represents a UpdatePriceUnitPrice struct. This is a container for one-of cases.

func (*UpdatePriceUnitPrice) AsPrecision added in v0.1.0

func (u *UpdatePriceUnitPrice) AsPrecision() (
	*float64,
	bool)

func (*UpdatePriceUnitPrice) AsString added in v0.1.0

func (u *UpdatePriceUnitPrice) AsString() (
	*string,
	bool)

func (UpdatePriceUnitPrice) MarshalJSON added in v0.1.0

func (u UpdatePriceUnitPrice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdatePriceUnitPrice. It customizes the JSON marshaling process for UpdatePriceUnitPrice objects.

func (UpdatePriceUnitPrice) String added in v0.1.0

func (u UpdatePriceUnitPrice) String() string

String converts the UpdatePriceUnitPrice object to a string representation.

func (*UpdatePriceUnitPrice) UnmarshalJSON added in v0.1.0

func (u *UpdatePriceUnitPrice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdatePriceUnitPrice. It customizes the JSON unmarshaling process for UpdatePriceUnitPrice objects.

type UpdateProductPricePoint

type UpdateProductPricePoint struct {
	Handle               *string        `json:"handle,omitempty"`
	PriceInCents         *int64         `json:"price_in_cents,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

UpdateProductPricePoint represents a UpdateProductPricePoint struct.

func (UpdateProductPricePoint) MarshalJSON

func (u UpdateProductPricePoint) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateProductPricePoint. It customizes the JSON marshaling process for UpdateProductPricePoint objects.

func (*UpdateProductPricePoint) UnmarshalJSON

func (u *UpdateProductPricePoint) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateProductPricePoint. It customizes the JSON unmarshaling process for UpdateProductPricePoint objects.

type UpdateProductPricePointPricePointId added in v0.1.0

type UpdateProductPricePointPricePointId struct {
	// contains filtered or unexported fields
}

UpdateProductPricePointPricePointId represents a UpdateProductPricePointPricePointId struct. This is a container for one-of cases.

func (*UpdateProductPricePointPricePointId) AsNumber added in v0.1.0

func (u *UpdateProductPricePointPricePointId) AsNumber() (
	*int,
	bool)

func (*UpdateProductPricePointPricePointId) AsString added in v0.1.0

func (u *UpdateProductPricePointPricePointId) AsString() (
	*string,
	bool)

func (UpdateProductPricePointPricePointId) MarshalJSON added in v0.1.0

func (u UpdateProductPricePointPricePointId) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateProductPricePointPricePointId. It customizes the JSON marshaling process for UpdateProductPricePointPricePointId objects.

func (UpdateProductPricePointPricePointId) String added in v0.1.0

String converts the UpdateProductPricePointPricePointId object to a string representation.

func (*UpdateProductPricePointPricePointId) UnmarshalJSON added in v0.1.0

func (u *UpdateProductPricePointPricePointId) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateProductPricePointPricePointId. It customizes the JSON unmarshaling process for UpdateProductPricePointPricePointId objects.

type UpdateProductPricePointProductId added in v0.1.0

type UpdateProductPricePointProductId struct {
	// contains filtered or unexported fields
}

UpdateProductPricePointProductId represents a UpdateProductPricePointProductId struct. This is a container for one-of cases.

func (*UpdateProductPricePointProductId) AsNumber added in v0.1.0

func (u *UpdateProductPricePointProductId) AsNumber() (
	*int,
	bool)

func (*UpdateProductPricePointProductId) AsString added in v0.1.0

func (u *UpdateProductPricePointProductId) AsString() (
	*string,
	bool)

func (UpdateProductPricePointProductId) MarshalJSON added in v0.1.0

func (u UpdateProductPricePointProductId) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateProductPricePointProductId. It customizes the JSON marshaling process for UpdateProductPricePointProductId objects.

func (UpdateProductPricePointProductId) String added in v0.1.0

String converts the UpdateProductPricePointProductId object to a string representation.

func (*UpdateProductPricePointProductId) UnmarshalJSON added in v0.1.0

func (u *UpdateProductPricePointProductId) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateProductPricePointProductId. It customizes the JSON unmarshaling process for UpdateProductPricePointProductId objects.

type UpdateProductPricePointRequest

type UpdateProductPricePointRequest struct {
	PricePoint           UpdateProductPricePoint `json:"price_point"`
	AdditionalProperties map[string]any          `json:"_"`
}

UpdateProductPricePointRequest represents a UpdateProductPricePointRequest struct.

func (UpdateProductPricePointRequest) MarshalJSON

func (u UpdateProductPricePointRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateProductPricePointRequest. It customizes the JSON marshaling process for UpdateProductPricePointRequest objects.

func (*UpdateProductPricePointRequest) UnmarshalJSON

func (u *UpdateProductPricePointRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateProductPricePointRequest. It customizes the JSON unmarshaling process for UpdateProductPricePointRequest objects.

type UpdateReasonCode

type UpdateReasonCode struct {
	// The unique identifier for the ReasonCode
	Code *string `json:"code,omitempty"`
	// The friendly summary of what the code signifies
	Description *string `json:"description,omitempty"`
	// The order that code appears in lists
	Position             *int           `json:"position,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

UpdateReasonCode represents a UpdateReasonCode struct.

func (UpdateReasonCode) MarshalJSON

func (u UpdateReasonCode) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateReasonCode. It customizes the JSON marshaling process for UpdateReasonCode objects.

func (*UpdateReasonCode) UnmarshalJSON

func (u *UpdateReasonCode) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateReasonCode. It customizes the JSON unmarshaling process for UpdateReasonCode objects.

type UpdateReasonCodeRequest

type UpdateReasonCodeRequest struct {
	ReasonCode           UpdateReasonCode `json:"reason_code"`
	AdditionalProperties map[string]any   `json:"_"`
}

UpdateReasonCodeRequest represents a UpdateReasonCodeRequest struct.

func (UpdateReasonCodeRequest) MarshalJSON

func (u UpdateReasonCodeRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateReasonCodeRequest. It customizes the JSON marshaling process for UpdateReasonCodeRequest objects.

func (*UpdateReasonCodeRequest) UnmarshalJSON

func (u *UpdateReasonCodeRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateReasonCodeRequest. It customizes the JSON unmarshaling process for UpdateReasonCodeRequest objects.

type UpdateSegment

type UpdateSegment struct {
	// The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes.
	PricingScheme        PricingScheme                `json:"pricing_scheme"`
	Prices               []CreateOrUpdateSegmentPrice `json:"prices,omitempty"`
	AdditionalProperties map[string]any               `json:"_"`
}

UpdateSegment represents a UpdateSegment struct.

func (UpdateSegment) MarshalJSON

func (u UpdateSegment) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateSegment. It customizes the JSON marshaling process for UpdateSegment objects.

func (*UpdateSegment) UnmarshalJSON

func (u *UpdateSegment) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateSegment. It customizes the JSON unmarshaling process for UpdateSegment objects.

type UpdateSegmentRequest

type UpdateSegmentRequest struct {
	Segment              UpdateSegment  `json:"segment"`
	AdditionalProperties map[string]any `json:"_"`
}

UpdateSegmentRequest represents a UpdateSegmentRequest struct.

func (UpdateSegmentRequest) MarshalJSON

func (u UpdateSegmentRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateSegmentRequest. It customizes the JSON marshaling process for UpdateSegmentRequest objects.

func (*UpdateSegmentRequest) UnmarshalJSON

func (u *UpdateSegmentRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateSegmentRequest. It customizes the JSON unmarshaling process for UpdateSegmentRequest objects.

type UpdateSubscription

type UpdateSubscription struct {
	CreditCardAttributes *CreditCardAttributes `json:"credit_card_attributes,omitempty"`
	// Set to the handle of a different product to change the subscription's product
	ProductHandle *string `json:"product_handle,omitempty"`
	// Set to the id of a different product to change the subscription's product
	ProductId            *int  `json:"product_id,omitempty"`
	ProductChangeDelayed *bool `json:"product_change_delayed,omitempty"`
	// Set to an empty string to cancel a delayed product change.
	NextProductId           *string `json:"next_product_id,omitempty"`
	NextProductPricePointId *string `json:"next_product_price_point_id,omitempty"`
	// Use for subscriptions with product eligible for calendar billing only. Value can be 1-28 or 'end'.
	SnapDay                       *UpdateSubscriptionSnapDay  `json:"snap_day,omitempty"`
	NextBillingAt                 *time.Time                  `json:"next_billing_at,omitempty"`
	PaymentCollectionMethod       *string                     `json:"payment_collection_method,omitempty"`
	ReceivesInvoiceEmails         *bool                       `json:"receives_invoice_emails,omitempty"`
	NetTerms                      *UpdateSubscriptionNetTerms `json:"net_terms,omitempty"`
	StoredCredentialTransactionId *int                        `json:"stored_credential_transaction_id,omitempty"`
	Reference                     *string                     `json:"reference,omitempty"`
	// (Optional) Used in place of `product_price_point_id` to define a custom price point unique to the subscription
	CustomPrice *SubscriptionCustomPrice `json:"custom_price,omitempty"`
	// (Optional) An array of component ids and custom prices to be added to the subscription.
	Components []UpdateSubscriptionComponent `json:"components,omitempty"`
	// Enable Communication Delay feature, making sure no communication (email or SMS) is sent to the Customer between 9PM and 8AM in time zone set by the `dunning_communication_delay_time_zone` attribute.
	DunningCommunicationDelayEnabled Optional[bool] `json:"dunning_communication_delay_enabled"`
	// Time zone for the Dunning Communication Delay feature.
	DunningCommunicationDelayTimeZone Optional[string] `json:"dunning_communication_delay_time_zone"`
	AdditionalProperties              map[string]any   `json:"_"`
}

UpdateSubscription represents a UpdateSubscription struct.

func (UpdateSubscription) MarshalJSON

func (u UpdateSubscription) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateSubscription. It customizes the JSON marshaling process for UpdateSubscription objects.

func (*UpdateSubscription) UnmarshalJSON

func (u *UpdateSubscription) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateSubscription. It customizes the JSON unmarshaling process for UpdateSubscription objects.

type UpdateSubscriptionComponent

type UpdateSubscriptionComponent struct {
	ComponentId *int `json:"component_id,omitempty"`
	// Create or update custom pricing unique to the subscription. Used in place of `price_point_id`.
	CustomPrice          *ComponentCustomPrice `json:"custom_price,omitempty"`
	AdditionalProperties map[string]any        `json:"_"`
}

UpdateSubscriptionComponent represents a UpdateSubscriptionComponent struct.

func (UpdateSubscriptionComponent) MarshalJSON

func (u UpdateSubscriptionComponent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateSubscriptionComponent. It customizes the JSON marshaling process for UpdateSubscriptionComponent objects.

func (*UpdateSubscriptionComponent) UnmarshalJSON

func (u *UpdateSubscriptionComponent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateSubscriptionComponent. It customizes the JSON unmarshaling process for UpdateSubscriptionComponent objects.

type UpdateSubscriptionGroup

type UpdateSubscriptionGroup struct {
	MemberIds            []int          `json:"member_ids,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

UpdateSubscriptionGroup represents a UpdateSubscriptionGroup struct.

func (UpdateSubscriptionGroup) MarshalJSON

func (u UpdateSubscriptionGroup) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateSubscriptionGroup. It customizes the JSON marshaling process for UpdateSubscriptionGroup objects.

func (*UpdateSubscriptionGroup) UnmarshalJSON

func (u *UpdateSubscriptionGroup) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateSubscriptionGroup. It customizes the JSON unmarshaling process for UpdateSubscriptionGroup objects.

type UpdateSubscriptionGroupRequest

type UpdateSubscriptionGroupRequest struct {
	SubscriptionGroup    UpdateSubscriptionGroup `json:"subscription_group"`
	AdditionalProperties map[string]any          `json:"_"`
}

UpdateSubscriptionGroupRequest represents a UpdateSubscriptionGroupRequest struct.

func (UpdateSubscriptionGroupRequest) MarshalJSON

func (u UpdateSubscriptionGroupRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateSubscriptionGroupRequest. It customizes the JSON marshaling process for UpdateSubscriptionGroupRequest objects.

func (*UpdateSubscriptionGroupRequest) UnmarshalJSON

func (u *UpdateSubscriptionGroupRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateSubscriptionGroupRequest. It customizes the JSON unmarshaling process for UpdateSubscriptionGroupRequest objects.

type UpdateSubscriptionNetTerms added in v0.1.0

type UpdateSubscriptionNetTerms struct {
	// contains filtered or unexported fields
}

UpdateSubscriptionNetTerms represents a UpdateSubscriptionNetTerms struct. This is a container for one-of cases.

func (*UpdateSubscriptionNetTerms) AsNumber added in v0.1.0

func (u *UpdateSubscriptionNetTerms) AsNumber() (
	*int,
	bool)

func (*UpdateSubscriptionNetTerms) AsString added in v0.1.0

func (u *UpdateSubscriptionNetTerms) AsString() (
	*string,
	bool)

func (UpdateSubscriptionNetTerms) MarshalJSON added in v0.1.0

func (u UpdateSubscriptionNetTerms) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateSubscriptionNetTerms. It customizes the JSON marshaling process for UpdateSubscriptionNetTerms objects.

func (UpdateSubscriptionNetTerms) String added in v0.1.0

String converts the UpdateSubscriptionNetTerms object to a string representation.

func (*UpdateSubscriptionNetTerms) UnmarshalJSON added in v0.1.0

func (u *UpdateSubscriptionNetTerms) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateSubscriptionNetTerms. It customizes the JSON unmarshaling process for UpdateSubscriptionNetTerms objects.

type UpdateSubscriptionNote

type UpdateSubscriptionNote struct {
	Body                 string         `json:"body"`
	Sticky               bool           `json:"sticky"`
	AdditionalProperties map[string]any `json:"_"`
}

UpdateSubscriptionNote represents a UpdateSubscriptionNote struct. Updatable fields for Subscription Note

func (UpdateSubscriptionNote) MarshalJSON

func (u UpdateSubscriptionNote) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateSubscriptionNote. It customizes the JSON marshaling process for UpdateSubscriptionNote objects.

func (*UpdateSubscriptionNote) UnmarshalJSON

func (u *UpdateSubscriptionNote) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateSubscriptionNote. It customizes the JSON unmarshaling process for UpdateSubscriptionNote objects.

type UpdateSubscriptionNoteRequest

type UpdateSubscriptionNoteRequest struct {
	// Updatable fields for Subscription Note
	Note                 UpdateSubscriptionNote `json:"note"`
	AdditionalProperties map[string]any         `json:"_"`
}

UpdateSubscriptionNoteRequest represents a UpdateSubscriptionNoteRequest struct. Updatable fields for Subscription Note

func (UpdateSubscriptionNoteRequest) MarshalJSON

func (u UpdateSubscriptionNoteRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateSubscriptionNoteRequest. It customizes the JSON marshaling process for UpdateSubscriptionNoteRequest objects.

func (*UpdateSubscriptionNoteRequest) UnmarshalJSON

func (u *UpdateSubscriptionNoteRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateSubscriptionNoteRequest. It customizes the JSON unmarshaling process for UpdateSubscriptionNoteRequest objects.

type UpdateSubscriptionRequest

type UpdateSubscriptionRequest struct {
	Subscription         UpdateSubscription `json:"subscription"`
	AdditionalProperties map[string]any     `json:"_"`
}

UpdateSubscriptionRequest represents a UpdateSubscriptionRequest struct.

func (UpdateSubscriptionRequest) MarshalJSON

func (u UpdateSubscriptionRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateSubscriptionRequest. It customizes the JSON marshaling process for UpdateSubscriptionRequest objects.

func (*UpdateSubscriptionRequest) UnmarshalJSON

func (u *UpdateSubscriptionRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateSubscriptionRequest. It customizes the JSON unmarshaling process for UpdateSubscriptionRequest objects.

type UpdateSubscriptionSnapDay added in v0.1.0

type UpdateSubscriptionSnapDay struct {
	// contains filtered or unexported fields
}

UpdateSubscriptionSnapDay represents a UpdateSubscriptionSnapDay struct. This is a container for one-of cases.

func (*UpdateSubscriptionSnapDay) AsNumber added in v0.1.0

func (u *UpdateSubscriptionSnapDay) AsNumber() (
	*int,
	bool)

func (*UpdateSubscriptionSnapDay) AsSnapDay added in v0.1.0

func (u *UpdateSubscriptionSnapDay) AsSnapDay() (
	*SnapDay,
	bool)

func (UpdateSubscriptionSnapDay) MarshalJSON added in v0.1.0

func (u UpdateSubscriptionSnapDay) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpdateSubscriptionSnapDay. It customizes the JSON marshaling process for UpdateSubscriptionSnapDay objects.

func (UpdateSubscriptionSnapDay) String added in v0.1.0

func (u UpdateSubscriptionSnapDay) String() string

String converts the UpdateSubscriptionSnapDay object to a string representation.

func (*UpdateSubscriptionSnapDay) UnmarshalJSON added in v0.1.0

func (u *UpdateSubscriptionSnapDay) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpdateSubscriptionSnapDay. It customizes the JSON unmarshaling process for UpdateSubscriptionSnapDay objects.

type UpsertPrepaidConfiguration

type UpsertPrepaidConfiguration struct {
	InitialFundingAmountInCents     *int64         `json:"initial_funding_amount_in_cents,omitempty"`
	ReplenishToAmountInCents        *int64         `json:"replenish_to_amount_in_cents,omitempty"`
	AutoReplenish                   *bool          `json:"auto_replenish,omitempty"`
	ReplenishThresholdAmountInCents *int64         `json:"replenish_threshold_amount_in_cents,omitempty"`
	AdditionalProperties            map[string]any `json:"_"`
}

UpsertPrepaidConfiguration represents a UpsertPrepaidConfiguration struct.

func (UpsertPrepaidConfiguration) MarshalJSON

func (u UpsertPrepaidConfiguration) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpsertPrepaidConfiguration. It customizes the JSON marshaling process for UpsertPrepaidConfiguration objects.

func (*UpsertPrepaidConfiguration) UnmarshalJSON

func (u *UpsertPrepaidConfiguration) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpsertPrepaidConfiguration. It customizes the JSON unmarshaling process for UpsertPrepaidConfiguration objects.

type UpsertPrepaidConfigurationRequest

type UpsertPrepaidConfigurationRequest struct {
	PrepaidConfiguration UpsertPrepaidConfiguration `json:"prepaid_configuration"`
	AdditionalProperties map[string]any             `json:"_"`
}

UpsertPrepaidConfigurationRequest represents a UpsertPrepaidConfigurationRequest struct.

func (UpsertPrepaidConfigurationRequest) MarshalJSON

func (u UpsertPrepaidConfigurationRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UpsertPrepaidConfigurationRequest. It customizes the JSON marshaling process for UpsertPrepaidConfigurationRequest objects.

func (*UpsertPrepaidConfigurationRequest) UnmarshalJSON

func (u *UpsertPrepaidConfigurationRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UpsertPrepaidConfigurationRequest. It customizes the JSON unmarshaling process for UpsertPrepaidConfigurationRequest objects.

type Usage

type Usage struct {
	Id                   *int64           `json:"id,omitempty"`
	Memo                 Optional[string] `json:"memo"`
	CreatedAt            *time.Time       `json:"created_at,omitempty"`
	PricePointId         *int             `json:"price_point_id,omitempty"`
	Quantity             *UsageQuantity   `json:"quantity,omitempty"`
	OverageQuantity      *int             `json:"overage_quantity,omitempty"`
	ComponentId          *int             `json:"component_id,omitempty"`
	ComponentHandle      *string          `json:"component_handle,omitempty"`
	SubscriptionId       *int             `json:"subscription_id,omitempty"`
	AdditionalProperties map[string]any   `json:"_"`
}

Usage represents a Usage struct.

func (Usage) MarshalJSON

func (u Usage) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Usage. It customizes the JSON marshaling process for Usage objects.

func (*Usage) UnmarshalJSON

func (u *Usage) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Usage. It customizes the JSON unmarshaling process for Usage objects.

type UsageQuantity added in v0.1.0

type UsageQuantity struct {
	// contains filtered or unexported fields
}

UsageQuantity represents a UsageQuantity struct. This is a container for one-of cases.

func (*UsageQuantity) AsNumber added in v0.1.0

func (u *UsageQuantity) AsNumber() (
	*int,
	bool)

func (*UsageQuantity) AsString added in v0.1.0

func (u *UsageQuantity) AsString() (
	*string,
	bool)

func (UsageQuantity) MarshalJSON added in v0.1.0

func (u UsageQuantity) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UsageQuantity. It customizes the JSON marshaling process for UsageQuantity objects.

func (UsageQuantity) String added in v0.1.0

func (u UsageQuantity) String() string

String converts the UsageQuantity object to a string representation.

func (*UsageQuantity) UnmarshalJSON added in v0.1.0

func (u *UsageQuantity) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UsageQuantity. It customizes the JSON unmarshaling process for UsageQuantity objects.

type UsageResponse

type UsageResponse struct {
	Usage                Usage          `json:"usage"`
	AdditionalProperties map[string]any `json:"_"`
}

UsageResponse represents a UsageResponse struct.

func (UsageResponse) MarshalJSON

func (u UsageResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for UsageResponse. It customizes the JSON marshaling process for UsageResponse objects.

func (*UsageResponse) UnmarshalJSON

func (u *UsageResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for UsageResponse. It customizes the JSON unmarshaling process for UsageResponse objects.

type VoidInvoice

type VoidInvoice struct {
	Reason               string         `json:"reason"`
	AdditionalProperties map[string]any `json:"_"`
}

VoidInvoice represents a VoidInvoice struct.

func (VoidInvoice) MarshalJSON

func (v VoidInvoice) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for VoidInvoice. It customizes the JSON marshaling process for VoidInvoice objects.

func (*VoidInvoice) UnmarshalJSON

func (v *VoidInvoice) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for VoidInvoice. It customizes the JSON unmarshaling process for VoidInvoice objects.

type VoidInvoiceEvent added in v0.2.0

type VoidInvoiceEvent struct {
	Id        int64            `json:"id"`
	Timestamp time.Time        `json:"timestamp"`
	Invoice   Invoice          `json:"invoice"`
	EventType InvoiceEventType `json:"event_type"`
	// Example schema for an `void_invoice` event
	EventData            VoidInvoiceEventData `json:"event_data"`
	AdditionalProperties map[string]any       `json:"_"`
}

VoidInvoiceEvent represents a VoidInvoiceEvent struct.

func (VoidInvoiceEvent) MarshalJSON added in v0.2.0

func (v VoidInvoiceEvent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for VoidInvoiceEvent. It customizes the JSON marshaling process for VoidInvoiceEvent objects.

func (*VoidInvoiceEvent) UnmarshalJSON added in v0.2.0

func (v *VoidInvoiceEvent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for VoidInvoiceEvent. It customizes the JSON unmarshaling process for VoidInvoiceEvent objects.

type VoidInvoiceEventData added in v0.1.0

type VoidInvoiceEventData struct {
	CreditNoteAttributes *CreditNote `json:"credit_note_attributes"`
	// The memo provided during invoice voiding.
	Memo *string `json:"memo"`
	// The amount of the void.
	AppliedAmount *string `json:"applied_amount"`
	// The time the refund was applied, in ISO 8601 format, i.e. "2019-06-07T17:20:06Z"
	TransactionTime *time.Time `json:"transaction_time"`
	// If true, the invoice is an advance invoice.
	IsAdvanceInvoice bool `json:"is_advance_invoice"`
	// The reason for the void.
	Reason               string         `json:"reason"`
	AdditionalProperties map[string]any `json:"_"`
}

VoidInvoiceEventData represents a VoidInvoiceEventData struct. Example schema for an `void_invoice` event

func (VoidInvoiceEventData) MarshalJSON added in v0.1.0

func (v VoidInvoiceEventData) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for VoidInvoiceEventData. It customizes the JSON marshaling process for VoidInvoiceEventData objects.

func (*VoidInvoiceEventData) UnmarshalJSON added in v0.1.0

func (v *VoidInvoiceEventData) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for VoidInvoiceEventData. It customizes the JSON unmarshaling process for VoidInvoiceEventData objects.

type VoidInvoiceRequest

type VoidInvoiceRequest struct {
	Void                 VoidInvoice    `json:"void"`
	AdditionalProperties map[string]any `json:"_"`
}

VoidInvoiceRequest represents a VoidInvoiceRequest struct.

func (VoidInvoiceRequest) MarshalJSON

func (v VoidInvoiceRequest) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for VoidInvoiceRequest. It customizes the JSON marshaling process for VoidInvoiceRequest objects.

func (*VoidInvoiceRequest) UnmarshalJSON

func (v *VoidInvoiceRequest) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for VoidInvoiceRequest. It customizes the JSON unmarshaling process for VoidInvoiceRequest objects.

type VoidRemainderEvent added in v0.2.0

type VoidRemainderEvent struct {
	Id        int64            `json:"id"`
	Timestamp time.Time        `json:"timestamp"`
	Invoice   Invoice          `json:"invoice"`
	EventType InvoiceEventType `json:"event_type"`
	// Example schema for an `void_remainder` event
	EventData            VoidRemainderEventData `json:"event_data"`
	AdditionalProperties map[string]any         `json:"_"`
}

VoidRemainderEvent represents a VoidRemainderEvent struct.

func (VoidRemainderEvent) MarshalJSON added in v0.2.0

func (v VoidRemainderEvent) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for VoidRemainderEvent. It customizes the JSON marshaling process for VoidRemainderEvent objects.

func (*VoidRemainderEvent) UnmarshalJSON added in v0.2.0

func (v *VoidRemainderEvent) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for VoidRemainderEvent. It customizes the JSON unmarshaling process for VoidRemainderEvent objects.

type VoidRemainderEventData added in v0.1.0

type VoidRemainderEventData struct {
	CreditNoteAttributes CreditNote `json:"credit_note_attributes"`
	// The memo provided during invoice remainder voiding.
	Memo string `json:"memo"`
	// The amount of the void.
	AppliedAmount string `json:"applied_amount"`
	// The time the refund was applied, in ISO 8601 format, i.e. "2019-06-07T17:20:06Z"
	TransactionTime      time.Time      `json:"transaction_time"`
	AdditionalProperties map[string]any `json:"_"`
}

VoidRemainderEventData represents a VoidRemainderEventData struct. Example schema for an `void_remainder` event

func (VoidRemainderEventData) MarshalJSON added in v0.1.0

func (v VoidRemainderEventData) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for VoidRemainderEventData. It customizes the JSON marshaling process for VoidRemainderEventData objects.

func (*VoidRemainderEventData) UnmarshalJSON added in v0.1.0

func (v *VoidRemainderEventData) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for VoidRemainderEventData. It customizes the JSON unmarshaling process for VoidRemainderEventData objects.

type Webhook

type Webhook struct {
	// A string describing which event type produced the given webhook
	Event *string `json:"event,omitempty"`
	// The unique identifier for the webhooks (unique across all of Chargify). This is not changed on a retry/replay of the same webhook, so it may be used to avoid duplicate action for the same event.
	Id *int64 `json:"id,omitempty"`
	// Timestamp indicating when the webhook was created
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// Text describing the status code and/or error from the last failed attempt to send the Webhook. When a webhook is retried and accepted, this field will be cleared.
	LastError *string `json:"last_error,omitempty"`
	// Timestamp indicating when the last non-acceptance occurred. If a webhook is later resent and accepted, this field will be cleared.
	LastErrorAt *time.Time `json:"last_error_at,omitempty"`
	// Timestamp indicating when the webhook was accepted by the merchant endpoint. When a webhook is explicitly replayed by the merchant, this value will be cleared until it is accepted again.
	AcceptedAt Optional[time.Time] `json:"accepted_at"`
	// Timestamp indicating when the most recent attempt was made to send the webhook
	LastSentAt *time.Time `json:"last_sent_at,omitempty"`
	// The url that the endpoint was last sent to.
	LastSentUrl *string `json:"last_sent_url,omitempty"`
	// A boolean flag describing whether the webhook was accepted by the webhook endpoint for the most recent attempt. (Acceptance is defined by receiving a “200 OK” HTTP response within a reasonable timeframe, i.e. 15 seconds)
	Successful *bool `json:"successful,omitempty"`
	// The data sent within the webhook post
	Body *string `json:"body,omitempty"`
	// The calculated webhook signature
	Signature *string `json:"signature,omitempty"`
	// The calculated HMAC-SHA-256 webhook signature
	SignatureHmacSha256  *string        `json:"signature_hmac_sha_256,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

Webhook represents a Webhook struct.

func (Webhook) MarshalJSON

func (w Webhook) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for Webhook. It customizes the JSON marshaling process for Webhook objects.

func (*Webhook) UnmarshalJSON

func (w *Webhook) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Webhook. It customizes the JSON unmarshaling process for Webhook objects.

type WebhookOrder

type WebhookOrder string

WebhookOrder is a string enum.

const (
	WebhookOrder_NEWESTFIRST WebhookOrder = "newest_first"
	WebhookOrder_OLDESTFIRST WebhookOrder = "oldest_first"
)

func (WebhookOrder) MarshalJSON added in v0.2.0

func (e WebhookOrder) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for WebhookOrder. It customizes the JSON marshaling process for WebhookOrder objects.

func (*WebhookOrder) UnmarshalJSON added in v0.2.0

func (e *WebhookOrder) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for WebhookOrder. It customizes the JSON unmarshaling process for WebhookOrder objects.

type WebhookResponse

type WebhookResponse struct {
	Webhook              *Webhook       `json:"webhook,omitempty"`
	AdditionalProperties map[string]any `json:"_"`
}

WebhookResponse represents a WebhookResponse struct.

func (WebhookResponse) MarshalJSON

func (w WebhookResponse) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for WebhookResponse. It customizes the JSON marshaling process for WebhookResponse objects.

func (*WebhookResponse) UnmarshalJSON

func (w *WebhookResponse) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for WebhookResponse. It customizes the JSON unmarshaling process for WebhookResponse objects.

type WebhookStatus

type WebhookStatus string

WebhookStatus is a string enum.

const (
	WebhookStatus_SUCCESSFUL WebhookStatus = "successful"
	WebhookStatus_FAILED     WebhookStatus = "failed"
	WebhookStatus_PENDING    WebhookStatus = "pending"
	WebhookStatus_PAUSED     WebhookStatus = "paused"
)

func (WebhookStatus) MarshalJSON added in v0.2.0

func (e WebhookStatus) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for WebhookStatus. It customizes the JSON marshaling process for WebhookStatus objects.

func (*WebhookStatus) UnmarshalJSON added in v0.2.0

func (e *WebhookStatus) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for WebhookStatus. It customizes the JSON unmarshaling process for WebhookStatus objects.

type WebhookSubscription

type WebhookSubscription string

WebhookSubscription is a string enum.

const (
	WebhookSubscription_BILLINGDATECHANGE                              WebhookSubscription = "billing_date_change"
	WebhookSubscription_COMPONENTALLOCATIONCHANGE                      WebhookSubscription = "component_allocation_change"
	WebhookSubscription_CUSTOMERCREATE                                 WebhookSubscription = "customer_create"
	WebhookSubscription_CUSTOMERUPDATE                                 WebhookSubscription = "customer_update"
	WebhookSubscription_DUNNINGSTEPREACHED                             WebhookSubscription = "dunning_step_reached"
	WebhookSubscription_EXPIRINGCARD                                   WebhookSubscription = "expiring_card"
	WebhookSubscription_EXPIRATIONDATECHANGE                           WebhookSubscription = "expiration_date_change"
	WebhookSubscription_INVOICEISSUED                                  WebhookSubscription = "invoice_issued"
	WebhookSubscription_METEREDUSAGE                                   WebhookSubscription = "metered_usage"
	WebhookSubscription_PAYMENTFAILURE                                 WebhookSubscription = "payment_failure"
	WebhookSubscription_PAYMENTSUCCESS                                 WebhookSubscription = "payment_success"
	WebhookSubscription_DIRECTDEBITPAYMENTPENDING                      WebhookSubscription = "direct_debit_payment_pending"
	WebhookSubscription_DIRECTDEBITPAYMENTPAIDOUT                      WebhookSubscription = "direct_debit_payment_paid_out"
	WebhookSubscription_DIRECTDEBITPAYMENTREJECTED                     WebhookSubscription = "direct_debit_payment_rejected"
	WebhookSubscription_PREPAIDSUBSCRIPTIONBALANCECHANGED              WebhookSubscription = "prepaid_subscription_balance_changed"
	WebhookSubscription_PREPAIDUSAGE                                   WebhookSubscription = "prepaid_usage"
	WebhookSubscription_REFUNDFAILURE                                  WebhookSubscription = "refund_failure"
	WebhookSubscription_REFUNDSUCCESS                                  WebhookSubscription = "refund_success"
	WebhookSubscription_RENEWALFAILURE                                 WebhookSubscription = "renewal_failure"
	WebhookSubscription_RENEWALSUCCESS                                 WebhookSubscription = "renewal_success"
	WebhookSubscription_SIGNUPFAILURE                                  WebhookSubscription = "signup_failure"
	WebhookSubscription_SIGNUPSUCCESS                                  WebhookSubscription = "signup_success"
	WebhookSubscription_STATEMENTCLOSED                                WebhookSubscription = "statement_closed"
	WebhookSubscription_STATEMENTSETTLED                               WebhookSubscription = "statement_settled"
	WebhookSubscription_SUBSCRIPTIONCARDUPDATE                         WebhookSubscription = "subscription_card_update"
	WebhookSubscription_SUBSCRIPTIONGROUPCARDUPDATE                    WebhookSubscription = "subscription_group_card_update"
	WebhookSubscription_SUBSCRIPTIONPRODUCTCHANGE                      WebhookSubscription = "subscription_product_change"
	WebhookSubscription_SUBSCRIPTIONSTATECHANGE                        WebhookSubscription = "subscription_state_change"
	WebhookSubscription_TRIALENDNOTICE                                 WebhookSubscription = "trial_end_notice"
	WebhookSubscription_UPCOMINGRENEWALNOTICE                          WebhookSubscription = "upcoming_renewal_notice"
	WebhookSubscription_UPGRADEDOWNGRADEFAILURE                        WebhookSubscription = "upgrade_downgrade_failure"
	WebhookSubscription_UPGRADEDOWNGRADESUCCESS                        WebhookSubscription = "upgrade_downgrade_success"
	WebhookSubscription_PENDINGCANCELLATIONCHANGE                      WebhookSubscription = "pending_cancellation_change"
	WebhookSubscription_SUBSCRIPTIONPREPAYMENTACCOUNTBALANCECHANGED    WebhookSubscription = "subscription_prepayment_account_balance_changed"
	WebhookSubscription_SUBSCRIPTIONSERVICECREDITACCOUNTBALANCECHANGED WebhookSubscription = "subscription_service_credit_account_balance_changed"
)

func (WebhookSubscription) MarshalJSON added in v0.2.0

func (e WebhookSubscription) MarshalJSON() (
	[]byte,
	error)

MarshalJSON implements the json.Marshaler interface for WebhookSubscription. It customizes the JSON marshaling process for WebhookSubscription objects.

func (*WebhookSubscription) UnmarshalJSON added in v0.2.0

func (e *WebhookSubscription) UnmarshalJSON(input []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for WebhookSubscription. It customizes the JSON unmarshaling process for WebhookSubscription objects.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL