@@ -19,9 +19,11 @@ class SubscriptionItem:
19
19
Attributes:
20
20
subscription_item_id (int): unique id of the subscription item in the context of a company
21
21
product_id (str): id of the product bought
22
+ access_right_unique_id (str): unique id of the access right this subscription item grants access to
22
23
title (str): product title presented to the customer
23
- price (float ): price of the subscription
24
+ tax_type (TaxType ): unique identification of the tax type the product represents
24
25
quantity (int): quantity of purchased entities
26
+ status (SubscriptionItemStatus): current status of the subscription item
25
27
created_date (Union[None, Unset, datetime.datetime]): time the object was created with time notation as defined
26
28
by <a href="https://tools.ietf.org/html/rfc3339#section-5.6" target="_blank">RFC 3339, section 5.6</a>, for
27
29
example, 17:32:28
@@ -36,32 +38,31 @@ class SubscriptionItem:
36
38
provided here - can be identically to the productId
37
39
plenigo_step_id (Union[Unset, str]): if the product is based on a plenigo offer the plenigo step id is provided
38
40
here
39
- access_right_unique_id (Union[Unset, str]): unique id of the access right this subscription item grants access
40
- to
41
41
internal_title (Union[Unset, str]): if the product is based on a plenigo offer the product title for internal
42
42
usage is provided here
43
- tax_type (Union[Unset, TaxType]): unique identification of the tax type the product represents
44
43
package_title (Union[Unset, str]): if subscription item is correlated to another subscription item in a way that
45
44
both items are presented as one (bundle) this field contains the correlation title
46
45
package_id (Union[Unset, str]): if subscription item is correlated to another subscription item in a way that
47
46
both items are presented as one (bundle) this field contains the correlation id - the id is only unique within a
48
47
subscription
49
48
package_cancellation_locked (Union[Unset, bool]): flag indicating if package elements can only be cancelled
50
49
together
50
+ price (Union[Unset, float]): price of the subscription
51
51
price_issue_id (Union[Unset, int]): id of the price issue the subscription item's price is based on
52
52
discount_percentage (Union[Unset, int]): discount offered to the subscription
53
53
credit_count (Union[Unset, int]): available credit count to use
54
54
credit_wallet_unique_id (Union[Unset, str]): the credit wallet unique id
55
- status (Union[Unset, SubscriptionItemStatus]): current status of the subscription item
56
55
cost_center (Union[Unset, str]): cost center associated with this subscription item
57
56
purchase_number (Union[Unset, str]): purchase number associated with this subscription item
58
57
"""
59
58
60
59
subscription_item_id : int
61
60
product_id : str
61
+ access_right_unique_id : str
62
62
title : str
63
- price : float
63
+ tax_type : TaxType
64
64
quantity : int
65
+ status : SubscriptionItemStatus
65
66
created_date : Union [None , Unset , datetime .datetime ] = UNSET
66
67
changed_date : Union [None , Unset , datetime .datetime ] = UNSET
67
68
created_by : Union [Unset , str ] = UNSET
@@ -70,17 +71,15 @@ class SubscriptionItem:
70
71
changed_by_type : Union [Unset , UserType ] = UNSET
71
72
plenigo_product_id : Union [Unset , str ] = UNSET
72
73
plenigo_step_id : Union [Unset , str ] = UNSET
73
- access_right_unique_id : Union [Unset , str ] = UNSET
74
74
internal_title : Union [Unset , str ] = UNSET
75
- tax_type : Union [Unset , TaxType ] = UNSET
76
75
package_title : Union [Unset , str ] = UNSET
77
76
package_id : Union [Unset , str ] = UNSET
78
77
package_cancellation_locked : Union [Unset , bool ] = UNSET
78
+ price : Union [Unset , float ] = UNSET
79
79
price_issue_id : Union [Unset , int ] = UNSET
80
80
discount_percentage : Union [Unset , int ] = UNSET
81
81
credit_count : Union [Unset , int ] = UNSET
82
82
credit_wallet_unique_id : Union [Unset , str ] = UNSET
83
- status : Union [Unset , SubscriptionItemStatus ] = UNSET
84
83
cost_center : Union [Unset , str ] = UNSET
85
84
purchase_number : Union [Unset , str ] = UNSET
86
85
additional_properties : Dict [str , Any ] = _attrs_field (init = False , factory = dict )
@@ -90,12 +89,16 @@ def to_dict(self) -> Dict[str, Any]:
90
89
91
90
product_id = self .product_id
92
91
92
+ access_right_unique_id = self .access_right_unique_id
93
+
93
94
title = self .title
94
95
95
- price = self .price
96
+ tax_type = self .tax_type . value
96
97
97
98
quantity = self .quantity
98
99
100
+ status = self .status .value
101
+
99
102
created_date : Union [None , Unset , str ]
100
103
if isinstance (self .created_date , Unset ) or self .created_date is None :
101
104
created_date = UNSET
@@ -128,20 +131,16 @@ def to_dict(self) -> Dict[str, Any]:
128
131
129
132
plenigo_step_id = self .plenigo_step_id
130
133
131
- access_right_unique_id = self .access_right_unique_id
132
-
133
134
internal_title = self .internal_title
134
135
135
- tax_type : Union [Unset , str ] = UNSET
136
- if not isinstance (self .tax_type , Unset ):
137
- tax_type = self .tax_type .value
138
-
139
136
package_title = self .package_title
140
137
141
138
package_id = self .package_id
142
139
143
140
package_cancellation_locked = self .package_cancellation_locked
144
141
142
+ price = self .price
143
+
145
144
price_issue_id = self .price_issue_id
146
145
147
146
discount_percentage = self .discount_percentage
@@ -150,10 +149,6 @@ def to_dict(self) -> Dict[str, Any]:
150
149
151
150
credit_wallet_unique_id = self .credit_wallet_unique_id
152
151
153
- status : Union [Unset , str ] = UNSET
154
- if not isinstance (self .status , Unset ):
155
- status = self .status .value
156
-
157
152
cost_center = self .cost_center
158
153
159
154
purchase_number = self .purchase_number
@@ -164,9 +159,11 @@ def to_dict(self) -> Dict[str, Any]:
164
159
{
165
160
"subscriptionItemId" : subscription_item_id ,
166
161
"productId" : product_id ,
162
+ "accessRightUniqueId" : access_right_unique_id ,
167
163
"title" : title ,
168
- "price " : price ,
164
+ "taxType " : tax_type ,
169
165
"quantity" : quantity ,
166
+ "status" : status ,
170
167
}
171
168
)
172
169
if created_date is not UNSET :
@@ -185,18 +182,16 @@ def to_dict(self) -> Dict[str, Any]:
185
182
field_dict ["plenigoProductId" ] = plenigo_product_id
186
183
if plenigo_step_id is not UNSET :
187
184
field_dict ["plenigoStepId" ] = plenigo_step_id
188
- if access_right_unique_id is not UNSET :
189
- field_dict ["accessRightUniqueId" ] = access_right_unique_id
190
185
if internal_title is not UNSET :
191
186
field_dict ["internalTitle" ] = internal_title
192
- if tax_type is not UNSET :
193
- field_dict ["taxType" ] = tax_type
194
187
if package_title is not UNSET :
195
188
field_dict ["packageTitle" ] = package_title
196
189
if package_id is not UNSET :
197
190
field_dict ["packageId" ] = package_id
198
191
if package_cancellation_locked is not UNSET :
199
192
field_dict ["packageCancellationLocked" ] = package_cancellation_locked
193
+ if price is not UNSET :
194
+ field_dict ["price" ] = price
200
195
if price_issue_id is not UNSET :
201
196
field_dict ["priceIssueId" ] = price_issue_id
202
197
if discount_percentage is not UNSET :
@@ -205,8 +200,6 @@ def to_dict(self) -> Dict[str, Any]:
205
200
field_dict ["creditCount" ] = credit_count
206
201
if credit_wallet_unique_id is not UNSET :
207
202
field_dict ["creditWalletUniqueId" ] = credit_wallet_unique_id
208
- if status is not UNSET :
209
- field_dict ["status" ] = status
210
203
if cost_center is not UNSET :
211
204
field_dict ["costCenter" ] = cost_center
212
205
if purchase_number is not UNSET :
@@ -221,12 +214,16 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
221
214
222
215
product_id = d .pop ("productId" )
223
216
217
+ access_right_unique_id = d .pop ("accessRightUniqueId" )
218
+
224
219
title = d .pop ("title" )
225
220
226
- price = d .pop ("price" )
221
+ tax_type = TaxType ( d .pop ("taxType" ) )
227
222
228
223
quantity = d .pop ("quantity" )
229
224
225
+ status = SubscriptionItemStatus (d .pop ("status" ))
226
+
230
227
def _parse_created_date (data : object ) -> Union [None , Unset , datetime .datetime ]:
231
228
if data is None :
232
229
return data
@@ -297,23 +294,16 @@ def _parse_changed_date(data: object) -> Union[None, Unset, datetime.datetime]:
297
294
298
295
plenigo_step_id = d .pop ("plenigoStepId" , UNSET )
299
296
300
- access_right_unique_id = d .pop ("accessRightUniqueId" , UNSET )
301
-
302
297
internal_title = d .pop ("internalTitle" , UNSET )
303
298
304
- _tax_type = d .pop ("taxType" , UNSET )
305
- tax_type : Union [Unset , TaxType ]
306
- if isinstance (_tax_type , Unset ) or not _tax_type :
307
- tax_type = UNSET
308
- else :
309
- tax_type = TaxType (_tax_type )
310
-
311
299
package_title = d .pop ("packageTitle" , UNSET )
312
300
313
301
package_id = d .pop ("packageId" , UNSET )
314
302
315
303
package_cancellation_locked = d .pop ("packageCancellationLocked" , UNSET )
316
304
305
+ price = d .pop ("price" , UNSET )
306
+
317
307
price_issue_id = d .pop ("priceIssueId" , UNSET )
318
308
319
309
discount_percentage = d .pop ("discountPercentage" , UNSET )
@@ -322,23 +312,18 @@ def _parse_changed_date(data: object) -> Union[None, Unset, datetime.datetime]:
322
312
323
313
credit_wallet_unique_id = d .pop ("creditWalletUniqueId" , UNSET )
324
314
325
- _status = d .pop ("status" , UNSET )
326
- status : Union [Unset , SubscriptionItemStatus ]
327
- if isinstance (_status , Unset ) or not _status :
328
- status = UNSET
329
- else :
330
- status = SubscriptionItemStatus (_status )
331
-
332
315
cost_center = d .pop ("costCenter" , UNSET )
333
316
334
317
purchase_number = d .pop ("purchaseNumber" , UNSET )
335
318
336
319
subscription_item = cls (
337
320
subscription_item_id = subscription_item_id ,
338
321
product_id = product_id ,
322
+ access_right_unique_id = access_right_unique_id ,
339
323
title = title ,
340
- price = price ,
324
+ tax_type = tax_type ,
341
325
quantity = quantity ,
326
+ status = status ,
342
327
created_date = created_date ,
343
328
changed_date = changed_date ,
344
329
created_by = created_by ,
@@ -347,17 +332,15 @@ def _parse_changed_date(data: object) -> Union[None, Unset, datetime.datetime]:
347
332
changed_by_type = changed_by_type ,
348
333
plenigo_product_id = plenigo_product_id ,
349
334
plenigo_step_id = plenigo_step_id ,
350
- access_right_unique_id = access_right_unique_id ,
351
335
internal_title = internal_title ,
352
- tax_type = tax_type ,
353
336
package_title = package_title ,
354
337
package_id = package_id ,
355
338
package_cancellation_locked = package_cancellation_locked ,
339
+ price = price ,
356
340
price_issue_id = price_issue_id ,
357
341
discount_percentage = discount_percentage ,
358
342
credit_count = credit_count ,
359
343
credit_wallet_unique_id = credit_wallet_unique_id ,
360
- status = status ,
361
344
cost_center = cost_center ,
362
345
purchase_number = purchase_number ,
363
346
)
0 commit comments