logos-sdk 0.0.25.dev36__tar.gz → 0.0.25.dev37__tar.gz
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.
- {logos_sdk-0.0.25.dev36 → logos_sdk-0.0.25.dev37}/PKG-INFO +1 -1
- {logos_sdk-0.0.25.dev36 → logos_sdk-0.0.25.dev37}/logos_sdk/services/MerchantCenter.py +21 -24
- {logos_sdk-0.0.25.dev36 → logos_sdk-0.0.25.dev37}/logos_sdk.egg-info/PKG-INFO +1 -1
- {logos_sdk-0.0.25.dev36 → logos_sdk-0.0.25.dev37}/LICENSE +0 -0
- {logos_sdk-0.0.25.dev36 → logos_sdk-0.0.25.dev37}/README.md +0 -0
- {logos_sdk-0.0.25.dev36 → logos_sdk-0.0.25.dev37}/logos_sdk/__init__.py +0 -0
- {logos_sdk-0.0.25.dev36 → logos_sdk-0.0.25.dev37}/logos_sdk/big_query/BigQuery.py +0 -0
- {logos_sdk-0.0.25.dev36 → logos_sdk-0.0.25.dev37}/logos_sdk/big_query/__init__.py +0 -0
- {logos_sdk-0.0.25.dev36 → logos_sdk-0.0.25.dev37}/logos_sdk/logging/LogosLogger.py +0 -0
- {logos_sdk-0.0.25.dev36 → logos_sdk-0.0.25.dev37}/logos_sdk/logging/__init__.py +0 -0
- {logos_sdk-0.0.25.dev36 → logos_sdk-0.0.25.dev37}/logos_sdk/services/CampaignManager.py +0 -0
- {logos_sdk-0.0.25.dev36 → logos_sdk-0.0.25.dev37}/logos_sdk/services/Collabim.py +0 -0
- {logos_sdk-0.0.25.dev36 → logos_sdk-0.0.25.dev37}/logos_sdk/services/DV360.py +0 -0
- {logos_sdk-0.0.25.dev36 → logos_sdk-0.0.25.dev37}/logos_sdk/services/Facebook.py +0 -0
- {logos_sdk-0.0.25.dev36 → logos_sdk-0.0.25.dev37}/logos_sdk/services/GA4.py +0 -0
- {logos_sdk-0.0.25.dev36 → logos_sdk-0.0.25.dev37}/logos_sdk/services/GoogleAds.py +0 -0
- {logos_sdk-0.0.25.dev36 → logos_sdk-0.0.25.dev37}/logos_sdk/services/GoogleSheets.py +0 -0
- {logos_sdk-0.0.25.dev36 → logos_sdk-0.0.25.dev37}/logos_sdk/services/MarketMiner.py +0 -0
- {logos_sdk-0.0.25.dev36 → logos_sdk-0.0.25.dev37}/logos_sdk/services/MicrosoftAdvertising.py +0 -0
- {logos_sdk-0.0.25.dev36 → logos_sdk-0.0.25.dev37}/logos_sdk/services/MicrosoftAdvertisingMerchantCenter.py +0 -0
- {logos_sdk-0.0.25.dev36 → logos_sdk-0.0.25.dev37}/logos_sdk/services/Sklik.py +0 -0
- {logos_sdk-0.0.25.dev36 → logos_sdk-0.0.25.dev37}/logos_sdk/services/__init__.py +0 -0
- {logos_sdk-0.0.25.dev36 → logos_sdk-0.0.25.dev37}/logos_sdk.egg-info/SOURCES.txt +0 -0
- {logos_sdk-0.0.25.dev36 → logos_sdk-0.0.25.dev37}/logos_sdk.egg-info/dependency_links.txt +0 -0
- {logos_sdk-0.0.25.dev36 → logos_sdk-0.0.25.dev37}/logos_sdk.egg-info/requires.txt +0 -0
- {logos_sdk-0.0.25.dev36 → logos_sdk-0.0.25.dev37}/logos_sdk.egg-info/top_level.txt +0 -0
- {logos_sdk-0.0.25.dev36 → logos_sdk-0.0.25.dev37}/setup.cfg +0 -0
- {logos_sdk-0.0.25.dev36 → logos_sdk-0.0.25.dev37}/setup.py +0 -0
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import os
|
|
1
2
|
from http import HTTPStatus
|
|
2
|
-
|
|
3
|
+
|
|
3
4
|
from dotenv import load_dotenv
|
|
4
|
-
|
|
5
|
+
|
|
6
|
+
from logos_sdk.services import get_headers, get_retry_session
|
|
5
7
|
|
|
6
8
|
|
|
7
9
|
class MerchantServiceException(Exception):
|
|
@@ -23,7 +25,6 @@ class MerchantCenterService:
|
|
|
23
25
|
self._GET_SUPPLEMENTAL_FEEDS = self._URL + "/feed-service/supplemental-feeds"
|
|
24
26
|
self._PRIMARY_FEEDS = self._URL + "/feed-service/feeds"
|
|
25
27
|
|
|
26
|
-
|
|
27
28
|
def list_accounts(self, merchant_account_id: str, secret_id: str):
|
|
28
29
|
"""
|
|
29
30
|
Lists the sub-accounts in your Merchant Center account
|
|
@@ -58,18 +59,16 @@ class MerchantCenterService:
|
|
|
58
59
|
raise MerchantServiceException(response.content)
|
|
59
60
|
|
|
60
61
|
def list_account_statuses(
|
|
61
|
-
self,
|
|
62
|
+
self, account_id: str, secret_id: str
|
|
62
63
|
):
|
|
63
64
|
"""
|
|
64
65
|
Retrieves the statuses of a Merchant Center account.
|
|
65
|
-
:param merchant_account_id: The ID of the managing account. This must be a multi-client account.
|
|
66
66
|
:param account_id: The ID of the account.
|
|
67
67
|
:param secret_id: The ID of the secret in secret manager
|
|
68
68
|
:return: List[Dict]
|
|
69
69
|
"""
|
|
70
70
|
body = {
|
|
71
|
-
"merchant_account_id":
|
|
72
|
-
"account_id": account_id,
|
|
71
|
+
"merchant_account_id": account_id,
|
|
73
72
|
"secret_id": secret_id,
|
|
74
73
|
}
|
|
75
74
|
header = get_headers(self._LIST_ACCOUNT_STATUSES)
|
|
@@ -204,18 +203,16 @@ class MerchantCenterService:
|
|
|
204
203
|
service_response = response.json()
|
|
205
204
|
yield service_response["data"]["results"]
|
|
206
205
|
|
|
207
|
-
def get_account_accessibility(self, secret_id: str,
|
|
206
|
+
def get_account_accessibility(self, secret_id: str, account_id: str) -> bool:
|
|
208
207
|
"""
|
|
209
208
|
Gets account accessibility
|
|
210
209
|
:param secret_id: The ID of the secret in secret manager
|
|
211
|
-
:param merchant_account_id: The ID of the managing account. This must be a multi-client account.
|
|
212
210
|
:param account_id: The ID of the account.
|
|
213
211
|
:return: True if account has access
|
|
214
212
|
"""
|
|
215
213
|
body = {
|
|
216
214
|
"secret_id": secret_id,
|
|
217
|
-
"merchant_account_id":
|
|
218
|
-
"account_id": account_id
|
|
215
|
+
"merchant_account_id": account_id,
|
|
219
216
|
}
|
|
220
217
|
header = get_headers(self._GET_ACCOUNT_ACCESSIBILITY)
|
|
221
218
|
response = self.session.request(
|
|
@@ -242,11 +239,11 @@ class MerchantCenterService:
|
|
|
242
239
|
raise MerchantServiceException(response.content)
|
|
243
240
|
|
|
244
241
|
def attach_supplemental_feed_to_primary_feed(
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
242
|
+
self,
|
|
243
|
+
secret_id: str,
|
|
244
|
+
merchant_account_id: str,
|
|
245
|
+
primary_feed_id: str,
|
|
246
|
+
supplemental_feed_id: str
|
|
250
247
|
):
|
|
251
248
|
body = {
|
|
252
249
|
"secret_id": secret_id,
|
|
@@ -267,11 +264,11 @@ class MerchantCenterService:
|
|
|
267
264
|
raise MerchantServiceException(response.content)
|
|
268
265
|
|
|
269
266
|
def detach_supplemental_feed_from_primary_feed(
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
267
|
+
self,
|
|
268
|
+
secret_id: str,
|
|
269
|
+
merchant_account_id: str,
|
|
270
|
+
primary_feed_id: str,
|
|
271
|
+
supplemental_feed_id: str
|
|
275
272
|
):
|
|
276
273
|
body = {
|
|
277
274
|
"secret_id": secret_id,
|
|
@@ -311,7 +308,7 @@ class MerchantCenterService:
|
|
|
311
308
|
raise MerchantServiceException(response.content)
|
|
312
309
|
|
|
313
310
|
def create_supplemental_feed(
|
|
314
|
-
|
|
311
|
+
self, secret_id: str, merchant_account_id: str, display_name: str
|
|
315
312
|
) -> bool:
|
|
316
313
|
"""
|
|
317
314
|
Creates a supplemental feed
|
|
@@ -337,7 +334,7 @@ class MerchantCenterService:
|
|
|
337
334
|
raise MerchantServiceException(response.content)
|
|
338
335
|
|
|
339
336
|
def delete_supplemental_feed(
|
|
340
|
-
|
|
337
|
+
self, secret_id: str, merchant_account_id: str, feed_id: str
|
|
341
338
|
) -> bool:
|
|
342
339
|
"""
|
|
343
340
|
Deletes a supplemental feed by it id
|
|
@@ -363,7 +360,7 @@ class MerchantCenterService:
|
|
|
363
360
|
raise MerchantServiceException(response.content)
|
|
364
361
|
|
|
365
362
|
def batch_update_products_in_supplemental_feeds(
|
|
366
|
-
|
|
363
|
+
self, secret_id: str, merchant_account_id: str, products
|
|
367
364
|
) -> bool:
|
|
368
365
|
"""
|
|
369
366
|
Creates a batch for update of products via supplemental feeds
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{logos_sdk-0.0.25.dev36 → logos_sdk-0.0.25.dev37}/logos_sdk/services/MicrosoftAdvertising.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|