-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathproduct.py
More file actions
199 lines (149 loc) · 5.56 KB
/
Copy pathproduct.py
File metadata and controls
199 lines (149 loc) · 5.56 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
# coding: utf-8
"""
Xero AppStore API
These endpoints are for Xero Partners to interact with the App Store Billing platform # noqa: E501
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
from xero_python.models import BaseModel
class Product(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 = {
"id": "str",
"name": "str",
"seat_unit": "str",
"type": "str",
"usage_unit": "str",
}
attribute_map = {
"id": "id",
"name": "name",
"seat_unit": "seatUnit",
"type": "type",
"usage_unit": "usageUnit",
}
def __init__(
self, id=None, name=None, seat_unit=None, type=None, usage_unit=None
): # noqa: E501
"""Product - a model defined in OpenAPI""" # noqa: E501
self._id = None
self._name = None
self._seat_unit = None
self._type = None
self._usage_unit = None
self.discriminator = None
if id is not None:
self.id = id
if name is not None:
self.name = name
if seat_unit is not None:
self.seat_unit = seat_unit
if type is not None:
self.type = type
if usage_unit is not None:
self.usage_unit = usage_unit
@property
def id(self):
"""Gets the id of this Product. # noqa: E501
The unique identifier for the product # noqa: E501
:return: The id of this Product. # noqa: E501
:rtype: str
"""
return self._id
@id.setter
def id(self, id):
"""Sets the id of this Product.
The unique identifier for the product # noqa: E501
:param id: The id of this Product. # noqa: E501
:type: str
"""
self._id = id
@property
def name(self):
"""Gets the name of this Product. # noqa: E501
The name of the product # noqa: E501
:return: The name of this Product. # noqa: E501
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""Sets the name of this Product.
The name of the product # noqa: E501
:param name: The name of this Product. # noqa: E501
:type: str
"""
self._name = name
@property
def seat_unit(self):
"""Gets the seat_unit of this Product. # noqa: E501
The unit of the per seat product. e.g. \"user\", \"organisation\", \"SMS\", etc # noqa: E501
:return: The seat_unit of this Product. # noqa: E501
:rtype: str
"""
return self._seat_unit
@seat_unit.setter
def seat_unit(self, seat_unit):
"""Sets the seat_unit of this Product.
The unit of the per seat product. e.g. \"user\", \"organisation\", \"SMS\", etc # noqa: E501
:param seat_unit: The seat_unit of this Product. # noqa: E501
:type: str
"""
self._seat_unit = seat_unit
@property
def type(self):
"""Gets the type of this Product. # noqa: E501
The pricing model of the product: * FIXED: Customers are charged a fixed amount for each billing period * PER_SEAT: Customers are charged based on the number of units they purchase * METERED: Customers are charged per use of this product * SIMPLE: Customers are charged on a fixed amount for each billing period with an optional add-on feature # noqa: E501
:return: The type of this Product. # noqa: E501
:rtype: str
"""
return self._type
@type.setter
def type(self, type):
"""Sets the type of this Product.
The pricing model of the product: * FIXED: Customers are charged a fixed amount for each billing period * PER_SEAT: Customers are charged based on the number of units they purchase * METERED: Customers are charged per use of this product * SIMPLE: Customers are charged on a fixed amount for each billing period with an optional add-on feature # noqa: E501
:param type: The type of this Product. # noqa: E501
:type: str
"""
allowed_values = [
"FIXED",
"PER_SEAT",
"METERED",
"SIMPLE",
"None",
] # noqa: E501
if type:
if type not in allowed_values:
raise ValueError(
"Invalid value for `type` ({0}), must be one of {1}".format( # noqa: E501
type, allowed_values
)
)
self._type = type
@property
def usage_unit(self):
"""Gets the usage_unit of this Product. # noqa: E501
The unit of the usage product. e.g. \"user\", \"minutes\", \"SMS\", etc # noqa: E501
:return: The usage_unit of this Product. # noqa: E501
:rtype: str
"""
return self._usage_unit
@usage_unit.setter
def usage_unit(self, usage_unit):
"""Sets the usage_unit of this Product.
The unit of the usage product. e.g. \"user\", \"minutes\", \"SMS\", etc # noqa: E501
:param usage_unit: The usage_unit of this Product. # noqa: E501
:type: str
"""
self._usage_unit = usage_unit