criteo-api-retailmedia-sdk 0.0.231113__py3-none-any.whl → 0.0.240207__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 (37) hide show
  1. criteo_api_retailmedia_preview/__init__.py +1 -1
  2. criteo_api_retailmedia_preview/api/__init__.py +1 -1
  3. criteo_api_retailmedia_preview/api/accounts_api.py +767 -0
  4. criteo_api_retailmedia_preview/api/audience_api.py +35 -32
  5. criteo_api_retailmedia_preview/api_client.py +5 -5
  6. criteo_api_retailmedia_preview/apis/__init__.py +2 -1
  7. criteo_api_retailmedia_preview/configuration.py +1 -1
  8. criteo_api_retailmedia_preview/model/external_account.py +4 -0
  9. criteo_api_retailmedia_preview/model/{common_status_code_response.py → grant_consent_input.py} +9 -15
  10. criteo_api_retailmedia_preview/model/grant_consent_model.py +279 -0
  11. criteo_api_retailmedia_preview/model/grant_consent_model_value_resource.py +273 -0
  12. criteo_api_retailmedia_preview/model/resource_of_retail_media_account.py +270 -0
  13. criteo_api_retailmedia_preview/model/resource_outcome_of_retail_media_account.py +274 -0
  14. criteo_api_retailmedia_preview/model/retail_media_account.py +297 -0
  15. criteo_api_retailmedia_preview/model/retail_media_brand_account_creation.py +265 -0
  16. criteo_api_retailmedia_preview/model/retail_media_seller.py +261 -0
  17. criteo_api_retailmedia_preview/model/retail_media_seller_account_creation.py +270 -0
  18. criteo_api_retailmedia_preview/model/{retail_media_audience_v2_attributes.py → rm_legacy_audience_get_entity_v1.py} +23 -23
  19. criteo_api_retailmedia_preview/model/{retail_media_audience_v2_list_response.py → rm_legacy_audience_get_entity_v1_list_response.py} +17 -29
  20. criteo_api_retailmedia_preview/model/{retail_media_audience.py → rm_legacy_audience_get_entity_v1_resource.py} +22 -33
  21. criteo_api_retailmedia_preview/model/{retail_media_audience_attributes.py → rm_legacy_audience_get_entity_v2.py} +15 -15
  22. criteo_api_retailmedia_preview/model/rm_legacy_audience_get_entity_v2_list_response.py +281 -0
  23. criteo_api_retailmedia_preview/model/{retail_media_audience_v2.py → rm_legacy_audience_get_entity_v2_resource.py} +18 -32
  24. criteo_api_retailmedia_preview/model/{user_behavior_details_v2.py → rm_legacy_audience_user_behavior_details_v2.py} +11 -11
  25. criteo_api_retailmedia_preview/model/{customer_list_details.py → rm_legacy_segment_customer_list.py} +11 -5
  26. criteo_api_retailmedia_preview/model/{user_behavior_details.py → rm_legacy_segment_user_behavior_v1.py} +28 -28
  27. criteo_api_retailmedia_preview/model/{create_user_behavior_segment_v2.py → rm_legacy_segment_user_behavior_v2.py} +7 -5
  28. criteo_api_retailmedia_preview/model/value_resource_collection_outcome_of_int64.py +274 -0
  29. criteo_api_retailmedia_preview/model/value_resource_collection_outcome_of_retail_media_seller.py +274 -0
  30. criteo_api_retailmedia_preview/model/value_resource_of_int64.py +261 -0
  31. criteo_api_retailmedia_preview/model/value_resource_of_retail_media_seller.py +266 -0
  32. criteo_api_retailmedia_preview/models/__init__.py +23 -11
  33. {criteo_api_retailmedia_sdk-0.0.231113.dist-info → criteo_api_retailmedia_sdk-0.0.240207.dist-info}/METADATA +3 -3
  34. {criteo_api_retailmedia_sdk-0.0.231113.dist-info → criteo_api_retailmedia_sdk-0.0.240207.dist-info}/RECORD +36 -23
  35. {criteo_api_retailmedia_sdk-0.0.231113.dist-info → criteo_api_retailmedia_sdk-0.0.240207.dist-info}/WHEEL +1 -1
  36. criteo_api_retailmedia_preview/model/get_page_of_audiences_by_account_id_response.py +0 -295
  37. {criteo_api_retailmedia_sdk-0.0.231113.dist-info → criteo_api_retailmedia_sdk-0.0.240207.dist-info}/top_level.txt +0 -0
