contact

package
v0.0.0-...-58d3d42 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2018 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BalanceInformation

type BalanceInformation struct {
	AnnualBalance     string
	Grid              string
	OutstandingAmount float64
	Prepaid           *PrepaidInformation
}

type Contact

type Contact struct {
	*client.Client
}

func New

func New(c *client.Client) *Contact

func (*Contact) Balance

func (self *Contact) Balance() (*BalanceInformation, error)

Get contact financial balance

func (*Contact) Create

func (self *Contact) Create(opts ContactCreate) (*ContactInformation, error)

Create a contact

func (*Contact) Delete

func (self *Contact) Delete(handle string) (bool, error)

Delete a contact

func (*Contact) Info

func (self *Contact) Info(handle string) (*ContactInformation, error)

Get contact information

type ContactCreate

type ContactCreate struct {
	Firstname string `goptions:"--firstname, obligatory, description='First name'"`
	Lastname  string `goptions:"--lastname, obligatory, description='Last name'"`
	Email     string `goptions:"--email, obligatory, description='Email address'"`
	Password  string `goptions:"--password, obligatory, description='Password'"`
	Address   string `goptions:"--address, obligatory, description='Street address'"`
	Zipcode   string `goptions:"--zipcode, obligatory, description='Zip code'"`
	City      string `goptions:"--city, obligatory, description='City'"`
	Country   string `goptions:"--country, obligatory, description='Country'"`
	Phone     string `goptions:"--phone, obligatory, description='Phone number'"`

	// Contact types
	IsPerson      bool `goptions:"--person, obligatory, mutexgroup='type', description='Contact type person'"`
	IsCompany     bool `goptions:"--company, obligatory, mutexgroup='type', description='Contact type company'"`
	IsAssociation bool `goptions:"--association, obligatory, mutexgroup='type', description='Contact type association'"`
	IsPublicBody  bool `goptions:"--publicbody, obligatory, mutexgroup='type', description='Contact type public body'"`
	IsReseller    bool `goptions:"--reseller, obligatory, mutexgroup='type', description='Contact type reseller'"`
}

func (ContactCreate) ContactType

func (self ContactCreate) ContactType() int

type ContactInformation

type ContactInformation struct {
	Firstname   string
	Lastname    string
	Email       string
	Address     string
	Zipcode     string
	City        string
	Country     string
	Phone       string
	ContactType int64
	Handle      string
}

func (ContactInformation) ContactTypeString

func (self ContactInformation) ContactTypeString() string

type PrepaidInformation

type PrepaidInformation struct {
	Id          int64
	Amount      string
	Currency    string
	DateCreated time.Time
	DateUpdated time.Time
}

Jump to

Keyboard shortcuts

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