-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel_direct_debit_order.go
368 lines (311 loc) · 12.9 KB
/
model_direct_debit_order.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
/*
finAPI Web Form 2.0
The following pages give you some general information on how to use our APIs.<br/>The actual API services documentation then follows further below. You can use the menu to jump between API sections.<br/><br/>This page has a built-in HTTP(S) client, so you can test the services directly from within this page, by filling in the request parameters and/or body in the respective services, and then hitting the TRY button. Note that you need to be authorized to make a successful API call. To authorize, refer to the '<a target='_blank' href='https://docs.finapi.io/?product=access#tag--Authorization'>Authorization</a>' section of Access, or in case you already have a valid user token, just use the QUICK AUTH on the left.<br/>Please also remember that all user management functions should be looked up in <a target='_blank' href='https://docs.finapi.io/?product=access'>Access</a>.<br/><br/>You should also check out the <a target='_blank' href='https://documentation.finapi.io/webform/'>Web Form 2.0 Public Documentation</a> as well as <a target='_blank' href='https://documentation.finapi.io/access/'>Access Public Documentation</a> for more information. If you need any help with the API, contact <a href='mailto:support@finapi.io'>support@finapi.io</a>.<br/><h2 id=\"general-information\">General information</h2><h3 id=\"general-request-ids\"><strong>Request IDs</strong></h3>With any API call, you can pass a request ID via a header with name \"X-Request-Id\". The request ID can be an arbitrary string with up to 255 characters. Passing a longer string will result in an error.<br/><br/>If you don't pass a request ID for a call, finAPI will generate a random ID internally.<br/><br/>The request ID is always returned back in the response of a service, as a header with name \"X-Request-Id\".<br/><br/>We highly recommend to always pass a (preferably unique) request ID, and include it into your client application logs whenever you make a request or receive a response(especially in the case of an error response). finAPI is also logging request IDs on its end. Having a request ID can help the finAPI support team to work more efficiently and solve tickets faster.<h3 id=\"type-coercion\"><strong>Type Coercion</strong></h3>In order to ease the integration for some languages, which do not natively support high precision number representations, Web Form 2.0 API supports relax type binding for the openAPI type <code>number</code>, which is used for money amount fields. If you use one of those languages, to avoid precision errors that can appear from <code>float</code> values, you can pass the amount as a <code>string</code>.<h3 id=\"general-faq\"><strong>FAQ</strong></h3><strong>Is there a finAPI SDK?</strong><br/>Currently we do not offer a native SDK, but there is the option to generate an SDKfor almost any target language via OpenAPI. Use the 'Download SDK' button on this page for SDK generation.<br/><br/><strong>Why do I need to keep authorizing when calling services on this page?</strong><br/>This page is a \"one-page-app\". Reloading the page resets the OAuth authorization context. There is generally no need to reload the page, so just don't do it and your authorization will persist.
API version: 2.430.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package webform2
import (
"encoding/json"
)
// DirectDebitOrder Direct debit order
type DirectDebitOrder struct {
Amount Amount `json:"amount"`
// The purpose of the transfer transaction
Purpose NullableString `json:"purpose,omitempty"`
// SEPA purpose code, according to ISO 20022, external codes set.<br/>Note that the SEPA purpose code may be ignored by some banks.
SepaPurposeCode NullableString `json:"sepaPurposeCode,omitempty"`
// End-To-End ID for the transfer transaction
EndToEndId NullableString `json:"endToEndId,omitempty"`
Payer PaymentPayer `json:"payer"`
// Mandate ID that this direct debit order is based on.
MandateId string `json:"mandateId"`
// Date of the mandate that this direct debit order is based on, in the format 'YYYY-MM-DD'
MandateDate string `json:"mandateDate"`
// Creditor ID of the source account's holder
CreditorId string `json:"creditorId"`
}
// NewDirectDebitOrder instantiates a new DirectDebitOrder 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 NewDirectDebitOrder(amount Amount, payer PaymentPayer, mandateId string, mandateDate string, creditorId string) *DirectDebitOrder {
this := DirectDebitOrder{}
this.Amount = amount
this.Payer = payer
this.MandateId = mandateId
this.MandateDate = mandateDate
this.CreditorId = creditorId
return &this
}
// NewDirectDebitOrderWithDefaults instantiates a new DirectDebitOrder 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 NewDirectDebitOrderWithDefaults() *DirectDebitOrder {
this := DirectDebitOrder{}
return &this
}
// GetAmount returns the Amount field value
func (o *DirectDebitOrder) GetAmount() Amount {
if o == nil {
var ret Amount
return ret
}
return o.Amount
}
// GetAmountOk returns a tuple with the Amount field value
// and a boolean to check if the value has been set.
func (o *DirectDebitOrder) GetAmountOk() (*Amount, bool) {
if o == nil {
return nil, false
}
return &o.Amount, true
}
// SetAmount sets field value
func (o *DirectDebitOrder) SetAmount(v Amount) {
o.Amount = v
}
// GetPurpose returns the Purpose field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *DirectDebitOrder) GetPurpose() string {
if o == nil || o.Purpose.Get() == nil {
var ret string
return ret
}
return *o.Purpose.Get()
}
// GetPurposeOk returns a tuple with the Purpose 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 *DirectDebitOrder) GetPurposeOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Purpose.Get(), o.Purpose.IsSet()
}
// HasPurpose returns a boolean if a field has been set.
func (o *DirectDebitOrder) HasPurpose() bool {
if o != nil && o.Purpose.IsSet() {
return true
}
return false
}
// SetPurpose gets a reference to the given NullableString and assigns it to the Purpose field.
func (o *DirectDebitOrder) SetPurpose(v string) {
o.Purpose.Set(&v)
}
// SetPurposeNil sets the value for Purpose to be an explicit nil
func (o *DirectDebitOrder) SetPurposeNil() {
o.Purpose.Set(nil)
}
// UnsetPurpose ensures that no value is present for Purpose, not even an explicit nil
func (o *DirectDebitOrder) UnsetPurpose() {
o.Purpose.Unset()
}
// GetSepaPurposeCode returns the SepaPurposeCode field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *DirectDebitOrder) GetSepaPurposeCode() string {
if o == nil || o.SepaPurposeCode.Get() == nil {
var ret string
return ret
}
return *o.SepaPurposeCode.Get()
}
// GetSepaPurposeCodeOk returns a tuple with the SepaPurposeCode 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 *DirectDebitOrder) GetSepaPurposeCodeOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.SepaPurposeCode.Get(), o.SepaPurposeCode.IsSet()
}
// HasSepaPurposeCode returns a boolean if a field has been set.
func (o *DirectDebitOrder) HasSepaPurposeCode() bool {
if o != nil && o.SepaPurposeCode.IsSet() {
return true
}
return false
}
// SetSepaPurposeCode gets a reference to the given NullableString and assigns it to the SepaPurposeCode field.
func (o *DirectDebitOrder) SetSepaPurposeCode(v string) {
o.SepaPurposeCode.Set(&v)
}
// SetSepaPurposeCodeNil sets the value for SepaPurposeCode to be an explicit nil
func (o *DirectDebitOrder) SetSepaPurposeCodeNil() {
o.SepaPurposeCode.Set(nil)
}
// UnsetSepaPurposeCode ensures that no value is present for SepaPurposeCode, not even an explicit nil
func (o *DirectDebitOrder) UnsetSepaPurposeCode() {
o.SepaPurposeCode.Unset()
}
// GetEndToEndId returns the EndToEndId field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *DirectDebitOrder) GetEndToEndId() string {
if o == nil || o.EndToEndId.Get() == nil {
var ret string
return ret
}
return *o.EndToEndId.Get()
}
// GetEndToEndIdOk returns a tuple with the EndToEndId 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 *DirectDebitOrder) GetEndToEndIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.EndToEndId.Get(), o.EndToEndId.IsSet()
}
// HasEndToEndId returns a boolean if a field has been set.
func (o *DirectDebitOrder) HasEndToEndId() bool {
if o != nil && o.EndToEndId.IsSet() {
return true
}
return false
}
// SetEndToEndId gets a reference to the given NullableString and assigns it to the EndToEndId field.
func (o *DirectDebitOrder) SetEndToEndId(v string) {
o.EndToEndId.Set(&v)
}
// SetEndToEndIdNil sets the value for EndToEndId to be an explicit nil
func (o *DirectDebitOrder) SetEndToEndIdNil() {
o.EndToEndId.Set(nil)
}
// UnsetEndToEndId ensures that no value is present for EndToEndId, not even an explicit nil
func (o *DirectDebitOrder) UnsetEndToEndId() {
o.EndToEndId.Unset()
}
// GetPayer returns the Payer field value
func (o *DirectDebitOrder) GetPayer() PaymentPayer {
if o == nil {
var ret PaymentPayer
return ret
}
return o.Payer
}
// GetPayerOk returns a tuple with the Payer field value
// and a boolean to check if the value has been set.
func (o *DirectDebitOrder) GetPayerOk() (*PaymentPayer, bool) {
if o == nil {
return nil, false
}
return &o.Payer, true
}
// SetPayer sets field value
func (o *DirectDebitOrder) SetPayer(v PaymentPayer) {
o.Payer = v
}
// GetMandateId returns the MandateId field value
func (o *DirectDebitOrder) GetMandateId() string {
if o == nil {
var ret string
return ret
}
return o.MandateId
}
// GetMandateIdOk returns a tuple with the MandateId field value
// and a boolean to check if the value has been set.
func (o *DirectDebitOrder) GetMandateIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.MandateId, true
}
// SetMandateId sets field value
func (o *DirectDebitOrder) SetMandateId(v string) {
o.MandateId = v
}
// GetMandateDate returns the MandateDate field value
func (o *DirectDebitOrder) GetMandateDate() string {
if o == nil {
var ret string
return ret
}
return o.MandateDate
}
// GetMandateDateOk returns a tuple with the MandateDate field value
// and a boolean to check if the value has been set.
func (o *DirectDebitOrder) GetMandateDateOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.MandateDate, true
}
// SetMandateDate sets field value
func (o *DirectDebitOrder) SetMandateDate(v string) {
o.MandateDate = v
}
// GetCreditorId returns the CreditorId field value
func (o *DirectDebitOrder) GetCreditorId() string {
if o == nil {
var ret string
return ret
}
return o.CreditorId
}
// GetCreditorIdOk returns a tuple with the CreditorId field value
// and a boolean to check if the value has been set.
func (o *DirectDebitOrder) GetCreditorIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.CreditorId, true
}
// SetCreditorId sets field value
func (o *DirectDebitOrder) SetCreditorId(v string) {
o.CreditorId = v
}
func (o DirectDebitOrder) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["amount"] = o.Amount
}
if o.Purpose.IsSet() {
toSerialize["purpose"] = o.Purpose.Get()
}
if o.SepaPurposeCode.IsSet() {
toSerialize["sepaPurposeCode"] = o.SepaPurposeCode.Get()
}
if o.EndToEndId.IsSet() {
toSerialize["endToEndId"] = o.EndToEndId.Get()
}
if true {
toSerialize["payer"] = o.Payer
}
if true {
toSerialize["mandateId"] = o.MandateId
}
if true {
toSerialize["mandateDate"] = o.MandateDate
}
if true {
toSerialize["creditorId"] = o.CreditorId
}
return json.Marshal(toSerialize)
}
type NullableDirectDebitOrder struct {
value *DirectDebitOrder
isSet bool
}
func (v NullableDirectDebitOrder) Get() *DirectDebitOrder {
return v.value
}
func (v *NullableDirectDebitOrder) Set(val *DirectDebitOrder) {
v.value = val
v.isSet = true
}
func (v NullableDirectDebitOrder) IsSet() bool {
return v.isSet
}
func (v *NullableDirectDebitOrder) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDirectDebitOrder(val *DirectDebitOrder) *NullableDirectDebitOrder {
return &NullableDirectDebitOrder{value: val, isSet: true}
}
func (v NullableDirectDebitOrder) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDirectDebitOrder) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}