@@ -30,7 +30,7 @@ from criteo_api_retailmedia_preview.exceptions import ApiAttributeError
30
30
 
31
31
 
32
32
 
33
- class UserBehaviorDetails(ModelNormal):
33
+ class RmLegacySegmentUserBehaviorV1(ModelNormal):
34
34
  """NOTE: This class is auto generated by OpenAPI Generator.
35
35
  Ref: https://openapi-generator.tech
36
36
 
@@ -55,9 +55,10 @@ class UserBehaviorDetails(ModelNormal):
55
55
  """
56
56
 
57
57
  allowed_values = {
58
- ('target_type',): {
59
- 'BRAND': "brand",
60
- 'CATEGORY': "category",
58
+ ('user_type',): {
59
+ 'VIEWER': "viewer",
60
+ 'BUYER': "buyer",
61
+ 'ADDTOCARTER': "addToCarter",
61
62
  },
62
63
  ('lookback_window',): {
63
64
  'P7D': "P7D",
@@ -70,13 +71,16 @@ class UserBehaviorDetails(ModelNormal):
70
71
  'P150D': "P150D",
71
72
  'P180D': "P180D",
72
73
  },
73
- ('user_type',): {
74
- 'VIEWER': "viewer",
75
- 'BUYER': "buyer",
74
+ ('target_type',): {
75
+ 'None': None,
76
+ 'BRAND': "brand",
77
+ 'CATEGORY': "category",
76
78
  },
77
79
  }
78
80
 
79
81
  validations = {
82
+ ('target_ids',): {
83
+ },
80
84
  }
81
85
 
82
86
  @cached_property
@@ -100,10 +104,10 @@ class UserBehaviorDetails(ModelNormal):
100
104
  and the value is attribute type.
101
105
  """
102
106
  return {
103
- 'target_type': (str,), # noqa: E501
104
- 'target_ids': ([str],), # noqa: E501
105
- 'lookback_window': (str,), # noqa: E501
106
107
  'user_type': (str,), # noqa: E501
108
+ 'lookback_window': (str,), # noqa: E501
109
+ 'target_type': (str, none_type,), # noqa: E501
110
+ 'target_ids': ([str], none_type,), # noqa: E501
107
111
  }
108
112
 
109
113
  @cached_property
@@ -112,10 +116,10 @@ class UserBehaviorDetails(ModelNormal):
112
116
 
113
117
 
114
118
  attribute_map = {
119
+ 'user_type': 'userType', # noqa: E501
120
+ 'lookback_window': 'lookbackWindow', # noqa: E501
115
121
  'target_type': 'targetType', # noqa: E501
116
122
  'target_ids': 'targetIds', # noqa: E501
117
- 'lookback_window': 'lookbackWindow', # noqa: E501
118
- 'user_type': 'userType', # noqa: E501
119
123
  }
120
124
 
121
125
  read_only_vars = {
@@ -125,14 +129,12 @@ class UserBehaviorDetails(ModelNormal):
125
129
 
126
130
  @classmethod
127
131
  @convert_js_args_to_python_args
128
- def _from_openapi_data(cls, target_type, target_ids, lookback_window, user_type, *args, **kwargs): # noqa: E501
129
- """UserBehaviorDetails - a model defined in OpenAPI
132
+ def _from_openapi_data(cls, user_type, lookback_window, *args, **kwargs): # noqa: E501
133
+ """RmLegacySegmentUserBehaviorV1 - a model defined in OpenAPI
130
134
 
131
135
  Args:
132
- target_type (str): Type of target
133
- target_ids ([str]): ist of ids for the target type
136
+ user_type (str): Type of shopper activity used to generate the audience.
134
137
  lookback_window (str): Length of lookback window
135
- user_type (str): Type of the user
136
138
 
137
139
  Keyword Args:
138
140
  _check_type (bool): if True, values for parameters in openapi_types
@@ -165,6 +167,8 @@ class UserBehaviorDetails(ModelNormal):
165
167
  Animal class but this time we won't travel
166
168
  through its discriminator because we passed in
167
169
  _visited_composed_classes = (Animal,)
170
+ target_type (str, none_type): Type of target. [optional] # noqa: E501
171
+ target_ids ([str], none_type): The categories to target. [optional] # noqa: E501
168
172
  """
169
173
 
170
174
  _check_type = kwargs.pop('_check_type', True)
@@ -196,10 +200,8 @@ class UserBehaviorDetails(ModelNormal):
196
200
  self._configuration = _configuration
197
201
  self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
198
202
 
199
- self.target_type = target_type
200
- self.target_ids = target_ids
201
- self.lookback_window = lookback_window
202
203
  self.user_type = user_type
204
+ self.lookback_window = lookback_window
203
205
  for var_name, var_value in kwargs.items():
204
206
  if var_name not in self.attribute_map and \
205
207
  self._configuration is not None and \
@@ -220,14 +222,12 @@ class UserBehaviorDetails(ModelNormal):
220
222
  ])
