python-amazon-ad-api 2.1.8__py3-none-any.whl → 2.1.9__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.
@@ -82,6 +82,13 @@ class Portfolios(Client):
82
82
  schema_version = 'application/json'
83
83
  headers = {"Accept": schema_version, "Content-Type": schema_version}
84
84
  body = kwargs.pop('body', None)
85
+
86
+ # Optional account header, taken from kwargs and removed before the
87
+ # call is built: left in kwargs it would travel in the query string.
88
+ account_id = kwargs.pop('account_id', None)
89
+ if account_id:
90
+ headers['Amazon-Ads-AccountId'] = account_id
91
+
85
92
  return self._request(kwargs.pop('path'), params=kwargs, headers=headers,
86
93
  **({'data': Utils.convert_body(body, False)} if body is not None else {}))
87
94
 
@@ -182,5 +189,12 @@ class Portfolios(Client):
182
189
  schema_version = 'application/json'
183
190
  headers = {"Accept": schema_version, "Content-Type": schema_version}
184
191
  body = kwargs.pop('body', None)
192
+
193
+ # Optional account header, taken from kwargs and removed before the
194
+ # call is built: left in kwargs it would travel in the query string.
195
+ account_id = kwargs.pop('account_id', None)
196
+ if account_id:
197
+ headers['Amazon-Ads-AccountId'] = account_id
198
+
185
199
  return self._request(kwargs.pop('path'), params=kwargs, headers=headers,
186
200
  **({'data': Utils.convert_body(body, False)} if body is not None else {}))
ad_api/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "2.1.8"
1
+ __version__ = "2.1.9"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-amazon-ad-api
3
- Version: 2.1.8
3
+ Version: 2.1.9
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=Zs7yBsCpiMSJW2PP_mZoH_3cEDqJwh80ulBcmuMBwMU,22
2
+ ad_api/version.py,sha256=Gf0zUMmdRLkPmvwnoP7oCpWn7Ep93jlNIlBD6nifugI,22
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=zXuD5cUAfqL-PRObvjOM54KC356HFq
112
112
  ad_api/api/v1/labels.py,sha256=jjPmafIQZTh99Ztj5MCcDC7UyoFFN0YuWdn2syqd3Yg,2438
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=jAbFxPO27laeMhwpzU8_JZJ5sVMdod1eap7Uw88sZIY,8889
115
+ ad_api/api/v1/portfolios.py,sha256=rXyqzP_0fB7aC38eiN3-5xm9dsog3P4MTeP12I59h80,9463
116
116
  ad_api/api/v1/recommendation_types.py,sha256=aEBfXu1EhzcRk9Nhin8_ieFiNnBiusX_vWviJw_qD08,2077
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.8.dist-info/licenses/LICENSE,sha256=h2rpqlmmLy-4l1tN6KpWAFxx1JEMYeEFrMrZUbx_B_o,1105
138
- python_amazon_ad_api-2.1.8.dist-info/METADATA,sha256=dJZcJ64haUWv1i67UnKKIb_KSJqhCnoaMERTnBUyUss,54257
139
- python_amazon_ad_api-2.1.8.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
140
- python_amazon_ad_api-2.1.8.dist-info/top_level.txt,sha256=nN9twUos-8pkP514ZwpvRU9YL9L2XyQyHsMQFfudGTU,7
141
- python_amazon_ad_api-2.1.8.dist-info/RECORD,,
137
+ python_amazon_ad_api-2.1.9.dist-info/licenses/LICENSE,sha256=h2rpqlmmLy-4l1tN6KpWAFxx1JEMYeEFrMrZUbx_B_o,1105
138
+ python_amazon_ad_api-2.1.9.dist-info/METADATA,sha256=3C9w7RBeDq-ssu-QlOHt22duYQ2hrue2-3I-zpsOOBU,54257
139
+ python_amazon_ad_api-2.1.9.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
140
+ python_amazon_ad_api-2.1.9.dist-info/top_level.txt,sha256=nN9twUos-8pkP514ZwpvRU9YL9L2XyQyHsMQFfudGTU,7
141
+ python_amazon_ad_api-2.1.9.dist-info/RECORD,,