-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathbank_transfer.py
More file actions
455 lines (343 loc) · 14 KB
/
bank_transfer.py
File metadata and controls
455 lines (343 loc) · 14 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
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
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
# coding: utf-8
"""
Xero Accounting API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
from xero_python.models import BaseModel
class BankTransfer(BaseModel):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
openapi_types = {
"from_bank_account": "Account",
"to_bank_account": "Account",
"amount": "float",
"date": "date[ms-format]",
"bank_transfer_id": "str",
"currency_rate": "float",
"from_bank_transaction_id": "str",
"to_bank_transaction_id": "str",
"from_is_reconciled": "bool",
"to_is_reconciled": "bool",
"reference": "str",
"has_attachments": "bool",
"created_date_utc": "datetime[ms-format]",
"validation_errors": "list[ValidationError]",
}
attribute_map = {
"from_bank_account": "FromBankAccount",
"to_bank_account": "ToBankAccount",
"amount": "Amount",
"date": "Date",
"bank_transfer_id": "BankTransferID",
"currency_rate": "CurrencyRate",
"from_bank_transaction_id": "FromBankTransactionID",
"to_bank_transaction_id": "ToBankTransactionID",
"from_is_reconciled": "FromIsReconciled",
"to_is_reconciled": "ToIsReconciled",
"reference": "Reference",
"has_attachments": "HasAttachments",
"created_date_utc": "CreatedDateUTC",
"validation_errors": "ValidationErrors",
}
def __init__(
self,
from_bank_account=None,
to_bank_account=None,
amount=None,
date=None,
bank_transfer_id=None,
currency_rate=None,
from_bank_transaction_id=None,
to_bank_transaction_id=None,
from_is_reconciled=False,
to_is_reconciled=False,
reference=None,
has_attachments=False,
created_date_utc=None,
validation_errors=None,
): # noqa: E501
"""BankTransfer - a model defined in OpenAPI""" # noqa: E501
self._from_bank_account = None
self._to_bank_account = None
self._amount = None
self._date = None
self._bank_transfer_id = None
self._currency_rate = None
self._from_bank_transaction_id = None
self._to_bank_transaction_id = None
self._from_is_reconciled = None
self._to_is_reconciled = None
self._reference = None
self._has_attachments = None
self._created_date_utc = None
self._validation_errors = None
self.discriminator = None
self.from_bank_account = from_bank_account
self.to_bank_account = to_bank_account
self.amount = amount
if date is not None:
self.date = date
if bank_transfer_id is not None:
self.bank_transfer_id = bank_transfer_id
if currency_rate is not None:
self.currency_rate = currency_rate
if from_bank_transaction_id is not None:
self.from_bank_transaction_id = from_bank_transaction_id
if to_bank_transaction_id is not None:
self.to_bank_transaction_id = to_bank_transaction_id
if from_is_reconciled is not None:
self.from_is_reconciled = from_is_reconciled
if to_is_reconciled is not None:
self.to_is_reconciled = to_is_reconciled
if reference is not None:
self.reference = reference
if has_attachments is not None:
self.has_attachments = has_attachments
if created_date_utc is not None:
self.created_date_utc = created_date_utc
if validation_errors is not None:
self.validation_errors = validation_errors
@property
def from_bank_account(self):
"""Gets the from_bank_account of this BankTransfer. # noqa: E501
:return: The from_bank_account of this BankTransfer. # noqa: E501
:rtype: Account
"""
return self._from_bank_account
@from_bank_account.setter
def from_bank_account(self, from_bank_account):
"""Sets the from_bank_account of this BankTransfer.
:param from_bank_account: The from_bank_account of this BankTransfer. # noqa: E501
:type: Account
"""
if from_bank_account is None:
raise ValueError(
"Invalid value for `from_bank_account`, must not be `None`"
) # noqa: E501
self._from_bank_account = from_bank_account
@property
def to_bank_account(self):
"""Gets the to_bank_account of this BankTransfer. # noqa: E501
:return: The to_bank_account of this BankTransfer. # noqa: E501
:rtype: Account
"""
return self._to_bank_account
@to_bank_account.setter
def to_bank_account(self, to_bank_account):
"""Sets the to_bank_account of this BankTransfer.
:param to_bank_account: The to_bank_account of this BankTransfer. # noqa: E501
:type: Account
"""
if to_bank_account is None:
raise ValueError(
"Invalid value for `to_bank_account`, must not be `None`"
) # noqa: E501
self._to_bank_account = to_bank_account
@property
def amount(self):
"""Gets the amount of this BankTransfer. # noqa: E501
amount of the transaction # noqa: E501
:return: The amount of this BankTransfer. # noqa: E501
:rtype: float
"""
return self._amount
@amount.setter
def amount(self, amount):
"""Sets the amount of this BankTransfer.
amount of the transaction # noqa: E501
:param amount: The amount of this BankTransfer. # noqa: E501
:type: float
"""
if amount is None:
raise ValueError(
"Invalid value for `amount`, must not be `None`"
) # noqa: E501
self._amount = amount
@property
def date(self):
"""Gets the date of this BankTransfer. # noqa: E501
The date of the Transfer YYYY-MM-DD # noqa: E501
:return: The date of this BankTransfer. # noqa: E501
:rtype: date
"""
return self._date
@date.setter
def date(self, date):
"""Sets the date of this BankTransfer.
The date of the Transfer YYYY-MM-DD # noqa: E501
:param date: The date of this BankTransfer. # noqa: E501
:type: date
"""
self._date = date
@property
def bank_transfer_id(self):
"""Gets the bank_transfer_id of this BankTransfer. # noqa: E501
The identifier of the Bank Transfer # noqa: E501
:return: The bank_transfer_id of this BankTransfer. # noqa: E501
:rtype: str
"""
return self._bank_transfer_id
@bank_transfer_id.setter
def bank_transfer_id(self, bank_transfer_id):
"""Sets the bank_transfer_id of this BankTransfer.
The identifier of the Bank Transfer # noqa: E501
:param bank_transfer_id: The bank_transfer_id of this BankTransfer. # noqa: E501
:type: str
"""
self._bank_transfer_id = bank_transfer_id
@property
def currency_rate(self):
"""Gets the currency_rate of this BankTransfer. # noqa: E501
The currency rate # noqa: E501
:return: The currency_rate of this BankTransfer. # noqa: E501
:rtype: float
"""
return self._currency_rate
@currency_rate.setter
def currency_rate(self, currency_rate):
"""Sets the currency_rate of this BankTransfer.
The currency rate # noqa: E501
:param currency_rate: The currency_rate of this BankTransfer. # noqa: E501
:type: float
"""
self._currency_rate = currency_rate
@property
def from_bank_transaction_id(self):
"""Gets the from_bank_transaction_id of this BankTransfer. # noqa: E501
The Bank Transaction ID for the source account # noqa: E501
:return: The from_bank_transaction_id of this BankTransfer. # noqa: E501
:rtype: str
"""
return self._from_bank_transaction_id
@from_bank_transaction_id.setter
def from_bank_transaction_id(self, from_bank_transaction_id):
"""Sets the from_bank_transaction_id of this BankTransfer.
The Bank Transaction ID for the source account # noqa: E501
:param from_bank_transaction_id: The from_bank_transaction_id of this BankTransfer. # noqa: E501
:type: str
"""
self._from_bank_transaction_id = from_bank_transaction_id
@property
def to_bank_transaction_id(self):
"""Gets the to_bank_transaction_id of this BankTransfer. # noqa: E501
The Bank Transaction ID for the destination account # noqa: E501
:return: The to_bank_transaction_id of this BankTransfer. # noqa: E501
:rtype: str
"""
return self._to_bank_transaction_id
@to_bank_transaction_id.setter
def to_bank_transaction_id(self, to_bank_transaction_id):
"""Sets the to_bank_transaction_id of this BankTransfer.
The Bank Transaction ID for the destination account # noqa: E501
:param to_bank_transaction_id: The to_bank_transaction_id of this BankTransfer. # noqa: E501
:type: str
"""
self._to_bank_transaction_id = to_bank_transaction_id
@property
def from_is_reconciled(self):
"""Gets the from_is_reconciled of this BankTransfer. # noqa: E501
The Bank Transaction boolean to show if it is reconciled for the source account # noqa: E501
:return: The from_is_reconciled of this BankTransfer. # noqa: E501
:rtype: bool
"""
return self._from_is_reconciled
@from_is_reconciled.setter
def from_is_reconciled(self, from_is_reconciled):
"""Sets the from_is_reconciled of this BankTransfer.
The Bank Transaction boolean to show if it is reconciled for the source account # noqa: E501
:param from_is_reconciled: The from_is_reconciled of this BankTransfer. # noqa: E501
:type: bool
"""
self._from_is_reconciled = from_is_reconciled
@property
def to_is_reconciled(self):
"""Gets the to_is_reconciled of this BankTransfer. # noqa: E501
The Bank Transaction boolean to show if it is reconciled for the destination account # noqa: E501
:return: The to_is_reconciled of this BankTransfer. # noqa: E501
:rtype: bool
"""
return self._to_is_reconciled
@to_is_reconciled.setter
def to_is_reconciled(self, to_is_reconciled):
"""Sets the to_is_reconciled of this BankTransfer.
The Bank Transaction boolean to show if it is reconciled for the destination account # noqa: E501
:param to_is_reconciled: The to_is_reconciled of this BankTransfer. # noqa: E501
:type: bool
"""
self._to_is_reconciled = to_is_reconciled
@property
def reference(self):
"""Gets the reference of this BankTransfer. # noqa: E501
Reference for the transactions. # noqa: E501
:return: The reference of this BankTransfer. # noqa: E501
:rtype: str
"""
return self._reference
@reference.setter
def reference(self, reference):
"""Sets the reference of this BankTransfer.
Reference for the transactions. # noqa: E501
:param reference: The reference of this BankTransfer. # noqa: E501
:type: str
"""
self._reference = reference
@property
def has_attachments(self):
"""Gets the has_attachments of this BankTransfer. # noqa: E501
Boolean to indicate if a Bank Transfer has an attachment # noqa: E501
:return: The has_attachments of this BankTransfer. # noqa: E501
:rtype: bool
"""
return self._has_attachments
@has_attachments.setter
def has_attachments(self, has_attachments):
"""Sets the has_attachments of this BankTransfer.
Boolean to indicate if a Bank Transfer has an attachment # noqa: E501
:param has_attachments: The has_attachments of this BankTransfer. # noqa: E501
:type: bool
"""
self._has_attachments = has_attachments
@property
def created_date_utc(self):
"""Gets the created_date_utc of this BankTransfer. # noqa: E501
UTC timestamp of creation date of bank transfer # noqa: E501
:return: The created_date_utc of this BankTransfer. # noqa: E501
:rtype: datetime
"""
return self._created_date_utc
@created_date_utc.setter
def created_date_utc(self, created_date_utc):
"""Sets the created_date_utc of this BankTransfer.
UTC timestamp of creation date of bank transfer # noqa: E501
:param created_date_utc: The created_date_utc of this BankTransfer. # noqa: E501
:type: datetime
"""
self._created_date_utc = created_date_utc
@property
def validation_errors(self):
"""Gets the validation_errors of this BankTransfer. # noqa: E501
Displays array of validation error messages from the API # noqa: E501
:return: The validation_errors of this BankTransfer. # noqa: E501
:rtype: list[ValidationError]
"""
return self._validation_errors
@validation_errors.setter
def validation_errors(self, validation_errors):
"""Sets the validation_errors of this BankTransfer.
Displays array of validation error messages from the API # noqa: E501
:param validation_errors: The validation_errors of this BankTransfer. # noqa: E501
:type: list[ValidationError]
"""
self._validation_errors = validation_errors