-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathallocation.py
More file actions
335 lines (251 loc) · 9.29 KB
/
allocation.py
File metadata and controls
335 lines (251 loc) · 9.29 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
# 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 Allocation(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 = {
"allocation_id": "str",
"invoice": "Invoice",
"overpayment": "Overpayment",
"prepayment": "Prepayment",
"credit_note": "CreditNote",
"amount": "float",
"date": "date[ms-format]",
"is_deleted": "bool",
"status_attribute_string": "str",
"validation_errors": "list[ValidationError]",
}
attribute_map = {
"allocation_id": "AllocationID",
"invoice": "Invoice",
"overpayment": "Overpayment",
"prepayment": "Prepayment",
"credit_note": "CreditNote",
"amount": "Amount",
"date": "Date",
"is_deleted": "IsDeleted",
"status_attribute_string": "StatusAttributeString",
"validation_errors": "ValidationErrors",
}
def __init__(
self,
allocation_id=None,
invoice=None,
overpayment=None,
prepayment=None,
credit_note=None,
amount=None,
date=None,
is_deleted=None,
status_attribute_string=None,
validation_errors=None,
): # noqa: E501
"""Allocation - a model defined in OpenAPI""" # noqa: E501
self._allocation_id = None
self._invoice = None
self._overpayment = None
self._prepayment = None
self._credit_note = None
self._amount = None
self._date = None
self._is_deleted = None
self._status_attribute_string = None
self._validation_errors = None
self.discriminator = None
if allocation_id is not None:
self.allocation_id = allocation_id
self.invoice = invoice
if overpayment is not None:
self.overpayment = overpayment
if prepayment is not None:
self.prepayment = prepayment
if credit_note is not None:
self.credit_note = credit_note
self.amount = amount
self.date = date
if is_deleted is not None:
self.is_deleted = is_deleted
if status_attribute_string is not None:
self.status_attribute_string = status_attribute_string
if validation_errors is not None:
self.validation_errors = validation_errors
@property
def allocation_id(self):
"""Gets the allocation_id of this Allocation. # noqa: E501
Xero generated unique identifier # noqa: E501
:return: The allocation_id of this Allocation. # noqa: E501
:rtype: str
"""
return self._allocation_id
@allocation_id.setter
def allocation_id(self, allocation_id):
"""Sets the allocation_id of this Allocation.
Xero generated unique identifier # noqa: E501
:param allocation_id: The allocation_id of this Allocation. # noqa: E501
:type: str
"""
self._allocation_id = allocation_id
@property
def invoice(self):
"""Gets the invoice of this Allocation. # noqa: E501
:return: The invoice of this Allocation. # noqa: E501
:rtype: Invoice
"""
return self._invoice
@invoice.setter
def invoice(self, invoice):
"""Sets the invoice of this Allocation.
:param invoice: The invoice of this Allocation. # noqa: E501
:type: Invoice
"""
if invoice is None:
raise ValueError(
"Invalid value for `invoice`, must not be `None`"
) # noqa: E501
self._invoice = invoice
@property
def overpayment(self):
"""Gets the overpayment of this Allocation. # noqa: E501
:return: The overpayment of this Allocation. # noqa: E501
:rtype: Overpayment
"""
return self._overpayment
@overpayment.setter
def overpayment(self, overpayment):
"""Sets the overpayment of this Allocation.
:param overpayment: The overpayment of this Allocation. # noqa: E501
:type: Overpayment
"""
self._overpayment = overpayment
@property
def prepayment(self):
"""Gets the prepayment of this Allocation. # noqa: E501
:return: The prepayment of this Allocation. # noqa: E501
:rtype: Prepayment
"""
return self._prepayment
@prepayment.setter
def prepayment(self, prepayment):
"""Sets the prepayment of this Allocation.
:param prepayment: The prepayment of this Allocation. # noqa: E501
:type: Prepayment
"""
self._prepayment = prepayment
@property
def credit_note(self):
"""Gets the credit_note of this Allocation. # noqa: E501
:return: The credit_note of this Allocation. # noqa: E501
:rtype: CreditNote
"""
return self._credit_note
@credit_note.setter
def credit_note(self, credit_note):
"""Sets the credit_note of this Allocation.
:param credit_note: The credit_note of this Allocation. # noqa: E501
:type: CreditNote
"""
self._credit_note = credit_note
@property
def amount(self):
"""Gets the amount of this Allocation. # noqa: E501
the amount being applied to the invoice # noqa: E501
:return: The amount of this Allocation. # noqa: E501
:rtype: float
"""
return self._amount
@amount.setter
def amount(self, amount):
"""Sets the amount of this Allocation.
the amount being applied to the invoice # noqa: E501
:param amount: The amount of this Allocation. # 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 Allocation. # noqa: E501
the date the allocation is applied YYYY-MM-DD. # noqa: E501
:return: The date of this Allocation. # noqa: E501
:rtype: date
"""
return self._date
@date.setter
def date(self, date):
"""Sets the date of this Allocation.
the date the allocation is applied YYYY-MM-DD. # noqa: E501
:param date: The date of this Allocation. # noqa: E501
:type: date
"""
if date is None:
raise ValueError(
"Invalid value for `date`, must not be `None`"
) # noqa: E501
self._date = date
@property
def is_deleted(self):
"""Gets the is_deleted of this Allocation. # noqa: E501
A flag that returns true when the allocation is succesfully deleted # noqa: E501
:return: The is_deleted of this Allocation. # noqa: E501
:rtype: bool
"""
return self._is_deleted
@is_deleted.setter
def is_deleted(self, is_deleted):
"""Sets the is_deleted of this Allocation.
A flag that returns true when the allocation is succesfully deleted # noqa: E501
:param is_deleted: The is_deleted of this Allocation. # noqa: E501
:type: bool
"""
self._is_deleted = is_deleted
@property
def status_attribute_string(self):
"""Gets the status_attribute_string of this Allocation. # noqa: E501
A string to indicate if a invoice status # noqa: E501
:return: The status_attribute_string of this Allocation. # noqa: E501
:rtype: str
"""
return self._status_attribute_string
@status_attribute_string.setter
def status_attribute_string(self, status_attribute_string):
"""Sets the status_attribute_string of this Allocation.
A string to indicate if a invoice status # noqa: E501
:param status_attribute_string: The status_attribute_string of this Allocation. # noqa: E501
:type: str
"""
self._status_attribute_string = status_attribute_string
@property
def validation_errors(self):
"""Gets the validation_errors of this Allocation. # noqa: E501
Displays array of validation error messages from the API # noqa: E501
:return: The validation_errors of this Allocation. # noqa: E501
:rtype: list[ValidationError]
"""
return self._validation_errors
@validation_errors.setter
def validation_errors(self, validation_errors):
"""Sets the validation_errors of this Allocation.
Displays array of validation error messages from the API # noqa: E501
:param validation_errors: The validation_errors of this Allocation. # noqa: E501
:type: list[ValidationError]
"""
self._validation_errors = validation_errors