-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmodel_create_dispute_request.go
More file actions
344 lines (284 loc) · 10.5 KB
/
Copy pathmodel_create_dispute_request.go
File metadata and controls
344 lines (284 loc) · 10.5 KB
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
/*
OpenPay API
super charge your subscription management.
API version: 1.2.1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package getopenpay
import (
"encoding/json"
)
// checks if the CreateDisputeRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateDisputeRequest{}
// CreateDisputeRequest struct for CreateDisputeRequest
type CreateDisputeRequest struct {
Meta map[string]interface{} `json:"meta,omitempty"`
PaymentIntentId NullableString `json:"payment_intent_id,omitempty"`
Reason NullableString `json:"reason,omitempty"`
TheirDisputeId NullableString `json:"their_dispute_id,omitempty"`
TheirPaymentIntentId NullableString `json:"their_payment_intent_id,omitempty"`
AdditionalProperties map[string]interface{}
}
type _CreateDisputeRequest CreateDisputeRequest
// NewCreateDisputeRequest instantiates a new CreateDisputeRequest 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 NewCreateDisputeRequest() *CreateDisputeRequest {
this := CreateDisputeRequest{}
return &this
}
// NewCreateDisputeRequestWithDefaults instantiates a new CreateDisputeRequest 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 NewCreateDisputeRequestWithDefaults() *CreateDisputeRequest {
this := CreateDisputeRequest{}
return &this
}
// GetMeta returns the Meta field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateDisputeRequest) GetMeta() map[string]interface{} {
if o == nil {
var ret map[string]interface{}
return ret
}
return o.Meta
}
// GetMetaOk returns a tuple with the Meta 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 *CreateDisputeRequest) GetMetaOk() (map[string]interface{}, bool) {
if o == nil || IsNil(o.Meta) {
return map[string]interface{}{}, false
}
return o.Meta, true
}
// HasMeta returns a boolean if a field has been set.
func (o *CreateDisputeRequest) HasMeta() bool {
if o != nil && !IsNil(o.Meta) {
return true
}
return false
}
// SetMeta gets a reference to the given map[string]interface{} and assigns it to the Meta field.
func (o *CreateDisputeRequest) SetMeta(v map[string]interface{}) {
o.Meta = v
}
// GetPaymentIntentId returns the PaymentIntentId field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateDisputeRequest) GetPaymentIntentId() string {
if o == nil || IsNil(o.PaymentIntentId.Get()) {
var ret string
return ret
}
return *o.PaymentIntentId.Get()
}
// GetPaymentIntentIdOk returns a tuple with the PaymentIntentId 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 *CreateDisputeRequest) GetPaymentIntentIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.PaymentIntentId.Get(), o.PaymentIntentId.IsSet()
}
// HasPaymentIntentId returns a boolean if a field has been set.
func (o *CreateDisputeRequest) HasPaymentIntentId() bool {
if o != nil && o.PaymentIntentId.IsSet() {
return true
}
return false
}
// SetPaymentIntentId gets a reference to the given NullableString and assigns it to the PaymentIntentId field.
func (o *CreateDisputeRequest) SetPaymentIntentId(v string) {
o.PaymentIntentId.Set(&v)
}
// SetPaymentIntentIdNil sets the value for PaymentIntentId to be an explicit nil
func (o *CreateDisputeRequest) SetPaymentIntentIdNil() {
o.PaymentIntentId.Set(nil)
}
// UnsetPaymentIntentId ensures that no value is present for PaymentIntentId, not even an explicit nil
func (o *CreateDisputeRequest) UnsetPaymentIntentId() {
o.PaymentIntentId.Unset()
}
// GetReason returns the Reason field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateDisputeRequest) GetReason() string {
if o == nil || IsNil(o.Reason.Get()) {
var ret string
return ret
}
return *o.Reason.Get()
}
// GetReasonOk returns a tuple with the Reason 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 *CreateDisputeRequest) GetReasonOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Reason.Get(), o.Reason.IsSet()
}
// HasReason returns a boolean if a field has been set.
func (o *CreateDisputeRequest) HasReason() bool {
if o != nil && o.Reason.IsSet() {
return true
}
return false
}
// SetReason gets a reference to the given NullableString and assigns it to the Reason field.
func (o *CreateDisputeRequest) SetReason(v string) {
o.Reason.Set(&v)
}
// SetReasonNil sets the value for Reason to be an explicit nil
func (o *CreateDisputeRequest) SetReasonNil() {
o.Reason.Set(nil)
}
// UnsetReason ensures that no value is present for Reason, not even an explicit nil
func (o *CreateDisputeRequest) UnsetReason() {
o.Reason.Unset()
}
// GetTheirDisputeId returns the TheirDisputeId field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateDisputeRequest) GetTheirDisputeId() string {
if o == nil || IsNil(o.TheirDisputeId.Get()) {
var ret string
return ret
}
return *o.TheirDisputeId.Get()
}
// GetTheirDisputeIdOk returns a tuple with the TheirDisputeId 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 *CreateDisputeRequest) GetTheirDisputeIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.TheirDisputeId.Get(), o.TheirDisputeId.IsSet()
}
// HasTheirDisputeId returns a boolean if a field has been set.
func (o *CreateDisputeRequest) HasTheirDisputeId() bool {
if o != nil && o.TheirDisputeId.IsSet() {
return true
}
return false
}
// SetTheirDisputeId gets a reference to the given NullableString and assigns it to the TheirDisputeId field.
func (o *CreateDisputeRequest) SetTheirDisputeId(v string) {
o.TheirDisputeId.Set(&v)
}
// SetTheirDisputeIdNil sets the value for TheirDisputeId to be an explicit nil
func (o *CreateDisputeRequest) SetTheirDisputeIdNil() {
o.TheirDisputeId.Set(nil)
}
// UnsetTheirDisputeId ensures that no value is present for TheirDisputeId, not even an explicit nil
func (o *CreateDisputeRequest) UnsetTheirDisputeId() {
o.TheirDisputeId.Unset()
}
// GetTheirPaymentIntentId returns the TheirPaymentIntentId field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateDisputeRequest) GetTheirPaymentIntentId() string {
if o == nil || IsNil(o.TheirPaymentIntentId.Get()) {
var ret string
return ret
}
return *o.TheirPaymentIntentId.Get()
}
// GetTheirPaymentIntentIdOk returns a tuple with the TheirPaymentIntentId 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 *CreateDisputeRequest) GetTheirPaymentIntentIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.TheirPaymentIntentId.Get(), o.TheirPaymentIntentId.IsSet()
}
// HasTheirPaymentIntentId returns a boolean if a field has been set.
func (o *CreateDisputeRequest) HasTheirPaymentIntentId() bool {
if o != nil && o.TheirPaymentIntentId.IsSet() {
return true
}
return false
}
// SetTheirPaymentIntentId gets a reference to the given NullableString and assigns it to the TheirPaymentIntentId field.
func (o *CreateDisputeRequest) SetTheirPaymentIntentId(v string) {
o.TheirPaymentIntentId.Set(&v)
}
// SetTheirPaymentIntentIdNil sets the value for TheirPaymentIntentId to be an explicit nil
func (o *CreateDisputeRequest) SetTheirPaymentIntentIdNil() {
o.TheirPaymentIntentId.Set(nil)
}
// UnsetTheirPaymentIntentId ensures that no value is present for TheirPaymentIntentId, not even an explicit nil
func (o *CreateDisputeRequest) UnsetTheirPaymentIntentId() {
o.TheirPaymentIntentId.Unset()
}
func (o CreateDisputeRequest) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CreateDisputeRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if o.Meta != nil {
toSerialize["meta"] = o.Meta
}
if o.PaymentIntentId.IsSet() {
toSerialize["payment_intent_id"] = o.PaymentIntentId.Get()
}
if o.Reason.IsSet() {
toSerialize["reason"] = o.Reason.Get()
}
if o.TheirDisputeId.IsSet() {
toSerialize["their_dispute_id"] = o.TheirDisputeId.Get()
}
if o.TheirPaymentIntentId.IsSet() {
toSerialize["their_payment_intent_id"] = o.TheirPaymentIntentId.Get()
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *CreateDisputeRequest) UnmarshalJSON(data []byte) (err error) {
varCreateDisputeRequest := _CreateDisputeRequest{}
err = json.Unmarshal(data, &varCreateDisputeRequest)
if err != nil {
return err
}
*o = CreateDisputeRequest(varCreateDisputeRequest)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "meta")
delete(additionalProperties, "payment_intent_id")
delete(additionalProperties, "reason")
delete(additionalProperties, "their_dispute_id")
delete(additionalProperties, "their_payment_intent_id")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableCreateDisputeRequest struct {
value *CreateDisputeRequest
isSet bool
}
func (v NullableCreateDisputeRequest) Get() *CreateDisputeRequest {
return v.value
}
func (v *NullableCreateDisputeRequest) Set(val *CreateDisputeRequest) {
v.value = val
v.isSet = true
}
func (v NullableCreateDisputeRequest) IsSet() bool {
return v.isSet
}
func (v *NullableCreateDisputeRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateDisputeRequest(val *CreateDisputeRequest) *NullableCreateDisputeRequest {
return &NullableCreateDisputeRequest{value: val, isSet: true}
}
func (v NullableCreateDisputeRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateDisputeRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}