billing

package
v3.0.0-...-c77a060 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	ID                 int    `json:"id,omitempty"`
	Name               string `json:"bigv_account_subscription,omitempty"`
	Owner              Person `json:"owner,omitempty"`
	TechnicalContact   Person `json:"tech,omitempty"`
	OwnerID            int    `json:"owner_id,omitempty"`
	CardReference      string `json:"card_reference,omitempty"`
	TechnicalContactID int    `json:"tech_id,omitempty"`

	InvoiceTerms     int    `json:"invoice_terms,omitempty"`
	PaymentMethod    string `json:"payment_method,omitempty"`
	EarliestActivity string `json:"earliest_activity,omitempty"`
}

Account represents the parts of an account that are discussed with bmbilling

func (Account) IsValid

func (a Account) IsValid() bool

IsValid returns true if the account is valid - whether its fields are set, or it should be considered a null account

type Assent

type Assent struct {
	AgreementID string `json:"-"`
	AccountID   int    `json:"account_id"`
	PersonID    int    `json:"person_id"`
	// Name is the full name of the person
	Name  string `json:"name"`
	Email string `json:"email"`
}

Assent represents an assent by a person on behalf of an account to an agreement

type Definition

type Definition struct {
	ID    int    `json:"id,omitempty"`
	Name  string `json:"name"`
	Value string `json:"value"`
	// Which auth group a user must be in to update the definition
	UpdateGroupReq string `json:"update_group_req,omitempty"`
}

Definition is an admin-modifiable parameter for bmbilling examples include account-opening credit amount and trial length

func (Definition) DefaultFields

func (d Definition) DefaultFields(f output.Format) string

DefaultFields returns the default fields used for making tables of Definitions

func (Definition) PrettyPrint

func (d Definition) PrettyPrint(wr io.Writer, detail prettyprint.DetailLevel) error

PrettyPrint writes the Definition in a human-readable form at the given detail level to wr

type Person

type Person struct {
	ID int `json:"id,omitempty"`
	// Username is the name this person uses to log in to our services.
	Username    string `json:"username"`
	Email       string `json:"email"`
	BackupEmail string `json:"email_backup,omitempty"`

	// only set in the creation request
	Password string `json:"password"`

	FirstName   string `json:"firstname"`
	LastName    string `json:"surname"`
	Address     string `json:"address"`
	City        string `json:"city"`
	StateCounty string `json:"statecounty,omitempty"`
	Postcode    string `json:"postcode"`
	Country     string `json:"country"`
	Phone       string `json:"phone"`
	MobilePhone string `json:"phonemobile,omitempty"`

	Organization         string `json:"organization,omitempty"`
	OrganizationDivision string `json:"division,omitempty"`
	VATNumber            string `json:"vatnumber,omitempty"`
}

Person represents a bmbilling person

func (Person) DefaultFields

func (p Person) DefaultFields(f output.Format) string

DefaultFields returns the list of default fields to feed to github.com/BytemarkHosting/row.From for this type.

func (Person) IsValid

func (p Person) IsValid() bool

IsValid returns true if the Person is valid, false otherwise.

func (Person) PrettyPrint

func (p Person) PrettyPrint(wr io.Writer, detail prettyprint.DetailLevel) error

PrettyPrint ouputs the person to the writer in a human readable form, at the specified detail level.

type SPPTokenRequest

type SPPTokenRequest struct {
	// needs to be able to be nil, so pointer
	Owner      *Person `json:"owner,omitempty"`
	CardEnding string  `json:"card_ending"`
}

SPPTokenRequest is the object sent to bmbilling to get a token to pass to SPP.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL