criteo-api-retailmedia-sdk 0.0.240207__py3-none-any.whl → 0.0.240515__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.
Files changed (131) hide show
  1. criteo_api_retailmedia_preview/__init__.py +1 -1
  2. criteo_api_retailmedia_preview/api/accounts_api.py +181 -35
  3. criteo_api_retailmedia_preview/api/analytics_api.py +142 -0
  4. criteo_api_retailmedia_preview/api/audience_api.py +284 -0
  5. criteo_api_retailmedia_preview/api/campaign_api.py +1678 -902
  6. criteo_api_retailmedia_preview/api/catalog_api.py +312 -0
  7. criteo_api_retailmedia_preview/api_client.py +4 -4
  8. criteo_api_retailmedia_preview/apis/__init__.py +1 -0
  9. criteo_api_retailmedia_preview/configuration.py +1 -1
  10. criteo_api_retailmedia_preview/model/{retail_media_externalv1_add_remove_keyword_model.py → add_remove_keyword_model.py} +12 -19
  11. criteo_api_retailmedia_preview/model/add_remove_keywords_model.py +262 -0
  12. criteo_api_retailmedia_preview/model/add_remove_keywords_model_request.py +262 -0
  13. criteo_api_retailmedia_preview/model/add_remove_keywords_model_resource.py +270 -0
  14. criteo_api_retailmedia_preview/model/approval_status_model.py +292 -0
  15. criteo_api_retailmedia_preview/model/async_accounts_report.py +421 -0
  16. criteo_api_retailmedia_preview/model/{external_catalog_request_preview.py → async_accounts_report_request.py} +13 -10
  17. criteo_api_retailmedia_preview/model/async_accounts_report_resource.py +273 -0
  18. criteo_api_retailmedia_preview/model/async_campaigns_report.py +74 -59
  19. criteo_api_retailmedia_preview/model/async_line_items_report.py +74 -60
  20. criteo_api_retailmedia_preview/model/audience_error.py +310 -0
  21. criteo_api_retailmedia_preview/model/{template_variable.py → audience_warning.py} +48 -46
  22. criteo_api_retailmedia_preview/model/{hyperlink_variable_value.py → batch_accepted_response.py} +11 -11
  23. criteo_api_retailmedia_preview/model/change_details.py +275 -0
  24. criteo_api_retailmedia_preview/model/{creative202210_list_response.py → creative_v2_list_response.py} +16 -16
  25. criteo_api_retailmedia_preview/model/{value_resource_collection_outcome_of_int64.py → creative_v2_response.py} +16 -9
  26. criteo_api_retailmedia_preview/model/custom_attribute.py +275 -0
  27. criteo_api_retailmedia_preview/model/error_code_response.py +281 -0
  28. criteo_api_retailmedia_preview/model/export_report_column.py +2 -2
  29. criteo_api_retailmedia_preview/model/{choice_variable_value.py → external_choice_variable_value.py} +3 -3
  30. criteo_api_retailmedia_preview/model/{color_variable_value.py → external_color_variable_value.py} +8 -14
  31. criteo_api_retailmedia_preview/model/{creative_update_model202207.py → external_creative_create_model_v2.py} +11 -11
  32. criteo_api_retailmedia_preview/model/{creative_create_model202207.py → external_creative_update_model_v2.py} +11 -11
  33. criteo_api_retailmedia_preview/model/{creative202210.py → external_creative_v2.py} +34 -28
  34. criteo_api_retailmedia_preview/model/{files_variable_value.py → external_files_variable_value.py} +4 -3
  35. criteo_api_retailmedia_preview/model/{text_variable_specification.py → external_hyperlink_variable_value.py} +7 -7
  36. criteo_api_retailmedia_preview/model/{line_item_bid_multipliers.py → external_line_item_bid_multipliers_v2.py} +41 -29
  37. criteo_api_retailmedia_preview/model/external_line_item_capping_v2.py +280 -0
  38. criteo_api_retailmedia_preview/model/external_line_item_page_category_v2.py +273 -0
  39. criteo_api_retailmedia_preview/model/{choice_variable_specification.py → external_line_item_page_v2.py} +36 -21
  40. criteo_api_retailmedia_preview/model/{page_type_environment.py → external_page_type_environment.py} +15 -9
  41. criteo_api_retailmedia_preview/model/external_preferred_line_item_create_model_v2.py +345 -0
  42. criteo_api_retailmedia_preview/model/{external_catalog_status.py → external_preferred_line_item_update_model_v2.py} +70 -47
  43. criteo_api_retailmedia_preview/model/{template.py → external_preferred_line_item_v2.py} +93 -70
  44. criteo_api_retailmedia_preview/model/{template_variable_value.py → external_template_variable_value.py} +36 -30
  45. criteo_api_retailmedia_preview/model/{text_variable_value.py → external_text_variable_value.py} +8 -14
  46. criteo_api_retailmedia_preview/model/external_video_variable_value.py +293 -0
  47. criteo_api_retailmedia_preview/model/{choice_option.py → fail_response.py} +21 -19
  48. criteo_api_retailmedia_preview/model/{retail_media_externalv1_input_keywords_model.py → input_keywords_model.py} +4 -16
  49. criteo_api_retailmedia_preview/model/{retail_media_externalv1_add_remove_keywords_model.py → input_resource_of_preferred_line_item_create_model_v2.py} +13 -11
  50. criteo_api_retailmedia_preview/model/insertion_order_history_change_data_capture.py +303 -0
  51. criteo_api_retailmedia_preview/model/{retail_media_externalv1_set_bids_model.py → installment.py} +13 -11
  52. criteo_api_retailmedia_preview/model/{json_api_body_with_id_of_int64_and_line_item_bid_multipliers_and_line_item_bid_multipliers.py → json_api_body_with_id_of_int64_and_line_item_bid_multipliers_v2_and_line_item_bid_multipliers_v2.py} +8 -8
  53. criteo_api_retailmedia_preview/model/{json_api_single_response_of_line_item_bid_multipliers.py → json_api_single_response_of_line_item_bid_multipliers_v2.py} +14 -14
  54. criteo_api_retailmedia_preview/model/{retail_media_externalv1_keyword_data_model.py → keyword_data_model.py} +19 -37
  55. criteo_api_retailmedia_preview/model/{retail_media_externalv1_keywords_model.py → keywords_model.py} +9 -18
  56. criteo_api_retailmedia_preview/model/keywords_model_resource.py +270 -0
  57. criteo_api_retailmedia_preview/model/keywords_model_response.py +274 -0
  58. criteo_api_retailmedia_preview/model/{line_item_bid_multipliers_request.py → line_item_bid_multipliers_v2_request.py} +8 -8
  59. criteo_api_retailmedia_preview/model/{line_item_bid_multipliers_response.py → line_item_bid_multipliers_v2_response.py} +16 -16
  60. criteo_api_retailmedia_preview/model/line_item_product_status.py +291 -0
  61. criteo_api_retailmedia_preview/model/loyalty_points.py +271 -0
  62. criteo_api_retailmedia_preview/model/match_type_model.py +291 -0
  63. criteo_api_retailmedia_preview/model/metadata.py +273 -0
  64. criteo_api_retailmedia_preview/model/negotiation_state_model.py +293 -0
  65. criteo_api_retailmedia_preview/model/page_of_insertion_order_history_change_data_capture.py +276 -0
  66. criteo_api_retailmedia_preview/model/{json_api_request_of_catalog_request_preview.py → preferred_line_item_create_model_v2_request.py} +8 -8
  67. criteo_api_retailmedia_preview/model/{retail_media_externalv1_set_bids_model_request.py → preferred_line_item_update_model_v2_request.py} +8 -8
  68. criteo_api_retailmedia_preview/model/{creative202210_response.py → preferred_line_item_v2_paged_list_response.py} +22 -16
  69. criteo_api_retailmedia_preview/model/{template_response.py → preferred_line_item_v2_response.py} +16 -16
  70. criteo_api_retailmedia_preview/model/price.py +267 -0
  71. criteo_api_retailmedia_preview/model/product.py +626 -0
  72. criteo_api_retailmedia_preview/model/product_importer_error.py +299 -0
  73. criteo_api_retailmedia_preview/model/product_importer_warning.py +299 -0
  74. criteo_api_retailmedia_preview/model/product_metadata.py +269 -0
  75. criteo_api_retailmedia_preview/model/product_resource_outcome.py +266 -0
  76. criteo_api_retailmedia_preview/model/{retail_media_externalv1_keywords_model_response.py → product_shipping.py} +33 -25
  77. criteo_api_retailmedia_preview/model/product_shipping_dimension.py +267 -0
  78. criteo_api_retailmedia_preview/model/product_shipping_weight.py +267 -0
  79. criteo_api_retailmedia_preview/model/product_tax.py +283 -0
  80. criteo_api_retailmedia_preview/model/product_unit_pricing_base_measure.py +267 -0
  81. criteo_api_retailmedia_preview/model/product_unit_pricing_measure.py +267 -0
  82. criteo_api_retailmedia_preview/model/{section.py → products_custom_batch_request.py} +13 -19
  83. criteo_api_retailmedia_preview/model/products_custom_batch_request_entry.py +305 -0
  84. criteo_api_retailmedia_preview/model/promoted_product.py +270 -0
  85. criteo_api_retailmedia_preview/model/promoted_product_resource.py +270 -0
  86. criteo_api_retailmedia_preview/model/promoted_product_resource_collection_input.py +262 -0
  87. criteo_api_retailmedia_preview/model/promoted_product_resource_collection_outcome.py +278 -0
  88. criteo_api_retailmedia_preview/model/{retail_media_externalv1_proposal_status_model.py → proposal_status_model.py} +22 -50
  89. criteo_api_retailmedia_preview/model/proposal_status_model_resource.py +270 -0
  90. criteo_api_retailmedia_preview/model/{template_list_response.py → proposal_status_model_response.py} +20 -27
  91. criteo_api_retailmedia_preview/model/report_detail_error.py +299 -0
  92. criteo_api_retailmedia_preview/model/{retail_media_externalv1_add_remove_keywords_model_request.py → report_detail_errors.py} +23 -11
  93. criteo_api_retailmedia_preview/model/{retail_media_externalv1_keywords_model_resource.py → report_ok_response.py} +56 -21
  94. criteo_api_retailmedia_preview/model/{resource_of_creative202210.py → resource_of_creative_v2.py} +8 -8
  95. criteo_api_retailmedia_preview/model/{resource_of_template.py → resource_of_line_item_bid_multipliers_v2.py} +8 -8
  96. criteo_api_retailmedia_preview/model/{retail_media_externalv1_add_remove_keywords_model_resource.py → resource_of_preferred_line_item_update_model_v2.py} +16 -22
  97. criteo_api_retailmedia_preview/model/{resource_of_line_item_bid_multipliers.py → resource_of_preferred_line_item_v2.py} +9 -9
  98. criteo_api_retailmedia_preview/model/resource_outcome.py +268 -0
  99. criteo_api_retailmedia_preview/model/retail_media_account.py +6 -6
  100. criteo_api_retailmedia_preview/model/retail_media_brands.py +257 -0
  101. criteo_api_retailmedia_preview/model/{json_api_body_without_id_of_catalog_request_and_catalog_request_preview.py → retail_media_contactlist_amendment.py} +16 -16
  102. criteo_api_retailmedia_preview/model/{retail_media_externalv1_set_bids_model_resource.py → retail_media_contactlist_amendment_attributes.py} +34 -25
  103. criteo_api_retailmedia_preview/model/retail_media_contactlist_amendment_request.py +275 -0
  104. criteo_api_retailmedia_preview/model/{json_api_single_response_of_catalog_status.py → retail_media_contactlist_operation.py} +24 -20
  105. criteo_api_retailmedia_preview/model/{json_api_body_with_id_of_int64_and_catalog_status_and_catalog_status.py → retail_media_contactlist_operation_response_attributes.py} +14 -18
  106. criteo_api_retailmedia_preview/model/retail_media_contactlist_operation_response_attributes_attributes.py +297 -0
  107. criteo_api_retailmedia_preview/model/review_state_model.py +294 -0
  108. criteo_api_retailmedia_preview/model/{retail_media_externalv1_problem_details.py → rmca_common_problem.py} +41 -30
  109. criteo_api_retailmedia_preview/model/{retail_media_externalv1_set_bid_model.py → set_bid_model.py} +4 -10
  110. criteo_api_retailmedia_preview/model/set_bids_model.py +262 -0
  111. criteo_api_retailmedia_preview/model/set_bids_model_request.py +262 -0
  112. criteo_api_retailmedia_preview/model/set_bids_model_resource.py +270 -0
  113. criteo_api_retailmedia_preview/model/sync_attributed_transactions_report.py +47 -45
  114. criteo_api_retailmedia_preview/model/sync_campaigns_report.py +68 -53
  115. criteo_api_retailmedia_preview/model/sync_line_items_report.py +70 -56
  116. criteo_api_retailmedia_preview/model/value_resource_collection_input_of_retail_media_seller.py +262 -0
  117. criteo_api_retailmedia_preview/model/value_resource_input_of_retail_media_brand_account_creation.py +262 -0
  118. criteo_api_retailmedia_preview/model/value_resource_input_of_retail_media_brands.py +262 -0
  119. criteo_api_retailmedia_preview/model/value_resource_input_of_retail_media_seller_account_creation.py +262 -0
  120. criteo_api_retailmedia_preview/model/value_resource_of_retail_media_brand_account_creation.py +266 -0
  121. criteo_api_retailmedia_preview/model/{value_resource_of_int64.py → value_resource_of_retail_media_brands.py} +11 -6
  122. criteo_api_retailmedia_preview/model/value_resource_of_retail_media_seller_account_creation.py +266 -0
  123. criteo_api_retailmedia_preview/models/__init__.py +106 -55
  124. {criteo_api_retailmedia_sdk-0.0.240207.dist-info → criteo_api_retailmedia_sdk-0.0.240515.dist-info}/METADATA +3 -3
  125. {criteo_api_retailmedia_sdk-0.0.240207.dist-info → criteo_api_retailmedia_sdk-0.0.240515.dist-info}/RECORD +127 -75
  126. {criteo_api_retailmedia_sdk-0.0.240207.dist-info → criteo_api_retailmedia_sdk-0.0.240515.dist-info}/WHEEL +1 -1
  127. criteo_api_retailmedia_preview/model/files_variables_specification.py +0 -290
  128. criteo_api_retailmedia_preview/model/retail_media_externalv1_proposal_status_model_resource.py +0 -283
  129. criteo_api_retailmedia_preview/model/retail_media_externalv1_proposal_status_model_response.py +0 -285
  130. criteo_api_retailmedia_preview/model/retail_media_externalv1_resource_outcome.py +0 -279
  131. {criteo_api_retailmedia_sdk-0.0.240207.dist-info → criteo_api_retailmedia_sdk-0.0.240515.dist-info}/top_level.txt +0 -0
