python-amazon-ad-api 1.2.1__py3-none-any.whl → 1.2.3__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.
@@ -7,8 +7,29 @@ class PortfoliosV3(Client):
7
7
  @sp_endpoint('/portfolios/list', method='POST')
8
8
  def list_portfolios(self, version: int = 3, prefer: bool = False, **kwargs) -> ApiResponse:
9
9
  r"""
10
+ Lists portfolios. Replaces the retired ``GET /v2/portfolios``.
10
11
 
11
- list_portfolios(body: (str, dict)) -> ApiResponse
12
+ Keyword Args
13
+
14
+ - ``prefer`` (bool): send ``Prefer: return=representation`` so the answer
15
+ carries the full portfolio objects rather than only the ids. [optional]
16
+
17
+ Request Body (optional)
18
+
19
+ - ``portfolioIdFilter`` (object): narrow to those ids. Carries
20
+ ``include``, a list of portfolio ids.
21
+ - ``nameFilter`` (object): narrow by name. Carries ``include``, a list of
22
+ names, and ``queryTermMatchType``, ``BROAD_MATCH`` or ``EXACT_MATCH``.
23
+ - ``stateFilter`` (object): narrow by state. Carries ``include``, a list
24
+ of states.
25
+ - ``includeExtendedDataFields`` (boolean): also return
26
+ ``creationDateTime``, ``lastUpdateDateTime``, ``servingStatus`` and
27
+ ``statusReasons``.
28
+ - ``nextToken`` (string): pagination token from a previous answer.
29
+
30
+ Returns
31
+ ApiResponse with ``portfolios``, ``totalResults`` and ``nextToken``.
32
+ Answers ``200``.
12
33
 
13
34
  """
14
35
 
@@ -25,9 +46,41 @@ class PortfoliosV3(Client):
25
46
  @sp_endpoint('/portfolios', method='POST')
26
47
  def create_portfolios(self, version: int = 3, prefer: bool = False, **kwargs) -> ApiResponse:
27
48
  r"""
28
-
29
- create_portfolios(body: (str, dict)) -> ApiResponse
30
-
49
+ Creates portfolios.
50
+
51
+ Keyword Args
52
+
53
+ - ``prefer`` (bool): send ``Prefer: return=representation`` so the answer
54
+ carries the created portfolio objects rather than only the ids.
55
+ [optional]
56
+
57
+ Request Body (required)
58
+
59
+ - ``portfolios`` (array): the portfolios to create.
60
+
61
+ Each one carries:
62
+
63
+ - ``name`` (string): required. The portfolio name.
64
+ - ``state`` (string): required. The contract lists ``ENABLED`` as the
65
+ only value.
66
+ - ``budget.amount`` (number): the budget amount. Absent when the policy
67
+ is ``NO_CAP``.
68
+ - ``budget.currencyCode`` (string): one of ``AED``, ``AUD``, ``BRL``,
69
+ ``CAD``, ``CLP``, ``CNY``, ``COP``, ``EGP``, ``EUR``, ``GBP``,
70
+ ``INR``, ``JPY``, ``MXN``, ``NGN``, ``PLN``, ``SAR``, ``SEK``,
71
+ ``SGD``, ``TRY``, ``USD``, ``ZAR``.
72
+ - ``budget.policy`` (string): ``DATE_RANGE``, ``MONTHLY_RECURRING``,
73
+ ``NO_CAP`` or ``OTHER``.
74
+ - ``budget.startDate`` (string): ISO 8601. Required when the policy is
75
+ ``DATE_RANGE``.
76
+ - ``budget.endDate`` (string): ISO 8601. Optional under either policy.
77
+ - ``budgetControls.campaignUnspentBudgetSharing.featureState``
78
+ (string): ``ENABLED`` or ``DISABLED``.
79
+
80
+ Returns
81
+ ApiResponse with ``success`` and ``error`` lists, each item keyed by
82
+ the ``index`` it held in the body. Answers ``207``, a multi-status,
83
+ not ``200``.
31
84
 
32
85
  """
