Documentation
¶
Index ¶
- type Account
- type AccountsAPI
- func (a *AccountsAPI) CreateSubAccount(subAccount *Account) error
- func (a *AccountsAPI) DelSubAccount(id string) error
- func (a *AccountsAPI) GetAllowedCodecs(codec string) ([]Codec, error)
- func (a *AccountsAPI) GetAuthTypes(authType int) ([]AuthType, error)
- func (a *AccountsAPI) GetDTMFModes(DTMFMode string) ([]DTMFMode, error)
- func (a *AccountsAPI) GetDeviceTypes(deviceType int) ([]DeviceType, error)
- func (a *AccountsAPI) GetLockInternational(lockInternational string) ([]LockInternational, error)
- func (a *AccountsAPI) GetMusicOnHold(musicOnHold string) ([]MusicOnHold, error)
- func (a *AccountsAPI) GetNAT(NAT string) ([]NAT, error)
- func (a *AccountsAPI) GetProtocols(protocol int) ([]Protocol, error)
- func (a *AccountsAPI) GetRegistrationStatus(account string) (bool, []RegistrationStatus, error)
- func (a *AccountsAPI) GetReportEstimatedHoldTime(typ3 string) ([]EstimatedHoldTime, error)
- func (a *AccountsAPI) GetRoutes(route int) ([]Route, error)
- func (a *AccountsAPI) GetSubAccounts(account string) ([]Account, error)
- func (a *AccountsAPI) SetSubAccount(account *Account) error
- type AddChargeReq
- type AddChargeResp
- type AddPaymentReq
- type AuthType
- type BackOrder
- type Balance
- type BalanceManagement
- type BaseResp
- type BaseRoute
- func NewAccountRoute(value string) BaseRoute
- func NewCBRoute() BaseRoute
- func NewDisaRoute() BaseRoute
- func NewFwdRoute(value string) BaseRoute
- func NewGrpRoute() BaseRoute
- func NewIVRRoute() BaseRoute
- func NewNoneRoute() BaseRoute
- func NewQueueRoute() BaseRoute
- func NewRecordingRoute() BaseRoute
- func NewSIPRoute() BaseRoute
- func NewSysRoute(value string) BaseRoute
- func NewTCRoute() BaseRoute
- func NewVMRoute(value string) BaseRoute
- type CDR
- type CDRAPI
- func (c *CDRAPI) GetCDR(dateFrom, dateTo time.Time, callStatus CallStatus, timezone *time.Location, ...) ([]CDR, error)
- func (c *CDRAPI) GetCallAccounts(clientId string) ([]CallAccount, error)
- func (c *CDRAPI) GetCallBilling() ([]CallBilling, error)
- func (c *CDRAPI) GetCallTypes(clientId string) ([]CallType, error)
- func (c *CDRAPI) GetRates(packag3, query string) ([]Rate, error)
- func (c *CDRAPI) GetResellerCDR(dateFrom, dateTo time.Time, client string, callStatus CallStatus, ...) ([]CDR, error)
- func (c *CDRAPI) GetTerminationRates(route, query string) ([]TerminationRate, error)
- type CallAccount
- type CallBilling
- type CallStatus
- type CallType
- type Callback
- type CallerIDFilter
- type CancelDIDResp
- type Carrier
- type Charge
- type Client
- type ClientPackage
- type ClientThreshold
- type ClientsAPI
- func (c *ClientsAPI) AddCharge(client, description string, charge float64, test bool) error
- func (c *ClientsAPI) AddPayment(client, description string, payment float64, test bool) error
- func (c *ClientsAPI) GetBalanceManagement(balanceManagement string) ([]BalanceManagement, error)
- func (c *ClientsAPI) GetCharges(client string) ([]Charge, error)
- func (c *ClientsAPI) GetClientPackages(client string) ([]ClientPackage, error)
- func (c *ClientsAPI) GetClientThreshold(client string) (*ClientThreshold, error)
- func (c *ClientsAPI) GetClients(client string) ([]Client, error)
- func (c *ClientsAPI) GetDeposits(client string) ([]Deposit, error)
- func (c *ClientsAPI) GetPackages(packag3 string) ([]Package, error)
- func (c *ClientsAPI) GetResellerBalance(client string) (*Balance, error)
- func (c *ClientsAPI) SetClient(client *Client) error
- func (c *ClientsAPI) SetClientThreshold(client, threshold, email string) error
- func (c *ClientsAPI) SignupClient(client *Client, confirmEmail, confirmPassword string, activate bool) error
- type Codec
- type ConnectDIDResp
- type Country
- type CreateSubAccountResp
- type DID
- type DIDCountries
- type DIDInfo
- type DIDOrder
- type DIDOrderInternationalGeographic
- type DIDOrderResellerConfig
- type DIDSearchType
- type DIDsAPI
- func (d *DIDsAPI) BackOrderDIDCan(backOrder *BackOrder) error
- func (d *DIDsAPI) BackOrderDIDUSA(backOrder *BackOrder) error
- func (d *DIDsAPI) CancelDID(DID, comment string, portOut, test bool) error
- func (d *DIDsAPI) ConnectDID(DID, account, monthly, setup, minute string, nextBilling time.Time, ...) error
- func (d *DIDsAPI) DelCallback(callback string) error
- func (d *DIDsAPI) DelCallerIDFiltering(filtering string) error
- func (d *DIDsAPI) DelClient(client string) error
- func (d *DIDsAPI) DelDISA(disa string) error
- func (d *DIDsAPI) DelForwarding(forwarding string) error
- func (d *DIDsAPI) DelIVR(ivr string) error
- func (d *DIDsAPI) DelPhonebook(phonebook string) error
- func (d *DIDsAPI) DelQueue(queue string) error
- func (d *DIDsAPI) DelRecording(recording string) error
- func (d *DIDsAPI) DelRingGroup(ringGroup string) error
- func (d *DIDsAPI) DelSIPURI(SIPURI string) error
- func (d *DIDsAPI) DelStaticMember(member, queue string) error
- func (d *DIDsAPI) DelTimeCondition(timeCondition string) error
- func (d *DIDsAPI) DeleteSMS(id string) error
- func (d *DIDsAPI) GetCallbacks(callback string) ([]Callback, error)
- func (d *DIDsAPI) GetCallerIDFiltering(filtering string) ([]CallerIDFilter, error)
- func (d *DIDsAPI) GetCarriers(carrier string) ([]Carrier, error)
- func (d *DIDsAPI) GetDIDCountries(countryId, typ3 string) ([]DIDCountries, error)
- func (d *DIDsAPI) GetDIDsCan(province, rateCenter string) ([]DID, error)
- func (d *DIDsAPI) GetDIDsInfo(client, DID string) ([]DIDInfo, error)
- func (d *DIDsAPI) GetDIDsInternationalGeographic(countryId string) ([]InternationalLocations, error)
- func (d *DIDsAPI) GetDIDsInternationalNational(countryId string) ([]InternationalLocations, error)
- func (d *DIDsAPI) GetDIDsInternationalTollFree(countryId string) ([]InternationalLocations, error)
- func (d *DIDsAPI) GetDIDsUSA(state, rateCenter string) ([]DID, error)
- func (d *DIDsAPI) GetDISAs(DISA string) ([]DISA, error)
- func (d *DIDsAPI) GetForwardings(forwarding string) ([]Forwarding, error)
- func (d *DIDsAPI) GetIVRs(IVR string) ([]IVR, error)
- func (d *DIDsAPI) GetInternationalTypes(typ3 string) ([]InternationalTypes, error)
- func (d *DIDsAPI) GetJoinWhenEmptyTypes(typ3 string) ([]JoinWhenEmptyType, error)
- func (d *DIDsAPI) GetPhonebook(phonebook, name string) ([]Phonebook, error)
- func (d *DIDsAPI) GetPortability(DID string) (bool, []Plan, error)
- func (d *DIDsAPI) GetProvinces() ([]Province, error)
- func (d *DIDsAPI) GetQueues(queue string) ([]Queue, error)
- func (d *DIDsAPI) GetRateCentersCan(province string) ([]RateCenter, error)
- func (d *DIDsAPI) GetRateCentersUSA(state string) ([]RateCenter, error)
- func (d *DIDsAPI) GetRecordingFile() error
- func (d *DIDsAPI) GetRecordings() error
- func (d *DIDsAPI) GetRingGroups() error
- func (d *DIDsAPI) GetRingStrategies() error
- func (d *DIDsAPI) GetSIPURIs() error
- func (d *DIDsAPI) GetSMS() error
- func (d *DIDsAPI) GetStates() ([]State, error)
- func (d *DIDsAPI) GetStaticMembers(queue, member string) ([]Member, error)
- func (d *DIDsAPI) GetTimeConditions(timeCondition string) ([]TimeCondition, error)
- func (d *DIDsAPI) GetVoicemailAttachmentFormats(emailAttachmentFormat string) ([]VoicemailAttachmentFormat, error)
- func (d *DIDsAPI) GetVoicemailSetups(voicemailSetup string) ([]VoicemailSetup, error)
- func (d *DIDsAPI) OrderDID(didOrder *DIDOrder) error
- func (d *DIDsAPI) OrderDIDInternationalGeographic(didOrder *DIDOrderInternationalGeographic) error
- func (d *DIDsAPI) OrderDIDInternationalNational() error
- func (d *DIDsAPI) OrderDIDInternationalTollFree() error
- func (d *DIDsAPI) OrderDIDVirtual() error
- func (d *DIDsAPI) OrderTollFree() error
- func (d *DIDsAPI) OrderVanity() error
- func (d *DIDsAPI) SearchDIDsCan(province string, typ3 DIDSearchType, query string) ([]DID, error)
- func (d *DIDsAPI) SearchDIDsUSA() error
- func (d *DIDsAPI) SearchTollFreeCanUS() error
- func (d *DIDsAPI) SearchTollFreeUSA() error
- func (d *DIDsAPI) SearchVanity() error
- func (d *DIDsAPI) SendSMS() error
- func (d *DIDsAPI) SetCallback() error
- func (d *DIDsAPI) SetCallerIDFiltering() error
- func (d *DIDsAPI) SetDIDBillingType() error
- func (d *DIDsAPI) SetDIDInfo() error
- func (d *DIDsAPI) SetDIDPOP() error
- func (d *DIDsAPI) SetDIDRouting() error
- func (d *DIDsAPI) SetDIDVoicemail() error
- func (d *DIDsAPI) SetDISA() error
- func (d *DIDsAPI) SetForwarding() error
- func (d *DIDsAPI) SetIVR() error
- func (d *DIDsAPI) SetPhonebook() error
- func (d *DIDsAPI) SetQueue() error
- func (d *DIDsAPI) SetRecording() error
- func (d *DIDsAPI) SetRingGroup() error
- func (d *DIDsAPI) SetSIPURI() error
- func (d *DIDsAPI) SetSMS() error
- func (d *DIDsAPI) SetStaticMember() error
- func (d *DIDsAPI) SetTimeCondition() error
- func (d *DIDsAPI) UnconnectDID() error
- type DISA
- type DTMFMode
- type DelStaticMemberResp
- type DelSubAccountReq
- type DelSubAccountResp
- type Deposit
- type DeviceType
- type EstimatedHoldTime
- type FaxAPI
- type Forwarding
- type GeneralAPI
- func (g *GeneralAPI) GetBalance(advanced bool) (*Balance, error)
- func (g *GeneralAPI) GetCountries(country string) ([]Country, error)
- func (g *GeneralAPI) GetIP() (string, error)
- func (g *GeneralAPI) GetLanguages(language string) ([]Language, error)
- func (g *GeneralAPI) GetServerInfo(serverPop string) ([]Server, error)
- func (g *GeneralAPI) GetTransactionHistory(dateFrom, dateTo time.Time) ([]Transaction, error)
- type GetAllowedCodecsResp
- type GetAuthTypesResp
- type GetBalanceMangementResp
- type GetBalanceResp
- type GetCDRResp
- type GetCallAccountsResp
- type GetCallBillingResp
- type GetCallTypeResp
- type GetCallbacksResp
- type GetCallerIDFilteringResp
- type GetCarriersResp
- type GetChargesResp
- type GetClientPackagesResp
- type GetClientThresholdResp
- type GetClientsResp
- type GetCountriesResp
- type GetDIDCountriesResp
- type GetDIDsCanResp
- type GetDIDsInfoResp
- type GetDIDsInternationalResp
- type GetDIDsUSAResp
- type GetDISAsResp
- type GetDTMFModesResp
- type GetDepositsResp
- type GetDeviceTypesResp
- type GetForwardingsResp
- type GetIPResp
- type GetIVRsResp
- type GetInternationalTypesResp
- type GetJoinWhenEmptyTypesResp
- type GetLanguagesResp
- type GetLockInternationalResp
- type GetMusicOnHoldResp
- type GetNATResp
- type GetPackagesResp
- type GetPhonebookResp
- type GetPortabilityResp
- type GetProtocolResp
- type GetProvincesResp
- type GetQueuesResp
- type GetRateCentersResp
- type GetRatesResp
- type GetRegistrationStatusResp
- type GetReportEstimatedHoldTimeResp
- type GetResellerBalanceResp
- type GetRoutesResp
- type GetServerInfoResp
- type GetStatesResp
- type GetStaticMembersResp
- type GetSubAccountsResp
- type GetTerminationRatesRep
- type GetTimeConditionsResp
- type GetTransactionHistoryResp
- type GetVoicemailAttachmentFormats
- type GetVoicemailSetups
- type IVR
- type IVRChoice
- type InternationalLocations
- type InternationalTypes
- type JoinWhenEmptyType
- type Language
- type LockInternational
- type Member
- type MusicOnHold
- type NAT
- type NumberValueDescription
- type Order
- type Package
- type Phonebook
- type Plan
- type Protocol
- type Province
- type Queue
- type Rate
- type RateCenter
- type RegistrationStatus
- type Route
- type SearchDIDsCanResp
- type Server
- type SetClientReq
- type SetClientThresholdReq
- type SetSubAccountResp
- type SignupClientReq
- type State
- type StatusResp
- type StringValueDescription
- type TerminationRate
- type TimeCondition
- type Transaction
- type VOIPClient
- func (c *VOIPClient) Call(req *http.Request, respStruct interface{}) (*http.Response, error)
- func (c *VOIPClient) Get(method string, values url.Values, entity interface{}) error
- func (c *VOIPClient) NewAccountsAPI() *AccountsAPI
- func (c *VOIPClient) NewCDRAPI() *CDRAPI
- func (c *VOIPClient) NewClientsAPI() *ClientsAPI
- func (c *VOIPClient) NewDIDsAPI() *DIDsAPI
- func (c *VOIPClient) NewFaxAPI() *FaxAPI
- func (c *VOIPClient) NewGeneralAPI() *GeneralAPI
- func (c *VOIPClient) NewVoicemailAPI() *VoicemailAPI
- func (c *VOIPClient) Post(method string, entity interface{}, respStruct interface{}) error
- func (c *VOIPClient) WriteStruct(writer *multipart.Writer, iface interface{}) error
- type VoicemailAPI
- type VoicemailAttachmentFormat
- type VoicemailSetup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
Id string `json:"id,omitempty" url:"id"`
Account string `json:"account,omitempty" url:"account"`
Username string `json:"username" url:"username"`
Protocol string `json:"protocol" url:"protocol"`
Description string `json:"description,omitempty" url:"description"`
AuthType string `json:"auth_type" url:"auth_type"`
Password string `json:"password,omitempty" url:"password"`
IP string `json:"ip,omitempty" url:"ip"`
DeviceType string `json:"device_type" url:"device_type"`
CalleridNumber string `json:"callerid_number,omitempty" url:"callerid_number"`
CanadaRouting string `json:"canada_routing,omitempty" url:"canada_routing"`
LockInternational string `json:"lock_international" url:"lock_international"`
InternationalRoute string `json:"international_route" url:"international_route"`
MusicOnHold string `json:"music_on_hold" url:"music_on_hold"`
AllowedCodecs string `json:"allowed_codecs" url:"allowed_codecs"`
DTMFMode string `json:"dtmf_mode" url:"dtmf_mode"`
NAT string `json:"nat" url:"nat"`
InternalExtension string `json:"internal_extension,omitempty" url:"internal_extension"`
InternalVoicemail string `json:"internal_voicemail,omitempty" url:"internal_voicemail"`
InternalDialtime string `json:"internal_dialtime,omitempty" url:"internal_dialtime"`
ResellerClient string `json:"reseller_client,omitempty" url:"reseller_client"`
ResellerPackage string `json:"reseller_package,omitempty" url:"reseller_package"`
ResellerNextbilling string `json:"reseller_nextbilling,omitempty" url:"reseller_nextbilling"`
ResellerChargesetup string `json:"reseller_chargesetup,omitempty" url:"reseller_chargesetup"`
}
type AccountsAPI ¶
type AccountsAPI struct {
// contains filtered or unexported fields
}
func (*AccountsAPI) CreateSubAccount ¶
func (a *AccountsAPI) CreateSubAccount(subAccount *Account) error
func (*AccountsAPI) DelSubAccount ¶
func (a *AccountsAPI) DelSubAccount(id string) error
func (*AccountsAPI) GetAllowedCodecs ¶
func (a *AccountsAPI) GetAllowedCodecs(codec string) ([]Codec, error)
func (*AccountsAPI) GetAuthTypes ¶
func (a *AccountsAPI) GetAuthTypes(authType int) ([]AuthType, error)
func (*AccountsAPI) GetDTMFModes ¶
func (a *AccountsAPI) GetDTMFModes(DTMFMode string) ([]DTMFMode, error)
func (*AccountsAPI) GetDeviceTypes ¶
func (a *AccountsAPI) GetDeviceTypes(deviceType int) ([]DeviceType, error)
func (*AccountsAPI) GetLockInternational ¶
func (a *AccountsAPI) GetLockInternational(lockInternational string) ([]LockInternational, error)
0 is an actual value for a Lock International entity so the signature of this message is a string opposed to an int. This was done to avoid confusion with other functions that take 0 in order to return all values.
func (*AccountsAPI) GetMusicOnHold ¶
func (a *AccountsAPI) GetMusicOnHold(musicOnHold string) ([]MusicOnHold, error)
func (*AccountsAPI) GetProtocols ¶
func (a *AccountsAPI) GetProtocols(protocol int) ([]Protocol, error)
func (*AccountsAPI) GetRegistrationStatus ¶
func (a *AccountsAPI) GetRegistrationStatus(account string) (bool, []RegistrationStatus, error)
func (*AccountsAPI) GetReportEstimatedHoldTime ¶
func (a *AccountsAPI) GetReportEstimatedHoldTime(typ3 string) ([]EstimatedHoldTime, error)
func (*AccountsAPI) GetSubAccounts ¶
func (a *AccountsAPI) GetSubAccounts(account string) ([]Account, error)
func (*AccountsAPI) SetSubAccount ¶
func (a *AccountsAPI) SetSubAccount(account *Account) error
type AddChargeReq ¶
type AddChargeResp ¶
type AddChargeResp struct {
BaseResp
}
type AddPaymentReq ¶
type AuthType ¶
type AuthType NumberValueDescription
type Balance ¶
type Balance struct {
CurrentBalance json.Number `json:"current_balance"`
SpentTotal json.Number `json:"spent_total,omitempty"`
CallsTotal json.Number `json:"calls_total,omitempty"`
TimeTotal json.Number `json:"time_total,omitempty"` //TODO:Stan change to duration
SpentToday json.Number `json:"spent_today,omitempty"`
CallsToday int `json:"calls_today,omitempty"`
TimeToday json.Number `json:"time_today,omitempty"`
}
type BalanceManagement ¶
type BalanceManagement NumberValueDescription
type CDR ¶
type CDR struct {
Date time.Time `json:"date"`
CallerId string `json:"callerid"`
Destination string `json:"destination"`
Description string `json:"description"`
Account string `json:"account"`
Disposition string `json:"disposition"`
Duration time.Duration `json:"duration"`
Seconds int `json:"seconds,string"`
Rate float64 `json:"rate,string,omitempty"`
Total float64 `json:"total,string"`
UniqueId string `json:"uniqueid"`
}
func (*CDR) UnmarshalJSON ¶
type CDRAPI ¶
type CDRAPI struct {
// contains filtered or unexported fields
}
func (*CDRAPI) GetCallAccounts ¶
func (c *CDRAPI) GetCallAccounts(clientId string) ([]CallAccount, error)
func (*CDRAPI) GetCallBilling ¶
func (c *CDRAPI) GetCallBilling() ([]CallBilling, error)
func (*CDRAPI) GetResellerCDR ¶
func (*CDRAPI) GetTerminationRates ¶
func (c *CDRAPI) GetTerminationRates(route, query string) ([]TerminationRate, error)
type CallAccount ¶
type CallAccount StringValueDescription
type CallBilling ¶
type CallBilling StringValueDescription
type CallType ¶
type CallType StringValueDescription
type CallerIDFilter ¶
type CallerIDFilter struct {
Filtering string `json:"filtering"`
Callerid string `json:"callerid"`
DID string `json:"did"`
Routing string `json:"routing"`
FailoverUnreachable string `json:"failover_unreachable"`
FailoverBusy string `json:"failover_busy"`
FailoverNoanswer string `json:"failover_noanswer"`
Note string `json:"note"`
}
type CancelDIDResp ¶
type CancelDIDResp struct {
BaseResp
}
type Carrier ¶
type Carrier NumberValueDescription
type Charge ¶
type Charge struct {
Id string `json:"id"`
Date time.Time `json:"date"`
Amount float64 `json:"amount"`
Description string `json:"description"`
}
func (*Charge) UnmarshalJSON ¶
type Client ¶
type Client struct {
Client string `json:"client"`
Email string `json:"email"`
Password string `json:"password"`
Company string `json:"company,omitempty"`
FirstName string `json:"firstname"`
LastName string `json:"lastname"`
Address string `json:"address,omitempty"`
City string `json:"city,omitempty"`
State string `json:"state,omitempty"`
Country string `json:"country,omitempty"`
Zip string `json:"zip,omitempty"`
PhoneNumber string `json:"phone_number"`
BalanceManagement string `json:"balance_management,omitempty"`
}
type ClientPackage ¶
type ClientPackage StringValueDescription
type ClientThreshold ¶
type ClientsAPI ¶
type ClientsAPI struct {
// contains filtered or unexported fields
}
func (*ClientsAPI) AddCharge ¶
func (c *ClientsAPI) AddCharge(client, description string, charge float64, test bool) error
func (*ClientsAPI) AddPayment ¶
func (c *ClientsAPI) AddPayment(client, description string, payment float64, test bool) error
func (*ClientsAPI) GetBalanceManagement ¶
func (c *ClientsAPI) GetBalanceManagement(balanceManagement string) ([]BalanceManagement, error)
func (*ClientsAPI) GetCharges ¶
func (c *ClientsAPI) GetCharges(client string) ([]Charge, error)
func (*ClientsAPI) GetClientPackages ¶
func (c *ClientsAPI) GetClientPackages(client string) ([]ClientPackage, error)
func (*ClientsAPI) GetClientThreshold ¶
func (c *ClientsAPI) GetClientThreshold(client string) (*ClientThreshold, error)
func (*ClientsAPI) GetClients ¶
func (c *ClientsAPI) GetClients(client string) ([]Client, error)
func (*ClientsAPI) GetDeposits ¶
func (c *ClientsAPI) GetDeposits(client string) ([]Deposit, error)
func (*ClientsAPI) GetPackages ¶
func (c *ClientsAPI) GetPackages(packag3 string) ([]Package, error)
func (*ClientsAPI) GetResellerBalance ¶
func (c *ClientsAPI) GetResellerBalance(client string) (*Balance, error)
func (*ClientsAPI) SetClient ¶
func (c *ClientsAPI) SetClient(client *Client) error
func (*ClientsAPI) SetClientThreshold ¶
func (c *ClientsAPI) SetClientThreshold(client, threshold, email string) error
func (*ClientsAPI) SignupClient ¶
func (c *ClientsAPI) SignupClient(client *Client, confirmEmail, confirmPassword string, activate bool) error
type Codec ¶
type Codec StringValueDescription
type ConnectDIDResp ¶
type ConnectDIDResp struct {
BaseResp
}
type Country ¶
type Country StringValueDescription
type CreateSubAccountResp ¶
type DID ¶
type DID struct {
DID string `json:"did"`
Ratecenter string `json:"ratecenter"`
Province string `json:"province,omitempty"` //only populated on Canadian API calls
ProvinceDescription string `json:"province_description,omitempty"` //only populated on Canadian API calls
State string `json:"state,omitempty"` //only populated on US API calls
StateDescription string `json:"state_description,omitempty"` //only populated on US API calls
PerMinuteMonthly string `json:"perminute_monthly"`
PerMinuteMinute string `json:"perminute_minute"`
PerMinuteSetup string `json:"perminute_setup"`
FlatMonthly string `json:"flat_monthly"`
FlatMinute string `json:"flat_minute"`
FlatSetup string `json:"flat_setup"`
SMS int `json:"sms,omitempty"`
}
type DIDCountries ¶
type DIDCountries NumberValueDescription
type DIDInfo ¶
type DIDInfo struct {
DID string `json:"did"`
Description string `json:"description"`
Order
E911 string `json:"e911"`
NextBilling time.Time `json:"next_billing"`
OrderDate time.Time `json:"next_billing"`
ResellerAccount string `json:"reseller_account"`
ResellerNextBilling string `json:"reseller_next_billing"`
ResellerMonthly string `json:"reseller_monthly"`
ResellerMinute string `json:"reseller_minute"`
ResellerSetup string `json:"reseller_setup"`
SMSAvailable int `json:"sms_available"`
SMSEnabled string `json:"sms_enabled"`
SMSEmail string `json:"sms_email"`
SMSEmailEnabled string `json:"sms_email_enabled"`
SMSForward string `json:"sms_forward"`
SMSForwardEnabled string `json:"sms_forward_enabled"`
SMSURLCallback string `json:"sms_url_callback"`
SMSURLCallbackEnabled string `json:"sms_url_callback_enabled"`
SMSURLCallbackEntry string `json:"sms_url_callback_retry"`
}
type DIDOrder ¶
type DIDOrder struct {
Did string `json:"did"`
Order
DIDOrderResellerConfig
}
type DIDOrderInternationalGeographic ¶
type DIDOrderInternationalGeographic struct {
LocationId string `json:"location_id"`
Quantity int `json:"quantity"`
Order
DIDOrderResellerConfig
}
type DIDOrderResellerConfig ¶
type DIDSearchType ¶
type DIDSearchType string
const ( StartsDIDSearchType DIDSearchType = "starts" ContainsDIDSearchType DIDSearchType = "contains" EndsDIDSearchType DIDSearchType = "ends" )
type DIDsAPI ¶
type DIDsAPI struct {
// contains filtered or unexported fields
}
func (*DIDsAPI) BackOrderDIDCan ¶
TODO:Stan this isn't working. It returns "invalid_ratecenter" and I'm pretty sure the ratecenter is correct.
func (*DIDsAPI) BackOrderDIDUSA ¶
TODO:Stan this isn't working. It returns "invalid_ratecenter" and I'm pretty sure the ratecenter is correct.
func (*DIDsAPI) ConnectDID ¶
func (*DIDsAPI) DelCallback ¶
func (*DIDsAPI) DelCallerIDFiltering ¶
func (*DIDsAPI) DelForwarding ¶
func (*DIDsAPI) DelPhonebook ¶
func (*DIDsAPI) DelRecording ¶
func (*DIDsAPI) DelRingGroup ¶
func (*DIDsAPI) DelStaticMember ¶
func (*DIDsAPI) DelTimeCondition ¶
func (*DIDsAPI) GetCallerIDFiltering ¶
func (d *DIDsAPI) GetCallerIDFiltering(filtering string) ([]CallerIDFilter, error)
func (*DIDsAPI) GetDIDCountries ¶
func (d *DIDsAPI) GetDIDCountries(countryId, typ3 string) ([]DIDCountries, error)
func (*DIDsAPI) GetDIDsCan ¶
func (*DIDsAPI) GetDIDsInternationalGeographic ¶
func (d *DIDsAPI) GetDIDsInternationalGeographic(countryId string) ([]InternationalLocations, error)
func (*DIDsAPI) GetDIDsInternationalNational ¶
func (d *DIDsAPI) GetDIDsInternationalNational(countryId string) ([]InternationalLocations, error)
func (*DIDsAPI) GetDIDsInternationalTollFree ¶
func (d *DIDsAPI) GetDIDsInternationalTollFree(countryId string) ([]InternationalLocations, error)
func (*DIDsAPI) GetForwardings ¶
func (d *DIDsAPI) GetForwardings(forwarding string) ([]Forwarding, error)
func (*DIDsAPI) GetInternationalTypes ¶
func (d *DIDsAPI) GetInternationalTypes(typ3 string) ([]InternationalTypes, error)
func (*DIDsAPI) GetJoinWhenEmptyTypes ¶
func (d *DIDsAPI) GetJoinWhenEmptyTypes(typ3 string) ([]JoinWhenEmptyType, error)
func (*DIDsAPI) GetPhonebook ¶
func (*DIDsAPI) GetProvinces ¶
func (*DIDsAPI) GetRateCentersCan ¶
func (d *DIDsAPI) GetRateCentersCan(province string) ([]RateCenter, error)
func (*DIDsAPI) GetRateCentersUSA ¶
func (d *DIDsAPI) GetRateCentersUSA(state string) ([]RateCenter, error)
func (*DIDsAPI) GetRecordingFile ¶
func (*DIDsAPI) GetRecordings ¶
func (*DIDsAPI) GetRingGroups ¶
func (*DIDsAPI) GetRingStrategies ¶
func (*DIDsAPI) GetSIPURIs ¶
func (*DIDsAPI) GetStaticMembers ¶
func (*DIDsAPI) GetTimeConditions ¶
func (d *DIDsAPI) GetTimeConditions(timeCondition string) ([]TimeCondition, error)
func (*DIDsAPI) GetVoicemailAttachmentFormats ¶
func (d *DIDsAPI) GetVoicemailAttachmentFormats(emailAttachmentFormat string) ([]VoicemailAttachmentFormat, error)
func (*DIDsAPI) GetVoicemailSetups ¶
func (d *DIDsAPI) GetVoicemailSetups(voicemailSetup string) ([]VoicemailSetup, error)
func (*DIDsAPI) OrderDIDInternationalGeographic ¶
func (d *DIDsAPI) OrderDIDInternationalGeographic(didOrder *DIDOrderInternationalGeographic) error
func (*DIDsAPI) OrderDIDInternationalNational ¶
func (*DIDsAPI) OrderDIDInternationalTollFree ¶
func (*DIDsAPI) OrderDIDVirtual ¶
func (*DIDsAPI) OrderTollFree ¶
func (*DIDsAPI) OrderVanity ¶
func (*DIDsAPI) SearchDIDsCan ¶
func (*DIDsAPI) SearchDIDsUSA ¶
func (*DIDsAPI) SearchTollFreeCanUS ¶
func (*DIDsAPI) SearchTollFreeUSA ¶
func (*DIDsAPI) SearchVanity ¶
func (*DIDsAPI) SetCallback ¶
func (*DIDsAPI) SetCallerIDFiltering ¶
func (*DIDsAPI) SetDIDBillingType ¶
func (*DIDsAPI) SetDIDInfo ¶
func (*DIDsAPI) SetDIDRouting ¶
func (*DIDsAPI) SetDIDVoicemail ¶
func (*DIDsAPI) SetForwarding ¶
func (*DIDsAPI) SetPhonebook ¶
func (*DIDsAPI) SetRecording ¶
func (*DIDsAPI) SetRingGroup ¶
func (*DIDsAPI) SetStaticMember ¶
func (*DIDsAPI) SetTimeCondition ¶
func (*DIDsAPI) UnconnectDID ¶
type DTMFMode ¶
type DTMFMode StringValueDescription
type DelStaticMemberResp ¶
type DelStaticMemberResp struct {
BaseResp
}
type DelSubAccountReq ¶
type DelSubAccountReq struct {
Id string `json:"id"`
}
type DelSubAccountResp ¶
type DelSubAccountResp struct {
BaseResp
}
type DeviceType ¶
type DeviceType NumberValueDescription
type EstimatedHoldTime ¶
type EstimatedHoldTime StringValueDescription
type Forwarding ¶
type GeneralAPI ¶
type GeneralAPI struct {
// contains filtered or unexported fields
}
func (*GeneralAPI) GetBalance ¶
func (g *GeneralAPI) GetBalance(advanced bool) (*Balance, error)
func (*GeneralAPI) GetCountries ¶
func (g *GeneralAPI) GetCountries(country string) ([]Country, error)
func (*GeneralAPI) GetIP ¶
func (g *GeneralAPI) GetIP() (string, error)
func (*GeneralAPI) GetLanguages ¶
func (g *GeneralAPI) GetLanguages(language string) ([]Language, error)
func (*GeneralAPI) GetServerInfo ¶
func (g *GeneralAPI) GetServerInfo(serverPop string) ([]Server, error)
func (*GeneralAPI) GetTransactionHistory ¶
func (g *GeneralAPI) GetTransactionHistory(dateFrom, dateTo time.Time) ([]Transaction, error)
type GetAllowedCodecsResp ¶
type GetAuthTypesResp ¶
type GetBalanceMangementResp ¶
type GetBalanceMangementResp struct {
BaseResp
BalanceManagement []BalanceManagement `json:"balance_mangement"`
}
type GetBalanceResp ¶
type GetCDRResp ¶
type GetCallAccountsResp ¶
type GetCallAccountsResp struct {
BaseResp
CallAccounts []CallAccount `json:"accounts"`
}
type GetCallBillingResp ¶
type GetCallBillingResp struct {
BaseResp
CallBilling []CallBilling `json:"call_billing"`
}
type GetCallTypeResp ¶
type GetCallbacksResp ¶
type GetCallerIDFilteringResp ¶
type GetCallerIDFilteringResp struct {
BaseResp
CallerIDFilters []CallerIDFilter `json:"filtering"`
}
type GetCarriersResp ¶
type GetChargesResp ¶
type GetClientPackagesResp ¶
type GetClientPackagesResp struct {
BaseResp
ClientPackages []ClientPackage `json:"packages"`
}
type GetClientThresholdResp ¶
type GetClientThresholdResp struct {
BaseResp
ThresholdInformation ClientThreshold `json:"threshold_information"`
}
type GetClientsResp ¶
type GetCountriesResp ¶
type GetDIDCountriesResp ¶
type GetDIDCountriesResp struct {
BaseResp
Countries []DIDCountries `json:"countries"`
}
type GetDIDsCanResp ¶
type GetDIDsInfoResp ¶
type GetDIDsInternationalResp ¶
type GetDIDsInternationalResp struct {
BaseResp
Locations []InternationalLocations `json:"locations"`
}
type GetDIDsUSAResp ¶
type GetDISAsResp ¶
type GetDTMFModesResp ¶
type GetDepositsResp ¶
type GetDeviceTypesResp ¶
type GetDeviceTypesResp struct {
BaseResp
DeviceTypes []DeviceType `json:"device_types"`
}
type GetForwardingsResp ¶
type GetForwardingsResp struct {
BaseResp
Forwardings []Forwarding `json:"forwardings"`
}
type GetIVRsResp ¶
type GetInternationalTypesResp ¶
type GetInternationalTypesResp struct {
BaseResp
Types []InternationalTypes `json:"types"`
}
type GetJoinWhenEmptyTypesResp ¶
type GetJoinWhenEmptyTypesResp struct {
BaseResp
JoinWhenEmptyTypes []JoinWhenEmptyType `json:"types"`
}
type GetLanguagesResp ¶
type GetLockInternationalResp ¶
type GetLockInternationalResp struct {
BaseResp
LockInternational []LockInternational `json:"lock_international"`
}
type GetMusicOnHoldResp ¶
type GetMusicOnHoldResp struct {
BaseResp
MusicOnHold []MusicOnHold `json:"music_on_hold"`
}
type GetNATResp ¶
type GetPackagesResp ¶
type GetPhonebookResp ¶
type GetPortabilityResp ¶
type GetProtocolResp ¶
type GetProvincesResp ¶
type GetQueuesResp ¶
type GetRateCentersResp ¶
type GetRateCentersResp struct {
BaseResp
RateCenters []RateCenter `json:"ratecenters"`
}
type GetRatesResp ¶
type GetRegistrationStatusResp ¶
type GetRegistrationStatusResp struct {
BaseResp
Registered string `json:"registered"`
Registrations []RegistrationStatus `json:"registrations"`
}
type GetReportEstimatedHoldTimeResp ¶
type GetReportEstimatedHoldTimeResp struct {
BaseResp
Types []EstimatedHoldTime `json:"types"`
}
type GetResellerBalanceResp ¶
type GetRoutesResp ¶
type GetServerInfoResp ¶
type GetStatesResp ¶
type GetStaticMembersResp ¶
type GetSubAccountsResp ¶
type GetTerminationRatesRep ¶
type GetTerminationRatesRep struct {
BaseResp
Route NumberValueDescription `json:"route"`
Rates []TerminationRate `json:"rates"`
}
type GetTimeConditionsResp ¶
type GetTimeConditionsResp struct {
BaseResp
TimeConditions []TimeCondition `json:"timeconditon"`
}
type GetTransactionHistoryResp ¶
type GetTransactionHistoryResp struct {
BaseResp
Transactions []Transaction `json:"transactions"`
}
type GetVoicemailAttachmentFormats ¶
type GetVoicemailAttachmentFormats struct {
BaseResp
VoicemailAttachmentFormats []VoicemailAttachmentFormat `json:"email_attachment_formats"`
}
type GetVoicemailSetups ¶
type GetVoicemailSetups struct {
BaseResp
VoicemailSetups []VoicemailSetup `json:"voicemailsetups"`
}
type IVR ¶
type IVR struct {
IVR string `json:"ivr"`
Name string `json:"name"`
Recording string `json:"recording"`
Timeout string `json:"timeout"`
Language string `json:"language"`
VoicemailSetup string `json:"voicemailsetup"`
Choices []IVRChoice `json:"choices"`
}
func (*IVR) UnmarshalJSON ¶
type InternationalLocations ¶
type InternationalLocations struct {
LocationId string `json:"location_id"`
LocationName string `json:"location_name"`
Country string `json:"country"`
AreaCode string `json:"area_code"`
Stock string `json:"stock"`
Monthly string `json:"montly"`
Setup string `json:"setup"`
Minute string `json:"minute"`
Channels string `json:"channels,omitempty"` //only used for GetDIDsInternationalGeographic
}
type InternationalTypes ¶
type InternationalTypes StringValueDescription
type JoinWhenEmptyType ¶
type JoinWhenEmptyType StringValueDescription
type Language ¶
type Language StringValueDescription
type LockInternational ¶
type LockInternational NumberValueDescription
The Value type seems to switch between int and string for some reason, so it needs a custom struct for now. TODO:Re-evaluate
type MusicOnHold ¶
type MusicOnHold StringValueDescription
type NAT ¶
type NAT StringValueDescription
type NumberValueDescription ¶
type Order ¶
type Order struct {
Routing BaseRoute `json:"routing"`
FailoverBusy BaseRoute `json:"failover_busy,omitempty"`
FailoverUnreachable BaseRoute `json:"failover_unreachable,omitempty"`
FailoverNoanswer BaseRoute `json:"failover_noanswer,omitempty"`
Voicemail string `json:"voicemail,omitempty"`
POP string `json:"pop"`
Dialtime json.Number `json:"dialtime"`
CNAM json.Number `json:"cnam"` //1: true, 0: false.
CalleridPrefix string `json:"callerid_prefix,omitempty"`
Note string `json:"note,omitempty"`
BillingType json.Number `json:"billing_type"`
Test bool `json:"test,omitempty"`
}
type Package ¶
type Package struct {
Package string `json:"package"` //This is the package id.
Name string `json:"name"`
MarkupFixed string `json:"markup_fixed"`
MarkupPercentage string `json:"markup_percentage"`
Pulse string `json:"pulse"`
InternationalRoute string `json:"international_route"`
CanadaRoute string `json:"canada_route"`
MonthlyFee string `json:"monthly_fee"`
SetupFee string `json:"setup_fee"`
FreeMinutes string `json:"free_minutes"`
}
type Protocol ¶
type Protocol NumberValueDescription
type Queue ¶
type Queue struct {
Queue string `json:"queue"`
QueueName string `json:"queue_name"`
QueueNumber string `json:"queue_number"`
QueueLanguage string `json:"queue_language"`
QueuePassword string `json:"queue_password"`
CalleridPrefix string `json:"callerid_prefix"`
JoinAnnouncement string `json:"join_announcement"`
PriorityWeight string `json:"priority_weight"`
AgentAnnouncement string `json:"agent_announcement"`
ReportHoldTimeAgent string `json:"report_hold_time_agent"`
MemberDelay string `json:"member_delay"`
MusicOnHold string `json:"music_on_hold"`
MaximumWaitTime string `json:"maximum_wait_time"`
MaximumCallers string `json:"maximum_callers"`
JoinWhenEmpty string `json:"join_when_empty"`
LeaveWhenEmpty string `json:"leave_when_empty"`
RingStrategy string `json:"ring_strategy"`
RingInuse string `json:"ring_inuse"`
AgentRingTimeout string `json:"agent_ring_timeout"`
RetryTimer string `json:"retry_timer"`
WrapupTime string `json:"wrapup_time"`
VoiceAnnouncement string `json:"voice_announcement"`
FrequencyAnnouncement string `json:"frequency_announcement"`
AnnouncePositionFrequency string `json:"announce_position_frecuency"`
AnnounceRoundSeconds string `json:"announce_round_seconds"`
IfAnnouncePositionEnabledReportEstimatedHoldTime string `json:"if_announce_position_enabled_report_estimated_hold_time"`
ThankyouForYourPatience string `json:"thankyou_for_your_patience"`
FailOverRoutingTimeout BaseRoute `json:"fail_over_routing_timeout"`
FailOverRoutingFull BaseRoute `json:"fail_over_routing_full"`
FailOverRoutingJoinEmpty BaseRoute `json:"fail_over_routing_join_empty"`
FailOverRoutingLeaveEmpty BaseRoute `json:"fail_over_routing_leave_empty"`
}
type RateCenter ¶
func (*RateCenter) UnmarshalJSON ¶
func (c *RateCenter) UnmarshalJSON(data []byte) error
type RegistrationStatus ¶
type Route ¶
type Route NumberValueDescription
type SearchDIDsCanResp ¶
type SetClientReq ¶
type SetClientReq Client
type SetClientThresholdReq ¶
type SetClientThresholdReq struct {
Client string `json:"client"`
Threshold string `json:"threshold"`
Email string `json:"email"`
}
TODO:Stan Req objects aren't needed out side of the package. Change.
type SetSubAccountResp ¶
type SetSubAccountResp struct {
BaseResp
}
type SignupClientReq ¶
type StatusResp ¶
type StatusResp interface {
GetStatus() string
}
type StringValueDescription ¶
type TerminationRate ¶
type TimeCondition ¶
type TimeCondition struct {
TimeCondition string `json:"timecondition"`
Name string `json:"name"`
RoutingMatch string `json:"routingmatch"`
RoutingNoMatch string `json:"routingnomatch"`
StartHour string `json:"starthour"`
StartMinute string `json:"startminute"`
EndHour string `json:"endhour"`
EndMinute string `json:"endminute"`
WeekdayStart string `json:"weekdaystart"`
WeekdayEnd string `json:"weekdayend"`
}
type Transaction ¶
type Transaction struct {
Date string `json:"date"` //can't be time.Time as the API likes to return things like this: {"date":"2015-11-02 to 2016-11-01","uniqueid":"n\/a","type":"CNAM Queries","description":"CNAM Queries","ammount":"-0.2160"}
UniqueId string `json:"uniqueid"`
Type string `json:"type"`
Description string `json:"description"`
Amount string `json:"amount"`
}
type VOIPClient ¶
func NewVOIPClient ¶
func NewVOIPClient(url, username, password string, debug bool) *VOIPClient
func (*VOIPClient) Get ¶
func (c *VOIPClient) Get(method string, values url.Values, entity interface{}) error
func (*VOIPClient) NewAccountsAPI ¶
func (c *VOIPClient) NewAccountsAPI() *AccountsAPI
func (*VOIPClient) NewCDRAPI ¶
func (c *VOIPClient) NewCDRAPI() *CDRAPI
func (*VOIPClient) NewClientsAPI ¶
func (c *VOIPClient) NewClientsAPI() *ClientsAPI
func (*VOIPClient) NewDIDsAPI ¶
func (c *VOIPClient) NewDIDsAPI() *DIDsAPI
Only partially implemented. See dids.go.
func (*VOIPClient) NewGeneralAPI ¶
func (c *VOIPClient) NewGeneralAPI() *GeneralAPI
func (*VOIPClient) NewVoicemailAPI ¶
func (c *VOIPClient) NewVoicemailAPI() *VoicemailAPI
Not implemented yet.
func (*VOIPClient) Post ¶
func (c *VOIPClient) Post(method string, entity interface{}, respStruct interface{}) error
func (*VOIPClient) WriteStruct ¶
func (c *VOIPClient) WriteStruct(writer *multipart.Writer, iface interface{}) error
type VoicemailAPI ¶
type VoicemailAPI struct {
// contains filtered or unexported fields
}
Not implemented yet.
type VoicemailAttachmentFormat ¶
type VoicemailAttachmentFormat StringValueDescription
type VoicemailSetup ¶
type VoicemailSetup NumberValueDescription