Documentation ¶
Index ¶
- func CreateBackorderDocument(c messagebird.Client, backOrderID string, req *CreateBackorderDocumentRequest) error
- func CreateBackorderEndUserDetail(c messagebird.Client, backOrderID string, ...) error
- func Delete(c messagebird.Client, phoneNumber string) error
- func DeleteNumberFromPool(c messagebird.Client, poolName string, numbers []string) error
- func DeletePool(c messagebird.Client, poolName string) error
- type AddNumberToPollResult
- type BackOrderID
- type Backorder
- type BackorderDocument
- type BackorderDocuments
- type CreateBackorderDocumentRequest
- type CreateBackorderEndUserDetailRequest
- type CreatePoolRequest
- type EndUserDetail
- type EndUserDetails
- type FailResult
- type Feature
- type ListPoolNumbersRequest
- type ListPoolRequest
- type ListRequest
- type Number
- type Numbers
- type NumbersSearching
- type PlaceBackorderRequest
- type Pool
- type PoolConfiguration
- type PoolNumbers
- type Pools
- type Prefix
- type Product
- type Products
- type ProductsRequest
- type PurchaseRequest
- type SearchPattern
- type SearchRequest
- type ShortProduct
- type Type
- type UpdatePoolRequest
- type UpdateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateBackorderDocument ¶
func CreateBackorderDocument(c messagebird.Client, backOrderID string, req *CreateBackorderDocumentRequest) error
func CreateBackorderEndUserDetail ¶
func CreateBackorderEndUserDetail(c messagebird.Client, backOrderID string, req *CreateBackorderEndUserDetailRequest) error
func Delete ¶
func Delete(c messagebird.Client, phoneNumber string) error
Delete a purchased phone number
func DeleteNumberFromPool ¶
func DeleteNumberFromPool(c messagebird.Client, poolName string, numbers []string) error
func DeletePool ¶
func DeletePool(c messagebird.Client, poolName string) error
Types ¶
type AddNumberToPollResult ¶
type AddNumberToPollResult struct { Success []string Fail []FailResult }
func AddNumberToPool ¶
func AddNumberToPool(c messagebird.Client, poolName string, numbers []string) (*AddNumberToPollResult, error)
type BackOrderID ¶
type BackOrderID string
func PlaceBackorder ¶
func PlaceBackorder(c messagebird.Client, req *PlaceBackorderRequest) (BackOrderID, error)
type Backorder ¶
type Backorder struct { ID string ProductID int Country string Prefix string Status string ReasonCodes []string }
func ReadBackorder ¶
func ReadBackorder(c messagebird.Client, backOrderID string) (*Backorder, error)
type BackorderDocument ¶
type BackorderDocuments ¶
type BackorderDocuments struct {
Limit, Count int
Items []*BackorderDocument
}
func ListBackorderDocuments ¶
func ListBackorderDocuments(c messagebird.Client, backOrderID string) (*BackorderDocuments, error)
type CreatePoolRequest ¶
type CreatePoolRequest struct { PoolName string `json:"poolName"` Service string `json:"service"` Configuration *PoolConfiguration `json:"configuration"` }
type EndUserDetail ¶
type EndUserDetails ¶
type EndUserDetails struct {
Items []*EndUserDetail
}
func ListBackorderEndUserDetails ¶
func ListBackorderEndUserDetails(c messagebird.Client, backOrderID string) (*EndUserDetails, error)
type FailResult ¶
type FailResult struct {
Number, Error string
}
type ListPoolNumbersRequest ¶
type ListPoolRequest ¶
type ListRequest ¶
type ListRequest struct { Limit int Offset int Features []string // Possible values: sms, voice, mms. Tags []string Number string Region string Locality string Type string // Possible values: landline, mobile, premium_rate and toll_free. }
ListRequest can be used to set query params in List().
func (*ListRequest) QueryParams ¶
func (lr *ListRequest) QueryParams() string
type Number ¶
type Number struct { Number string Country string Region string Locality string Features []Feature Tags []string Type Type Status string VerificationRequired bool InitialContractDuration int InboundCallsOnly bool MonthlyPrice float64 Currency string Conditions []string CreatedAt *time.Time RenewalAt *time.Time }
Number represents a specific phone number.
func Purchase ¶
func Purchase(c messagebird.Client, numberPurchaseRequest *PurchaseRequest) (*Number, error)
Purchase purchases a phone number.
func Read ¶
func Read(c messagebird.Client, phoneNumber string) (*Number, error)
Read get a purchased phone number
func Update ¶
func Update(c messagebird.Client, phoneNumber string, req *UpdateRequest) (*Number, error)
Update updates a purchased phone number. Only updating *tags* is supported at the moment.
type Numbers ¶
Numbers provide a list of all purchased phone numbers.
func List ¶
func List(c messagebird.Client, params *ListRequest) (*Numbers, error)
List fetches all purchased phone numbers
type NumbersSearching ¶
NumbersSearching provide a list of all phone numbers. that are available for purchase.
func Search ¶
func Search(c messagebird.Client, countryCode string, params *SearchRequest) (*NumbersSearching, error)
Search for phone numbers available for purchase, countryCode needs to be in Alpha-2 country code (example: NL)
type PlaceBackorderRequest ¶
type Pool ¶
type Pool struct { ID string Name string Service string Configuration *PoolConfiguration NumbersCount int CreatedAt *time.Time UpdatedAt *time.Time }
func CreatePool ¶
func CreatePool(c messagebird.Client, req *CreatePoolRequest) (*Pool, error)
func UpdatePool ¶
func UpdatePool(c messagebird.Client, poolName string, req *UpdatePoolRequest) (*Pool, error)
type PoolConfiguration ¶
type PoolConfiguration struct {
ByCountry bool `json:"byCountry"`
}
type PoolNumbers ¶
func ListPoolNumbers ¶
func ListPoolNumbers(c messagebird.Client, poolName string, req *ListPoolNumbersRequest) (*PoolNumbers, error)
type Pools ¶
func ListPool ¶
func ListPool(c messagebird.Client, req *ListPoolRequest) (*Pools, error)
type Product ¶
type Product struct { Country string NumberType string BackOrderLeadTime string ReachableFromNationalFixed bool ReachableFromNationalMobile bool ReachableFromPayPhone bool VerificationRequired bool InitialContractDuration string Prefixes []*Prefix Remarks []string Conditions []string EndUserData []string ForbiddenContent []string }
func ReadProduct ¶
func ReadProduct(c messagebird.Client, productID string) (*Product, error)
ReadProduct get a purchased phone number
type Products ¶
type Products struct { Items []*ShortProduct Count int Limit int }
func SearchProducts ¶
func SearchProducts(c messagebird.Client, params *ProductsRequest) (*Products, error)
SearchProducts searches for unified communication phone numbers that are available for you to back order.
type ProductsRequest ¶
type ProductsRequest struct { CountryCode string `json:"countryCode"` Limit int `json:"limit"` Features []string `json:"features"` Type string `json:"type"` Prefix string `json:"prefix"` }
ProductsRequest can be used to set query params in SearchProducts().
func (*ProductsRequest) QueryParams ¶
func (req *ProductsRequest) QueryParams() string
type PurchaseRequest ¶
type PurchaseRequest struct { Number string `json:"number"` Country string `json:"countryCode"` BillingIntervalMonths int `json:"billingIntervalMonths"` }
PurchaseRequest can be used to purchase a number.
type SearchPattern ¶
type SearchPattern string
const ( // SearchPatternStart force phone numbers to start with the provided fragment. SearchPatternStart SearchPattern = "start" // SearchPatternEnd phone numbers can be somewhere within the provided fragment. SearchPatternEnd SearchPattern = "end" // SearchPatternAnyWhere force phone numbers to end with the provided fragment. SearchPatternAnyWhere SearchPattern = "anywhere" )
type SearchRequest ¶
type SearchRequest struct { Limit int Offset int Number string Country string Region string Locality string Features []string // Possible values: sms, voice, mms. Tags []string Type string // Possible values: landline, mobile, premium_rate and toll_free. Status string SearchPattern SearchPattern ExcludeNumbersRequireVerification bool // exclude_numbers_require_verification Prices bool }
SearchRequest can be used to set query params in Search().
func (*SearchRequest) QueryParams ¶
func (sr *SearchRequest) QueryParams() string
type ShortProduct ¶
type UpdatePoolRequest ¶
type UpdatePoolRequest struct { PoolName string `json:"poolName"` // new pool name Configuration *PoolConfiguration `json:"configuration"` }
type UpdateRequest ¶
type UpdateRequest struct {
Tags []string `json:"tags"`
}
UpdateRequest can be used to set tags update.