-
Notifications
You must be signed in to change notification settings - Fork 28
/
model_assign_terminals_request.go
255 lines (213 loc) · 8.11 KB
/
model_assign_terminals_request.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
/*
POS Terminal Management API
API version: 1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package posterminalmanagement
import (
"encoding/json"
"github.com/adyen/adyen-go-api-library/v7/src/common"
)
// checks if the AssignTerminalsRequest type satisfies the MappedNullable interface at compile time
var _ common.MappedNullable = &AssignTerminalsRequest{}
// AssignTerminalsRequest struct for AssignTerminalsRequest
type AssignTerminalsRequest struct {
// Your company account. To return terminals to the company inventory, specify only this parameter and the `terminals`.
CompanyAccount string `json:"companyAccount"`
// Name of the merchant account. Specify this parameter to assign terminals to this merchant account or to a store under this merchant account.
MerchantAccount *string `json:"merchantAccount,omitempty"`
// Boolean that indicates if you are assigning the terminals to the merchant inventory. Do not use when assigning terminals to a store. Required when assigning the terminal to a merchant account. - Set this to **true** to assign the terminals to the merchant inventory. This also means that the terminals cannot be boarded. - Set this to **false** to assign the terminals to the merchant account as in-store terminals. This makes the terminals ready to be boarded and to process payments through the specified merchant account.
MerchantInventory *bool `json:"merchantInventory,omitempty"`
// The store code of the store that you want to assign the terminals to.
Store *string `json:"store,omitempty"`
// Array containing a list of terminal IDs that you want to assign or reassign to the merchant account or store, or that you want to return to the company inventory. For example, `[\"V400m-324689776\",\"P400Plus-329127412\"]`.
Terminals []string `json:"terminals"`
}
// NewAssignTerminalsRequest instantiates a new AssignTerminalsRequest object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewAssignTerminalsRequest(companyAccount string, terminals []string) *AssignTerminalsRequest {
this := AssignTerminalsRequest{}
this.CompanyAccount = companyAccount
this.Terminals = terminals
return &this
}
// NewAssignTerminalsRequestWithDefaults instantiates a new AssignTerminalsRequest object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewAssignTerminalsRequestWithDefaults() *AssignTerminalsRequest {
this := AssignTerminalsRequest{}
return &this
}
// GetCompanyAccount returns the CompanyAccount field value
func (o *AssignTerminalsRequest) GetCompanyAccount() string {
if o == nil {
var ret string
return ret
}
return o.CompanyAccount
}
// GetCompanyAccountOk returns a tuple with the CompanyAccount field value
// and a boolean to check if the value has been set.
func (o *AssignTerminalsRequest) GetCompanyAccountOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.CompanyAccount, true
}
// SetCompanyAccount sets field value
func (o *AssignTerminalsRequest) SetCompanyAccount(v string) {
o.CompanyAccount = v
}
// GetMerchantAccount returns the MerchantAccount field value if set, zero value otherwise.
func (o *AssignTerminalsRequest) GetMerchantAccount() string {
if o == nil || common.IsNil(o.MerchantAccount) {
var ret string
return ret
}
return *o.MerchantAccount
}
// GetMerchantAccountOk returns a tuple with the MerchantAccount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AssignTerminalsRequest) GetMerchantAccountOk() (*string, bool) {
if o == nil || common.IsNil(o.MerchantAccount) {
return nil, false
}
return o.MerchantAccount, true
}
// HasMerchantAccount returns a boolean if a field has been set.
func (o *AssignTerminalsRequest) HasMerchantAccount() bool {
if o != nil && !common.IsNil(o.MerchantAccount) {
return true
}
return false
}
// SetMerchantAccount gets a reference to the given string and assigns it to the MerchantAccount field.
func (o *AssignTerminalsRequest) SetMerchantAccount(v string) {
o.MerchantAccount = &v
}
// GetMerchantInventory returns the MerchantInventory field value if set, zero value otherwise.
func (o *AssignTerminalsRequest) GetMerchantInventory() bool {
if o == nil || common.IsNil(o.MerchantInventory) {
var ret bool
return ret
}
return *o.MerchantInventory
}
// GetMerchantInventoryOk returns a tuple with the MerchantInventory field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AssignTerminalsRequest) GetMerchantInventoryOk() (*bool, bool) {
if o == nil || common.IsNil(o.MerchantInventory) {
return nil, false
}
return o.MerchantInventory, true
}
// HasMerchantInventory returns a boolean if a field has been set.
func (o *AssignTerminalsRequest) HasMerchantInventory() bool {
if o != nil && !common.IsNil(o.MerchantInventory) {
return true
}
return false
}
// SetMerchantInventory gets a reference to the given bool and assigns it to the MerchantInventory field.
func (o *AssignTerminalsRequest) SetMerchantInventory(v bool) {
o.MerchantInventory = &v
}
// GetStore returns the Store field value if set, zero value otherwise.
func (o *AssignTerminalsRequest) GetStore() string {
if o == nil || common.IsNil(o.Store) {
var ret string
return ret
}
return *o.Store
}
// GetStoreOk returns a tuple with the Store field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AssignTerminalsRequest) GetStoreOk() (*string, bool) {
if o == nil || common.IsNil(o.Store) {
return nil, false
}
return o.Store, true
}
// HasStore returns a boolean if a field has been set.
func (o *AssignTerminalsRequest) HasStore() bool {
if o != nil && !common.IsNil(o.Store) {
return true
}
return false
}
// SetStore gets a reference to the given string and assigns it to the Store field.
func (o *AssignTerminalsRequest) SetStore(v string) {
o.Store = &v
}
// GetTerminals returns the Terminals field value
func (o *AssignTerminalsRequest) GetTerminals() []string {
if o == nil {
var ret []string
return ret
}
return o.Terminals
}
// GetTerminalsOk returns a tuple with the Terminals field value
// and a boolean to check if the value has been set.
func (o *AssignTerminalsRequest) GetTerminalsOk() ([]string, bool) {
if o == nil {
return nil, false
}
return o.Terminals, true
}
// SetTerminals sets field value
func (o *AssignTerminalsRequest) SetTerminals(v []string) {
o.Terminals = v
}
func (o AssignTerminalsRequest) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AssignTerminalsRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["companyAccount"] = o.CompanyAccount
if !common.IsNil(o.MerchantAccount) {
toSerialize["merchantAccount"] = o.MerchantAccount
}
if !common.IsNil(o.MerchantInventory) {
toSerialize["merchantInventory"] = o.MerchantInventory
}
if !common.IsNil(o.Store) {
toSerialize["store"] = o.Store
}
toSerialize["terminals"] = o.Terminals
return toSerialize, nil
}
type NullableAssignTerminalsRequest struct {
value *AssignTerminalsRequest
isSet bool
}
func (v NullableAssignTerminalsRequest) Get() *AssignTerminalsRequest {
return v.value
}
func (v *NullableAssignTerminalsRequest) Set(val *AssignTerminalsRequest) {
v.value = val
v.isSet = true
}
func (v NullableAssignTerminalsRequest) IsSet() bool {
return v.isSet
}
func (v *NullableAssignTerminalsRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAssignTerminalsRequest(val *AssignTerminalsRequest) *NullableAssignTerminalsRequest {
return &NullableAssignTerminalsRequest{value: val, isSet: true}
}
func (v NullableAssignTerminalsRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAssignTerminalsRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}