-
Notifications
You must be signed in to change notification settings - Fork 88
/
model_credit_pay_stub_net_pay.go
270 lines (225 loc) · 8.49 KB
/
model_credit_pay_stub_net_pay.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
/*
* 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"
)
// CreditPayStubNetPay An object representing information about the net pay amount on the pay stub.
type CreditPayStubNetPay struct {
// Raw amount of the net pay for the pay period.
CurrentAmount NullableFloat64 `json:"current_amount"`
// Description of the net pay.
Description NullableString `json:"description"`
// The ISO-4217 currency code of the net pay. Always `null` if `unofficial_currency_code` is non-null.
IsoCurrencyCode NullableString `json:"iso_currency_code"`
// The unofficial currency code associated with the net pay. 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"`
// The year-to-date amount of the net pay.
YtdAmount NullableFloat64 `json:"ytd_amount"`
AdditionalProperties map[string]interface{}
}
type _CreditPayStubNetPay CreditPayStubNetPay
// NewCreditPayStubNetPay instantiates a new CreditPayStubNetPay 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 NewCreditPayStubNetPay(currentAmount NullableFloat64, description NullableString, isoCurrencyCode NullableString, unofficialCurrencyCode NullableString, ytdAmount NullableFloat64) *CreditPayStubNetPay {
this := CreditPayStubNetPay{}
this.CurrentAmount = currentAmount
this.Description = description
this.IsoCurrencyCode = isoCurrencyCode
this.UnofficialCurrencyCode = unofficialCurrencyCode
this.YtdAmount = ytdAmount
return &this
}
// NewCreditPayStubNetPayWithDefaults instantiates a new CreditPayStubNetPay 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 NewCreditPayStubNetPayWithDefaults() *CreditPayStubNetPay {
this := CreditPayStubNetPay{}
return &this
}
// GetCurrentAmount returns the CurrentAmount field value
// If the value is explicit nil, the zero value for float64 will be returned
func (o *CreditPayStubNetPay) 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
// 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 *CreditPayStubNetPay) GetCurrentAmountOk() (*float64, bool) {
if o == nil {
return nil, false
}
return o.CurrentAmount.Get(), o.CurrentAmount.IsSet()
}
// SetCurrentAmount sets field value
func (o *CreditPayStubNetPay) SetCurrentAmount(v float64) {
o.CurrentAmount.Set(&v)
}
// GetDescription returns the Description field value
// If the value is explicit nil, the zero value for string will be returned
func (o *CreditPayStubNetPay) GetDescription() string {
if o == nil || o.Description.Get() == nil {
var ret string
return ret
}
return *o.Description.Get()
}
// GetDescriptionOk returns a tuple with the Description field value
// 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 *CreditPayStubNetPay) GetDescriptionOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Description.Get(), o.Description.IsSet()
}
// SetDescription sets field value
func (o *CreditPayStubNetPay) SetDescription(v string) {
o.Description.Set(&v)
}
// GetIsoCurrencyCode returns the IsoCurrencyCode field value
// If the value is explicit nil, the zero value for string will be returned
func (o *CreditPayStubNetPay) 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
// 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 *CreditPayStubNetPay) GetIsoCurrencyCodeOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.IsoCurrencyCode.Get(), o.IsoCurrencyCode.IsSet()
}
// SetIsoCurrencyCode sets field value
func (o *CreditPayStubNetPay) SetIsoCurrencyCode(v string) {
o.IsoCurrencyCode.Set(&v)
}
// GetUnofficialCurrencyCode returns the UnofficialCurrencyCode field value
// If the value is explicit nil, the zero value for string will be returned
func (o *CreditPayStubNetPay) 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
// 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 *CreditPayStubNetPay) GetUnofficialCurrencyCodeOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.UnofficialCurrencyCode.Get(), o.UnofficialCurrencyCode.IsSet()
}
// SetUnofficialCurrencyCode sets field value
func (o *CreditPayStubNetPay) SetUnofficialCurrencyCode(v string) {
o.UnofficialCurrencyCode.Set(&v)
}
// GetYtdAmount returns the YtdAmount field value
// If the value is explicit nil, the zero value for float64 will be returned
func (o *CreditPayStubNetPay) 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
// 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 *CreditPayStubNetPay) GetYtdAmountOk() (*float64, bool) {
if o == nil {
return nil, false
}
return o.YtdAmount.Get(), o.YtdAmount.IsSet()
}
// SetYtdAmount sets field value
func (o *CreditPayStubNetPay) SetYtdAmount(v float64) {
o.YtdAmount.Set(&v)
}
func (o CreditPayStubNetPay) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["current_amount"] = o.CurrentAmount.Get()
}
if true {
toSerialize["description"] = o.Description.Get()
}
if true {
toSerialize["iso_currency_code"] = o.IsoCurrencyCode.Get()
}
if true {
toSerialize["unofficial_currency_code"] = o.UnofficialCurrencyCode.Get()
}
if true {
toSerialize["ytd_amount"] = o.YtdAmount.Get()
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return json.Marshal(toSerialize)
}
func (o *CreditPayStubNetPay) UnmarshalJSON(bytes []byte) (err error) {
varCreditPayStubNetPay := _CreditPayStubNetPay{}
if err = json.Unmarshal(bytes, &varCreditPayStubNetPay); err == nil {
*o = CreditPayStubNetPay(varCreditPayStubNetPay)
} else {
return err
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
delete(additionalProperties, "current_amount")
delete(additionalProperties, "description")
delete(additionalProperties, "iso_currency_code")
delete(additionalProperties, "unofficial_currency_code")
delete(additionalProperties, "ytd_amount")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableCreditPayStubNetPay struct {
value *CreditPayStubNetPay
isSet bool
}
func (v NullableCreditPayStubNetPay) Get() *CreditPayStubNetPay {
return v.value
}
func (v *NullableCreditPayStubNetPay) Set(val *CreditPayStubNetPay) {
v.value = val
v.isSet = true
}
func (v NullableCreditPayStubNetPay) IsSet() bool {
return v.isSet
}
func (v *NullableCreditPayStubNetPay) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreditPayStubNetPay(val *CreditPayStubNetPay) *NullableCreditPayStubNetPay {
return &NullableCreditPayStubNetPay{value: val, isSet: true}
}
func (v NullableCreditPayStubNetPay) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreditPayStubNetPay) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}