-
Notifications
You must be signed in to change notification settings - Fork 3.7k
/
sponsored_products.py
79 lines (57 loc) · 1.52 KB
/
sponsored_products.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#
from decimal import Decimal
from typing import Dict, List, Optional
from .common import CatalogModel, Targeting
class Adjustments(CatalogModel):
predicate: str
percentage: Decimal
class Bidding(CatalogModel):
strategy: str
adjustments: List[Adjustments]
class ProductCampaign(CatalogModel):
portfolioId: int
campaignId: Decimal
name: str
tags: Dict[str, str]
campaignType: str
targetingType: str
state: str
dailyBudget: Decimal
ruleBasedBudget: Dict[str, str]
startDate: str
endDate: str = None
premiumBidAdjustment: bool
bidding: Bidding
networks: str
class ProductAdGroups(CatalogModel):
adGroupId: Decimal
name: str
campaignId: Decimal
defaultBid: Decimal
state: str
class SuggestedBid(CatalogModel):
suggested: Decimal
rangeStart: Decimal
rangeEnd: Decimal
class ProductAdGroupBidRecommendations(CatalogModel):
adGroupId: Decimal
suggestedBid: Optional[SuggestedBid] = None
class SuggestedKeyword(CatalogModel):
keywordText: str
matchType: str
class ProductAdGroupSuggestedKeywords(CatalogModel):
adGroupId: Decimal
suggestedKeywords: List[SuggestedKeyword] = None
class ProductAd(CatalogModel):
adId: Decimal
campaignId: Decimal
adGroupId: Decimal
sku: str
asin: str
state: str
class ProductTargeting(Targeting):
campaignId: Decimal
expression: List[Dict[str, str]]
resolvedExpression: List[Dict[str, str]]