@@ -30,13 +30,13 @@ from criteo_api_retailmedia_preview.exceptions import ApiAttributeError
30
30
 
31
31
 
32
32
  def lazy_import():
33
- from criteo_api_retailmedia_preview.model.problem_details import ProblemDetails
34
- from criteo_api_retailmedia_preview.model.resource_of_line_item_bid_multipliers import ResourceOfLineItemBidMultipliers
35
- globals()['ProblemDetails'] = ProblemDetails
36
- globals()['ResourceOfLineItemBidMultipliers'] = ResourceOfLineItemBidMultipliers
33
+ from criteo_api_retailmedia_preview.model.common_problem import CommonProblem
34
+ from criteo_api_retailmedia_preview.model.resource_of_line_item_bid_multipliers_v2 import ResourceOfLineItemBidMultipliersV2
35
+ globals()['CommonProblem'] = CommonProblem
36
+ globals()['ResourceOfLineItemBidMultipliersV2'] = ResourceOfLineItemBidMultipliersV2
37
37
 
38
38
 
39
- class LineItemBidMultipliersResponse(ModelNormal):
39
+ class LineItemBidMultipliersV2Response(ModelNormal):
40
40
  """NOTE: This class is auto generated by OpenAPI Generator.
41
41
  Ref: https://openapi-generator.tech
42
42
 
@@ -89,9 +89,9 @@ class LineItemBidMultipliersResponse(ModelNormal):
89
89
  """
