@@ -103,7 +103,8 @@ def __init__(
103
103
self .allocation_state = allocation_state
104
104
self .price_cents_usd = price_cents_usd
105
105
self .patch_fee_cents_usd = patch_fee_cents_usd
106
- self .allocations = allocations
106
+ if allocations is not None :
107
+ self .allocations = allocations
107
108
if registry_url is not None :
108
109
self .registry_url = registry_url
109
110
self .metadata = metadata
@@ -304,7 +305,7 @@ def allocation_state(self, allocation_state):
304
305
raise ValueError (
305
306
"Invalid value for `allocation_state`, must not be `None`"
306
307
) # noqa: E501
307
- allowed_values = ["pending" , "partially_allocated" , " allocated" ] # noqa: E501
308
+ allowed_values = ["pending" , "allocated" ] # noqa: E501
308
309
if (
309
310
self .local_vars_configuration .client_side_validation
310
311
and allocation_state not in allowed_values
@@ -367,7 +368,7 @@ def patch_fee_cents_usd(self, patch_fee_cents_usd):
367
368
def allocations (self ):
368
369
"""Gets the allocations of this Order. # noqa: E501
369
370
370
- An array containing the inventory allocations for this order. # noqa: E501
371
+ DEPRECATED. An array containing the inventory allocations for this order. # noqa: E501
371
372
372
373
:return: The allocations of this Order. # noqa: E501
373
374
:rtype: list[Allocation]
@@ -378,17 +379,11 @@ def allocations(self):
378
379
def allocations (self , allocations ):
379
380
"""Sets the allocations of this Order.
380
381
381
- An array containing the inventory allocations for this order. # noqa: E501
382
+ DEPRECATED. An array containing the inventory allocations for this order. # noqa: E501
382
383
383
384
:param allocations: The allocations of this Order. # noqa: E501
384
385
:type: list[Allocation]
385
386
"""
386
- if (
387
- self .local_vars_configuration .client_side_validation and allocations is None
388
- ): # noqa: E501
389
- raise ValueError (
390
- "Invalid value for `allocations`, must not be `None`"
391
- ) # noqa: E501
392
387
393
388
self ._allocations = allocations
394
389
0 commit comments