python-amazon-ad-api 2.1.10__py3-none-any.whl → 2.1.11__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.
@@ -81,7 +81,9 @@ class Portfolios(Client):
81
81
  """
82
82
  schema_version = 'application/json'
83
83
  headers = {"Accept": schema_version, "Content-Type": schema_version}
84
- body = kwargs.pop('body', None)
84
+ # The contract marks this body required: omit it and the call raises
85
+ # KeyError here rather than reaching the service.
86
+ body = kwargs.pop('body')
85
87
 
86
88
  # Optional account header, taken from kwargs and removed before the
87
89
  # call is built: left in kwargs it would travel in the query string.
@@ -89,8 +91,8 @@ class Portfolios(Client):
89
91
  if account_id:
90
92
  headers['Amazon-Ads-AccountId'] = account_id
91
93
 
92
- return self._request(kwargs.pop('path'), params=kwargs, headers=headers,
93
- **({'data': Utils.convert_body(body, False)} if body is not None else {}))
94
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(body, False),
95
+ params=kwargs, headers=headers)
94
96
 
95
97
  @sp_endpoint('/adsApi/v1/query/portfolios', method='POST')
96
98
  def query_portfolios(self, **kwargs) -> ApiResponse:
@@ -188,7 +190,9 @@ class Portfolios(Client):
188
190
  """
189
191
  schema_version = 'application/json'
190
192
  headers = {"Accept": schema_version, "Content-Type": schema_version}
191
- body = kwargs.pop('body', None)
193
+ # The contract marks this body required: omit it and the call raises
194
+ # KeyError here rather than reaching the service.
195
+ body = kwargs.pop('body')
192
196
 
193
197
  # Optional account header, taken from kwargs and removed before the
194
198
  # call is built: left in kwargs it would travel in the query string.
@@ -196,5 +200,5 @@ class Portfolios(Client):
196
200
  if account_id:
197
201
  headers['Amazon-Ads-AccountId'] = account_id
198
202
 
199
- return self._request(kwargs.pop('path'), params=kwargs, headers=headers,
200
- **({'data': Utils.convert_body(body, False)} if body is not None else {}))
203
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(body, False),
204
+ params=kwargs, headers=headers)
ad_api/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "2.1.10"
1
+ __version__ = "2.1.11"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-amazon-ad-api
3
- Version: 2.1.10
3
+ Version: 2.1.11
4
4
  Summary: Python wrapper for the Amazon Advertising API
5
5
  Home-page: https://github.com/denisneuf/python-amazon-ad-api
6
6
  Author: Daniel Alvaro
@@ -1,5 +1,5 @@
1
1
  ad_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- ad_api/version.py,sha256=zBzBCTHx_lpM20-2wHeccRHskIUls_oSQ1tzAOiGGrU,23
2
+ ad_api/version.py,sha256=zcHMV6HbszEZFZ1gDEpbHxTYg8dJ5fCYdeDd-O6IPP4,23
3
3
  ad_api/api/__init__.py,sha256=Ain-1s6B4eywYsw3CdYQc2C1KTQdAZy2L3T90KJDYdI,1995
4
4
  ad_api/api/account.py,sha256=X6VPoPsEfGwuABUYVWJATiUpgHSCAz0BreQOHCze9To,4613
5
5
  ad_api/api/account_budgets.py,sha256=jFce5eLWAFK3ydjnYR7_Sv7B0-gHTG5bMTx_TcHyy1A,2319
@@ -112,7 +112,7 @@ ad_api/api/v1/label_object_associations.py,sha256=GdaLkkPcEaqjH1egwF63d8DzT3eta1
112
112
  ad_api/api/v1/labels.py,sha256=jQxbwjsTWEXDyilGdt-_Kam_k9jMS8IBP-eyu6AW70A,2831
113
113
  ad_api/api/v1/location_indexes.py,sha256=xV2g8DuNh6ayNwl55YiLEkbAFPfR6AeM92AH7VWC6dg,7266
114
114
  ad_api/api/v1/manager_accounts.py,sha256=iiW0bjS23rn2R_In3Zisn0mSFQsQ6iy6KgkO_JxT-H4,5101
115
- ad_api/api/v1/portfolios.py,sha256=rXyqzP_0fB7aC38eiN3-5xm9dsog3P4MTeP12I59h80,9463
115
+ ad_api/api/v1/portfolios.py,sha256=mDrx3xo72BN_ltk3eefVm9A4kR7g_sbFMr2JTfuJpOM,9647
116
116
  ad_api/api/v1/recommendation_types.py,sha256=zw546ssLqFwKShZ9MNkG0I7DWKTnQs3yptcCsgHi-pA,2576
117
117
  ad_api/api/v1/recommendations.py,sha256=lb3Jwtwcmq3L8j0HAUKzOt8o_xQRJRduXcjklX_tFw8,4305
118
118
  ad_api/api/v1/reports.py,sha256=vJmWhIsALkX27HeijTsSUz3zrYhUBm4RodTCieJD8Y8,6657
@@ -134,8 +134,8 @@ ad_api/base/marketplaces.py,sha256=44lvCcluXNpqTprWQ80e3weSQmQbJoWL-WDSOWVbCyQ,4
134
134
  ad_api/base/utils.py,sha256=_qnCBOvyJTLgaZjJzUWTi38GGLHkQszXELs79133Rb4,5618
135
135
  ad_api/shared/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
136
136
  ad_api/shared/base_client.py,sha256=zOL_LTh-58URWf3ZDlrwmqXXbd6PX66QF5hrr2p83yY,356
137
- python_amazon_ad_api-2.1.10.dist-info/licenses/LICENSE,sha256=h2rpqlmmLy-4l1tN6KpWAFxx1JEMYeEFrMrZUbx_B_o,1105
138
- python_amazon_ad_api-2.1.10.dist-info/METADATA,sha256=-NPe3JMA80TOzP5qanWtCKRbJoU5pyHZfHT8gsF-wYM,54258
139
- python_amazon_ad_api-2.1.10.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
140
- python_amazon_ad_api-2.1.10.dist-info/top_level.txt,sha256=nN9twUos-8pkP514ZwpvRU9YL9L2XyQyHsMQFfudGTU,7
141
- python_amazon_ad_api-2.1.10.dist-info/RECORD,,
137
+ python_amazon_ad_api-2.1.11.dist-info/licenses/LICENSE,sha256=h2rpqlmmLy-4l1tN6KpWAFxx1JEMYeEFrMrZUbx_B_o,1105
138
+ python_amazon_ad_api-2.1.11.dist-info/METADATA,sha256=qU8Y9rQFVP-_1_8LP2ZPVF6HqRqWSAoiHH2uc9mpN4g,54258
139
+ python_amazon_ad_api-2.1.11.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
140
+ python_amazon_ad_api-2.1.11.dist-info/top_level.txt,sha256=nN9twUos-8pkP514ZwpvRU9YL9L2XyQyHsMQFfudGTU,7
141
+ python_amazon_ad_api-2.1.11.dist-info/RECORD,,