criteo-api-retailmedia-sdk 0.0.251029__py3-none-any.whl → 0.0.251030__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.

@@ -8,7 +8,7 @@
8
8
  """
9
9
 
10
10
 
11
- __version__ = "0.0.251029"
11
+ __version__ = "0.0.251030"
12
12
 
13
13
  # import ApiClient
14
14
  from criteo_api_retailmedia_preview.api_client import ApiClient
@@ -22,6 +22,7 @@ from criteo_api_retailmedia_preview.model_utils import ( # noqa: F401
22
22
  validate_and_convert_types
23
23
  )
24
24
  from criteo_api_retailmedia_preview.model.entity_resource_outcome_of_retail_media_account_v2 import EntityResourceOutcomeOfRetailMediaAccountV2
25
+ from criteo_api_retailmedia_preview.model.grant_consent_input import GrantConsentInput
25
26
  from criteo_api_retailmedia_preview.model.value_resource_collection_input_of_retail_media_seller import ValueResourceCollectionInputOfRetailMediaSeller
26
27
  from criteo_api_retailmedia_preview.model.value_resource_collection_outcome_of_retail_media_seller import ValueResourceCollectionOutcomeOfRetailMediaSeller
27
28
  from criteo_api_retailmedia_preview.model.value_resource_input_of_retail_media_brand_account_creation_v2 import ValueResourceInputOfRetailMediaBrandAccountCreationV2
@@ -41,6 +42,62 @@ class ThirdPartyAccountsApi(object):
41
42
  if api_client is None:
42
43
  api_client = ApiClient()
43
44
  self.api_client = api_client
45
+ self.grant_third_party_consent_endpoint = _Endpoint(
46
+ settings={
47
+ 'response_type': None,
48
+ 'auth': [
49
+ 'oauth',
50
+ 'oauth'
51
+ ],
52
+ 'endpoint_path': '/preview/retail-media/accounts/{accountId}/grant-third-party-consent',
53
+ 'operation_id': 'grant_third_party_consent',
54
+ 'http_method': 'POST',
55
+ 'servers': None,
56
+ },
57
+ params_map={
58
+ 'all': [
59
+ 'account_id',
60
+ 'grant_consent_input',
61
+ ],
62
+ 'required': [
63
+ 'account_id',
64
+ ],
65
+ 'nullable': [
66
+ ],
67
+ 'enum': [
68
+ ],
69
+ 'validation': [
70
+ ]
71
+ },
72
+ root_map={
73
+ 'validations': {
74
+ },
75
+ 'allowed_values': {
76
+ },
77
+ 'openapi_types': {
78
+ 'account_id':
79
+ (str,),
80
+ 'grant_consent_input':
81
+ (GrantConsentInput,),
82
+ },
83
+ 'attribute_map': {
84
+ 'account_id': 'accountId',
85
+ },
86
+ 'location_map': {
87
+ 'account_id': 'path',
88
+ 'grant_consent_input': 'body',
89
+ },
90
+ 'collection_format_map': {
91
+ }
92
+ },
93
+ headers_map={
94
+ 'accept': [],
95
+ 'content_type': [
96
+ 'application/json'
97
+ ]
98
+ },
99
+ api_client=api_client
100
+ )
44
101
  self.preview_retail_media_third_party_accounts_account_id_brands_add_post_endpoint = _Endpoint(
45
102
  settings={
46
103
  'response_type': (ValueResourceOutcomeOfRetailMediaBrands,),
@@ -332,6 +389,90 @@ class ThirdPartyAccountsApi(object):
332
389
  api_client=api_client
333
390
  )
334
391
 
392
+ def grant_third_party_consent(
393
+ self,
394
+ account_id,
395
+ **kwargs
396
+ ):
397
+ """ # noqa: E501
398
+
399
+ Grant third-party consent to a business application on behalf of a Private Market demand account # noqa: E501
400
+ This method makes a synchronous HTTP request by default. To make an
401
+ asynchronous HTTP request, please pass async_req=True
402
+
403
+ >>> thread = api.grant_third_party_consent(account_id, async_req=True)
404
+ >>> result = thread.get()
405
+
406
+ Args:
407
+ account_id (str): The demand account ID on which to grant consent
408
+
409
+ Keyword Args:
410
+ grant_consent_input (GrantConsentInput): The request input containing clientId, callbackURL, and callbackState. [optional]
411
+ _return_http_data_only (bool): response data without head status
412
+ code and headers. Default is True.
413
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
414
+ will be returned without reading/decoding response data.
415
+ Default is True.
416
+ _request_timeout (int/float/tuple): timeout setting for this request. If
417
+ one number provided, it will be total request timeout. It can also
418
+ be a pair (tuple) of (connection, read) timeouts.
419
+ Default is None.
420
+ _check_input_type (bool): specifies if type checking
421
+ should be done one the data sent to the server.
422
+ Default is True.
423
+ _check_return_type (bool): specifies if type checking
424
+ should be done one the data received from the server.
425
+ Default is True.
426
+ _spec_property_naming (bool): True if the variable names in the input data
427
+ are serialized names, as specified in the OpenAPI document.
428
+ False if the variable names in the input data
429
+ are pythonic names, e.g. snake case (default)
430
+ _content_type (str/None): force body content-type.
431
+ Default is None and content-type will be predicted by allowed
432
+ content-types and body.
433
+ _host_index (int/None): specifies the index of the server
434
+ that we want to use.
435
+ Default is read from the configuration.
436
+ _request_auths (list): set to override the auth_settings for an a single
437
+ request; this effectively ignores the authentication
438
+ in the spec for a single request.
439
+ Default is None
440
+ async_req (bool): execute request asynchronously
441
+
442
+ Returns:
443
+ None
444
+ If the method is called asynchronously, returns the request
445
+ thread.
446
+ """
447
+ kwargs['async_req'] = kwargs.get(
448
+ 'async_req', False
449
+ )
450
+ kwargs['_return_http_data_only'] = kwargs.get(
451
+ '_return_http_data_only', True
452
+ )
453
+ kwargs['_preload_content'] = kwargs.get(
454
+ '_preload_content', True
455
+ )
456
+ kwargs['_request_timeout'] = kwargs.get(
457
+ '_request_timeout', None
458
+ )
459
+ kwargs['_check_input_type'] = kwargs.get(
460
+ '_check_input_type', True
461
+ )
462
+ kwargs['_check_return_type'] = kwargs.get(
463
+ '_check_return_type', True
464
+ )
465
+ kwargs['_spec_property_naming'] = kwargs.get(
466
+ '_spec_property_naming', False
467
+ )
468
+ kwargs['_content_type'] = kwargs.get(
469
+ '_content_type')
470
+ kwargs['_host_index'] = kwargs.get('_host_index')
471
+ kwargs['_request_auths'] = kwargs.get('_request_auths', None)
472
+ kwargs['account_id'] = \
473
+ account_id
474
+ return self.grant_third_party_consent_endpoint.call_with_http_info(**kwargs)
475
+
335
476
  def preview_retail_media_third_party_accounts_account_id_brands_add_post(
336
477
  self,
337
478
  account_id,
@@ -76,7 +76,7 @@ class ApiClient(object):
76
76
  self.default_headers[header_name] = header_value
77
77
  self.cookie = cookie
78
78
  # Set default User-Agent.
79
- self.user_agent = 'OpenAPI-Generator/0.0.251029/python'
79
+ self.user_agent = 'OpenAPI-Generator/0.0.251030/python'
80
80
 
81
81
  def __enter__(self):
82
82
  return self
@@ -395,7 +395,7 @@ class Configuration(object):
395
395
  "OS: {env}\n"\
396
396
  "Python Version: {pyversion}\n"\
397
397
  "Version of the API: Preview\n"\
398
- "SDK Package Version: 0.0.251029".\
398
+ "SDK Package Version: 0.0.251030".\
399
399
  format(env=sys.platform, pyversion=sys.version)
400
400
 
401
401
  def get_host_settings(self):
@@ -0,0 +1,269 @@
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.grant_consent_model_value_resource import GrantConsentModelValueResource
34
+ globals()['GrantConsentModelValueResource'] = GrantConsentModelValueResource
35
+
36
+
37
+ class GrantConsentInput(ModelNormal):
38
+ """NOTE: This class is auto generated by OpenAPI Generator.
39
+ Ref: https://openapi-generator.tech
40
+
41
+ Do not edit the class manually.
42
+
43
+ Attributes:
44
+ allowed_values (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
+ with a capitalized key describing the allowed value and an allowed
47
+ value. These dicts store the allowed enum values.
48
+ attribute_map (dict): The key is attribute name
49
+ and the value is json key in definition.
50
+ discriminator_value_class_map (dict): A dict to go from the discriminator
51
+ variable value to the discriminator class name.
52
+ validations (dict): The key is the tuple path to the attribute
53
+ and the for var_name this is (var_name,). The value is a dict
54
+ that stores validations for max_length, min_length, max_items,
55
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
56
+ inclusive_minimum, and regex.
57
+ additional_properties_type (tuple): A tuple of classes accepted
58
+ as additional properties values.
59
+ """
60
+
61
+ allowed_values = {
62
+ }
63
+
64
+ validations = {
65
+ }
66
+
67
+ @cached_property
68
+ def additional_properties_type():
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
+ lazy_import()
74
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
75
+
76
+ _nullable = False
77
+
78
+ @cached_property
79
+ def openapi_types():
80
+ """
81
+ This must be a method because a model may have properties that are
82
+ of type self, this must run after the class is loaded
83
+
84
+ Returns
85
+ openapi_types (dict): The key is attribute name
86
+ and the value is attribute type.
87
+ """
88
+ lazy_import()
89
+ return {
90
+ 'data': (GrantConsentModelValueResource,), # noqa: E501
91
+ }
92
+
93
+ @cached_property
94
+ def discriminator():
95
+ return None
96
+
97
+
98
+ attribute_map = {
99
+ 'data': 'data', # noqa: E501
100
+ }
101
+
102
+ read_only_vars = {
103
+ }
104
+
105
+ _composed_schemas = {}
106
+
107
+ @classmethod
108
+ @convert_js_args_to_python_args
109
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
110
+ """GrantConsentInput - a model defined in OpenAPI
111
+
112
+ Keyword Args:
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
+ data (GrantConsentModelValueResource): [optional] # noqa: E501
144
+ """
145
+
146
+ _check_type = kwargs.pop('_check_type', True)
147
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
148
+ _path_to_item = kwargs.pop('_path_to_item', ())
149
+ _configuration = kwargs.pop('_configuration', None)
150
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
151
+
152
+ self = super(OpenApiModel, cls).__new__(cls)
153
+
154
+ if args:
155
+ for arg in args:
156
+ if isinstance(arg, dict):
157
+ kwargs.update(arg)
158
+ else:
159
+ raise ApiTypeError(
160
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
161
+ args,
162
+ self.__class__.__name__,
163
+ ),
164
+ path_to_item=_path_to_item,
165
+ valid_classes=(self.__class__,),
166
+ )
167
+
168
+ self._data_store = {}
169
+ self._check_type = _check_type
170
+ self._spec_property_naming = _spec_property_naming
171
+ self._path_to_item = _path_to_item
172
+ self._configuration = _configuration
173
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
174
+
175
+ for var_name, var_value in kwargs.items():
176
+ if var_name not in self.attribute_map and \
177
+ self._configuration is not None and \
178
+ self._configuration.discard_unknown_keys and \
179
+ self.additional_properties_type is None:
180
+ # discard variable.
181
+ continue
182
+ setattr(self, var_name, var_value)
183
+ return self
184
+
185
+ required_properties = set([
186
+ '_data_store',
187
+ '_check_type',
188
+ '_spec_property_naming',
189
+ '_path_to_item',
190
+ '_configuration',
191
+ '_visited_composed_classes',
192
+ ])
193
+
194
+ @convert_js_args_to_python_args
195
+ def __init__(self, *args, **kwargs): # noqa: E501
196
+ """GrantConsentInput - a model defined in OpenAPI
197
+
198
+ Keyword Args:
199
+ _check_type (bool): if True, values for parameters in openapi_types
200
+ will be type checked and a TypeError will be
201
+ raised if the wrong type is input.
202
+ Defaults to True
203
+ _path_to_item (tuple/list): This is a list of keys or values to
204
+ drill down to the model in received_data
205
+ when deserializing a response
206
+ _spec_property_naming (bool): True if the variable names in the input data
207
+ are serialized names, as specified in the OpenAPI document.
208
+ False if the variable names in the input data
209
+ are pythonic names, e.g. snake case (default)
210
+ _configuration (Configuration): the instance to use when
211
+ deserializing a file_type parameter.
212
+ If passed, type conversion is attempted
213
+ If omitted no type conversion is done.
214
+ _visited_composed_classes (tuple): This stores a tuple of
215
+ classes that we have traveled through so that
216
+ if we see that class again we will not use its
217
+ discriminator again.
218
+ When traveling through a discriminator, the
219
+ composed schema that is
220
+ is traveled through is added to this set.
221
+ For example if Animal has a discriminator
222
+ petType and we pass in "Dog", and the class Dog
223
+ allOf includes Animal, we move through Animal
224
+ once using the discriminator, and pick Dog.
225
+ Then in Dog, we will make an instance of the
226
+ Animal class but this time we won't travel
227
+ through its discriminator because we passed in
228
+ _visited_composed_classes = (Animal,)
229
+ data (GrantConsentModelValueResource): [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.")
@@ -0,0 +1,279 @@
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
+
33
+ class GrantConsentModel(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
+ @cached_property
64
+ def additional_properties_type():
65
+ """
66
+ This must be a method because a model may have properties that are
67
+ of type self, this must run after the class is loaded
68
+ """
69
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
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
+ return {
84
+ 'callback_url': (str,), # noqa: E501
85
+ 'client_id': (str,), # noqa: E501
86
+ 'callback_state': (str,), # noqa: E501
87
+ }
88
+
89
+ @cached_property
90
+ def discriminator():
91
+ return None
92
+
93
+
94
+ attribute_map = {
95
+ 'callback_url': 'callbackUrl', # noqa: E501
96
+ 'client_id': 'clientId', # noqa: E501
97
+ 'callback_state': 'callbackState', # noqa: E501
98
+ }
99
+
100
+ read_only_vars = {
101
+ }
102
+
103
+ _composed_schemas = {}
104
+
105
+ @classmethod
106
+ @convert_js_args_to_python_args
107
+ def _from_openapi_data(cls, callback_url, client_id, *args, **kwargs): # noqa: E501
108
+ """GrantConsentModel - a model defined in OpenAPI
109
+
110
+ Args:
111
+ callback_url (str):
112
+ client_id (str):
113
+
114
+ Keyword Args:
115
+ _check_type (bool): if True, values for parameters in openapi_types
116
+ will be type checked and a TypeError will be
117
+ raised if the wrong type is input.
118
+ Defaults to True
119
+ _path_to_item (tuple/list): This is a list of keys or values to
120
+ drill down to the model in received_data
121
+ when deserializing a response
122
+ _spec_property_naming (bool): True if the variable names in the input data
123
+ are serialized names, as specified in the OpenAPI document.
124
+ False if the variable names in the input data
125
+ are pythonic names, e.g. snake case (default)
126
+ _configuration (Configuration): the instance to use when
127
+ deserializing a file_type parameter.
128
+ If passed, type conversion is attempted
129
+ If omitted no type conversion is done.
130
+ _visited_composed_classes (tuple): This stores a tuple of
131
+ classes that we have traveled through so that
132
+ if we see that class again we will not use its
133
+ discriminator again.
134
+ When traveling through a discriminator, the
135
+ composed schema that is
136
+ is traveled through is added to this set.
137
+ For example if Animal has a discriminator
138
+ petType and we pass in "Dog", and the class Dog
139
+ allOf includes Animal, we move through Animal
140
+ once using the discriminator, and pick Dog.
141
+ Then in Dog, we will make an instance of the
142
+ Animal class but this time we won't travel
143
+ through its discriminator because we passed in
144
+ _visited_composed_classes = (Animal,)
145
+ callback_state (str): [optional] # noqa: E501
146
+ """
147
+
148
+ _check_type = kwargs.pop('_check_type', True)
149
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
150
+ _path_to_item = kwargs.pop('_path_to_item', ())
151
+ _configuration = kwargs.pop('_configuration', None)
152
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
153
+
154
+ self = super(OpenApiModel, cls).__new__(cls)
155
+
156
+ if args:
157
+ for arg in args:
158
+ if isinstance(arg, dict):
159
+ kwargs.update(arg)
160
+ else:
161
+ raise ApiTypeError(
162
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
163
+ args,
164
+ self.__class__.__name__,
165
+ ),
166
+ path_to_item=_path_to_item,
167
+ valid_classes=(self.__class__,),
168
+ )
169
+
170
+ self._data_store = {}
171
+ self._check_type = _check_type
172
+ self._spec_property_naming = _spec_property_naming
173
+ self._path_to_item = _path_to_item
174
+ self._configuration = _configuration
175
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
176
+
177
+ self.callback_url = callback_url
178
+ self.client_id = client_id
179
+ for var_name, var_value in kwargs.items():
180
+ if var_name not in self.attribute_map and \
181
+ self._configuration is not None and \
182
+ self._configuration.discard_unknown_keys and \
183
+ self.additional_properties_type is None:
184
+ # discard variable.
185
+ continue
186
+ setattr(self, var_name, var_value)
187
+ return self
188
+
189
+ required_properties = set([
190
+ '_data_store',
191
+ '_check_type',
192
+ '_spec_property_naming',
193
+ '_path_to_item',
194
+ '_configuration',
195
+ '_visited_composed_classes',
196
+ ])
197
+
198
+ @convert_js_args_to_python_args
199
+ def __init__(self, callback_url, client_id, *args, **kwargs): # noqa: E501
200
+ """GrantConsentModel - a model defined in OpenAPI
201
+
202
+ Args:
203
+ callback_url (str):
204
+ client_id (str):
205
+
206
+ Keyword Args:
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
+ callback_state (str): [optional] # noqa: E501
238
+ """
239
+
240
+ _check_type = kwargs.pop('_check_type', True)
241
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
242
+ _path_to_item = kwargs.pop('_path_to_item', ())
243
+ _configuration = kwargs.pop('_configuration', None)
244
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
245
+
246
+ if args:
247
+ for arg in args:
248
+ if isinstance(arg, dict):
249
+ kwargs.update(arg)
250
+ else:
251
+ raise ApiTypeError(
252
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
253
+ args,
254
+ self.__class__.__name__,
255
+ ),
256
+ path_to_item=_path_to_item,
257
+ valid_classes=(self.__class__,),
258
+ )
259
+
260
+ self._data_store = {}
261
+ self._check_type = _check_type
262
+ self._spec_property_naming = _spec_property_naming
263
+ self._path_to_item = _path_to_item
264
+ self._configuration = _configuration
265
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
266
+
267
+ self.callback_url = callback_url
268
+ self.client_id = client_id
269
+ for var_name, var_value in kwargs.items():
270
+ if var_name not in self.attribute_map and \
271
+ self._configuration is not None and \
272
+ self._configuration.discard_unknown_keys and \
273
+ self.additional_properties_type is None:
274
+ # discard variable.
275
+ continue
276
+ setattr(self, var_name, var_value)
277
+ if var_name in self.read_only_vars:
278
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
279
+ f"class with read only attributes.")
@@ -0,0 +1,273 @@
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.grant_consent_model import GrantConsentModel
34
+ globals()['GrantConsentModel'] = GrantConsentModel
35
+
36
+
37
+ class GrantConsentModelValueResource(ModelNormal):
38
+ """NOTE: This class is auto generated by OpenAPI Generator.
39
+ Ref: https://openapi-generator.tech
40
+
41
+ Do not edit the class manually.
42
+
43
+ Attributes:
44
+ allowed_values (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
+ with a capitalized key describing the allowed value and an allowed
47
+ value. These dicts store the allowed enum values.
48
+ attribute_map (dict): The key is attribute name
49
+ and the value is json key in definition.
50
+ discriminator_value_class_map (dict): A dict to go from the discriminator
51
+ variable value to the discriminator class name.
52
+ validations (dict): The key is the tuple path to the attribute
53
+ and the for var_name this is (var_name,). The value is a dict
54
+ that stores validations for max_length, min_length, max_items,
55
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
56
+ inclusive_minimum, and regex.
57
+ additional_properties_type (tuple): A tuple of classes accepted
58
+ as additional properties values.
59
+ """
60
+
61
+ allowed_values = {
62
+ }
63
+
64
+ validations = {
65
+ }
66
+
67
+ @cached_property
68
+ def additional_properties_type():
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
+ lazy_import()
74
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
75
+
76
+ _nullable = False
77
+
78
+ @cached_property
79
+ def openapi_types():
80
+ """
81
+ This must be a method because a model may have properties that are
82
+ of type self, this must run after the class is loaded
83
+
84
+ Returns
85
+ openapi_types (dict): The key is attribute name
86
+ and the value is attribute type.
87
+ """
88
+ lazy_import()
89
+ return {
90
+ 'attributes': (GrantConsentModel,), # noqa: E501
91
+ 'type': (str,), # noqa: E501
92
+ }
93
+
94
+ @cached_property
95
+ def discriminator():
96
+ return None
97
+
98
+
99
+ attribute_map = {
100
+ 'attributes': 'attributes', # noqa: E501
101
+ 'type': 'type', # noqa: E501
102
+ }
103
+
104
+ read_only_vars = {
105
+ }
106
+
107
+ _composed_schemas = {}
108
+
109
+ @classmethod
110
+ @convert_js_args_to_python_args
111
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
112
+ """GrantConsentModelValueResource - a model defined in OpenAPI
113
+
114
+ Keyword Args:
115
+ _check_type (bool): if True, values for parameters in openapi_types
116
+ will be type checked and a TypeError will be
117
+ raised if the wrong type is input.
118
+ Defaults to True
119
+ _path_to_item (tuple/list): This is a list of keys or values to
120
+ drill down to the model in received_data
121
+ when deserializing a response
122
+ _spec_property_naming (bool): True if the variable names in the input data
123
+ are serialized names, as specified in the OpenAPI document.
124
+ False if the variable names in the input data
125
+ are pythonic names, e.g. snake case (default)
126
+ _configuration (Configuration): the instance to use when
127
+ deserializing a file_type parameter.
128
+ If passed, type conversion is attempted
129
+ If omitted no type conversion is done.
130
+ _visited_composed_classes (tuple): This stores a tuple of
131
+ classes that we have traveled through so that
132
+ if we see that class again we will not use its
133
+ discriminator again.
134
+ When traveling through a discriminator, the
135
+ composed schema that is
136
+ is traveled through is added to this set.
137
+ For example if Animal has a discriminator
138
+ petType and we pass in "Dog", and the class Dog
139
+ allOf includes Animal, we move through Animal
140
+ once using the discriminator, and pick Dog.
141
+ Then in Dog, we will make an instance of the
142
+ Animal class but this time we won't travel
143
+ through its discriminator because we passed in
144
+ _visited_composed_classes = (Animal,)
145
+ attributes (GrantConsentModel): [optional] # noqa: E501
146
+ type (str): [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
+ """GrantConsentModelValueResource - 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
+ attributes (GrantConsentModel): [optional] # noqa: E501
233
+ type (str): [optional] # noqa: E501
234
+ """
235
+
236
+ _check_type = kwargs.pop('_check_type', True)
237
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
238
+ _path_to_item = kwargs.pop('_path_to_item', ())
239
+ _configuration = kwargs.pop('_configuration', None)
240
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
241
+
242
+ if args:
243
+ for arg in args:
244
+ if isinstance(arg, dict):
245
+ kwargs.update(arg)
246
+ else:
247
+ raise ApiTypeError(
248
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
249
+ args,
250
+ self.__class__.__name__,
251
+ ),
252
+ path_to_item=_path_to_item,
253
+ valid_classes=(self.__class__,),
254
+ )
255
+
256
+ self._data_store = {}
257
+ self._check_type = _check_type
258
+ self._spec_property_naming = _spec_property_naming
259
+ self._path_to_item = _path_to_item
260
+ self._configuration = _configuration
261
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
262
+
263
+ for var_name, var_value in kwargs.items():
264
+ if var_name not in self.attribute_map and \
265
+ self._configuration is not None and \
266
+ self._configuration.discard_unknown_keys and \
267
+ self.additional_properties_type is None:
268
+ # discard variable.
269
+ continue
270
+ setattr(self, var_name, var_value)
271
+ if var_name in self.read_only_vars:
272
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
273
+ f"class with read only attributes.")
@@ -98,6 +98,9 @@ from criteo_api_retailmedia_preview.model.external_retail_media_seller_account_c
98
98
  from criteo_api_retailmedia_preview.model.files_variable_value import FilesVariableValue
99
99
  from criteo_api_retailmedia_preview.model.flight_leg import FlightLeg
100
100
  from criteo_api_retailmedia_preview.model.flight_schedule import FlightSchedule
101
+ from criteo_api_retailmedia_preview.model.grant_consent_input import GrantConsentInput
102
+ from criteo_api_retailmedia_preview.model.grant_consent_model import GrantConsentModel
103
+ from criteo_api_retailmedia_preview.model.grant_consent_model_value_resource import GrantConsentModelValueResource
101
104
  from criteo_api_retailmedia_preview.model.hyperlink_variable_value import HyperlinkVariableValue
102
105
  from criteo_api_retailmedia_preview.model.inbot_discussion import InbotDiscussion
103
106
  from criteo_api_retailmedia_preview.model.inbot_discussion_body_model import InbotDiscussionBodyModel
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: criteo-api-retailmedia-sdk
3
- Version: 0.0.251029
3
+ Version: 0.0.251030
4
4
  Summary: Criteo API SDK
5
5
  Home-page: https://github.com/criteo/criteo-api-python-sdk
6
6
  Author: Criteo
@@ -35,9 +35,9 @@ IMPORTANT: This Python package links to Criteo production environment. Any test
35
35
 
36
36
 
37
37
  ```sh
38
- pip install criteo-api-retailmedia-sdk==0.0.251029
38
+ pip install criteo-api-retailmedia-sdk==0.0.251030
39
39
  ```
40
- (you may need to run `pip` with root permission: `sudo pip install criteo-api-retailmedia-sdk==0.0.251029`)
40
+ (you may need to run `pip` with root permission: `sudo pip install criteo-api-retailmedia-sdk==0.0.251030`)
41
41
 
42
42
  Then import the package:
43
43
  ```python
@@ -1,7 +1,7 @@
1
- criteo_api_retailmedia_preview/__init__.py,sha256=pjC87JsZ72Qv3ETpCtFDxuI9IaysXWhj36k05up1B9Y,1023
2
- criteo_api_retailmedia_preview/api_client.py,sha256=NlK5iyjdKYW5GvyFU0FXIRioOA1ohHsrjApSoAGLiKI,39217
1
+ criteo_api_retailmedia_preview/__init__.py,sha256=APxcKTkHy1Y0Urmk6CO4WBQQdDwAYMHrZbKuZ1NctIQ,1023
2
+ criteo_api_retailmedia_preview/api_client.py,sha256=_da2EvfnvewAdAQM59ug2HgumOOv9LBh0JotSVQ9tMM,39217
3
3
  criteo_api_retailmedia_preview/api_client_builder.py,sha256=GA_82AyTtGhe8KsCV4WRibYrDshmKbXDRLdELNYmBEo,1504
4
- criteo_api_retailmedia_preview/configuration.py,sha256=VUfq4Ebo0m-JbkWbQgPXBUSIbv7Y-0xFRKA-NGQ-NZE,16714
4
+ criteo_api_retailmedia_preview/configuration.py,sha256=CGcq749DVjnFQVboXVHn8stskq8H_aNdP2lnEkGnczw,16714
5
5
  criteo_api_retailmedia_preview/criteo_api_client.py,sha256=OMLOZH6PXNNHEZ-9_X1b-jNJT80YCrfQrxln-6rWo3k,652
6
6
  criteo_api_retailmedia_preview/criteo_auth.py,sha256=1pjObPpytC72QM8YxL3NmwDI0ePSXuRFIiMpq6j3LF0,4693
7
7
  criteo_api_retailmedia_preview/criteo_rest.py,sha256=7fjy1FXDYlgRVnUqEvXaa3daGnZAB0rUPqmFxgBeRmk,3410
@@ -19,7 +19,7 @@ criteo_api_retailmedia_preview/api/campaign_api.py,sha256=nt_pCH8MdNc5VP4iba5NEq
19
19
  criteo_api_retailmedia_preview/api/catalog_api.py,sha256=E_-KG_TLUvOatMkq4CcIwIPs2seKs-umOZUDCLmfGYM,29817
20
20
  criteo_api_retailmedia_preview/api/gateway_api.py,sha256=kEmtDyfACdByE6SbIMwV0OH7HsRvtN7jnmc1qDCtiLs,5693
21
21
  criteo_api_retailmedia_preview/api/on_site_recommendation_api.py,sha256=yeEY6PXg4HoGYcEStM2kPLKPTSSLY3NLMbdHSCK8KtU,6779
22
- criteo_api_retailmedia_preview/api/third_party_accounts_api.py,sha256=NmL1z_5H90O6-9MchE0uPEtudm_VSZM0exv24jib4wQ,32044
22
+ criteo_api_retailmedia_preview/api/third_party_accounts_api.py,sha256=0i9NRBcGMz0LFesM-NmEl_3LX88j4A4YVBG87po1EWU,37626
23
23
  criteo_api_retailmedia_preview/apis/__init__.py,sha256=aQ-GkS-zjRw3ZA2fMjTY-xtDT_ZnmDvCECaKUAXbgBc,1207
24
24
  criteo_api_retailmedia_preview/model/__init__.py,sha256=bT9TCy7p9BdziIRXh21nOFnDrB8GHCJHOvSpCwfZuts,364
25
25
  criteo_api_retailmedia_preview/model/account_fees_search_request.py,sha256=6dReVkNQVknPG3k2A2o6mIQV6G0Ow_LAyeQbnBfUTYY,11269
@@ -111,6 +111,9 @@ criteo_api_retailmedia_preview/model/external_retail_media_seller_account_creati
111
111
  criteo_api_retailmedia_preview/model/files_variable_value.py,sha256=Qqfb2gLb2C-nOmcA1qUe770OyS1OS4GYqhSJfNQzoBg,11325
112
112
  criteo_api_retailmedia_preview/model/flight_leg.py,sha256=M_fWAkEawDTSADhSLYOfOAqQvM3kRFbjANYkpWH29Is,12179
113
113
  criteo_api_retailmedia_preview/model/flight_schedule.py,sha256=TkCm1jN4J_GHNyldtIESeXQgPI7KtQcJBmfdfrgvEYc,11433
114
+ criteo_api_retailmedia_preview/model/grant_consent_input.py,sha256=-Sikyn_QNW3t49Y1LvG7RFSKgWYTOJkxxy7qsOHHwUw,11739
115
+ criteo_api_retailmedia_preview/model/grant_consent_model.py,sha256=EraR6UKaj9b2px5XmmTBGpG_Keoehy7QVTqCvfGdViQ,11994
116
+ criteo_api_retailmedia_preview/model/grant_consent_model_value_resource.py,sha256=mBZFYV2zkxGzRnWZw8fDTTS89hRTBdeNt0Ec6rU4lmg,11893
114
117
  criteo_api_retailmedia_preview/model/hyperlink_variable_value.py,sha256=AvsQCJ3S3JKYfteiKuHSDs5VTinuTJhsU8Pb-kol7gQ,11209
115
118
  criteo_api_retailmedia_preview/model/inbot_discussion.py,sha256=y3QOSXnX8dUwyVw4YVXb3cFlpKHU63in45t21iK1GXA,11828
116
119
  criteo_api_retailmedia_preview/model/inbot_discussion_body_model.py,sha256=vqqxcKLT4OAAZizC19OeH8FBz1CUDJ8GhPg6CYIoV9k,11816
@@ -359,8 +362,8 @@ criteo_api_retailmedia_preview/model/value_resource_recommended_keywords_respons
359
362
  criteo_api_retailmedia_preview/model/value_resource_set_sku_buy_box_winners_request.py,sha256=gwlCZE59aYIF0lD6PQWqXGiLmGSAn_E9WsM7rPx2rMU,11768
360
363
  criteo_api_retailmedia_preview/model/value_resource_update_offers_request.py,sha256=mvfCuIfe1_km1sIe9nWccLTtI_49DDCeY1plBzJbU84,11695
361
364
  criteo_api_retailmedia_preview/model/video_variable_value.py,sha256=MutQTssNekmvLKDmu2kTKk0ZrijtpRwYToR_-nlo3SM,12078
362
- criteo_api_retailmedia_preview/models/__init__.py,sha256=OYfxclLqvQYSYCZMW1XIIDdZDiWNLItHQaZQjZXjVqk,38738
363
- criteo_api_retailmedia_sdk-0.0.251029.dist-info/METADATA,sha256=mzsPHlbIszCsaP1jWXyJBkIg4zsMtTboiRxteTkBycw,1848
364
- criteo_api_retailmedia_sdk-0.0.251029.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
365
- criteo_api_retailmedia_sdk-0.0.251029.dist-info/top_level.txt,sha256=mR8aaWgc27pZ23OyoxxkhvUuHPeOkKiUaNQ-RiAivhc,31
366
- criteo_api_retailmedia_sdk-0.0.251029.dist-info/RECORD,,
365
+ criteo_api_retailmedia_preview/models/__init__.py,sha256=KGZtXK2-UxnK1ZHG1H7kAWqgsmSdQU8A_HGbsFIus7U,39027
366
+ criteo_api_retailmedia_sdk-0.0.251030.dist-info/METADATA,sha256=VXUWUJ3FuTADoJQbqCTlnhT0g5nULAdxF_BTAbqZEaI,1848
367
+ criteo_api_retailmedia_sdk-0.0.251030.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
368
+ criteo_api_retailmedia_sdk-0.0.251030.dist-info/top_level.txt,sha256=mR8aaWgc27pZ23OyoxxkhvUuHPeOkKiUaNQ-RiAivhc,31
369
+ criteo_api_retailmedia_sdk-0.0.251030.dist-info/RECORD,,