-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathuser.py
More file actions
266 lines (202 loc) · 7.28 KB
/
Copy pathuser.py
File metadata and controls
266 lines (202 loc) · 7.28 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
# 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 User(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 = {
"user_id": "str",
"email_address": "str",
"first_name": "str",
"last_name": "str",
"updated_date_utc": "datetime[ms-format]",
"is_subscriber": "bool",
"organisation_role": "str",
}
attribute_map = {
"user_id": "UserID",
"email_address": "EmailAddress",
"first_name": "FirstName",
"last_name": "LastName",
"updated_date_utc": "UpdatedDateUTC",
"is_subscriber": "IsSubscriber",
"organisation_role": "OrganisationRole",
}
def __init__(
self,
user_id=None,
email_address=None,
first_name=None,
last_name=None,
updated_date_utc=None,
is_subscriber=None,
organisation_role=None,
): # noqa: E501
"""User - a model defined in OpenAPI""" # noqa: E501
self._user_id = None
self._email_address = None
self._first_name = None
self._last_name = None
self._updated_date_utc = None
self._is_subscriber = None
self._organisation_role = None
self.discriminator = None
if user_id is not None:
self.user_id = user_id
if email_address is not None:
self.email_address = email_address
if first_name is not None:
self.first_name = first_name
if last_name is not None:
self.last_name = last_name
if updated_date_utc is not None:
self.updated_date_utc = updated_date_utc
if is_subscriber is not None:
self.is_subscriber = is_subscriber
if organisation_role is not None:
self.organisation_role = organisation_role
@property
def user_id(self):
"""Gets the user_id of this User. # noqa: E501
Xero identifier # noqa: E501
:return: The user_id of this User. # noqa: E501
:rtype: str
"""
return self._user_id
@user_id.setter
def user_id(self, user_id):
"""Sets the user_id of this User.
Xero identifier # noqa: E501
:param user_id: The user_id of this User. # noqa: E501
:type: str
"""
self._user_id = user_id
@property
def email_address(self):
"""Gets the email_address of this User. # noqa: E501
Email address of user # noqa: E501
:return: The email_address of this User. # noqa: E501
:rtype: str
"""
return self._email_address
@email_address.setter
def email_address(self, email_address):
"""Sets the email_address of this User.
Email address of user # noqa: E501
:param email_address: The email_address of this User. # noqa: E501
:type: str
"""
self._email_address = email_address
@property
def first_name(self):
"""Gets the first_name of this User. # noqa: E501
First name of user # noqa: E501
:return: The first_name of this User. # noqa: E501
:rtype: str
"""
return self._first_name
@first_name.setter
def first_name(self, first_name):
"""Sets the first_name of this User.
First name of user # noqa: E501
:param first_name: The first_name of this User. # noqa: E501
:type: str
"""
self._first_name = first_name
@property
def last_name(self):
"""Gets the last_name of this User. # noqa: E501
Last name of user # noqa: E501
:return: The last_name of this User. # noqa: E501
:rtype: str
"""
return self._last_name
@last_name.setter
def last_name(self, last_name):
"""Sets the last_name of this User.
Last name of user # noqa: E501
:param last_name: The last_name of this User. # noqa: E501
:type: str
"""
self._last_name = last_name
@property
def updated_date_utc(self):
"""Gets the updated_date_utc of this User. # noqa: E501
Timestamp of last change to user # noqa: E501
:return: The updated_date_utc of this User. # noqa: E501
:rtype: datetime
"""
return self._updated_date_utc
@updated_date_utc.setter
def updated_date_utc(self, updated_date_utc):
"""Sets the updated_date_utc of this User.
Timestamp of last change to user # noqa: E501
:param updated_date_utc: The updated_date_utc of this User. # noqa: E501
:type: datetime
"""
self._updated_date_utc = updated_date_utc
@property
def is_subscriber(self):
"""Gets the is_subscriber of this User. # noqa: E501
Boolean to indicate if user is the subscriber # noqa: E501
:return: The is_subscriber of this User. # noqa: E501
:rtype: bool
"""
return self._is_subscriber
@is_subscriber.setter
def is_subscriber(self, is_subscriber):
"""Sets the is_subscriber of this User.
Boolean to indicate if user is the subscriber # noqa: E501
:param is_subscriber: The is_subscriber of this User. # noqa: E501
:type: bool
"""
self._is_subscriber = is_subscriber
@property
def organisation_role(self):
"""Gets the organisation_role of this User. # noqa: E501
User role that defines permissions in Xero and via API (READONLY, INVOICEONLY, STANDARD, FINANCIALADVISER, etc) # noqa: E501
:return: The organisation_role of this User. # noqa: E501
:rtype: str
"""
return self._organisation_role
@organisation_role.setter
def organisation_role(self, organisation_role):
"""Sets the organisation_role of this User.
User role that defines permissions in Xero and via API (READONLY, INVOICEONLY, STANDARD, FINANCIALADVISER, etc) # noqa: E501
:param organisation_role: The organisation_role of this User. # noqa: E501
:type: str
"""
allowed_values = [
"READONLY",
"INVOICEONLY",
"STANDARD",
"FINANCIALADVISER",
"MANAGEDCLIENT",
"CASHBOOKCLIENT",
"UNKNOWN",
"REMOVED",
"None",
] # noqa: E501
if organisation_role:
if organisation_role not in allowed_values:
raise ValueError(
"Invalid value for `organisation_role` ({0}), must be one of {1}".format( # noqa: E501
organisation_role, allowed_values
)
)
self._organisation_role = organisation_role