-
Notifications
You must be signed in to change notification settings - Fork 2
/
availablephonenumber_client.go
54 lines (46 loc) · 2 KB
/
availablephonenumber_client.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING;
// Autogenerated by clientgenerator -r AvailablePhoneNumber -m R DO NOT EDIT
package api
import (
"github.com/exotel/goapi/assets/types"
"github.com/exotel/goapi/resources"
)
//AvailablePhoneNumberService is the struct that defines the availablephonenumber information and has fubnctions to perform availablephonenumber level
type AvailablePhoneNumberService struct {
Client
}
//Get sets the action as types.READ
func (__receiver_AService *AvailablePhoneNumberService) Get() *AvailablePhoneNumberService {
if len(__receiver_AService.ResourceID) == 0 {
__receiver_AService.action = types.BULKREAD
__receiver_AService.data = resources.AvailablePhoneNumberFilter{}
__receiver_AService.url = resources.AvailablePhoneNumberURLS[types.BULKREAD]
} else {
__receiver_AService.data = struct{}{}
__receiver_AService.url = resources.AvailablePhoneNumberURLS[types.READ]
__receiver_AService.action = types.READ
}
return __receiver_AService
}
//ID sets the id for the resource request
func (__receiver_AService *AvailablePhoneNumberService) ID(id string) *AvailablePhoneNumberService {
__receiver_AService.ResourceID = id
switch __receiver_AService.action {
case types.BULKREAD:
__receiver_AService.data = struct{}{}
__receiver_AService.url = resources.AvailablePhoneNumberURLS[types.READ]
__receiver_AService.action = types.READ
}
return __receiver_AService
}
//Filter set the filter for read operation for read
func (__receiver_AService *AvailablePhoneNumberService) Filter(filter resources.AvailablePhoneNumberFilter) *AvailablePhoneNumberService {
__receiver_AService.data = filter
return __receiver_AService
}
//AvailablePhoneNumber returns an instance of AvailablePhoneNumberService
func (c *Client) AvailablePhoneNumber() *AvailablePhoneNumberService {
availablephonenumberService := AvailablePhoneNumberService{Client: *c}
availablephonenumberService.validActions = types.READ | types.BULKREAD | 0x00
return &availablephonenumberService
}