criteo-api-retailmedia-sdk 0.0.250728__py3-none-any.whl → 0.0.250811__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of criteo-api-retailmedia-sdk might be problematic. Click here for more details.

Files changed (27) hide show
  1. criteo_api_retailmedia_preview/__init__.py +1 -1
  2. criteo_api_retailmedia_preview/api/campaign_api.py +11 -351
  3. criteo_api_retailmedia_preview/api_client.py +1 -1
  4. criteo_api_retailmedia_preview/configuration.py +1 -1
  5. criteo_api_retailmedia_preview/model/{sku_slim_data_v2_list_response.py → entity_resource_collection_outcome_of_sponsored_products_line_item_and_metadata.py} +23 -24
  6. criteo_api_retailmedia_preview/model/flight_leg.py +16 -16
  7. criteo_api_retailmedia_preview/model/sponsored_products_line_item.py +14 -18
  8. criteo_api_retailmedia_preview/model/sponsored_products_line_item_create_request_model.py +12 -9
  9. criteo_api_retailmedia_preview/model/{sku_search_request_slim_preview_request.py → value_resource_input_of_sponsored_products_line_item_create_request_model.py} +9 -16
  10. criteo_api_retailmedia_preview/model/{sku_search_request_slim_v2_preview_request.py → value_resource_of_sponsored_products_line_item_create_request_model.py} +14 -17
  11. criteo_api_retailmedia_preview/models/__init__.py +3 -15
  12. {criteo_api_retailmedia_sdk-0.0.250728.dist-info → criteo_api_retailmedia_sdk-0.0.250811.dist-info}/METADATA +3 -3
  13. {criteo_api_retailmedia_sdk-0.0.250728.dist-info → criteo_api_retailmedia_sdk-0.0.250811.dist-info}/RECORD +15 -27
  14. criteo_api_retailmedia_preview/model/brand.py +0 -267
  15. criteo_api_retailmedia_preview/model/category.py +0 -267
  16. criteo_api_retailmedia_preview/model/page_of_sponsored_products_line_item.py +0 -276
  17. criteo_api_retailmedia_preview/model/resource_of_sku_search_request_slim_preview.py +0 -277
  18. criteo_api_retailmedia_preview/model/resource_of_sku_search_request_slim_v2_preview.py +0 -277
  19. criteo_api_retailmedia_preview/model/resource_of_sku_slim_data_preview.py +0 -277
  20. criteo_api_retailmedia_preview/model/resource_of_sku_slim_data_v2.py +0 -277
  21. criteo_api_retailmedia_preview/model/sku_search_request_slim_preview.py +0 -275
  22. criteo_api_retailmedia_preview/model/sku_search_request_slim_v2_preview.py +0 -273
  23. criteo_api_retailmedia_preview/model/sku_slim_data_preview.py +0 -347
  24. criteo_api_retailmedia_preview/model/sku_slim_data_preview_list_response.py +0 -281
  25. criteo_api_retailmedia_preview/model/sku_slim_data_v2.py +0 -321
  26. {criteo_api_retailmedia_sdk-0.0.250728.dist-info → criteo_api_retailmedia_sdk-0.0.250811.dist-info}/WHEEL +0 -0
  27. {criteo_api_retailmedia_sdk-0.0.250728.dist-info → criteo_api_retailmedia_sdk-0.0.250811.dist-info}/top_level.txt +0 -0