221
223
 
222
224
  @convert_js_args_to_python_args
223
- def __init__(self, target_type, target_ids, lookback_window, user_type, *args, **kwargs): # noqa: E501
224
- """UserBehaviorDetails - a model defined in OpenAPI
225
+ def __init__(self, user_type, lookback_window, *args, **kwargs): # noqa: E501
226
+ """RmLegacySegmentUserBehaviorV1 - a model defined in OpenAPI
225
227
 
226
228
  Args:
227
- target_type (str): Type of target
228
- target_ids ([str]): ist of ids for the target type
229
+ user_type (str): Type of shopper activity used to generate the audience.
229
230
  lookback_window (str): Length of lookback window
230
- user_type (str): Type of the user
231
231
 
232
232
  Keyword Args:
233
233
  _check_type (bool): if True, values for parameters in openapi_types
@@ -260,6 +260,8 @@ class UserBehaviorDetails(ModelNormal):
260
260
  Animal class but this time we won't travel
261
261
  through its discriminator because we passed in
262
262
  _visited_composed_classes = (Animal,)
263
+ target_type (str, none_type): Type of target. [optional] # noqa: E501
264
+ target_ids ([str], none_type): The categories to target. [optional] # noqa: E501
263
265
  """
264
266
 
265
267
  _check_type = kwargs.pop('_check_type', True)
@@ -289,10 +291,8 @@ class UserBehaviorDetails(ModelNormal):
289
291
  self._configuration = _configuration
290
292
  self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
291
293
 
292
- self.target_type = target_type
293
- self.target_ids = target_ids
294
- self.lookback_window = lookback_window
295
294
  self.user_type = user_type
295
+ self.lookback_window = lookback_window
296
296
  for var_name, var_value in kwargs.items():
297
297
  if var_name not in self.attribute_map and \
298
298
  self._configuration is not None and \
@@ -30,7 +30,7 @@ from criteo_api_retailmedia_preview.exceptions import ApiAttributeError
30
30
 
31
31
 
32
32
 
33
- class CreateUserBehaviorSegmentV2(ModelNormal):
33
+ class RmLegacySegmentUserBehaviorV2(ModelNormal):
34
34
  """NOTE: This class is auto generated by OpenAPI Generator.
35
35
  Ref: https://openapi-generator.tech
36
36
 
@@ -74,6 +74,10 @@ class CreateUserBehaviorSegmentV2(ModelNormal):
74
74
  }
75
75
 
76
76
  validations = {
77
+ ('category_ids',): {
78
+ },
79
+ ('brand_ids',): {
80
+ },
77
81
  }
78
82
 
79
83
  @cached_property
@@ -120,8 +124,6 @@ class CreateUserBehaviorSegmentV2(ModelNormal):
120
124
  }
121
125
 
122
126
  read_only_vars = {
123
- 'min_price', # noqa: E501
124
- 'max_price', # noqa: E501
125
127
  }
126
128
 
127
129
  _composed_schemas = {}
@@ -129,7 +131,7 @@ class CreateUserBehaviorSegmentV2(ModelNormal):
129
131
  @classmethod
130
132
  @convert_js_args_to_python_args
131
133
  def _from_openapi_data(cls, user_action, lookback_window, *args, **kwargs): # noqa: E501
132
- """CreateUserBehaviorSegmentV2 - a model defined in OpenAPI
134
+ """RmLegacySegmentUserBehaviorV2 - a model defined in OpenAPI
133
135
 
134
136
  Args:
135
137
  user_action (str): Type of shopper activity used to generate the audience.
