criteo-api-retailmedia-sdk 2024.7.0.240731__py3-none-any.whl → 2024.7.0.241029__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.
- {criteo_api_retailmedia_sdk-2024.7.0.240731.dist-info → criteo_api_retailmedia_sdk-2024.7.0.241029.dist-info}/METADATA +3 -3
- {criteo_api_retailmedia_sdk-2024.7.0.240731.dist-info → criteo_api_retailmedia_sdk-2024.7.0.241029.dist-info}/RECORD +43 -40
- {criteo_api_retailmedia_sdk-2024.7.0.240731.dist-info → criteo_api_retailmedia_sdk-2024.7.0.241029.dist-info}/WHEEL +1 -1
- criteo_api_retailmedia_v2024_07/__init__.py +1 -1
- criteo_api_retailmedia_v2024_07/api/analytics_api.py +3 -3
- criteo_api_retailmedia_v2024_07/api/balance_api.py +118 -90
- criteo_api_retailmedia_v2024_07/api/campaign_api.py +711 -707
- criteo_api_retailmedia_v2024_07/api_client.py +1 -1
- criteo_api_retailmedia_v2024_07/configuration.py +1 -1
- criteo_api_retailmedia_v2024_07/model/{external_add_funds_to_balance.py → add_funds_to_balance_v2.py} +12 -14
- criteo_api_retailmedia_v2024_07/model/{add_funds_to_balance_request.py → add_funds_to_balance_v2_request.py} +8 -8
- criteo_api_retailmedia_v2024_07/model/{external_balance_response.py → balance_response_v2.py} +46 -70
- criteo_api_retailmedia_v2024_07/model/{balance_response.py → balance_response_v2_response.py} +8 -8
- criteo_api_retailmedia_v2024_07/model/campaign_attributes_v202301.py +4 -0
- criteo_api_retailmedia_v2024_07/model/campaign_v202301.py +4 -0
- criteo_api_retailmedia_v2024_07/model/change_dates_of_balance_v2.py +271 -0
- criteo_api_retailmedia_v2024_07/model/{change_dates_of_balance_request.py → change_dates_of_balance_v2_request.py} +8 -8
- criteo_api_retailmedia_v2024_07/model/{external_create_balance.py → create_balance_v2.py} +22 -34
- criteo_api_retailmedia_v2024_07/model/{create_balance_request.py → create_balance_v2_request.py} +8 -8
- criteo_api_retailmedia_v2024_07/model/editable_campaign_attributes_v202301.py +4 -0
- criteo_api_retailmedia_v2024_07/model/external_account.py +4 -0
- criteo_api_retailmedia_v2024_07/model/line_item_product_status.py +291 -0
- criteo_api_retailmedia_v2024_07/model/{balance_response_paged_list_response.py → paged_resource_collection_outcome_of_balance_response_v2.py} +8 -8
- criteo_api_retailmedia_v2024_07/model/product_metadata.py +269 -0
- criteo_api_retailmedia_v2024_07/model/product_resource_outcome.py +266 -0
- criteo_api_retailmedia_v2024_07/model/promoted_product.py +270 -0
- criteo_api_retailmedia_v2024_07/model/promoted_product_resource.py +270 -0
- criteo_api_retailmedia_v2024_07/model/{external_promoted_product202110.py → promoted_product_resource_collection_input.py} +13 -14
- criteo_api_retailmedia_v2024_07/model/{promoted_product202110_paged_list_response.py → promoted_product_resource_collection_outcome.py} +25 -32
- criteo_api_retailmedia_v2024_07/model/{resource_of_add_funds_to_balance.py → resource_of_add_funds_to_balance_v2.py} +8 -8
- criteo_api_retailmedia_v2024_07/model/{resource_of_create_balance.py → resource_of_balance_response_v2.py} +8 -8
- criteo_api_retailmedia_v2024_07/model/{resource_of_update_balance_model.py → resource_of_change_dates_of_balance_v2.py} +8 -8
- criteo_api_retailmedia_v2024_07/model/{resource_of_balance_response.py → resource_of_create_balance_v2.py} +8 -8
- criteo_api_retailmedia_v2024_07/model/resource_of_update_balance_model_v2.py +277 -0
- criteo_api_retailmedia_v2024_07/model/retail_media_account.py +6 -2
- criteo_api_retailmedia_v2024_07/model/retail_media_brand_account_creation.py +6 -2
- criteo_api_retailmedia_v2024_07/model/retail_media_seller_account_creation.py +6 -2
- criteo_api_retailmedia_v2024_07/model/rm_legacy_audience_get_entity_v1_resource.py +4 -4
- criteo_api_retailmedia_v2024_07/model/section.py +6 -8
- criteo_api_retailmedia_v2024_07/model/{external_change_dates_of_balance.py → update_balance_model_v2.py} +22 -24
- criteo_api_retailmedia_v2024_07/model/{update_balance_model_request.py → update_balance_model_v2_request.py} +8 -8
- criteo_api_retailmedia_v2024_07/models/__init__.py +23 -20
- criteo_api_retailmedia_v2024_07/model/external_update_balance_model.py +0 -283
- criteo_api_retailmedia_v2024_07/model/promoted_product202110_list_request.py +0 -269
- criteo_api_retailmedia_v2024_07/model/resource_of_change_dates_of_balance.py +0 -277
- criteo_api_retailmedia_v2024_07/model/resource_of_promoted_product202110.py +0 -277
- {criteo_api_retailmedia_sdk-2024.7.0.240731.dist-info → criteo_api_retailmedia_sdk-2024.7.0.241029.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Criteo API
|
|
3
|
+
|
|
4
|
+
Criteo API - RetailMedia # noqa: E501
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2024-07
|
|
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_v2024_07.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_v2024_07.exceptions import ApiAttributeError
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class LineItemProductStatus(ModelSimple):
|
|
34
|
+
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
35
|
+
Ref: https://openapi-generator.tech
|
|
36
|
+
|
|
37
|
+
Do not edit the class manually.
|
|
38
|
+
|
|
39
|
+
Attributes:
|
|
40
|
+
allowed_values (dict): The key is the tuple path to the attribute
|
|
41
|
+
and the for var_name this is (var_name,). The value is a dict
|
|
42
|
+
with a capitalized key describing the allowed value and an allowed
|
|
43
|
+
value. These dicts store the allowed enum values.
|
|
44
|
+
validations (dict): The key is the tuple path to the attribute
|
|
45
|
+
and the for var_name this is (var_name,). The value is a dict
|
|
46
|
+
that stores validations for max_length, min_length, max_items,
|
|
47
|
+
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
|
48
|
+
inclusive_minimum, and regex.
|
|
49
|
+
additional_properties_type (tuple): A tuple of classes accepted
|
|
50
|
+
as additional properties values.
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
allowed_values = {
|
|
54
|
+
('value',): {
|
|
55
|
+
'UNKNOWN': "Unknown",
|
|
56
|
+
'ACTIVE': "Active",
|
|
57
|
+
'PAUSED': "Paused",
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
validations = {
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
additional_properties_type = None
|
|
65
|
+
|
|
66
|
+
_nullable = False
|
|
67
|
+
|
|
68
|
+
@cached_property
|
|
69
|
+
def openapi_types():
|
|
70
|
+
"""
|
|
71
|
+
This must be a method because a model may have properties that are
|
|
72
|
+
of type self, this must run after the class is loaded
|
|
73
|
+
|
|
74
|
+
Returns
|
|
75
|
+
openapi_types (dict): The key is attribute name
|
|
76
|
+
and the value is attribute type.
|
|
77
|
+
"""
|
|
78
|
+
return {
|
|
79
|
+
'value': (str,),
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@cached_property
|
|
83
|
+
def discriminator():
|
|
84
|
+
return None
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
attribute_map = {}
|
|
88
|
+
|
|
89
|
+
read_only_vars = set()
|
|
90
|
+
|
|
91
|
+
_composed_schemas = None
|
|
92
|
+
|
|
93
|
+
required_properties = set([
|
|
94
|
+
'_data_store',
|
|
95
|
+
'_check_type',
|
|
96
|
+
'_spec_property_naming',
|
|
97
|
+
'_path_to_item',
|
|
98
|
+
'_configuration',
|
|
99
|
+
'_visited_composed_classes',
|
|
100
|
+
])
|
|
101
|
+
|
|
102
|
+
@convert_js_args_to_python_args
|
|
103
|
+
def __init__(self, *args, **kwargs):
|
|
104
|
+
"""LineItemProductStatus - a model defined in OpenAPI
|
|
105
|
+
|
|
106
|
+
Note that value can be passed either in args or in kwargs, but not in both.
|
|
107
|
+
|
|
108
|
+
Args:
|
|
109
|
+
args[0] (str): The status of a promoted product in the context of the line item.., must be one of ["Unknown", "Active", "Paused", ] # noqa: E501
|
|
110
|
+
|
|
111
|
+
Keyword Args:
|
|
112
|
+
value (str): The status of a promoted product in the context of the line item.., must be one of ["Unknown", "Active", "Paused", ] # noqa: E501
|
|
113
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
114
|
+
will be type checked and a TypeError will be
|
|
115
|
+
raised if the wrong type is input.
|
|
116
|
+
Defaults to True
|
|
117
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
118
|
+
drill down to the model in received_data
|
|
119
|
+
when deserializing a response
|
|
120
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
121
|
+
are serialized names, as specified in the OpenAPI document.
|
|
122
|
+
False if the variable names in the input data
|
|
123
|
+
are pythonic names, e.g. snake case (default)
|
|
124
|
+
_configuration (Configuration): the instance to use when
|
|
125
|
+
deserializing a file_type parameter.
|
|
126
|
+
If passed, type conversion is attempted
|
|
127
|
+
If omitted no type conversion is done.
|
|
128
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
129
|
+
classes that we have traveled through so that
|
|
130
|
+
if we see that class again we will not use its
|
|
131
|
+
discriminator again.
|
|
132
|
+
When traveling through a discriminator, the
|
|
133
|
+
composed schema that is
|
|
134
|
+
is traveled through is added to this set.
|
|
135
|
+
For example if Animal has a discriminator
|
|
136
|
+
petType and we pass in "Dog", and the class Dog
|
|
137
|
+
allOf includes Animal, we move through Animal
|
|
138
|
+
once using the discriminator, and pick Dog.
|
|
139
|
+
Then in Dog, we will make an instance of the
|
|
140
|
+
Animal class but this time we won't travel
|
|
141
|
+
through its discriminator because we passed in
|
|
142
|
+
_visited_composed_classes = (Animal,)
|
|
143
|
+
"""
|
|
144
|
+
# required up here when default value is not given
|
|
145
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
146
|
+
|
|
147
|
+
if 'value' in kwargs:
|
|
148
|
+
value = kwargs.pop('value')
|
|
149
|
+
elif args:
|
|
150
|
+
args = list(args)
|
|
151
|
+
value = args.pop(0)
|
|
152
|
+
else:
|
|
153
|
+
raise ApiTypeError(
|
|
154
|
+
"value is required, but not passed in args or kwargs and doesn't have default",
|
|
155
|
+
path_to_item=_path_to_item,
|
|
156
|
+
valid_classes=(self.__class__,),
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
160
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
161
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
162
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
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
|
+
self.value = value
|
|
185
|
+
if kwargs:
|
|
186
|
+
raise ApiTypeError(
|
|
187
|
+
"Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % (
|
|
188
|
+
kwargs,
|
|
189
|
+
self.__class__.__name__,
|
|
190
|
+
),
|
|
191
|
+
path_to_item=_path_to_item,
|
|
192
|
+
valid_classes=(self.__class__,),
|
|
193
|
+
)
|
|
194
|
+
|
|
195
|
+
@classmethod
|
|
196
|
+
@convert_js_args_to_python_args
|
|
197
|
+
def _from_openapi_data(cls, *args, **kwargs):
|
|
198
|
+
"""LineItemProductStatus - a model defined in OpenAPI
|
|
199
|
+
|
|
200
|
+
Note that value can be passed either in args or in kwargs, but not in both.
|
|
201
|
+
|
|
202
|
+
Args:
|
|
203
|
+
args[0] (str): The status of a promoted product in the context of the line item.., must be one of ["Unknown", "Active", "Paused", ] # noqa: E501
|
|
204
|
+
|
|
205
|
+
Keyword Args:
|
|
206
|
+
value (str): The status of a promoted product in the context of the line item.., must be one of ["Unknown", "Active", "Paused", ] # noqa: E501
|
|
207
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
208
|
+
will be type checked and a TypeError will be
|
|
209
|
+
raised if the wrong type is input.
|
|
210
|
+
Defaults to True
|
|
211
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
212
|
+
drill down to the model in received_data
|
|
213
|
+
when deserializing a response
|
|
214
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
215
|
+
are serialized names, as specified in the OpenAPI document.
|
|
216
|
+
False if the variable names in the input data
|
|
217
|
+
are pythonic names, e.g. snake case (default)
|
|
218
|
+
_configuration (Configuration): the instance to use when
|
|
219
|
+
deserializing a file_type parameter.
|
|
220
|
+
If passed, type conversion is attempted
|
|
221
|
+
If omitted no type conversion is done.
|
|
222
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
223
|
+
classes that we have traveled through so that
|
|
224
|
+
if we see that class again we will not use its
|
|
225
|
+
discriminator again.
|
|
226
|
+
When traveling through a discriminator, the
|
|
227
|
+
composed schema that is
|
|
228
|
+
is traveled through is added to this set.
|
|
229
|
+
For example if Animal has a discriminator
|
|
230
|
+
petType and we pass in "Dog", and the class Dog
|
|
231
|
+
allOf includes Animal, we move through Animal
|
|
232
|
+
once using the discriminator, and pick Dog.
|
|
233
|
+
Then in Dog, we will make an instance of the
|
|
234
|
+
Animal class but this time we won't travel
|
|
235
|
+
through its discriminator because we passed in
|
|
236
|
+
_visited_composed_classes = (Animal,)
|
|
237
|
+
"""
|
|
238
|
+
# required up here when default value is not given
|
|
239
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
240
|
+
|
|
241
|
+
self = super(OpenApiModel, cls).__new__(cls)
|
|
242
|
+
|
|
243
|
+
if 'value' in kwargs:
|
|
244
|
+
value = kwargs.pop('value')
|
|
245
|
+
elif args:
|
|
246
|
+
args = list(args)
|
|
247
|
+
value = args.pop(0)
|
|
248
|
+
else:
|
|
249
|
+
raise ApiTypeError(
|
|
250
|
+
"value is required, but not passed in args or kwargs and doesn't have default",
|
|
251
|
+
path_to_item=_path_to_item,
|
|
252
|
+
valid_classes=(self.__class__,),
|
|
253
|
+
)
|
|
254
|
+
|
|
255
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
256
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
257
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
258
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
259
|
+
|
|
260
|
+
if args:
|
|
261
|
+
for arg in args:
|
|
262
|
+
if isinstance(arg, dict):
|
|
263
|
+
kwargs.update(arg)
|
|
264
|
+
else:
|
|
265
|
+
raise ApiTypeError(
|
|
266
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
267
|
+
args,
|
|
268
|
+
self.__class__.__name__,
|
|
269
|
+
),
|
|
270
|
+
path_to_item=_path_to_item,
|
|
271
|
+
valid_classes=(self.__class__,),
|
|
272
|
+
)
|
|
273
|
+
|
|
274
|
+
self._data_store = {}
|
|
275
|
+
self._check_type = _check_type
|
|
276
|
+
self._spec_property_naming = _spec_property_naming
|
|
277
|
+
self._path_to_item = _path_to_item
|
|
278
|
+
self._configuration = _configuration
|
|
279
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
280
|
+
self.value = value
|
|
281
|
+
if kwargs:
|
|
282
|
+
raise ApiTypeError(
|
|
283
|
+
"Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % (
|
|
284
|
+
kwargs,
|
|
285
|
+
self.__class__.__name__,
|
|
286
|
+
),
|
|
287
|
+
path_to_item=_path_to_item,
|
|
288
|
+
valid_classes=(self.__class__,),
|
|
289
|
+
)
|
|
290
|
+
|
|
291
|
+
return self
|
|
@@ -32,13 +32,13 @@ from criteo_api_retailmedia_v2024_07.exceptions import ApiAttributeError
|
|
|
32
32
|
def lazy_import():
|
|
33
33
|
from criteo_api_retailmedia_v2024_07.model.common_problem import CommonProblem
|
|
34
34
|
from criteo_api_retailmedia_v2024_07.model.page_metadata import PageMetadata
|
|
35
|
-
from criteo_api_retailmedia_v2024_07.model.
|
|
35
|
+
from criteo_api_retailmedia_v2024_07.model.resource_of_balance_response_v2 import ResourceOfBalanceResponseV2
|
|
36
36
|
globals()['CommonProblem'] = CommonProblem
|
|
37
37
|
globals()['PageMetadata'] = PageMetadata
|
|
38
|
-
globals()['
|
|
38
|
+
globals()['ResourceOfBalanceResponseV2'] = ResourceOfBalanceResponseV2
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
class
|
|
41
|
+
class PagedResourceCollectionOutcomeOfBalanceResponseV2(ModelNormal):
|
|
42
42
|
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
43
43
|
Ref: https://openapi-generator.tech
|
|
44
44
|
|
|
@@ -92,7 +92,7 @@ class BalanceResponsePagedListResponse(ModelNormal):
|
|
|
92
92
|
lazy_import()
|
|
93
93
|
return {
|
|
94
94
|
'metadata': (PageMetadata,), # noqa: E501
|
|
95
|
-
'data': ([
|
|
95
|
+
'data': ([ResourceOfBalanceResponseV2],), # noqa: E501
|
|
96
96
|
'warnings': ([CommonProblem],), # noqa: E501
|
|
97
97
|
'errors': ([CommonProblem],), # noqa: E501
|
|
98
98
|
}
|
|
@@ -119,7 +119,7 @@ class BalanceResponsePagedListResponse(ModelNormal):
|
|
|
119
119
|
@classmethod
|
|
120
120
|
@convert_js_args_to_python_args
|
|
121
121
|
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
|
|
122
|
-
"""
|
|
122
|
+
"""PagedResourceCollectionOutcomeOfBalanceResponseV2 - a model defined in OpenAPI
|
|
123
123
|
|
|
124
124
|
Keyword Args:
|
|
125
125
|
_check_type (bool): if True, values for parameters in openapi_types
|
|
@@ -153,7 +153,7 @@ class BalanceResponsePagedListResponse(ModelNormal):
|
|
|
153
153
|
through its discriminator because we passed in
|
|
154
154
|
_visited_composed_classes = (Animal,)
|
|
155
155
|
metadata (PageMetadata): [optional] # noqa: E501
|
|
156
|
-
data ([
|
|
156
|
+
data ([ResourceOfBalanceResponseV2]): [optional] # noqa: E501
|
|
157
157
|
warnings ([CommonProblem]): [optional] # noqa: E501
|
|
158
158
|
errors ([CommonProblem]): [optional] # noqa: E501
|
|
159
159
|
"""
|
|
@@ -208,7 +208,7 @@ class BalanceResponsePagedListResponse(ModelNormal):
|
|
|
208
208
|
|
|
209
209
|
@convert_js_args_to_python_args
|
|
210
210
|
def __init__(self, *args, **kwargs): # noqa: E501
|
|
211
|
-
"""
|
|
211
|
+
"""PagedResourceCollectionOutcomeOfBalanceResponseV2 - a model defined in OpenAPI
|
|
212
212
|
|
|
213
213
|
Keyword Args:
|
|
214
214
|
_check_type (bool): if True, values for parameters in openapi_types
|
|
@@ -242,7 +242,7 @@ class BalanceResponsePagedListResponse(ModelNormal):
|
|
|
242
242
|
through its discriminator because we passed in
|
|
243
243
|
_visited_composed_classes = (Animal,)
|
|
244
244
|
metadata (PageMetadata): [optional] # noqa: E501
|
|
245
|
-
data ([
|
|
245
|
+
data ([ResourceOfBalanceResponseV2]): [optional] # noqa: E501
|
|
246
246
|
warnings ([CommonProblem]): [optional] # noqa: E501
|
|
247
247
|
errors ([CommonProblem]): [optional] # noqa: E501
|
|
248
248
|
"""
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Criteo API
|
|
3
|
+
|
|
4
|
+
Criteo API - RetailMedia # noqa: E501
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2024-07
|
|
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_v2024_07.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_v2024_07.exceptions import ApiAttributeError
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class ProductMetadata(ModelNormal):
|
|
34
|
+
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
35
|
+
Ref: https://openapi-generator.tech
|
|
36
|
+
|
|
37
|
+
Do not edit the class manually.
|
|
38
|
+
|
|
39
|
+
Attributes:
|
|
40
|
+
allowed_values (dict): The key is the tuple path to the attribute
|
|
41
|
+
and the for var_name this is (var_name,). The value is a dict
|
|
42
|
+
with a capitalized key describing the allowed value and an allowed
|
|
43
|
+
value. These dicts store the allowed enum values.
|
|
44
|
+
attribute_map (dict): The key is attribute name
|
|
45
|
+
and the value is json key in definition.
|
|
46
|
+
discriminator_value_class_map (dict): A dict to go from the discriminator
|
|
47
|
+
variable value to the discriminator class name.
|
|
48
|
+
validations (dict): The key is the tuple path to the attribute
|
|
49
|
+
and the for var_name this is (var_name,). The value is a dict
|
|
50
|
+
that stores validations for max_length, min_length, max_items,
|
|
51
|
+
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
|
52
|
+
inclusive_minimum, and regex.
|
|
53
|
+
additional_properties_type (tuple): A tuple of classes accepted
|
|
54
|
+
as additional properties values.
|
|
55
|
+
"""
|
|
56
|
+
|
|
57
|
+
allowed_values = {
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
validations = {
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
additional_properties_type = None
|
|
64
|
+
|
|
65
|
+
_nullable = False
|
|
66
|
+
|
|
67
|
+
@cached_property
|
|
68
|
+
def openapi_types():
|
|
69
|
+
"""
|
|
70
|
+
This must be a method because a model may have properties that are
|
|
71
|
+
of type self, this must run after the class is loaded
|
|
72
|
+
|
|
73
|
+
Returns
|
|
74
|
+
openapi_types (dict): The key is attribute name
|
|
75
|
+
and the value is attribute type.
|
|
76
|
+
"""
|
|
77
|
+
return {
|
|
78
|
+
'offset': (int, none_type,), # noqa: E501
|
|
79
|
+
'limit': (int, none_type,), # noqa: E501
|
|
80
|
+
'count': (int, none_type,), # noqa: E501
|
|
81
|
+
'response_count': (int, none_type,), # noqa: E501
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@cached_property
|
|
85
|
+
def discriminator():
|
|
86
|
+
return None
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
attribute_map = {
|
|
90
|
+
'offset': 'offset', # noqa: E501
|
|
91
|
+
'limit': 'limit', # noqa: E501
|
|
92
|
+
'count': 'count', # noqa: E501
|
|
93
|
+
'response_count': 'responseCount', # noqa: E501
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
read_only_vars = {
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
_composed_schemas = {}
|
|
100
|
+
|
|
101
|
+
@classmethod
|
|
102
|
+
@convert_js_args_to_python_args
|
|
103
|
+
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
|
|
104
|
+
"""ProductMetadata - a model defined in OpenAPI
|
|
105
|
+
|
|
106
|
+
Keyword Args:
|
|
107
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
108
|
+
will be type checked and a TypeError will be
|
|
109
|
+
raised if the wrong type is input.
|
|
110
|
+
Defaults to True
|
|
111
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
112
|
+
drill down to the model in received_data
|
|
113
|
+
when deserializing a response
|
|
114
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
115
|
+
are serialized names, as specified in the OpenAPI document.
|
|
116
|
+
False if the variable names in the input data
|
|
117
|
+
are pythonic names, e.g. snake case (default)
|
|
118
|
+
_configuration (Configuration): the instance to use when
|
|
119
|
+
deserializing a file_type parameter.
|
|
120
|
+
If passed, type conversion is attempted
|
|
121
|
+
If omitted no type conversion is done.
|
|
122
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
123
|
+
classes that we have traveled through so that
|
|
124
|
+
if we see that class again we will not use its
|
|
125
|
+
discriminator again.
|
|
126
|
+
When traveling through a discriminator, the
|
|
127
|
+
composed schema that is
|
|
128
|
+
is traveled through is added to this set.
|
|
129
|
+
For example if Animal has a discriminator
|
|
130
|
+
petType and we pass in "Dog", and the class Dog
|
|
131
|
+
allOf includes Animal, we move through Animal
|
|
132
|
+
once using the discriminator, and pick Dog.
|
|
133
|
+
Then in Dog, we will make an instance of the
|
|
134
|
+
Animal class but this time we won't travel
|
|
135
|
+
through its discriminator because we passed in
|
|
136
|
+
_visited_composed_classes = (Animal,)
|
|
137
|
+
offset (int, none_type): Zero based offset of the first item in the response.. [optional] # noqa: E501
|
|
138
|
+
limit (int, none_type): Maximum number of items in the response.. [optional] # noqa: E501
|
|
139
|
+
count (int, none_type): Total number of items available.. [optional] # noqa: E501
|
|
140
|
+
response_count (int, none_type): Number of items in the response.. [optional] # noqa: E501
|
|
141
|
+
"""
|
|
142
|
+
|
|
143
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
144
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', True)
|
|
145
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
146
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
147
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
148
|
+
|
|
149
|
+
self = super(OpenApiModel, cls).__new__(cls)
|
|
150
|
+
|
|
151
|
+
if args:
|
|
152
|
+
for arg in args:
|
|
153
|
+
if isinstance(arg, dict):
|
|
154
|
+
kwargs.update(arg)
|
|
155
|
+
else:
|
|
156
|
+
raise ApiTypeError(
|
|
157
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
158
|
+
args,
|
|
159
|
+
self.__class__.__name__,
|
|
160
|
+
),
|
|
161
|
+
path_to_item=_path_to_item,
|
|
162
|
+
valid_classes=(self.__class__,),
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
self._data_store = {}
|
|
166
|
+
self._check_type = _check_type
|
|
167
|
+
self._spec_property_naming = _spec_property_naming
|
|
168
|
+
self._path_to_item = _path_to_item
|
|
169
|
+
self._configuration = _configuration
|
|
170
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
171
|
+
|
|
172
|
+
for var_name, var_value in kwargs.items():
|
|
173
|
+
if var_name not in self.attribute_map and \
|
|
174
|
+
self._configuration is not None and \
|
|
175
|
+
self._configuration.discard_unknown_keys and \
|
|
176
|
+
self.additional_properties_type is None:
|
|
177
|
+
# discard variable.
|
|
178
|
+
continue
|
|
179
|
+
setattr(self, var_name, var_value)
|
|
180
|
+
return self
|
|
181
|
+
|
|
182
|
+
required_properties = set([
|
|
183
|
+
'_data_store',
|
|
184
|
+
'_check_type',
|
|
185
|
+
'_spec_property_naming',
|
|
186
|
+
'_path_to_item',
|
|
187
|
+
'_configuration',
|
|
188
|
+
'_visited_composed_classes',
|
|
189
|
+
])
|
|
190
|
+
|
|
191
|
+
@convert_js_args_to_python_args
|
|
192
|
+
def __init__(self, *args, **kwargs): # noqa: E501
|
|
193
|
+
"""ProductMetadata - a model defined in OpenAPI
|
|
194
|
+
|
|
195
|
+
Keyword Args:
|
|
196
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
197
|
+
will be type checked and a TypeError will be
|
|
198
|
+
raised if the wrong type is input.
|
|
199
|
+
Defaults to True
|
|
200
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
201
|
+
drill down to the model in received_data
|
|
202
|
+
when deserializing a response
|
|
203
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
204
|
+
are serialized names, as specified in the OpenAPI document.
|
|
205
|
+
False if the variable names in the input data
|
|
206
|
+
are pythonic names, e.g. snake case (default)
|
|
207
|
+
_configuration (Configuration): the instance to use when
|
|
208
|
+
deserializing a file_type parameter.
|
|
209
|
+
If passed, type conversion is attempted
|
|
210
|
+
If omitted no type conversion is done.
|
|
211
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
212
|
+
classes that we have traveled through so that
|
|
213
|
+
if we see that class again we will not use its
|
|
214
|
+
discriminator again.
|
|
215
|
+
When traveling through a discriminator, the
|
|
216
|
+
composed schema that is
|
|
217
|
+
is traveled through is added to this set.
|
|
218
|
+
For example if Animal has a discriminator
|
|
219
|
+
petType and we pass in "Dog", and the class Dog
|
|
220
|
+
allOf includes Animal, we move through Animal
|
|
221
|
+
once using the discriminator, and pick Dog.
|
|
222
|
+
Then in Dog, we will make an instance of the
|
|
223
|
+
Animal class but this time we won't travel
|
|
224
|
+
through its discriminator because we passed in
|
|
225
|
+
_visited_composed_classes = (Animal,)
|
|
226
|
+
offset (int, none_type): Zero based offset of the first item in the response.. [optional] # noqa: E501
|
|
227
|
+
limit (int, none_type): Maximum number of items in the response.. [optional] # noqa: E501
|
|
228
|
+
count (int, none_type): Total number of items available.. [optional] # noqa: E501
|
|
229
|
+
response_count (int, none_type): Number of items in the response.. [optional] # noqa: E501
|
|
230
|
+
"""
|
|
231
|
+
|
|
232
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
233
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
234
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
235
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
236
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
237
|
+
|
|
238
|
+
if args:
|
|
239
|
+
for arg in args:
|
|
240
|
+
if isinstance(arg, dict):
|
|
241
|
+
kwargs.update(arg)
|
|
242
|
+
else:
|
|
243
|
+
raise ApiTypeError(
|
|
244
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
245
|
+
args,
|
|
246
|
+
self.__class__.__name__,
|
|
247
|
+
),
|
|
248
|
+
path_to_item=_path_to_item,
|
|
249
|
+
valid_classes=(self.__class__,),
|
|
250
|
+
)
|
|
251
|
+
|
|
252
|
+
self._data_store = {}
|
|
253
|
+
self._check_type = _check_type
|
|
254
|
+
self._spec_property_naming = _spec_property_naming
|
|
255
|
+
self._path_to_item = _path_to_item
|
|
256
|
+
self._configuration = _configuration
|
|
257
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
258
|
+
|
|
259
|
+
for var_name, var_value in kwargs.items():
|
|
260
|
+
if var_name not in self.attribute_map and \
|
|
261
|
+
self._configuration is not None and \
|
|
262
|
+
self._configuration.discard_unknown_keys and \
|
|
263
|
+
self.additional_properties_type is None:
|
|
264
|
+
# discard variable.
|
|
265
|
+
continue
|
|
266
|
+
setattr(self, var_name, var_value)
|
|
267
|
+
if var_name in self.read_only_vars:
|
|
268
|
+
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
|
|
269
|
+
f"class with read only attributes.")
|