-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathaddress.py
More file actions
388 lines (303 loc) · 10.9 KB
/
address.py
File metadata and controls
388 lines (303 loc) · 10.9 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
# 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 Address(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 = {
"address_type": "str",
"address_line1": "str",
"address_line2": "str",
"address_line3": "str",
"address_line4": "str",
"city": "str",
"region": "str",
"postal_code": "str",
"country": "str",
"attention_to": "str",
}
attribute_map = {
"address_type": "AddressType",
"address_line1": "AddressLine1",
"address_line2": "AddressLine2",
"address_line3": "AddressLine3",
"address_line4": "AddressLine4",
"city": "City",
"region": "Region",
"postal_code": "PostalCode",
"country": "Country",
"attention_to": "AttentionTo",
}
def __init__(
self,
address_type=None,
address_line1=None,
address_line2=None,
address_line3=None,
address_line4=None,
city=None,
region=None,
postal_code=None,
country=None,
attention_to=None,
): # noqa: E501
"""Address - a model defined in OpenAPI""" # noqa: E501
self._address_type = None
self._address_line1 = None
self._address_line2 = None
self._address_line3 = None
self._address_line4 = None
self._city = None
self._region = None
self._postal_code = None
self._country = None
self._attention_to = None
self.discriminator = None
if address_type is not None:
self.address_type = address_type
if address_line1 is not None:
self.address_line1 = address_line1
if address_line2 is not None:
self.address_line2 = address_line2
if address_line3 is not None:
self.address_line3 = address_line3
if address_line4 is not None:
self.address_line4 = address_line4
if city is not None:
self.city = city
if region is not None:
self.region = region
if postal_code is not None:
self.postal_code = postal_code
if country is not None:
self.country = country
if attention_to is not None:
self.attention_to = attention_to
@property
def address_type(self):
"""Gets the address_type of this Address. # noqa: E501
define the type of address # noqa: E501
:return: The address_type of this Address. # noqa: E501
:rtype: str
"""
return self._address_type
@address_type.setter
def address_type(self, address_type):
"""Sets the address_type of this Address.
define the type of address # noqa: E501
:param address_type: The address_type of this Address. # noqa: E501
:type: str
"""
allowed_values = ["POBOX", "STREET", "None"] # noqa: E501
if address_type:
if address_type not in allowed_values:
raise ValueError(
"Invalid value for `address_type` ({0}), must be one of {1}".format( # noqa: E501
address_type, allowed_values
)
)
self._address_type = address_type
@property
def address_line1(self):
"""Gets the address_line1 of this Address. # noqa: E501
max length = 500 # noqa: E501
:return: The address_line1 of this Address. # noqa: E501
:rtype: str
"""
return self._address_line1
@address_line1.setter
def address_line1(self, address_line1):
"""Sets the address_line1 of this Address.
max length = 500 # noqa: E501
:param address_line1: The address_line1 of this Address. # noqa: E501
:type: str
"""
if address_line1 is not None and len(address_line1) > 500:
raise ValueError(
"Invalid value for `address_line1`, "
"length must be less than or equal to `500`"
) # noqa: E501
self._address_line1 = address_line1
@property
def address_line2(self):
"""Gets the address_line2 of this Address. # noqa: E501
max length = 500 # noqa: E501
:return: The address_line2 of this Address. # noqa: E501
:rtype: str
"""
return self._address_line2
@address_line2.setter
def address_line2(self, address_line2):
"""Sets the address_line2 of this Address.
max length = 500 # noqa: E501
:param address_line2: The address_line2 of this Address. # noqa: E501
:type: str
"""
if address_line2 is not None and len(address_line2) > 500:
raise ValueError(
"Invalid value for `address_line2`, "
"length must be less than or equal to `500`"
) # noqa: E501
self._address_line2 = address_line2
@property
def address_line3(self):
"""Gets the address_line3 of this Address. # noqa: E501
max length = 500 # noqa: E501
:return: The address_line3 of this Address. # noqa: E501
:rtype: str
"""
return self._address_line3
@address_line3.setter
def address_line3(self, address_line3):
"""Sets the address_line3 of this Address.
max length = 500 # noqa: E501
:param address_line3: The address_line3 of this Address. # noqa: E501
:type: str
"""
if address_line3 is not None and len(address_line3) > 500:
raise ValueError(
"Invalid value for `address_line3`, "
"length must be less than or equal to `500`"
) # noqa: E501
self._address_line3 = address_line3
@property
def address_line4(self):
"""Gets the address_line4 of this Address. # noqa: E501
max length = 500 # noqa: E501
:return: The address_line4 of this Address. # noqa: E501
:rtype: str
"""
return self._address_line4
@address_line4.setter
def address_line4(self, address_line4):
"""Sets the address_line4 of this Address.
max length = 500 # noqa: E501
:param address_line4: The address_line4 of this Address. # noqa: E501
:type: str
"""
if address_line4 is not None and len(address_line4) > 500:
raise ValueError(
"Invalid value for `address_line4`, "
"length must be less than or equal to `500`"
) # noqa: E501
self._address_line4 = address_line4
@property
def city(self):
"""Gets the city of this Address. # noqa: E501
max length = 255 # noqa: E501
:return: The city of this Address. # noqa: E501
:rtype: str
"""
return self._city
@city.setter
def city(self, city):
"""Sets the city of this Address.
max length = 255 # noqa: E501
:param city: The city of this Address. # noqa: E501
:type: str
"""
if city is not None and len(city) > 255:
raise ValueError(
"Invalid value for `city`, "
"length must be less than or equal to `255`"
) # noqa: E501
self._city = city
@property
def region(self):
"""Gets the region of this Address. # noqa: E501
max length = 255 # noqa: E501
:return: The region of this Address. # noqa: E501
:rtype: str
"""
return self._region
@region.setter
def region(self, region):
"""Sets the region of this Address.
max length = 255 # noqa: E501
:param region: The region of this Address. # noqa: E501
:type: str
"""
if region is not None and len(region) > 255:
raise ValueError(
"Invalid value for `region`, "
"length must be less than or equal to `255`"
) # noqa: E501
self._region = region
@property
def postal_code(self):
"""Gets the postal_code of this Address. # noqa: E501
max length = 50 # noqa: E501
:return: The postal_code of this Address. # noqa: E501
:rtype: str
"""
return self._postal_code
@postal_code.setter
def postal_code(self, postal_code):
"""Sets the postal_code of this Address.
max length = 50 # noqa: E501
:param postal_code: The postal_code of this Address. # noqa: E501
:type: str
"""
if postal_code is not None and len(postal_code) > 50:
raise ValueError(
"Invalid value for `postal_code`, "
"length must be less than or equal to `50`"
) # noqa: E501
self._postal_code = postal_code
@property
def country(self):
"""Gets the country of this Address. # noqa: E501
max length = 50, [A-Z], [a-z] only # noqa: E501
:return: The country of this Address. # noqa: E501
:rtype: str
"""
return self._country
@country.setter
def country(self, country):
"""Sets the country of this Address.
max length = 50, [A-Z], [a-z] only # noqa: E501
:param country: The country of this Address. # noqa: E501
:type: str
"""
if country is not None and len(country) > 50:
raise ValueError(
"Invalid value for `country`, "
"length must be less than or equal to `50`"
) # noqa: E501
self._country = country
@property
def attention_to(self):
"""Gets the attention_to of this Address. # noqa: E501
max length = 255 # noqa: E501
:return: The attention_to of this Address. # noqa: E501
:rtype: str
"""
return self._attention_to
@attention_to.setter
def attention_to(self, attention_to):
"""Sets the attention_to of this Address.
max length = 255 # noqa: E501
:param attention_to: The attention_to of this Address. # noqa: E501
:type: str
"""
if attention_to is not None and len(attention_to) > 255:
raise ValueError(
"Invalid value for `attention_to`, "
"length must be less than or equal to `255`"
) # noqa: E501
self._attention_to = attention_to