-
Notifications
You must be signed in to change notification settings - Fork 1
/
accounting_params.go
101 lines (80 loc) · 3.37 KB
/
accounting_params.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
package modzy
import "github.com/modzy/sdk-go/model"
// GetEntitlementsOutput -
type GetEntitlementsOutput struct {
Entitlements []model.Entitlement `json:"entitlements"`
}
type ListAccountingUsersInput struct {
Paging PagingInput
}
// ListAccountingUsersFilterField are known field names that can be used when filtering the jobs history
type ListAccountingUsersFilterField string
const (
ListAccountingUsersFilterFieldFirstName ListAccountingUsersFilterField = "firstName"
ListAccountingUsersFilterFieldLastName ListAccountingUsersFilterField = "lastName"
ListAccountingUsersFilterFieldEmail ListAccountingUsersFilterField = "email"
ListAccountingUsersFilterFieldSearch ListAccountingUsersFilterField = "search"
ListAccountingUsersFilterFieldStatus ListAccountingUsersFilterField = "status"
ListAccountingUsersFilterFieldAccessKey ListAccountingUsersFilterField = "accessKey"
ListAccountingUsersFilterFieldStartDate ListAccountingUsersFilterField = "startDate"
ListAccountingUsersFilterFieldEndDate ListAccountingUsersFilterField = "endDate"
ListAccountingUsersFilterFieldSearchDate ListAccountingUsersFilterField = "searchDate"
)
func (i *ListAccountingUsersInput) WithPaging(perPage int, page int) *ListAccountingUsersInput {
i.Paging = NewPaging(perPage, page)
return i
}
func (i *ListAccountingUsersInput) WithFilter(field ListAccountingUsersFilterField, value string) *ListAccountingUsersInput {
i.Paging = i.Paging.WithFilterAnd(string(field), value)
return i
}
func (i *ListAccountingUsersInput) WithFilterAnd(field ListAccountingUsersFilterField, values ...string) *ListAccountingUsersInput {
i.Paging = i.Paging.WithFilterAnd(string(field), values...)
return i
}
func (i *ListAccountingUsersInput) WithFilterOr(field ListAccountingUsersFilterField, values ...string) *ListAccountingUsersInput {
i.Paging = i.Paging.WithFilterOr(string(field), values...)
return i
}
type ListAccountingUsersOutput struct {
Users []model.AccountingUser `json:"users"`
NextPage *ListAccountingUsersInput `json:"nextPage"`
}
type GetLicenseOutput struct {
License model.License `json:"license"`
}
type ListProjectsInput struct {
Paging PagingInput
}
// ListProjectsFilterField are known field names that can be used when filtering the jobs history
type ListProjectsFilterField string
const (
ListProjectsFilterFieldSearch ListProjectsFilterField = "search"
ListProjectsFilterFieldStatus ListProjectsFilterField = "status"
)
func (i *ListProjectsInput) WithPaging(perPage int, page int) *ListProjectsInput {
i.Paging = NewPaging(perPage, page)
return i
}
func (i *ListProjectsInput) WithFilter(field ListProjectsFilterField, value string) *ListProjectsInput {
i.Paging = i.Paging.WithFilterAnd(string(field), value)
return i
}
func (i *ListProjectsInput) WithFilterAnd(field ListProjectsFilterField, values ...string) *ListProjectsInput {
i.Paging = i.Paging.WithFilterAnd(string(field), values...)
return i
}
func (i *ListProjectsInput) WithFilterOr(field ListProjectsFilterField, values ...string) *ListProjectsInput {
i.Paging = i.Paging.WithFilterOr(string(field), values...)
return i
}
type ListProjectsOutput struct {
Projects []model.AccountingProject `json:"projects"`
NextPage *ListProjectsInput `json:"nextPage"`
}
type GetProjectDetailsInput struct {
ProjectID string
}
type GetProjectDetailsOutput struct {
Project model.AccountingProject `json:"project"`
}