@@ -224,7 +226,7 @@ class CreateUserBehaviorSegmentV2(ModelNormal):
224
226
 
225
227
  @convert_js_args_to_python_args
226
228
  def __init__(self, user_action, lookback_window, *args, **kwargs): # noqa: E501
227
- """CreateUserBehaviorSegmentV2 - a model defined in OpenAPI
229
+ """RmLegacySegmentUserBehaviorV2 - a model defined in OpenAPI
228
230
 
229
231
  Args:
230
232
  user_action (str): Type of shopper activity used to generate the audience.
@@ -0,0 +1,274 @@
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.common_problem import CommonProblem
34
+ from criteo_api_retailmedia_preview.model.value_resource_of_int64 import ValueResourceOfInt64
35
+ globals()['CommonProblem'] = CommonProblem
36
+ globals()['ValueResourceOfInt64'] = ValueResourceOfInt64
37
+
38
+
39
+ class ValueResourceCollectionOutcomeOfInt64(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
+ additional_properties_type = None
70
+
71
+ _nullable = False
72
+
73
+ @cached_property
74
+ def openapi_types():
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
+ Returns
80
+ openapi_types (dict): The key is attribute name
81
+ and the value is attribute type.
82
+ """
83
+ lazy_import()
84
+ return {
85
+ 'data': ([ValueResourceOfInt64], none_type,), # noqa: E501
86
+ 'warnings': ([CommonProblem], none_type,), # noqa: E501
87
+ 'errors': ([CommonProblem], none_type,), # noqa: E501
88
+ }
89
+
90
+ @cached_property
91
+ def discriminator():
92
+ return None
93
+
94
+
95
+ attribute_map = {
96
+ 'data': 'data', # noqa: E501
97
+ 'warnings': 'warnings', # noqa: E501
98
+ 'errors': 'errors', # noqa: E501
99
+ }
100
+
101
+ read_only_vars = {
102
+ 'warnings', # noqa: E501
103
+ 'errors', # noqa: E501
104
+ }
105
+
106
+ _composed_schemas = {}
107
+
108
+ @classmethod
109
+ @convert_js_args_to_python_args
110
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
111
+ """ValueResourceCollectionOutcomeOfInt64 - a model defined in OpenAPI
112
+
113
+ Keyword Args:
114
+ _check_type (bool): if True, values for parameters in openapi_types
115
+ will be type checked and a TypeError will be
116
+ raised if the wrong type is input.
117
+ Defaults to True
118
+ _path_to_item (tuple/list): This is a list of keys or values to
119
+ drill down to the model in received_data
120
+ when deserializing a response
121
+ _spec_property_naming (bool): True if the variable names in the input data
122
+ are serialized names, as specified in the OpenAPI document.
123
+ False if the variable names in the input data
124
+ are pythonic names, e.g. snake case (default)
125
+ _configuration (Configuration): the instance to use when
126
+ deserializing a file_type parameter.
127
+ If passed, type conversion is attempted
128
+ If omitted no type conversion is done.
129
+ _visited_composed_classes (tuple): This stores a tuple of
130
+ classes that we have traveled through so that
131
+ if we see that class again we will not use its
132
+ discriminator again.
133
+ When traveling through a discriminator, the
134
+ composed schema that is
135
+ is traveled through is added to this set.
136
+ For example if Animal has a discriminator
137
+ petType and we pass in "Dog", and the class Dog
138
+ allOf includes Animal, we move through Animal
139
+ once using the discriminator, and pick Dog.
140
+ Then in Dog, we will make an instance of the
141
+ Animal class but this time we won't travel
142
+ through its discriminator because we passed in
143
+ _visited_composed_classes = (Animal,)
144
+ data ([ValueResourceOfInt64], none_type): [optional] # noqa: E501
145
+ warnings ([CommonProblem], none_type): [optional] # noqa: E501
146
+ errors ([CommonProblem], none_type): [optional] # noqa: E501
147
+ """
148
+
149
+ _check_type = kwargs.pop('_check_type', True)
150
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
151
+ _path_to_item = kwargs.pop('_path_to_item', ())
152
+ _configuration = kwargs.pop('_configuration', None)
153
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
154
+
155
+ self = super(OpenApiModel, cls).__new__(cls)
156
+
157
+ if args:
158
+ for arg in args:
159
+ if isinstance(arg, dict):
160
+ kwargs.update(arg)
161
+ else:
162
+ raise ApiTypeError(
163
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
164
+ args,
165
+ self.__class__.__name__,
166
+ ),
167
+ path_to_item=_path_to_item,
168
+ valid_classes=(self.__class__,),
169
+ )
170
+
171
+ self._data_store = {}
172
+ self._check_type = _check_type
173
+ self._spec_property_naming = _spec_property_naming
174
+ self._path_to_item = _path_to_item
175
+ self._configuration = _configuration
176
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
177
+
178
+ for var_name, var_value in kwargs.items():
179
+ if var_name not in self.attribute_map and \
180
+ self._configuration is not None and \
181
+ self._configuration.discard_unknown_keys and \
182
+ self.additional_properties_type is None:
183
+ # discard variable.
184
+ continue
185
+ setattr(self, var_name, var_value)
186
+ return self
187
+
188
+ required_properties = set([
189
+ '_data_store',
190
+ '_check_type',
191
+ '_spec_property_naming',
192
+ '_path_to_item',
193
+ '_configuration',
194
+ '_visited_composed_classes',
195
+ ])
196
+
197
+ @convert_js_args_to_python_args
198
+ def __init__(self, *args, **kwargs): # noqa: E501
199
+ """ValueResourceCollectionOutcomeOfInt64 - a model defined in OpenAPI
200
+
201
+ Keyword Args:
202
+ _check_type (bool): if True, values for parameters in openapi_types
203
+ will be type checked and a TypeError will be
204
+ raised if the wrong type is input.
205
+ Defaults to True
206
+ _path_to_item (tuple/list): This is a list of keys or values to
207
+ drill down to the model in received_data
208
+ when deserializing a response
209
+ _spec_property_naming (bool): True if the variable names in the input data
210
+ are serialized names, as specified in the OpenAPI document.
211
+ False if the variable names in the input data
212
+ are pythonic names, e.g. snake case (default)
213
+ _configuration (Configuration): the instance to use when
214
+ deserializing a file_type parameter.
215
+ If passed, type conversion is attempted
216
+ If omitted no type conversion is done.
217
+ _visited_composed_classes (tuple): This stores a tuple of
218
+ classes that we have traveled through so that
219
+ if we see that class again we will not use its
220
+ discriminator again.
221
+ When traveling through a discriminator, the
222
+ composed schema that is
223
+ is traveled through is added to this set.
224
+ For example if Animal has a discriminator
225
+ petType and we pass in "Dog", and the class Dog
226
+ allOf includes Animal, we move through Animal
227
+ once using the discriminator, and pick Dog.
228
+ Then in Dog, we will make an instance of the
229
+ Animal class but this time we won't travel
230
+ through its discriminator because we passed in
231
+ _visited_composed_classes = (Animal,)
232
+ data ([ValueResourceOfInt64], none_type): [optional] # noqa: E501
233
+ warnings ([CommonProblem], none_type): [optional] # noqa: E501
234
+ errors ([CommonProblem], none_type): [optional] # noqa: E501
235
+ """
236
+
237
+ _check_type = kwargs.pop('_check_type', True)
238
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
239
+ _path_to_item = kwargs.pop('_path_to_item', ())
240
+ _configuration = kwargs.pop('_configuration', None)
241
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
242
+
243
+ if args:
244
+ for arg in args:
245
+ if isinstance(arg, dict):
246
+ kwargs.update(arg)
247
+ else:
248
+ raise ApiTypeError(
249
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
250
+ args,
251
+ self.__class__.__name__,
252
+ ),
253
+ path_to_item=_path_to_item,
254
+ valid_classes=(self.__class__,),
255
+ )
256
+
257
+ self._data_store = {}
258
+ self._check_type = _check_type
259
+ self._spec_property_naming = _spec_property_naming
260
+ self._path_to_item = _path_to_item
261
+ self._configuration = _configuration
262
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
263
+
264
+ for var_name, var_value in kwargs.items():
265
+ if var_name not in self.attribute_map and \
266
+ self._configuration is not None and \
267
+ self._configuration.discard_unknown_keys and \
268
+ self.additional_properties_type is None:
269
+ # discard variable.
270
+ continue
271
+ setattr(self, var_name, var_value)
272
+ if var_name in self.read_only_vars:
273
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
274
+ f"class with read only attributes.")