-
Notifications
You must be signed in to change notification settings - Fork 88
/
model_earnings_total.go
419 lines (354 loc) · 12.8 KB
/
model_earnings_total.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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
/*
* The Plaid API
*
* The Plaid REST API. Please see https://plaid.com/docs/api for more details.
*
* API version: 2020-09-14_1.508.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package plaid
import (
"encoding/json"
)
// EarningsTotal An object representing both the current pay period and year to date amount for an earning category.
type EarningsTotal struct {
// Total amount of the earnings for this pay period
CurrentAmount NullableFloat64 `json:"current_amount,omitempty"`
CurrentPay *Pay `json:"current_pay,omitempty"`
YtdPay *Pay `json:"ytd_pay,omitempty"`
// Total number of hours worked for this pay period
Hours NullableFloat32 `json:"hours,omitempty"`
// The ISO-4217 currency code of the line item. Always `null` if `unofficial_currency_code` is non-null.
IsoCurrencyCode NullableString `json:"iso_currency_code,omitempty"`
// The unofficial currency code associated with the security. Always `null` if `iso_currency_code` is non-`null`. Unofficial currency codes are used for currencies that do not have official ISO currency codes, such as cryptocurrencies and the currencies of certain countries. See the [currency code schema](https://plaid.com/docs/api/accounts#currency-code-schema) for a full listing of supported `iso_currency_code`s.
UnofficialCurrencyCode NullableString `json:"unofficial_currency_code,omitempty"`
// The total year-to-date amount of the earnings
YtdAmount NullableFloat64 `json:"ytd_amount,omitempty"`
AdditionalProperties map[string]interface{}
}
type _EarningsTotal EarningsTotal
// NewEarningsTotal instantiates a new EarningsTotal 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 NewEarningsTotal() *EarningsTotal {
this := EarningsTotal{}
return &this
}
// NewEarningsTotalWithDefaults instantiates a new EarningsTotal 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 NewEarningsTotalWithDefaults() *EarningsTotal {
this := EarningsTotal{}
return &this
}
// GetCurrentAmount returns the CurrentAmount field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *EarningsTotal) GetCurrentAmount() float64 {
if o == nil || o.CurrentAmount.Get() == nil {
var ret float64
return ret
}
return *o.CurrentAmount.Get()
}
// GetCurrentAmountOk returns a tuple with the CurrentAmount field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *EarningsTotal) GetCurrentAmountOk() (*float64, bool) {
if o == nil {
return nil, false
}
return o.CurrentAmount.Get(), o.CurrentAmount.IsSet()
}
// HasCurrentAmount returns a boolean if a field has been set.
func (o *EarningsTotal) HasCurrentAmount() bool {
if o != nil && o.CurrentAmount.IsSet() {
return true
}
return false
}
// SetCurrentAmount gets a reference to the given NullableFloat64 and assigns it to the CurrentAmount field.
func (o *EarningsTotal) SetCurrentAmount(v float64) {
o.CurrentAmount.Set(&v)
}
// SetCurrentAmountNil sets the value for CurrentAmount to be an explicit nil
func (o *EarningsTotal) SetCurrentAmountNil() {
o.CurrentAmount.Set(nil)
}
// UnsetCurrentAmount ensures that no value is present for CurrentAmount, not even an explicit nil
func (o *EarningsTotal) UnsetCurrentAmount() {
o.CurrentAmount.Unset()
}
// GetCurrentPay returns the CurrentPay field value if set, zero value otherwise.
func (o *EarningsTotal) GetCurrentPay() Pay {
if o == nil || o.CurrentPay == nil {
var ret Pay
return ret
}
return *o.CurrentPay
}
// GetCurrentPayOk returns a tuple with the CurrentPay field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EarningsTotal) GetCurrentPayOk() (*Pay, bool) {
if o == nil || o.CurrentPay == nil {
return nil, false
}
return o.CurrentPay, true
}
// HasCurrentPay returns a boolean if a field has been set.
func (o *EarningsTotal) HasCurrentPay() bool {
if o != nil && o.CurrentPay != nil {
return true
}
return false
}
// SetCurrentPay gets a reference to the given Pay and assigns it to the CurrentPay field.
func (o *EarningsTotal) SetCurrentPay(v Pay) {
o.CurrentPay = &v
}
// GetYtdPay returns the YtdPay field value if set, zero value otherwise.
func (o *EarningsTotal) GetYtdPay() Pay {
if o == nil || o.YtdPay == nil {
var ret Pay
return ret
}
return *o.YtdPay
}
// GetYtdPayOk returns a tuple with the YtdPay field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EarningsTotal) GetYtdPayOk() (*Pay, bool) {
if o == nil || o.YtdPay == nil {
return nil, false
}
return o.YtdPay, true
}
// HasYtdPay returns a boolean if a field has been set.
func (o *EarningsTotal) HasYtdPay() bool {
if o != nil && o.YtdPay != nil {
return true
}
return false
}
// SetYtdPay gets a reference to the given Pay and assigns it to the YtdPay field.
func (o *EarningsTotal) SetYtdPay(v Pay) {
o.YtdPay = &v
}
// GetHours returns the Hours field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *EarningsTotal) GetHours() float32 {
if o == nil || o.Hours.Get() == nil {
var ret float32
return ret
}
return *o.Hours.Get()
}
// GetHoursOk returns a tuple with the Hours field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *EarningsTotal) GetHoursOk() (*float32, bool) {
if o == nil {
return nil, false
}
return o.Hours.Get(), o.Hours.IsSet()
}
// HasHours returns a boolean if a field has been set.
func (o *EarningsTotal) HasHours() bool {
if o != nil && o.Hours.IsSet() {
return true
}
return false
}
// SetHours gets a reference to the given NullableFloat32 and assigns it to the Hours field.
func (o *EarningsTotal) SetHours(v float32) {
o.Hours.Set(&v)
}
// SetHoursNil sets the value for Hours to be an explicit nil
func (o *EarningsTotal) SetHoursNil() {
o.Hours.Set(nil)
}
// UnsetHours ensures that no value is present for Hours, not even an explicit nil
func (o *EarningsTotal) UnsetHours() {
o.Hours.Unset()
}
// GetIsoCurrencyCode returns the IsoCurrencyCode field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *EarningsTotal) GetIsoCurrencyCode() string {
if o == nil || o.IsoCurrencyCode.Get() == nil {
var ret string
return ret
}
return *o.IsoCurrencyCode.Get()
}
// GetIsoCurrencyCodeOk returns a tuple with the IsoCurrencyCode field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *EarningsTotal) GetIsoCurrencyCodeOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.IsoCurrencyCode.Get(), o.IsoCurrencyCode.IsSet()
}
// HasIsoCurrencyCode returns a boolean if a field has been set.
func (o *EarningsTotal) HasIsoCurrencyCode() bool {
if o != nil && o.IsoCurrencyCode.IsSet() {
return true
}
return false
}
// SetIsoCurrencyCode gets a reference to the given NullableString and assigns it to the IsoCurrencyCode field.
func (o *EarningsTotal) SetIsoCurrencyCode(v string) {
o.IsoCurrencyCode.Set(&v)
}
// SetIsoCurrencyCodeNil sets the value for IsoCurrencyCode to be an explicit nil
func (o *EarningsTotal) SetIsoCurrencyCodeNil() {
o.IsoCurrencyCode.Set(nil)
}
// UnsetIsoCurrencyCode ensures that no value is present for IsoCurrencyCode, not even an explicit nil
func (o *EarningsTotal) UnsetIsoCurrencyCode() {
o.IsoCurrencyCode.Unset()
}
// GetUnofficialCurrencyCode returns the UnofficialCurrencyCode field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *EarningsTotal) GetUnofficialCurrencyCode() string {
if o == nil || o.UnofficialCurrencyCode.Get() == nil {
var ret string
return ret
}
return *o.UnofficialCurrencyCode.Get()
}
// GetUnofficialCurrencyCodeOk returns a tuple with the UnofficialCurrencyCode field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *EarningsTotal) GetUnofficialCurrencyCodeOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.UnofficialCurrencyCode.Get(), o.UnofficialCurrencyCode.IsSet()
}
// HasUnofficialCurrencyCode returns a boolean if a field has been set.
func (o *EarningsTotal) HasUnofficialCurrencyCode() bool {
if o != nil && o.UnofficialCurrencyCode.IsSet() {
return true
}
return false
}
// SetUnofficialCurrencyCode gets a reference to the given NullableString and assigns it to the UnofficialCurrencyCode field.
func (o *EarningsTotal) SetUnofficialCurrencyCode(v string) {
o.UnofficialCurrencyCode.Set(&v)
}
// SetUnofficialCurrencyCodeNil sets the value for UnofficialCurrencyCode to be an explicit nil
func (o *EarningsTotal) SetUnofficialCurrencyCodeNil() {
o.UnofficialCurrencyCode.Set(nil)
}
// UnsetUnofficialCurrencyCode ensures that no value is present for UnofficialCurrencyCode, not even an explicit nil
func (o *EarningsTotal) UnsetUnofficialCurrencyCode() {
o.UnofficialCurrencyCode.Unset()
}
// GetYtdAmount returns the YtdAmount field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *EarningsTotal) GetYtdAmount() float64 {
if o == nil || o.YtdAmount.Get() == nil {
var ret float64
return ret
}
return *o.YtdAmount.Get()
}
// GetYtdAmountOk returns a tuple with the YtdAmount field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *EarningsTotal) GetYtdAmountOk() (*float64, bool) {
if o == nil {
return nil, false
}
return o.YtdAmount.Get(), o.YtdAmount.IsSet()
}
// HasYtdAmount returns a boolean if a field has been set.
func (o *EarningsTotal) HasYtdAmount() bool {
if o != nil && o.YtdAmount.IsSet() {
return true
}
return false
}
// SetYtdAmount gets a reference to the given NullableFloat64 and assigns it to the YtdAmount field.
func (o *EarningsTotal) SetYtdAmount(v float64) {
o.YtdAmount.Set(&v)
}
// SetYtdAmountNil sets the value for YtdAmount to be an explicit nil
func (o *EarningsTotal) SetYtdAmountNil() {
o.YtdAmount.Set(nil)
}
// UnsetYtdAmount ensures that no value is present for YtdAmount, not even an explicit nil
func (o *EarningsTotal) UnsetYtdAmount() {
o.YtdAmount.Unset()
}
func (o EarningsTotal) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.CurrentAmount.IsSet() {
toSerialize["current_amount"] = o.CurrentAmount.Get()
}
if o.CurrentPay != nil {
toSerialize["current_pay"] = o.CurrentPay
}
if o.YtdPay != nil {
toSerialize["ytd_pay"] = o.YtdPay
}
if o.Hours.IsSet() {
toSerialize["hours"] = o.Hours.Get()
}
if o.IsoCurrencyCode.IsSet() {
toSerialize["iso_currency_code"] = o.IsoCurrencyCode.Get()
}
if o.UnofficialCurrencyCode.IsSet() {
toSerialize["unofficial_currency_code"] = o.UnofficialCurrencyCode.Get()
}
if o.YtdAmount.IsSet() {
toSerialize["ytd_amount"] = o.YtdAmount.Get()
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return json.Marshal(toSerialize)
}
func (o *EarningsTotal) UnmarshalJSON(bytes []byte) (err error) {
varEarningsTotal := _EarningsTotal{}
if err = json.Unmarshal(bytes, &varEarningsTotal); err == nil {
*o = EarningsTotal(varEarningsTotal)
} else {
return err
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
delete(additionalProperties, "current_amount")
delete(additionalProperties, "current_pay")
delete(additionalProperties, "ytd_pay")
delete(additionalProperties, "hours")
delete(additionalProperties, "iso_currency_code")
delete(additionalProperties, "unofficial_currency_code")
delete(additionalProperties, "ytd_amount")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableEarningsTotal struct {
value *EarningsTotal
isSet bool
}
func (v NullableEarningsTotal) Get() *EarningsTotal {
return v.value
}
func (v *NullableEarningsTotal) Set(val *EarningsTotal) {
v.value = val
v.isSet = true
}
func (v NullableEarningsTotal) IsSet() bool {
return v.isSet
}
func (v *NullableEarningsTotal) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableEarningsTotal(val *EarningsTotal) *NullableEarningsTotal {
return &NullableEarningsTotal{value: val, isSet: true}
}
func (v NullableEarningsTotal) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableEarningsTotal) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}