/
model_get_all_orders_200_response_data_inner_amt.go
313 lines (262 loc) · 9.6 KB
/
model_get_all_orders_200_response_data_inner_amt.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
/*
Tokopedia API
Tokopedia API
API version: 1.0
Contact: dev@sirclo.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package tokopedia
import (
"encoding/json"
)
// checks if the GetAllOrders200ResponseDataInnerAmt type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GetAllOrders200ResponseDataInnerAmt{}
// GetAllOrders200ResponseDataInnerAmt struct for GetAllOrders200ResponseDataInnerAmt
type GetAllOrders200ResponseDataInnerAmt struct {
// Total Product Price
TtlProductPrice *float64 `json:"ttl_product_price,omitempty"`
// Shipping Cost
ShippingCost *float64 `json:"shipping_cost,omitempty"`
// Insurance Cost
InsuranceCost *float64 `json:"insurance_cost,omitempty"`
// Total Amount
TtlAmount *float64 `json:"ttl_amount,omitempty"`
// Voucher Amount
VoucherAmount *float64 `json:"voucher_amount,omitempty"`
// Toppoints Amount
ToppointsAmount *float64 `json:"toppoints_amount,omitempty"`
}
// NewGetAllOrders200ResponseDataInnerAmt instantiates a new GetAllOrders200ResponseDataInnerAmt 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 NewGetAllOrders200ResponseDataInnerAmt() *GetAllOrders200ResponseDataInnerAmt {
this := GetAllOrders200ResponseDataInnerAmt{}
return &this
}
// NewGetAllOrders200ResponseDataInnerAmtWithDefaults instantiates a new GetAllOrders200ResponseDataInnerAmt 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 NewGetAllOrders200ResponseDataInnerAmtWithDefaults() *GetAllOrders200ResponseDataInnerAmt {
this := GetAllOrders200ResponseDataInnerAmt{}
return &this
}
// GetTtlProductPrice returns the TtlProductPrice field value if set, zero value otherwise.
func (o *GetAllOrders200ResponseDataInnerAmt) GetTtlProductPrice() float64 {
if o == nil || IsNil(o.TtlProductPrice) {
var ret float64
return ret
}
return *o.TtlProductPrice
}
// GetTtlProductPriceOk returns a tuple with the TtlProductPrice field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetAllOrders200ResponseDataInnerAmt) GetTtlProductPriceOk() (*float64, bool) {
if o == nil || IsNil(o.TtlProductPrice) {
return nil, false
}
return o.TtlProductPrice, true
}
// HasTtlProductPrice returns a boolean if a field has been set.
func (o *GetAllOrders200ResponseDataInnerAmt) HasTtlProductPrice() bool {
if o != nil && !IsNil(o.TtlProductPrice) {
return true
}
return false
}
// SetTtlProductPrice gets a reference to the given float64 and assigns it to the TtlProductPrice field.
func (o *GetAllOrders200ResponseDataInnerAmt) SetTtlProductPrice(v float64) {
o.TtlProductPrice = &v
}
// GetShippingCost returns the ShippingCost field value if set, zero value otherwise.
func (o *GetAllOrders200ResponseDataInnerAmt) GetShippingCost() float64 {
if o == nil || IsNil(o.ShippingCost) {
var ret float64
return ret
}
return *o.ShippingCost
}
// GetShippingCostOk returns a tuple with the ShippingCost field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetAllOrders200ResponseDataInnerAmt) GetShippingCostOk() (*float64, bool) {
if o == nil || IsNil(o.ShippingCost) {
return nil, false
}
return o.ShippingCost, true
}
// HasShippingCost returns a boolean if a field has been set.
func (o *GetAllOrders200ResponseDataInnerAmt) HasShippingCost() bool {
if o != nil && !IsNil(o.ShippingCost) {
return true
}
return false
}
// SetShippingCost gets a reference to the given float64 and assigns it to the ShippingCost field.
func (o *GetAllOrders200ResponseDataInnerAmt) SetShippingCost(v float64) {
o.ShippingCost = &v
}
// GetInsuranceCost returns the InsuranceCost field value if set, zero value otherwise.
func (o *GetAllOrders200ResponseDataInnerAmt) GetInsuranceCost() float64 {
if o == nil || IsNil(o.InsuranceCost) {
var ret float64
return ret
}
return *o.InsuranceCost
}
// GetInsuranceCostOk returns a tuple with the InsuranceCost field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetAllOrders200ResponseDataInnerAmt) GetInsuranceCostOk() (*float64, bool) {
if o == nil || IsNil(o.InsuranceCost) {
return nil, false
}
return o.InsuranceCost, true
}
// HasInsuranceCost returns a boolean if a field has been set.
func (o *GetAllOrders200ResponseDataInnerAmt) HasInsuranceCost() bool {
if o != nil && !IsNil(o.InsuranceCost) {
return true
}
return false
}
// SetInsuranceCost gets a reference to the given float64 and assigns it to the InsuranceCost field.
func (o *GetAllOrders200ResponseDataInnerAmt) SetInsuranceCost(v float64) {
o.InsuranceCost = &v
}
// GetTtlAmount returns the TtlAmount field value if set, zero value otherwise.
func (o *GetAllOrders200ResponseDataInnerAmt) GetTtlAmount() float64 {
if o == nil || IsNil(o.TtlAmount) {
var ret float64
return ret
}
return *o.TtlAmount
}
// GetTtlAmountOk returns a tuple with the TtlAmount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetAllOrders200ResponseDataInnerAmt) GetTtlAmountOk() (*float64, bool) {
if o == nil || IsNil(o.TtlAmount) {
return nil, false
}
return o.TtlAmount, true
}
// HasTtlAmount returns a boolean if a field has been set.
func (o *GetAllOrders200ResponseDataInnerAmt) HasTtlAmount() bool {
if o != nil && !IsNil(o.TtlAmount) {
return true
}
return false
}
// SetTtlAmount gets a reference to the given float64 and assigns it to the TtlAmount field.
func (o *GetAllOrders200ResponseDataInnerAmt) SetTtlAmount(v float64) {
o.TtlAmount = &v
}
// GetVoucherAmount returns the VoucherAmount field value if set, zero value otherwise.
func (o *GetAllOrders200ResponseDataInnerAmt) GetVoucherAmount() float64 {
if o == nil || IsNil(o.VoucherAmount) {
var ret float64
return ret
}
return *o.VoucherAmount
}
// GetVoucherAmountOk returns a tuple with the VoucherAmount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetAllOrders200ResponseDataInnerAmt) GetVoucherAmountOk() (*float64, bool) {
if o == nil || IsNil(o.VoucherAmount) {
return nil, false
}
return o.VoucherAmount, true
}
// HasVoucherAmount returns a boolean if a field has been set.
func (o *GetAllOrders200ResponseDataInnerAmt) HasVoucherAmount() bool {
if o != nil && !IsNil(o.VoucherAmount) {
return true
}
return false
}
// SetVoucherAmount gets a reference to the given float64 and assigns it to the VoucherAmount field.
func (o *GetAllOrders200ResponseDataInnerAmt) SetVoucherAmount(v float64) {
o.VoucherAmount = &v
}
// GetToppointsAmount returns the ToppointsAmount field value if set, zero value otherwise.
func (o *GetAllOrders200ResponseDataInnerAmt) GetToppointsAmount() float64 {
if o == nil || IsNil(o.ToppointsAmount) {
var ret float64
return ret
}
return *o.ToppointsAmount
}
// GetToppointsAmountOk returns a tuple with the ToppointsAmount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetAllOrders200ResponseDataInnerAmt) GetToppointsAmountOk() (*float64, bool) {
if o == nil || IsNil(o.ToppointsAmount) {
return nil, false
}
return o.ToppointsAmount, true
}
// HasToppointsAmount returns a boolean if a field has been set.
func (o *GetAllOrders200ResponseDataInnerAmt) HasToppointsAmount() bool {
if o != nil && !IsNil(o.ToppointsAmount) {
return true
}
return false
}
// SetToppointsAmount gets a reference to the given float64 and assigns it to the ToppointsAmount field.
func (o *GetAllOrders200ResponseDataInnerAmt) SetToppointsAmount(v float64) {
o.ToppointsAmount = &v
}
func (o GetAllOrders200ResponseDataInnerAmt) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o GetAllOrders200ResponseDataInnerAmt) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.TtlProductPrice) {
toSerialize["ttl_product_price"] = o.TtlProductPrice
}
if !IsNil(o.ShippingCost) {
toSerialize["shipping_cost"] = o.ShippingCost
}
if !IsNil(o.InsuranceCost) {
toSerialize["insurance_cost"] = o.InsuranceCost
}
if !IsNil(o.TtlAmount) {
toSerialize["ttl_amount"] = o.TtlAmount
}
if !IsNil(o.VoucherAmount) {
toSerialize["voucher_amount"] = o.VoucherAmount
}
if !IsNil(o.ToppointsAmount) {
toSerialize["toppoints_amount"] = o.ToppointsAmount
}
return toSerialize, nil
}
type NullableGetAllOrders200ResponseDataInnerAmt struct {
value *GetAllOrders200ResponseDataInnerAmt
isSet bool
}
func (v NullableGetAllOrders200ResponseDataInnerAmt) Get() *GetAllOrders200ResponseDataInnerAmt {
return v.value
}
func (v *NullableGetAllOrders200ResponseDataInnerAmt) Set(val *GetAllOrders200ResponseDataInnerAmt) {
v.value = val
v.isSet = true
}
func (v NullableGetAllOrders200ResponseDataInnerAmt) IsSet() bool {
return v.isSet
}
func (v *NullableGetAllOrders200ResponseDataInnerAmt) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGetAllOrders200ResponseDataInnerAmt(val *GetAllOrders200ResponseDataInnerAmt) *NullableGetAllOrders200ResponseDataInnerAmt {
return &NullableGetAllOrders200ResponseDataInnerAmt{value: val, isSet: true}
}
func (v NullableGetAllOrders200ResponseDataInnerAmt) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGetAllOrders200ResponseDataInnerAmt) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}