90
90
  lazy_import()
91
91
  return {
92
- 'data': (ResourceOfLineItemBidMultipliers,), # noqa: E501
93
- 'warnings': ([ProblemDetails],), # noqa: E501
94
- 'errors': ([ProblemDetails],), # noqa: E501
92
+ 'data': (ResourceOfLineItemBidMultipliersV2,), # noqa: E501
93
+ 'warnings': ([CommonProblem], none_type,), # noqa: E501
94
+ 'errors': ([CommonProblem], none_type,), # noqa: E501
95
95
  }
96
96
 
97
97
  @cached_property
@@ -115,7 +115,7 @@ class LineItemBidMultipliersResponse(ModelNormal):
115
115
  @classmethod
116
116
  @convert_js_args_to_python_args
117
117
  def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
118
- """LineItemBidMultipliersResponse - a model defined in OpenAPI
118
+ """LineItemBidMultipliersV2Response - a model defined in OpenAPI
119
119
 
120
120
  Keyword Args:
121
121
  _check_type (bool): if True, values for parameters in openapi_types
@@ -148,9 +148,9 @@ class LineItemBidMultipliersResponse(ModelNormal):
148
148
  Animal class but this time we won't travel
149
149
  through its discriminator because we passed in
150
150
  _visited_composed_classes = (Animal,)