@@ -1,281 +0,0 @@
1
- """
2
- Criteo API
3
-
4
- Criteo API - RetailMedia # noqa: E501
5
-
6
- The version of the OpenAPI document: Preview
7
- Generated by: https://openapi-generator.tech
8
- """
9
-
10
-
11
- import re # noqa: F401
12
- import sys # noqa: F401
13
-
14
- from criteo_api_retailmedia_preview.model_utils import ( # noqa: F401
15
- ApiTypeError,
16
- ModelComposed,
17
- ModelNormal,
18
- ModelSimple,
19
- cached_property,
20
- change_keys_js_to_python,
21
- convert_js_args_to_python_args,
22
- date,
23
- datetime,
24
- file_type,
25
- none_type,
26
- validate_get_composed_info,
27
- OpenApiModel
28
- )
29
- from criteo_api_retailmedia_preview.exceptions import ApiAttributeError
30
-
31
-
32
- def lazy_import():
33
- from criteo_api_retailmedia_preview.model.problem_details import ProblemDetails
34
- from criteo_api_retailmedia_preview.model.resource_of_sku_slim_data_preview import ResourceOfSkuSlimDataPreview
35
- globals()['ProblemDetails'] = ProblemDetails
36
- globals()['ResourceOfSkuSlimDataPreview'] = ResourceOfSkuSlimDataPreview
37
-
38
-
39
- class SkuSlimDataPreviewListResponse(ModelNormal):
40
- """NOTE: This class is auto generated by OpenAPI Generator.
41
- Ref: https://openapi-generator.tech
42
-
43
- Do not edit the class manually.
44
-
45
- Attributes:
46
- allowed_values (dict): The key is the tuple path to the attribute
47
- and the for var_name this is (var_name,). The value is a dict
48
- with a capitalized key describing the allowed value and an allowed
49
- value. These dicts store the allowed enum values.
50
- attribute_map (dict): The key is attribute name
51
- and the value is json key in definition.
52
- discriminator_value_class_map (dict): A dict to go from the discriminator
53
- variable value to the discriminator class name.
54
- validations (dict): The key is the tuple path to the attribute
55
- and the for var_name this is (var_name,). The value is a dict
56
- that stores validations for max_length, min_length, max_items,
57
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
58
- inclusive_minimum, and regex.
59
- additional_properties_type (tuple): A tuple of classes accepted
60
- as additional properties values.
61
- """
62
-
63
- allowed_values = {
64
- }
65
-
66
- validations = {
67
- }
68
-
69
- @cached_property
70
- def additional_properties_type():
71
- """
72
- This must be a method because a model may have properties that are
73
- of type self, this must run after the class is loaded
74
- """
75
- lazy_import()
76
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
77
-
78
- _nullable = False
79
-
80
- @cached_property
81
- def openapi_types():
82
- """
83
- This must be a method because a model may have properties that are
84
- of type self, this must run after the class is loaded
85
-
86
- Returns
87
- openapi_types (dict): The key is attribute name
88
- and the value is attribute type.
89
- """
90
- lazy_import()
91
- return {
92
- 'data': ([ResourceOfSkuSlimDataPreview],), # noqa: E501
93
- 'errors': ([ProblemDetails],), # noqa: E501
94
- 'warnings': ([ProblemDetails],), # noqa: E501
95
- }
96
-
97
- @cached_property
98
- def discriminator():
99
- return None
100
-
101
-
102
- attribute_map = {
103
- 'data': 'data', # noqa: E501
104
- 'errors': 'errors', # noqa: E501
105
- 'warnings': 'warnings', # noqa: E501
106
- }
107
-
108
- read_only_vars = {
109
- 'errors', # noqa: E501
110
- 'warnings', # noqa: E501
111
- }
112
-
113
- _composed_schemas = {}
114
-
115
- @classmethod
116
- @convert_js_args_to_python_args
117
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
118
- """SkuSlimDataPreviewListResponse - a model defined in OpenAPI
119
-
120
- Keyword Args:
121
- _check_type (bool): if True, values for parameters in openapi_types
122
- will be type checked and a TypeError will be
123
- raised if the wrong type is input.
124
- Defaults to True
125
- _path_to_item (tuple/list): This is a list of keys or values to
126
- drill down to the model in received_data
127
- when deserializing a response
128
- _spec_property_naming (bool): True if the variable names in the input data
129
- are serialized names, as specified in the OpenAPI document.
130
- False if the variable names in the input data
131
- are pythonic names, e.g. snake case (default)
132
- _configuration (Configuration): the instance to use when
133
- deserializing a file_type parameter.
134
- If passed, type conversion is attempted
135
- If omitted no type conversion is done.
136
- _visited_composed_classes (tuple): This stores a tuple of
137
- classes that we have traveled through so that
138
- if we see that class again we will not use its
139
- discriminator again.
140
- When traveling through a discriminator, the
141
- composed schema that is
142
- is traveled through is added to this set.
143
- For example if Animal has a discriminator
144
- petType and we pass in "Dog", and the class Dog
145
- allOf includes Animal, we move through Animal
146
- once using the discriminator, and pick Dog.
147
- Then in Dog, we will make an instance of the
148
- Animal class but this time we won't travel
149
- through its discriminator because we passed in
150
- _visited_composed_classes = (Animal,)
151
- data ([ResourceOfSkuSlimDataPreview]): [optional] # noqa: E501
152
- errors ([ProblemDetails]): [optional] # noqa: E501
153
- warnings ([ProblemDetails]): [optional] # noqa: E501
154
- """
155
-
156
- _check_type = kwargs.pop('_check_type', True)
157
- _spec_property_naming = kwargs.pop('_spec_property_naming', True)
158
- _path_to_item = kwargs.pop('_path_to_item', ())
159
- _configuration = kwargs.pop('_configuration', None)
160
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
161
-
162
- self = super(OpenApiModel, cls).__new__(cls)
163
-
164
- if args:
165
- for arg in args:
166
- if isinstance(arg, dict):
167
- kwargs.update(arg)
168
- else:
169
- raise ApiTypeError(
170
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
171
- args,
172
- self.__class__.__name__,
173
- ),
174
- path_to_item=_path_to_item,
175
- valid_classes=(self.__class__,),
176
- )
177
-
178
- self._data_store = {}
179
- self._check_type = _check_type
180
- self._spec_property_naming = _spec_property_naming
181
- self._path_to_item = _path_to_item
182
- self._configuration = _configuration
183
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
184
-
185
- for var_name, var_value in kwargs.items():
186
- if var_name not in self.attribute_map and \
187
- self._configuration is not None and \
188
- self._configuration.discard_unknown_keys and \
189
- self.additional_properties_type is None:
190
- # discard variable.
191
- continue
192
- setattr(self, var_name, var_value)
193
- return self
194
-
195
- required_properties = set([
196
- '_data_store',
197
- '_check_type',
198
- '_spec_property_naming',
199
- '_path_to_item',
200
- '_configuration',
201
- '_visited_composed_classes',
202
- ])
203
-
204
- @convert_js_args_to_python_args
205
- def __init__(self, *args, **kwargs): # noqa: E501
206
- """SkuSlimDataPreviewListResponse - a model defined in OpenAPI
207
-
208
- Keyword Args:
209
- _check_type (bool): if True, values for parameters in openapi_types
210
- will be type checked and a TypeError will be
211
- raised if the wrong type is input.
212
- Defaults to True
213
- _path_to_item (tuple/list): This is a list of keys or values to
214
- drill down to the model in received_data
215
- when deserializing a response
216
- _spec_property_naming (bool): True if the variable names in the input data
217
- are serialized names, as specified in the OpenAPI document.
218
- False if the variable names in the input data
219
- are pythonic names, e.g. snake case (default)
220
- _configuration (Configuration): the instance to use when
221
- deserializing a file_type parameter.
222
- If passed, type conversion is attempted
223
- If omitted no type conversion is done.
224
- _visited_composed_classes (tuple): This stores a tuple of
225
- classes that we have traveled through so that
226
- if we see that class again we will not use its
227
- discriminator again.
228
- When traveling through a discriminator, the
229
- composed schema that is
230
- is traveled through is added to this set.
231
- For example if Animal has a discriminator
232
- petType and we pass in "Dog", and the class Dog
233
- allOf includes Animal, we move through Animal
234
- once using the discriminator, and pick Dog.
235
- Then in Dog, we will make an instance of the
236
- Animal class but this time we won't travel
237
- through its discriminator because we passed in
238
- _visited_composed_classes = (Animal,)
239
- data ([ResourceOfSkuSlimDataPreview]): [optional] # noqa: E501
240
- errors ([ProblemDetails]): [optional] # noqa: E501
241
- warnings ([ProblemDetails]): [optional] # noqa: E501
242
- """
243
-
244
- _check_type = kwargs.pop('_check_type', True)
245
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
246
- _path_to_item = kwargs.pop('_path_to_item', ())
247
- _configuration = kwargs.pop('_configuration', None)
248
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
249
-
250
- if args:
251
- for arg in args:
252
- if isinstance(arg, dict):
253
- kwargs.update(arg)
254
- else:
255
- raise ApiTypeError(
256
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
257
- args,
258
- self.__class__.__name__,
259
- ),
260
- path_to_item=_path_to_item,
261
- valid_classes=(self.__class__,),
262
- )
263
-
264
- self._data_store = {}
265
- self._check_type = _check_type
266
- self._spec_property_naming = _spec_property_naming
267
- self._path_to_item = _path_to_item
268
- self._configuration = _configuration
269
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
270
-
271
- for var_name, var_value in kwargs.items():
272
- if var_name not in self.attribute_map and \
273
- self._configuration is not None and \
274
- self._configuration.discard_unknown_keys and \
275
- self.additional_properties_type is None:
276
- # discard variable.
277
- continue
278
- setattr(self, var_name, var_value)
279
- if var_name in self.read_only_vars:
280
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
281
- f"class with read only attributes.")
@@ -1,321 +0,0 @@
1
- """
2
- Criteo API
3
-
4
- Criteo API - RetailMedia # noqa: E501
5
-
6
- The version of the OpenAPI document: Preview
7
- Generated by: https://openapi-generator.tech
8
- """
9
-
10
-
11
- import re # noqa: F401
12
- import sys # noqa: F401
13
-
14
- from criteo_api_retailmedia_preview.model_utils import ( # noqa: F401
15
- ApiTypeError,
16
- ModelComposed,
17
- ModelNormal,
18
- ModelSimple,
19
- cached_property,
20
- change_keys_js_to_python,
21
- convert_js_args_to_python_args,
22
- date,
23
- datetime,
24
- file_type,
25
- none_type,
26
- validate_get_composed_info,
27
- OpenApiModel
28
- )
29
- from criteo_api_retailmedia_preview.exceptions import ApiAttributeError
30
-
31
-
32
- def lazy_import():
33
- from criteo_api_retailmedia_preview.model.brand import Brand
34
- from criteo_api_retailmedia_preview.model.category import Category
35
- globals()['Brand'] = Brand
36
- globals()['Category'] = Category
37
-
38
-
39
- class SkuSlimDataV2(ModelNormal):
40
- """NOTE: This class is auto generated by OpenAPI Generator.
41
- Ref: https://openapi-generator.tech
42
-
43
- Do not edit the class manually.
44
-
45
- Attributes:
46
- allowed_values (dict): The key is the tuple path to the attribute
47
- and the for var_name this is (var_name,). The value is a dict
48
- with a capitalized key describing the allowed value and an allowed
49
- value. These dicts store the allowed enum values.
50
- attribute_map (dict): The key is attribute name
51
- and the value is json key in definition.
52
- discriminator_value_class_map (dict): A dict to go from the discriminator
53
- variable value to the discriminator class name.
54
- validations (dict): The key is the tuple path to the attribute
55
- and the for var_name this is (var_name,). The value is a dict
56
- that stores validations for max_length, min_length, max_items,
57
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
58
- inclusive_minimum, and regex.
59
- additional_properties_type (tuple): A tuple of classes accepted
60
- as additional properties values.
61
- """
62
-
63
- allowed_values = {
64
- }
65
-
66
- validations = {
67
- ('name',): {
68
- 'max_length': 1000,
69
- 'min_length': 0,
70
- },
71
- }
72
-
73
- @cached_property
74
- def additional_properties_type():
75
- """
76
- This must be a method because a model may have properties that are
77
- of type self, this must run after the class is loaded
78
- """
79
- lazy_import()
80
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
81
-
82
- _nullable = False
83
-
84
- @cached_property
85
- def openapi_types():
86
- """
87
- This must be a method because a model may have properties that are
88
- of type self, this must run after the class is loaded
89
-
90
- Returns
91
- openapi_types (dict): The key is attribute name
92
- and the value is attribute type.
93
- """
94
- lazy_import()
95
- return {
96
- 'is_in_stock': (bool,), # noqa: E501
97
- 'price': (float, none_type,), # noqa: E501
98
- 'updated_at': (datetime,), # noqa: E501
99
- 'brand': (Brand,), # noqa: E501
100
- 'category': (Category,), # noqa: E501
101
- 'description': (str, none_type,), # noqa: E501
102
- 'gtin': (str, none_type,), # noqa: E501
103
- 'image_url': (str,), # noqa: E501
104
- 'mpn': (str, none_type,), # noqa: E501
105
- 'name': (str,), # noqa: E501
106
- }
107
-
108
- @cached_property
109
- def discriminator():
110
- return None
111
-
112
-
113
- attribute_map = {
114
- 'is_in_stock': 'isInStock', # noqa: E501
115
- 'price': 'price', # noqa: E501
116
- 'updated_at': 'updatedAt', # noqa: E501
117
- 'brand': 'brand', # noqa: E501
118
- 'category': 'category', # noqa: E501
119
- 'description': 'description', # noqa: E501
120
- 'gtin': 'gtin', # noqa: E501
121
- 'image_url': 'imageUrl', # noqa: E501
122
- 'mpn': 'mpn', # noqa: E501
123
- 'name': 'name', # noqa: E501
124
- }
125
-
126
- read_only_vars = {
127
- }
128
-
129
- _composed_schemas = {}
130
-
131
- @classmethod
132
- @convert_js_args_to_python_args
133
- def _from_openapi_data(cls, is_in_stock, price, updated_at, *args, **kwargs): # noqa: E501
134
- """SkuSlimDataV2 - a model defined in OpenAPI
135
-
136
- Args:
137
- is_in_stock (bool): An indication of if the retailer currently has the product in stock.
138
- price (float, none_type): The price of the product on the retailer site. Can be omitted in certain circumstances
139
- updated_at (datetime): The last time this product was updated in the Retail Media Catalog. Represented as a UTC ISO8601 string.
140
-
141
- Keyword Args:
142
- _check_type (bool): if True, values for parameters in openapi_types
143
- will be type checked and a TypeError will be
144
- raised if the wrong type is input.
145
- Defaults to True
146
- _path_to_item (tuple/list): This is a list of keys or values to
147
- drill down to the model in received_data
148
- when deserializing a response
149
- _spec_property_naming (bool): True if the variable names in the input data
150
- are serialized names, as specified in the OpenAPI document.
151
- False if the variable names in the input data
152
- are pythonic names, e.g. snake case (default)
153
- _configuration (Configuration): the instance to use when
154
- deserializing a file_type parameter.
155
- If passed, type conversion is attempted
156
- If omitted no type conversion is done.
157
- _visited_composed_classes (tuple): This stores a tuple of
158
- classes that we have traveled through so that
159
- if we see that class again we will not use its
160
- discriminator again.
161
- When traveling through a discriminator, the
162
- composed schema that is
163
- is traveled through is added to this set.
164
- For example if Animal has a discriminator
165
- petType and we pass in "Dog", and the class Dog
166
- allOf includes Animal, we move through Animal
167
- once using the discriminator, and pick Dog.
168
- Then in Dog, we will make an instance of the
169
- Animal class but this time we won't travel
170
- through its discriminator because we passed in
171
- _visited_composed_classes = (Animal,)
172
- brand (Brand): [optional] # noqa: E501
173
- category (Category): [optional] # noqa: E501
174
- description (str, none_type): A short description of the product.. [optional] # noqa: E501
175
- gtin (str, none_type): A GTIN identifier for the product if available. Covers variations such as EANs and UPCs.. [optional] # noqa: E501
176
- image_url (str): An http image resource provided by the retailer.. [optional] # noqa: E501
177
- mpn (str, none_type): The MPN for the product if available.. [optional] # noqa: E501
178
- name (str): A short product name.. [optional] # noqa: E501
179
- """
180
-
181
- _check_type = kwargs.pop('_check_type', True)
182
- _spec_property_naming = kwargs.pop('_spec_property_naming', True)
183
- _path_to_item = kwargs.pop('_path_to_item', ())
184
- _configuration = kwargs.pop('_configuration', None)
185
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
186
-
187
- self = super(OpenApiModel, cls).__new__(cls)
188
-
189
- if args:
190
- for arg in args:
191
- if isinstance(arg, dict):
192
- kwargs.update(arg)
193
- else:
194
- raise ApiTypeError(
195
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
196
- args,
197
- self.__class__.__name__,
198
- ),
199
- path_to_item=_path_to_item,
200
- valid_classes=(self.__class__,),
201
- )
202
-
203
- self._data_store = {}
204
- self._check_type = _check_type
205
- self._spec_property_naming = _spec_property_naming
206
- self._path_to_item = _path_to_item
207
- self._configuration = _configuration
208
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
209
-
210
- self.is_in_stock = is_in_stock
211
- self.price = price
212
- self.updated_at = updated_at
213
- for var_name, var_value in kwargs.items():
214
- if var_name not in self.attribute_map and \
215
- self._configuration is not None and \
216
- self._configuration.discard_unknown_keys and \
217
- self.additional_properties_type is None:
218
- # discard variable.
219
- continue
220
- setattr(self, var_name, var_value)
221
- return self
222
-
223
- required_properties = set([
224
- '_data_store',
225
- '_check_type',
226
- '_spec_property_naming',
227
- '_path_to_item',
228
- '_configuration',
229
- '_visited_composed_classes',
230
- ])
231
-
232
- @convert_js_args_to_python_args
233
- def __init__(self, is_in_stock, price, updated_at, *args, **kwargs): # noqa: E501
234
- """SkuSlimDataV2 - a model defined in OpenAPI
235
-
236
- Args:
237
- is_in_stock (bool): An indication of if the retailer currently has the product in stock.
238
- price (float, none_type): The price of the product on the retailer site. Can be omitted in certain circumstances
239
- updated_at (datetime): The last time this product was updated in the Retail Media Catalog. Represented as a UTC ISO8601 string.
240
-
241
- Keyword Args:
242
- _check_type (bool): if True, values for parameters in openapi_types
243
- will be type checked and a TypeError will be
244
- raised if the wrong type is input.
245
- Defaults to True
246
- _path_to_item (tuple/list): This is a list of keys or values to
247
- drill down to the model in received_data
248
- when deserializing a response
249
- _spec_property_naming (bool): True if the variable names in the input data
250
- are serialized names, as specified in the OpenAPI document.
251
- False if the variable names in the input data
252
- are pythonic names, e.g. snake case (default)
253
- _configuration (Configuration): the instance to use when
254
- deserializing a file_type parameter.
255
- If passed, type conversion is attempted
256
- If omitted no type conversion is done.
257
- _visited_composed_classes (tuple): This stores a tuple of
258
- classes that we have traveled through so that
259
- if we see that class again we will not use its
260
- discriminator again.
261
- When traveling through a discriminator, the
262
- composed schema that is
263
- is traveled through is added to this set.
264
- For example if Animal has a discriminator
265
- petType and we pass in "Dog", and the class Dog
266
- allOf includes Animal, we move through Animal
267
- once using the discriminator, and pick Dog.
268
- Then in Dog, we will make an instance of the
269
- Animal class but this time we won't travel
270
- through its discriminator because we passed in
271
- _visited_composed_classes = (Animal,)
272
- brand (Brand): [optional] # noqa: E501
273
- category (Category): [optional] # noqa: E501
274
- description (str, none_type): A short description of the product.. [optional] # noqa: E501
275
- gtin (str, none_type): A GTIN identifier for the product if available. Covers variations such as EANs and UPCs.. [optional] # noqa: E501
276
- image_url (str): An http image resource provided by the retailer.. [optional] # noqa: E501
277
- mpn (str, none_type): The MPN for the product if available.. [optional] # noqa: E501
278
- name (str): A short product name.. [optional] # noqa: E501
279
- """
280
-
281
- _check_type = kwargs.pop('_check_type', True)
282
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
283
- _path_to_item = kwargs.pop('_path_to_item', ())
284
- _configuration = kwargs.pop('_configuration', None)
285
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
286
-
287
- if args:
288
- for arg in args:
289
- if isinstance(arg, dict):
290
- kwargs.update(arg)
291
- else:
292
- raise ApiTypeError(
293
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
294
- args,
295
- self.__class__.__name__,
296
- ),
297
- path_to_item=_path_to_item,
298
- valid_classes=(self.__class__,),
299
- )
300
-
301
- self._data_store = {}
302
- self._check_type = _check_type
303
- self._spec_property_naming = _spec_property_naming
304
- self._path_to_item = _path_to_item
305
- self._configuration = _configuration
306
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
307
-
308
- self.is_in_stock = is_in_stock
309
- self.price = price
310
- self.updated_at = updated_at
311
- for var_name, var_value in kwargs.items():
312
- if var_name not in self.attribute_map and \
313
- self._configuration is not None and \
314
- self._configuration.discard_unknown_keys and \
315
- self.additional_properties_type is None:
316
- # discard variable.
317
- continue
318
- setattr(self, var_name, var_value)
319
- if var_name in self.read_only_vars:
320
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
321
- f"class with read only attributes.")