Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlignmentKind ¶
type AlignmentKind string
AlignmentKind specifies what governs when an invoice is issued
const ( // AlignmentKindSubscription specifies that the invoice is issued based on the subscription period ( // e.g. whenever a due line item is added, it will trigger an invoice generation after the collection period) AlignmentKindSubscription AlignmentKind = "subscription" )
func (AlignmentKind) Values ¶
func (k AlignmentKind) Values() []string
type CollectionConfig ¶
func (*CollectionConfig) Validate ¶
func (c *CollectionConfig) Validate() error
type CollectionMethod ¶
type CollectionMethod string
const ( // CollectionMethodChargeAutomatically charges the customer automatically based on previously saved card data CollectionMethodChargeAutomatically CollectionMethod = "charge_automatically" // CollectionMethodSendInvoice sends an invoice to the customer along with the payment instructions/links CollectionMethodSendInvoice CollectionMethod = "send_invoice" )
func (CollectionMethod) Values ¶
func (c CollectionMethod) Values() []string
type Configuration ¶
type Configuration struct { // Collection describes the rules for collecting pending line items Collection *CollectionConfig `json:"collection,omitempty"` // Workflow describes the rules for advancing the billing process Workflow *WorkflowConfig `json:"workflow,omitempty"` // Granuality describes the rules for line item granuality Granuality *GranualityConfig `json:"granuality,omitempty"` }
func (*Configuration) Validate ¶
func (c *Configuration) Validate() error
type GranualityConfig ¶
type GranualityConfig struct { // Resolution specifies the resolution of the line items Resolution GranualityResolution `json:"resolution,omitempty"` // PerSubjectDetails specifies if the line items should be split per subject or not PerSubjectDetails *bool `json:"perSubjectDetails,omitempty"` }
func (*GranualityConfig) Validate ¶
func (c *GranualityConfig) Validate() error
type GranualityResolution ¶
type GranualityResolution string
const ( // GranualityResolutionDay provides line items for metered data per day GranualityResolutionDay GranualityResolution = "day" // GranualityResolutionPeriod provides one line item per period GranualityResolutionPeriod GranualityResolution = "period" )
func (GranualityResolution) Values ¶
func (r GranualityResolution) Values() []string
type WorkflowConfig ¶
type WorkflowConfig struct { // AutoAdvance specifies if the workflow will automatically advance from draft to issued after DraftPeriod, if not set it // will default to the billing provider's default behavior AutoAdvance *bool `json:"autoAdvance,omitempty"` // DraftPeriod specifies how long to wait before automatically advancing from draft to issued DraftPeriod time.Duration `json:"draftPeriod,omitempty"` // DueAfter specifies how long after the invoice is issued that it is due DueAfter time.Duration `json:"dueAfter,omitempty"` // CollectionMethod specifies how the invoice should be collected CollectionMethod CollectionMethod `json:"collectionMethod,omitempty"` }
func (*WorkflowConfig) Validate ¶
func (c *WorkflowConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.