151
- data (ResourceOfLineItemBidMultipliers): [optional] # noqa: E501
152
- warnings ([ProblemDetails]): [optional] # noqa: E501
153
- errors ([ProblemDetails]): [optional] # noqa: E501
151
+ data (ResourceOfLineItemBidMultipliersV2): [optional] # noqa: E501
152
+ warnings ([CommonProblem], none_type): [optional] # noqa: E501
153
+ errors ([CommonProblem], none_type): [optional] # noqa: E501
154
154
  """
155
155
 
156
156
  _check_type = kwargs.pop('_check_type', True)
@@ -203,7 +203,7 @@ class LineItemBidMultipliersResponse(ModelNormal):
203
203
 
204
204
  @convert_js_args_to_python_args
205
205
  def __init__(self, *args, **kwargs): # noqa: E501
206
- """LineItemBidMultipliersResponse - a model defined in OpenAPI
206
+ """LineItemBidMultipliersV2Response - a model defined in OpenAPI
207
207
 
208
208
  Keyword Args:
209
209
  _check_type (bool): if True, values for parameters in openapi_types
@@ -236,9 +236,9 @@ class LineItemBidMultipliersResponse(ModelNormal):
236
236
  Animal class but this time we won't travel
237
237
  through its discriminator because we passed in
238
238
  _visited_composed_classes = (Animal,)
239
- data (ResourceOfLineItemBidMultipliers): [optional] # noqa: E501
240
- warnings ([ProblemDetails]): [optional] # noqa: E501
241
- errors ([ProblemDetails]): [optional] # noqa: E501
239
+ data (ResourceOfLineItemBidMultipliersV2): [optional] # noqa: E501
240
+ warnings ([CommonProblem], none_type): [optional] # noqa: E501
241
+ errors ([CommonProblem], none_type): [optional] # noqa: E501
242
242
  """