33
86
  schema_version = 'application/vnd.spPortfolio.v' + str(version) + '+json'
@@ -41,9 +94,32 @@ class PortfoliosV3(Client):
41
94
  @sp_endpoint('/portfolios', method='PUT')
42
95
  def edit_portfolios(self, version: int = 3, prefer: bool = False, **kwargs) -> ApiResponse:
43
96
  r"""
97
+ Updates portfolios.
44
98
 
45
- edit_portfolios(body: (str, dict)) -> ApiResponse
99
+ Keyword Args
46
100
 
101
+ - ``prefer`` (bool): send ``Prefer: return=representation`` so the answer
102
+ carries the updated portfolio objects rather than only the ids.
103
+ [optional]
104
+
105
+ Request Body (required)
106
+
107
+ - ``portfolios`` (array): the portfolios to update.
108
+
109
+ Each one carries ``portfolioId``, which is required, plus any of the
110
+ members ``create_portfolios`` accepts. Only what is sent is changed:
111
+
112
+ - ``portfolioId`` (string): required. The portfolio to update.
113
+ - ``name`` (string): the portfolio name.
114
+ - ``state`` (string): ``ENABLED``.
115
+ - ``budget.amount``, ``budget.currencyCode``, ``budget.policy``,
116
+ ``budget.startDate`` and ``budget.endDate`` as above.
117
+ - ``budgetControls.campaignUnspentBudgetSharing.featureState`` as above.
118
+
119
+ Returns
120
+ ApiResponse with ``success`` and ``error`` lists, each item keyed by
121
+ the ``index`` it held in the body. Answers ``207``, a multi-status,
122
+ not ``200``.
47
123
 
48
124
  """
49
125
  schema_version = 'application/vnd.spPortfolio.v' + str(version) + '+json'
@@ -58,9 +134,17 @@ class PortfoliosV3(Client):
58
134
  @sp_endpoint('/portfolios/budget/usage', method='POST')
59
135
  def get_budget_usage_for_portfolios(self, version: int = 1, **kwargs) -> ApiResponse:
60
136
  r"""
137
+ Reports how much of each portfolio budget has been spent.
138
+
139
+ Request Body (required)
61
140
 
62
- get_budget_usage_for_portfolios(body: (str, dict)) -> ApiResponse
141
+ - ``portfolioIds`` (array): the portfolios to measure.
63
142
 
143
+ Returns
144
+ ApiResponse split into ``success`` and ``error``. A successful entry
145
+ carries ``portfolioId``, ``index``, ``budget``,
146
+ ``budgetUsagePercent`` and ``usageUpdatedTimestamp``. Answers
147
+ ``207``, a multi-status, not ``200``.
64
148
 
65
149
  """
66
150
  schema_version = 'application/vnd.portfoliobudgetusage.v' + str(version) + '+json'
@@ -47,9 +47,21 @@ class ValidationConfigurations(Client):
47
47
  Retrieves the configuration values used in targeting clause validation for the requested inputted marketplace, entityType, and programType context/contexts.
48
48
 
49
49
  Request body
50
- | **countryCodesList** (Array): [optional] The list of countryCode enums defining the marketplaces whose configuration values are requested. When null is selected and no value is attributed to this key, all countryCode options are selected. [ US, CA, MX, BR, UK, DE, FR, ES, IN, IT, NL, AE, SA, SE, TR, PL, EG, JP, AU, SG, CN ]
51
- | **entityTypesList** (Array): [optional] The list of entityType enums defining the marketplaces whose configuration values are requested. When null is selected and no value is attributed to this key, all countryCode options are selected. [ SELLER, VENDOR ]
52
- | **programTypesList** (Array): [optional] The list of programType enums defining the marketplaces whose configuration values are requested. When null is selected and no value is attributed to this key, all countryCode options are selected. [ SB, SP, SD ]
50
+
51
+ - ``countryCodesList`` (Array): [optional] The list of countryCode enums
52
+ defining the marketplaces whose configuration values are requested.
53
+ When null is selected and no value is attributed to this key, all
54
+ countryCode options are selected. [ US, CA, MX, BR, UK, DE, FR, ES, IN,
55
+ IT, NL, AE, SA, SE, TR, PL, EG, JP, AU, SG, CN ]
56
+ - ``entityTypesList`` (Array): [optional] The list of entityType enums
57
+ defining the marketplaces whose configuration values are requested.
58
+ When null is selected and no value is attributed to this key, all
59
+ countryCode options are selected. [ SELLER, VENDOR ]
60
+ - ``programTypesList`` (Array): [optional] The list of programType enums
61
+ defining the marketplaces whose configuration values are requested.
62
+ When null is selected and no value is attributed to this key, all
63
+ countryCode options are selected. [ SB, SP, SD ]
64
+
53
65
  Returns:
54
66
  ApiResponse
55
67
 
ad_api/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "1.2.1"
1
+ __version__ = "1.2.3"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-amazon-ad-api
3
- Version: 1.2.1
3
+ Version: 1.2.3
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
@@ -263,10 +263,6 @@ curl \
263
263
  * [Profiles](https://python-amazon-ad-api.readthedocs.io/en/latest/api/profiles.html)
264
264
  * [Manager Accounts](https://python-amazon-ad-api.readthedocs.io/en/latest/api/manager_accounts.html)
265
265
 
266
- Warning: [PLANNED DEPRECATION 1/3/2025]
267
- There is a new version 3 Portfolios API, please check the [migration guide](https://advertising.amazon.com/API/docs/en-us/reference/migration-guides/portfolios-v2-v3).
268
-
269
- * [Portfolios](https://python-amazon-ad-api.readthedocs.io/en/latest/api/portfolios.html)
270
266
  * [PortfoliosV3](https://python-amazon-ad-api.readthedocs.io/en/latest/api/portfoliosV3.html)
271
267
  * [Invoices](https://python-amazon-ad-api.readthedocs.io/en/latest/api/invoices.html)
272
268
  * [Billing](https://python-amazon-ad-api.readthedocs.io/en/latest/api/billing.html)
@@ -1,5 +1,5 @@
1
1
  ad_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- ad_api/version.py,sha256=Mlm4Gvmb_6yQxwUbv2Ksc-BJFXLPg9H1Vt2iV7wXrA4,22
2
+ ad_api/version.py,sha256=C-D_WWrVkBDmQmApLcm0sWNh2CgIrwWfc8_sB5vvU-Q,22
3
3
  ad_api/api/__init__.py,sha256=E9c0ZyK4vplMlKKEBF8CV5u7P4uSkTMSQsAuSQu5bfY,1514
4
4
  ad_api/api/account.py,sha256=CmOvCfHoPWaeTUJvtB0pNoNulZVSz4oMMCKIpVTpHos,2931
5
5
  ad_api/api/advertising_test_account.py,sha256=btOVbdk2tBDmyKSJaQbcIFyzNG8KFJVUmTe4p9xMhpU,1507
@@ -17,13 +17,13 @@ ad_api/api/localization.py,sha256=HdkChAawloJ8zj5rCye9NVf7kLnQ7vW6aKsBLZ2W-gI,17
17
17
  ad_api/api/manager_accounts.py,sha256=tnmJxOGIKTuJ3i8wciwfs931REW0aeNKQiqCpBrTZ2Y,5107
18
18
  ad_api/api/metadata.py,sha256=vWPbDGvEB72421fjSu4KrNkTdrIijHTPV8k36hceSbA,2406
19
19
  ad_api/api/portfolios.py,sha256=Oe3LS2HsjMJSq1Id8cwOWrH2AiPMcBb7oTkFHjudnTI,7103
20
- ad_api/api/portfolios_v3.py,sha256=3vOfyz0awonr2NJOCm5SjX_bOz9-4hyQbf67DIY9IQU,2596
20
+ ad_api/api/portfolios_v3.py,sha256=eoVCO0UzJZ9L2nGKkEh8nq-V8wANJsXb4bdM2asuk1A,6447
21
21
  ad_api/api/profiles.py,sha256=mMSCUd5HdR_nFBDFngLY94tIfMCA4yGnjHz-PSMe0rE,7200
22
22
  ad_api/api/recommendations.py,sha256=aVDnnX8GEhdOVSKypIs8lyUJCiFxo9ujMYVXqzHTvBc,4633
23
23
  ad_api/api/reports.py,sha256=gNmDHLULD2uaJgsMpIbCX9kabwhMXRr9WfZBtHUdsOY,6043
24
24
  ad_api/api/stores.py,sha256=7W3RJKZyZOQ3nHzInvK9FDhWTXCH6Xe9a6dCBatEZ-o,2484
25
25
  ad_api/api/stream.py,sha256=JpnF8SKniOAHiEnEq1RPrh6tNy-Q2-8GPBTmnlxEXqQ,2989
26
- ad_api/api/validation_configurations.py,sha256=5C9yn77BS_B4qlq9Aj7UIk4erP7_k8UgShy63877vTw,3918
26
+ ad_api/api/validation_configurations.py,sha256=BBoUv7iWJjB33Wp4pClNbzSUX9iNW36lJEIDn6CqgD8,4008
27
27
  ad_api/api/sb/__init__.py,sha256=APbCAkWM1gzYuhpEUU98XDIKJKJx1NXALjLBXA9zdBU,1538
28
28
  ad_api/api/sb/ad_creatives_v4.py,sha256=zQzTivDkGzX3I5ZfCWIlzRUGWfTRsXJZCKQrKMaMDpc,14512
29
29
  ad_api/api/sb/ad_groups.py,sha256=W06Fk0CCsuEYen1Bd8obR6aHpOMhk6tGWNWApecw59c,2882
@@ -108,8 +108,8 @@ ad_api/base/exceptions.py,sha256=9D3M40ZIlLS0fA-aQh1BTWPOW-Nvf0tRhbA85jFnDJ4,438
108
108
  ad_api/base/helpers.py,sha256=UK7Q13vZ0mNdF54xzfzoGDn2O_cd2yPrK2X4rOzC41c,2334
109
109
  ad_api/base/marketplaces.py,sha256=44lvCcluXNpqTprWQ80e3weSQmQbJoWL-WDSOWVbCyQ,4657
110
110
  ad_api/base/utils.py,sha256=_qnCBOvyJTLgaZjJzUWTi38GGLHkQszXELs79133Rb4,5618
111
- python_amazon_ad_api-1.2.1.dist-info/licenses/LICENSE,sha256=h2rpqlmmLy-4l1tN6KpWAFxx1JEMYeEFrMrZUbx_B_o,1105
112
- python_amazon_ad_api-1.2.1.dist-info/METADATA,sha256=ASyFVXxnIVnBki5JSdq1fMlUgB9RZNXrbitkS4B0yCg,21778
113
- python_amazon_ad_api-1.2.1.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
114
- python_amazon_ad_api-1.2.1.dist-info/top_level.txt,sha256=nN9twUos-8pkP514ZwpvRU9YL9L2XyQyHsMQFfudGTU,7
115
- python_amazon_ad_api-1.2.1.dist-info/RECORD,,
111
+ python_amazon_ad_api-1.2.3.dist-info/licenses/LICENSE,sha256=h2rpqlmmLy-4l1tN6KpWAFxx1JEMYeEFrMrZUbx_B_o,1105
112
+ python_amazon_ad_api-1.2.3.dist-info/METADATA,sha256=On7nRch4tuPN_bwIc7Zz4kSZR0lRbtX1mVJqqR181yU,21479
113
+ python_amazon_ad_api-1.2.3.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
114
+ python_amazon_ad_api-1.2.3.dist-info/top_level.txt,sha256=nN9twUos-8pkP514ZwpvRU9YL9L2XyQyHsMQFfudGTU,7
115
+ python_amazon_ad_api-1.2.3.dist-info/RECORD,,