243
243
 
244
244
  _check_type = kwargs.pop('_check_type', True)
@@ -0,0 +1,291 @@
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 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
@@ -0,0 +1,271 @@
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 LoyaltyPoints(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
+ 'name': (str, none_type,), # noqa: E501
85
+ 'points_value': (int, none_type,), # noqa: E501
86
+ 'ratio': (float, none_type,), # noqa: E501
87
+ }
88
+
89
+ @cached_property
90
+ def discriminator():
91
+ return None
92
+
93
+
94
+ attribute_map = {
95
+ 'name': 'name', # noqa: E501
96
+ 'points_value': 'pointsValue', # noqa: E501
97
+ 'ratio': 'ratio', # 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, *args, **kwargs): # noqa: E501
108
+ """LoyaltyPoints - a model defined in OpenAPI
109
+
110
+ Keyword Args:
111
+ _check_type (bool): if True, values for parameters in openapi_types
112
+ will be type checked and a TypeError will be
113
+ raised if the wrong type is input.
114
+ Defaults to True
115
+ _path_to_item (tuple/list): This is a list of keys or values to
116
+ drill down to the model in received_data
117
+ when deserializing a response
118
+ _spec_property_naming (bool): True if the variable names in the input data
119
+ are serialized names, as specified in the OpenAPI document.
120
+ False if the variable names in the input data
121
+ are pythonic names, e.g. snake case (default)
122
+ _configuration (Configuration): the instance to use when
123
+ deserializing a file_type parameter.
124
+ If passed, type conversion is attempted
125
+ If omitted no type conversion is done.
126
+ _visited_composed_classes (tuple): This stores a tuple of
127
+ classes that we have traveled through so that
128
+ if we see that class again we will not use its
129
+ discriminator again.
130
+ When traveling through a discriminator, the
131
+ composed schema that is
132
+ is traveled through is added to this set.
133
+ For example if Animal has a discriminator
134
+ petType and we pass in "Dog", and the class Dog
135
+ allOf includes Animal, we move through Animal
136
+ once using the discriminator, and pick Dog.
137
+ Then in Dog, we will make an instance of the
138
+ Animal class but this time we won't travel
139
+ through its discriminator because we passed in
140
+ _visited_composed_classes = (Animal,)
141
+ name (str, none_type): Name of loyalty points program. It is recommended to limit the name to 12 full-width characters or 24 Roman characters.. [optional] # noqa: E501
142
+ points_value (int, none_type): The retailer's loyalty points in absolute value.. [optional] # noqa: E501
143
+ ratio (float, none_type): The ratio of a point when converted to currency. Google assumes currency based on Merchant Center settings. If ratio is left out, it defaults to 1.0.. [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
+ """LoyaltyPoints - 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
+ name (str, none_type): Name of loyalty points program. It is recommended to limit the name to 12 full-width characters or 24 Roman characters.. [optional] # noqa: E501
230
+ points_value (int, none_type): The retailer's loyalty points in absolute value.. [optional] # noqa: E501
231
+ ratio (float, none_type): The ratio of a point when converted to currency. Google assumes currency based on Merchant Center settings. If ratio is left out, it defaults to 1.0.. [optional] # noqa: E501
232
+ """
233
+
234
+ _check_type = kwargs.pop('_check_type', True)
235
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
236
+ _path_to_item = kwargs.pop('_path_to_item', ())
237
+ _configuration = kwargs.pop('_configuration', None)
238
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
239
+
240
+ if args:
241
+ for arg in args:
242
+ if isinstance(arg, dict):
243
+ kwargs.update(arg)
244
+ else:
245
+ raise ApiTypeError(
246
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
247
+ args,
248
+ self.__class__.__name__,
249
+ ),
250
+ path_to_item=_path_to_item,
251
+ valid_classes=(self.__class__,),
252
+ )
253
+
254
+ self._data_store = {}
255
+ self._check_type = _check_type
256
+ self._spec_property_naming = _spec_property_naming
257
+ self._path_to_item = _path_to_item
258
+ self._configuration = _configuration
259
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
260
+
261
+ for var_name, var_value in kwargs.items():
262
+ if var_name not in self.attribute_map and \
263
+ self._configuration is not None and \
264
+ self._configuration.discard_unknown_keys and \
265
+ self.additional_properties_type is None:
266
+ # discard variable.
267
+ continue
268
+ setattr(self, var_name, var_value)
269
+ if var_name in self.read_only_vars:
270
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
271
+ f"class with read only attributes.")