amazon-ads 0.4.0 → 0.5.0
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.
- checksums.yaml +4 -4
- data/lib/amazon_ads/apis/ad_associations.rb +6 -6
- data/lib/amazon_ads/apis/ad_extensions.rb +4 -4
- data/lib/amazon_ads/apis/ad_groups.rb +6 -6
- data/lib/amazon_ads/apis/ads.rb +6 -6
- data/lib/amazon_ads/apis/advertiser_accounts.rb +23 -0
- data/lib/amazon_ads/apis/brand_store_edition_publish_versions.rb +2 -2
- data/lib/amazon_ads/apis/brand_stores.rb +3 -3
- data/lib/amazon_ads/apis/campaign_forecasts.rb +2 -2
- data/lib/amazon_ads/apis/campaigns.rb +6 -6
- data/lib/amazon_ads/apis/commitment_spends.rb +9 -3
- data/lib/amazon_ads/apis/commitments.rb +45 -9
- data/lib/amazon_ads/apis/deal_preferences.rb +17 -0
- data/lib/amazon_ads/apis/geo_locations.rb +11 -0
- data/lib/amazon_ads/apis/location_indexes.rb +29 -0
- data/lib/amazon_ads/apis/manager_accounts.rb +23 -0
- data/lib/amazon_ads/apis/reserved_target_pricings.rb +11 -0
- data/lib/amazon_ads/apis/selling_accounts.rb +11 -0
- data/lib/amazon_ads/apis/supplier_ad_product_prices.rb +11 -0
- data/lib/amazon_ads/apis/supplier_ad_products.rb +11 -0
- data/lib/amazon_ads/apis/supplier_proposal_destinations.rb +11 -0
- data/lib/amazon_ads/apis/supplier_proposals.rb +23 -0
- data/lib/amazon_ads/apis/supplier_proposed_deal_forecasts.rb +11 -0
- data/lib/amazon_ads/apis/supplier_proposed_deal_historical_versions.rb +11 -0
- data/lib/amazon_ads/apis/supplier_proposed_deal_revisions.rb +17 -0
- data/lib/amazon_ads/apis/supplier_proposed_deals.rb +23 -0
- data/lib/amazon_ads/apis/supplier_publishers.rb +11 -0
- data/lib/amazon_ads/apis/supplier_target_items.rb +11 -0
- data/lib/amazon_ads/apis/targets.rb +9 -9
- data/lib/amazon_ads/version.rb +1 -1
- metadata +18 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ca37ac82a931b7caf155e83c72450a70b37b1e00ed1e161ff8df8707d1594940
|
|
4
|
+
data.tar.gz: 6595ca8f52d77efd69c38436bb4b8d0f78b27a8bd06c3e444e28cafd16dc8a5a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f974f8dfcd535e8c084a5a3c7d7e790f315d1190dfa5a42a15ed6aeced63d205e15545c9e580b9bafeaf025dc4de11bc3f0190ac961f7efac880e25a4ae4696b
|
|
7
|
+
data.tar.gz: 2bbd82c0a5375b827ea8411cf008fc9ad5ee11f7fd20c743da1ec830235fa1853081724c6a0d28d4e97d845f0a88a7ec81eab0462178058fa70e5266c72a2775
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
module AmazonAds
|
|
4
4
|
class AdAssociations < API
|
|
5
5
|
# Create Ad Association
|
|
6
|
-
#: (
|
|
7
|
-
def create_ad_association(ad_associations:
|
|
6
|
+
#: (ad_associations: Array[untyped]) -> HTTP::Response
|
|
7
|
+
def create_ad_association(ad_associations:)
|
|
8
8
|
request(:post, "/adsApi/v1/create/adAssociations", json: { "adAssociations" => ad_associations }.compact)
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
# Delete Ad Association
|
|
12
|
-
#: (
|
|
13
|
-
def delete_ad_association(ad_association_ids:
|
|
12
|
+
#: (ad_association_ids: Array[untyped]) -> HTTP::Response
|
|
13
|
+
def delete_ad_association(ad_association_ids:)
|
|
14
14
|
request(:post, "/adsApi/v1/delete/adAssociations", json: { "adAssociationIds" => ad_association_ids }.compact)
|
|
15
15
|
end
|
|
16
16
|
|
|
@@ -21,8 +21,8 @@ module AmazonAds
|
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
# Update Ad Association
|
|
24
|
-
#: (
|
|
25
|
-
def update_ad_association(ad_associations:
|
|
24
|
+
#: (ad_associations: Array[untyped]) -> HTTP::Response
|
|
25
|
+
def update_ad_association(ad_associations:)
|
|
26
26
|
request(:post, "/adsApi/v1/update/adAssociations", json: { "adAssociations" => ad_associations }.compact)
|
|
27
27
|
end
|
|
28
28
|
end
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
module AmazonAds
|
|
4
4
|
class AdExtensions < API
|
|
5
5
|
# Create ad extensions - API is in open beta
|
|
6
|
-
#: (
|
|
7
|
-
def create_ad_extension(ad_extensions:
|
|
6
|
+
#: (ad_extensions: Array[untyped]) -> HTTP::Response
|
|
7
|
+
def create_ad_extension(ad_extensions:)
|
|
8
8
|
request(:post, "/adsApi/v1/create/adExtensions", json: { "adExtensions" => ad_extensions }.compact)
|
|
9
9
|
end
|
|
10
10
|
|
|
@@ -15,8 +15,8 @@ module AmazonAds
|
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
# Update ad_extension - API is in open beta
|
|
18
|
-
#: (
|
|
19
|
-
def update_ad_extension(ad_extensions:
|
|
18
|
+
#: (ad_extensions: Array[untyped]) -> HTTP::Response
|
|
19
|
+
def update_ad_extension(ad_extensions:)
|
|
20
20
|
request(:post, "/adsApi/v1/update/adExtensions", json: { "adExtensions" => ad_extensions }.compact)
|
|
21
21
|
end
|
|
22
22
|
end
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
module AmazonAds
|
|
4
4
|
class AdGroups < API
|
|
5
5
|
# Create ad groups
|
|
6
|
-
#: (
|
|
7
|
-
def create_ad_group(ad_groups:
|
|
6
|
+
#: (ad_groups: Array[untyped]) -> HTTP::Response
|
|
7
|
+
def create_ad_group(ad_groups:)
|
|
8
8
|
request(:post, "/adsApi/v1/create/adGroups", json: { "adGroups" => ad_groups }.compact)
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
# Delete ad groups
|
|
12
|
-
#: (
|
|
13
|
-
def delete_ad_group(ad_group_ids:
|
|
12
|
+
#: (ad_group_ids: Array[untyped]) -> HTTP::Response
|
|
13
|
+
def delete_ad_group(ad_group_ids:)
|
|
14
14
|
request(:post, "/adsApi/v1/delete/adGroups", json: { "adGroupIds" => ad_group_ids }.compact)
|
|
15
15
|
end
|
|
16
16
|
|
|
@@ -21,8 +21,8 @@ module AmazonAds
|
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
# Update ad groups
|
|
24
|
-
#: (
|
|
25
|
-
def update_ad_group(ad_groups:
|
|
24
|
+
#: (ad_groups: Array[untyped]) -> HTTP::Response
|
|
25
|
+
def update_ad_group(ad_groups:)
|
|
26
26
|
request(:post, "/adsApi/v1/update/adGroups", json: { "adGroups" => ad_groups }.compact)
|
|
27
27
|
end
|
|
28
28
|
end
|
data/lib/amazon_ads/apis/ads.rb
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
module AmazonAds
|
|
4
4
|
class Ads < API
|
|
5
5
|
# Create ads
|
|
6
|
-
#: (
|
|
7
|
-
def create_ad(ads:
|
|
6
|
+
#: (ads: Array[untyped]) -> HTTP::Response
|
|
7
|
+
def create_ad(ads:)
|
|
8
8
|
request(:post, "/adsApi/v1/create/ads", json: { "ads" => ads }.compact)
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
# Delete ads
|
|
12
|
-
#: (
|
|
13
|
-
def delete_ad(ad_ids:
|
|
12
|
+
#: (ad_ids: Array[untyped]) -> HTTP::Response
|
|
13
|
+
def delete_ad(ad_ids:)
|
|
14
14
|
request(:post, "/adsApi/v1/delete/ads", json: { "adIds" => ad_ids }.compact)
|
|
15
15
|
end
|
|
16
16
|
|
|
@@ -21,8 +21,8 @@ module AmazonAds
|
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
# Update ads
|
|
24
|
-
#: (
|
|
25
|
-
def update_ad(ads:
|
|
24
|
+
#: (ads: Array[untyped]) -> HTTP::Response
|
|
25
|
+
def update_ad(ads:)
|
|
26
26
|
request(:post, "/adsApi/v1/update/ads", json: { "ads" => ads }.compact)
|
|
27
27
|
end
|
|
28
28
|
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module AmazonAds
|
|
4
|
+
class AdvertiserAccounts < API
|
|
5
|
+
# Create advertiser accounts
|
|
6
|
+
#: (advertiser_accounts: Array[untyped]) -> HTTP::Response
|
|
7
|
+
def create_advertiser_account(advertiser_accounts:)
|
|
8
|
+
request(:post, "/adsApi/v1/create/advertiserAccounts", json: { "advertiserAccounts" => advertiser_accounts }.compact)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# List advertiser accounts
|
|
12
|
+
#: (?advertiser_account_id_filter: untyped?, ?is_global_account_filter: untyped?, ?max_results: Integer?, ?next_token: String?) -> HTTP::Response
|
|
13
|
+
def query_advertiser_account(advertiser_account_id_filter: nil, is_global_account_filter: nil, max_results: nil, next_token: nil)
|
|
14
|
+
request(:post, "/adsApi/v1/query/advertiserAccounts", json: { "advertiserAccountIdFilter" => advertiser_account_id_filter, "isGlobalAccountFilter" => is_global_account_filter, "maxResults" => max_results, "nextToken" => next_token }.compact)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Update advertiser accounts
|
|
18
|
+
#: (advertiser_accounts: Array[untyped]) -> HTTP::Response
|
|
19
|
+
def update_advertiser_account(advertiser_accounts:)
|
|
20
|
+
request(:post, "/adsApi/v1/update/advertiserAccounts", json: { "advertiserAccounts" => advertiser_accounts }.compact)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -9,8 +9,8 @@ module AmazonAds
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
# Update store edition publish versions
|
|
12
|
-
#: (
|
|
13
|
-
def update_brand_store_edition_publish_version(brand_store_edition_publish_versions:
|
|
12
|
+
#: (brand_store_edition_publish_versions: Array[untyped]) -> HTTP::Response
|
|
13
|
+
def update_brand_store_edition_publish_version(brand_store_edition_publish_versions:)
|
|
14
14
|
request(:post, "/adsApi/v1/update/brandStoreEditionPublishVersions", json: { "brandStoreEditionPublishVersions" => brand_store_edition_publish_versions }.compact)
|
|
15
15
|
end
|
|
16
16
|
end
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
module AmazonAds
|
|
4
4
|
class BrandStores < API
|
|
5
5
|
# Query brand store content
|
|
6
|
-
#: (store_name_filter: untyped, ?max_results: Integer?, ?next_token: String
|
|
7
|
-
def query_brand_store(store_name_filter:, max_results: nil, next_token: nil
|
|
8
|
-
request(:post, "/adsApi/v1/query/brandStores", json: { "maxResults" => max_results, "nextToken" => next_token, "
|
|
6
|
+
#: (store_name_filter: untyped, ?max_results: Integer?, ?next_token: String?) -> HTTP::Response
|
|
7
|
+
def query_brand_store(store_name_filter:, max_results: nil, next_token: nil)
|
|
8
|
+
request(:post, "/adsApi/v1/query/brandStores", json: { "maxResults" => max_results, "nextToken" => next_token, "storeNameFilter" => store_name_filter }.compact)
|
|
9
9
|
end
|
|
10
10
|
end
|
|
11
11
|
end
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
module AmazonAds
|
|
4
4
|
class CampaignForecasts < API
|
|
5
5
|
# Retrieve campaign forecast
|
|
6
|
-
#: (
|
|
7
|
-
def dsp_retrieve_campaign_forecast(campaign_forecast_descriptions:
|
|
6
|
+
#: (campaign_forecast_descriptions: Array[untyped]) -> HTTP::Response
|
|
7
|
+
def dsp_retrieve_campaign_forecast(campaign_forecast_descriptions:)
|
|
8
8
|
request(:post, "/adsApi/v1/retrieve/campaignForecasts/dsp", json: { "campaignForecastDescriptions" => campaign_forecast_descriptions }.compact)
|
|
9
9
|
end
|
|
10
10
|
end
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
module AmazonAds
|
|
4
4
|
class Campaigns < API
|
|
5
5
|
# Create campaigns
|
|
6
|
-
#: (
|
|
7
|
-
def create_campaign(campaigns:
|
|
6
|
+
#: (campaigns: Array[untyped]) -> HTTP::Response
|
|
7
|
+
def create_campaign(campaigns:)
|
|
8
8
|
request(:post, "/adsApi/v1/create/campaigns", json: { "campaigns" => campaigns }.compact)
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
# Delete campaigns
|
|
12
|
-
#: (
|
|
13
|
-
def delete_campaign(campaign_ids:
|
|
12
|
+
#: (campaign_ids: Array[untyped]) -> HTTP::Response
|
|
13
|
+
def delete_campaign(campaign_ids:)
|
|
14
14
|
request(:post, "/adsApi/v1/delete/campaigns", json: { "campaignIds" => campaign_ids }.compact)
|
|
15
15
|
end
|
|
16
16
|
|
|
@@ -21,8 +21,8 @@ module AmazonAds
|
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
# Update campaign
|
|
24
|
-
#: (
|
|
25
|
-
def update_campaign(campaigns:
|
|
24
|
+
#: (campaigns: Array[untyped]) -> HTTP::Response
|
|
25
|
+
def update_campaign(campaigns:)
|
|
26
26
|
request(:post, "/adsApi/v1/update/campaigns", json: { "campaigns" => campaigns }.compact)
|
|
27
27
|
end
|
|
28
28
|
end
|
|
@@ -2,10 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
module AmazonAds
|
|
4
4
|
class CommitmentSpends < API
|
|
5
|
-
# Retrieve commitment spend
|
|
6
|
-
#: (
|
|
7
|
-
def dsp_retrieve_commitment_spend(commitment_ids:
|
|
5
|
+
# Retrieve commitment spend (Deprecated legacy ad-product path alias of RetrieveCommitmentSpend; prefer the ad-product-agnostic path.)
|
|
6
|
+
#: (commitment_ids: Array[untyped]) -> HTTP::Response
|
|
7
|
+
def dsp_retrieve_commitment_spend(commitment_ids:)
|
|
8
8
|
request(:post, "/adsApi/v1/retrieve/commitmentSpends/dsp", json: { "commitmentIds" => commitment_ids }.compact)
|
|
9
9
|
end
|
|
10
|
+
|
|
11
|
+
# Retrieve commitment spend
|
|
12
|
+
#: (commitment_ids: Array[untyped]) -> HTTP::Response
|
|
13
|
+
def retrieve_commitment_spend(commitment_ids:)
|
|
14
|
+
request(:post, "/adsApi/v1/retrieve/commitmentSpends", json: { "commitmentIds" => commitment_ids }.compact)
|
|
15
|
+
end
|
|
10
16
|
end
|
|
11
17
|
end
|
|
@@ -3,27 +3,63 @@
|
|
|
3
3
|
module AmazonAds
|
|
4
4
|
class Commitments < API
|
|
5
5
|
# Create commitments
|
|
6
|
-
#: (
|
|
7
|
-
def
|
|
6
|
+
#: (commitments: Array[untyped]) -> HTTP::Response
|
|
7
|
+
def create_commitment(commitments:)
|
|
8
|
+
request(:post, "/adsApi/v1/create/commitments", json: { "commitments" => commitments }.compact)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# Create commitments (Deprecated legacy ad-product path alias of CreateCommitment; prefer the ad-product-agnostic path.)
|
|
12
|
+
#: (commitments: Array[untyped]) -> HTTP::Response
|
|
13
|
+
def dsp_create_commitment(commitments:)
|
|
8
14
|
request(:post, "/adsApi/v1/create/commitments/dsp", json: { "commitments" => commitments }.compact)
|
|
9
15
|
end
|
|
10
16
|
|
|
11
|
-
# List commitments
|
|
17
|
+
# List commitments (Deprecated legacy ad-product path alias of ListCommitment; prefer the ad-product-agnostic path.)
|
|
12
18
|
#: (?next_token: String?, ?max_results: Integer?) -> HTTP::Response
|
|
13
19
|
def dsp_list_commitment(next_token: nil, max_results: nil)
|
|
14
20
|
request(:get, "/adsApi/v1/commitments/dsp", params: { "nextToken" => next_token, "maxResults" => max_results }.compact)
|
|
15
21
|
end
|
|
16
22
|
|
|
17
|
-
#
|
|
18
|
-
#: (?
|
|
19
|
-
def
|
|
23
|
+
# Query commitments with filters (Deprecated legacy ad-product path alias of QueryCommitment; prefer the ad-product-agnostic path.)
|
|
24
|
+
#: (?advertiser_ids_filter: untyped?, ?campaign_ids_filter: untyped?, ?commitment_id_filter: untyped?, ?commitment_name_filter: untyped?, ?deal_ids_filter: untyped?, ?max_results: Integer?, ?next_token: String?, ?spend_calculation_mode_filter: untyped?) -> HTTP::Response
|
|
25
|
+
def dsp_query_commitment(advertiser_ids_filter: nil, campaign_ids_filter: nil, commitment_id_filter: nil, commitment_name_filter: nil, deal_ids_filter: nil, max_results: nil, next_token: nil, spend_calculation_mode_filter: nil)
|
|
26
|
+
request(:post, "/adsApi/v1/query/commitments/dsp", json: { "advertiserIdsFilter" => advertiser_ids_filter, "campaignIdsFilter" => campaign_ids_filter, "commitmentIdFilter" => commitment_id_filter, "commitmentNameFilter" => commitment_name_filter, "dealIdsFilter" => deal_ids_filter, "maxResults" => max_results, "nextToken" => next_token, "spendCalculationModeFilter" => spend_calculation_mode_filter }.compact)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Get Commitments (Deprecated legacy ad-product path alias of RetrieveCommitment; prefer the ad-product-agnostic path.)
|
|
30
|
+
#: (commitment_ids: Array[untyped]) -> HTTP::Response
|
|
31
|
+
def dsp_retrieve_commitment(commitment_ids:)
|
|
20
32
|
request(:post, "/adsApi/v1/retrieve/commitments/dsp", json: { "commitmentIds" => commitment_ids }.compact)
|
|
21
33
|
end
|
|
22
34
|
|
|
23
|
-
# Update commitments
|
|
24
|
-
#: (
|
|
25
|
-
def dsp_update_commitment(commitments:
|
|
35
|
+
# Update commitments (Deprecated legacy ad-product path alias of UpdateCommitment; prefer the ad-product-agnostic path.)
|
|
36
|
+
#: (commitments: Array[untyped]) -> HTTP::Response
|
|
37
|
+
def dsp_update_commitment(commitments:)
|
|
26
38
|
request(:post, "/adsApi/v1/update/commitments/dsp", json: { "commitments" => commitments }.compact)
|
|
27
39
|
end
|
|
40
|
+
|
|
41
|
+
# List commitments
|
|
42
|
+
#: (?next_token: String?, ?max_results: Integer?) -> HTTP::Response
|
|
43
|
+
def list_commitment(next_token: nil, max_results: nil)
|
|
44
|
+
request(:get, "/adsApi/v1/commitments", params: { "nextToken" => next_token, "maxResults" => max_results }.compact)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Query commitments with filters
|
|
48
|
+
#: (?advertiser_ids_filter: untyped?, ?campaign_ids_filter: untyped?, ?commitment_id_filter: untyped?, ?commitment_name_filter: untyped?, ?deal_ids_filter: untyped?, ?max_results: Integer?, ?next_token: String?, ?spend_calculation_mode_filter: untyped?) -> HTTP::Response
|
|
49
|
+
def query_commitment(advertiser_ids_filter: nil, campaign_ids_filter: nil, commitment_id_filter: nil, commitment_name_filter: nil, deal_ids_filter: nil, max_results: nil, next_token: nil, spend_calculation_mode_filter: nil)
|
|
50
|
+
request(:post, "/adsApi/v1/query/commitments", json: { "advertiserIdsFilter" => advertiser_ids_filter, "campaignIdsFilter" => campaign_ids_filter, "commitmentIdFilter" => commitment_id_filter, "commitmentNameFilter" => commitment_name_filter, "dealIdsFilter" => deal_ids_filter, "maxResults" => max_results, "nextToken" => next_token, "spendCalculationModeFilter" => spend_calculation_mode_filter }.compact)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Get Commitments
|
|
54
|
+
#: (commitment_ids: Array[untyped]) -> HTTP::Response
|
|
55
|
+
def retrieve_commitment(commitment_ids:)
|
|
56
|
+
request(:post, "/adsApi/v1/retrieve/commitments", json: { "commitmentIds" => commitment_ids }.compact)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Update commitments
|
|
60
|
+
#: (commitments: Array[untyped]) -> HTTP::Response
|
|
61
|
+
def update_commitment(commitments:)
|
|
62
|
+
request(:post, "/adsApi/v1/update/commitments", json: { "commitments" => commitments }.compact)
|
|
63
|
+
end
|
|
28
64
|
end
|
|
29
65
|
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module AmazonAds
|
|
4
|
+
class DealPreferences < API
|
|
5
|
+
# Creates one or more deal preferences for a DSP advertiser account.
|
|
6
|
+
#: (deal_preferences: Array[untyped]) -> HTTP::Response
|
|
7
|
+
def create_deal_preference(deal_preferences:)
|
|
8
|
+
request(:post, "/adsApi/v1/create/dealPreferences", json: { "dealPreferences" => deal_preferences }.compact)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# Lists deal preferences for a DSP advertiser account.
|
|
12
|
+
#: (?next_token: String?, ?max_results: Integer?) -> HTTP::Response
|
|
13
|
+
def list_deal_preference(next_token: nil, max_results: nil)
|
|
14
|
+
request(:get, "/adsApi/v1/dealPreferences", params: { "nextToken" => next_token, "maxResults" => max_results }.compact)
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module AmazonAds
|
|
4
|
+
class GeoLocations < API
|
|
5
|
+
# Create geo location targeting definitions. Supports smart locations, which target users based on their percentile rank within a Smart Location Index, and radius locations, which target users within a specified distance of an address or coordinate. Note: radius locations are currently in beta.
|
|
6
|
+
#: (geo_locations: Array[untyped]) -> HTTP::Response
|
|
7
|
+
def create_geo_location(geo_locations:)
|
|
8
|
+
request(:post, "/adsApi/v1/create/geoLocations", json: { "geoLocations" => geo_locations }.compact)
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module AmazonAds
|
|
4
|
+
class LocationIndexes < API
|
|
5
|
+
# Create a Smart Location Index. A Smart Location Index is a named dataset that maps postal codes to index values representing relative audience quality or sales potential for a given advertiser. Index data is processed asynchronously; the index status will transition from PENDING to ENABLED once processing is complete.
|
|
6
|
+
#: (location_indexes: Array[untyped]) -> HTTP::Response
|
|
7
|
+
def create_location_index(location_indexes:)
|
|
8
|
+
request(:post, "/adsApi/v1/create/locationIndexes", json: { "locationIndexes" => location_indexes }.compact)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# List all Smart Location Indexes for the authenticated advertiser. Returns a paginated collection of indexes including their current processing status. Use the nextToken from the response to retrieve subsequent pages.
|
|
12
|
+
#: (?next_token: String?, ?max_results: Integer?) -> HTTP::Response
|
|
13
|
+
def list_location_index(next_token: nil, max_results: nil)
|
|
14
|
+
request(:get, "/adsApi/v1/locationIndexes", params: { "nextToken" => next_token, "maxResults" => max_results }.compact)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Retrieve one or more Smart Location Indexes by ID. Returns the current metadata and processing status for each requested index. An index with status PENDING is still being processed and is not yet available for use in smart location targeting.
|
|
18
|
+
#: (index_ids: Array[untyped]) -> HTTP::Response
|
|
19
|
+
def retrieve_location_index(index_ids:)
|
|
20
|
+
request(:post, "/adsApi/v1/retrieve/locationIndexes", json: { "indexIds" => index_ids }.compact)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Update the data for an existing Smart Location Index. Replaces the index's postal code values with the provided dataset. The update is processed asynchronously; the index status will return to PENDING until the new data has been fully processed.
|
|
24
|
+
#: (location_indexes: Array[untyped]) -> HTTP::Response
|
|
25
|
+
def update_location_index(location_indexes:)
|
|
26
|
+
request(:post, "/adsApi/v1/update/locationIndexes", json: { "locationIndexes" => location_indexes }.compact)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module AmazonAds
|
|
4
|
+
class ManagerAccounts < API
|
|
5
|
+
# Create manager accounts
|
|
6
|
+
#: (manager_accounts: Array[untyped]) -> HTTP::Response
|
|
7
|
+
def create_manager_account(manager_accounts:)
|
|
8
|
+
request(:post, "/adsApi/v1/create/managerAccounts", json: { "managerAccounts" => manager_accounts }.compact)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# List manager accounts
|
|
12
|
+
#: (?manager_account_id_filter: untyped?, ?max_results: Integer?, ?next_token: String?) -> HTTP::Response
|
|
13
|
+
def query_manager_account(manager_account_id_filter: nil, max_results: nil, next_token: nil)
|
|
14
|
+
request(:post, "/adsApi/v1/query/managerAccounts", json: { "managerAccountIdFilter" => manager_account_id_filter, "maxResults" => max_results, "nextToken" => next_token }.compact)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Update manager accounts
|
|
18
|
+
#: (manager_accounts: Array[untyped]) -> HTTP::Response
|
|
19
|
+
def update_manager_account(manager_accounts:)
|
|
20
|
+
request(:post, "/adsApi/v1/update/managerAccounts", json: { "managerAccounts" => manager_accounts }.compact)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module AmazonAds
|
|
4
|
+
class ReservedTargetPricings < API
|
|
5
|
+
# Create reservedTarget pricing
|
|
6
|
+
#: (reserved_target_pricings: Array[untyped]) -> HTTP::Response
|
|
7
|
+
def sb_ads_apiv1_create_reserved_target_pricing(reserved_target_pricings:)
|
|
8
|
+
request(:post, "/adsApi/v1/create/reservedTargetPricings/sb", json: { "reservedTargetPricings" => reserved_target_pricings }.compact)
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module AmazonAds
|
|
4
|
+
class SellingAccounts < API
|
|
5
|
+
# List selling accounts
|
|
6
|
+
#: (?max_results: Integer?, ?next_token: String?, ?selling_account_link_token_filter: untyped?, ?selling_program_filter: untyped?) -> HTTP::Response
|
|
7
|
+
def query_selling_account(max_results: nil, next_token: nil, selling_account_link_token_filter: nil, selling_program_filter: nil)
|
|
8
|
+
request(:post, "/adsApi/v1/query/sellingAccounts", json: { "maxResults" => max_results, "nextToken" => next_token, "sellingAccountLinkTokenFilter" => selling_account_link_token_filter, "sellingProgramFilter" => selling_program_filter }.compact)
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module AmazonAds
|
|
4
|
+
class SupplierAdProductPrices < API
|
|
5
|
+
# Create supplier ad product price
|
|
6
|
+
#: (supplier_ad_product_prices: Array[untyped]) -> HTTP::Response
|
|
7
|
+
def create_supplier_ad_product_price(supplier_ad_product_prices:)
|
|
8
|
+
request(:post, "/adsApi/v1/create/supplierAdProductPrices", json: { "supplierAdProductPrices" => supplier_ad_product_prices }.compact)
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module AmazonAds
|
|
4
|
+
class SupplierAdProducts < API
|
|
5
|
+
# Query supplier ad products
|
|
6
|
+
#: (ad_product_filter: untyped, ?country_filter: untyped?, ?deal_type_filter: untyped?, ?inventory_type_filter: untyped?, ?max_date_time_filter: untyped?, ?max_results: Integer?, ?min_date_time_filter: untyped?, ?name_filter: untyped?, ?next_token: String?, ?sort: Array[untyped]?, ?supplier_ad_product_id_filter: untyped?, ?supplier_proposal_destination_id_filter: untyped?, ?supplier_publisher_id_filter: untyped?) -> HTTP::Response
|
|
7
|
+
def query_supplier_ad_product(ad_product_filter:, country_filter: nil, deal_type_filter: nil, inventory_type_filter: nil, max_date_time_filter: nil, max_results: nil, min_date_time_filter: nil, name_filter: nil, next_token: nil, sort: nil, supplier_ad_product_id_filter: nil, supplier_proposal_destination_id_filter: nil, supplier_publisher_id_filter: nil)
|
|
8
|
+
request(:post, "/adsApi/v1/query/supplierAdProducts", json: { "adProductFilter" => ad_product_filter, "countryFilter" => country_filter, "dealTypeFilter" => deal_type_filter, "inventoryTypeFilter" => inventory_type_filter, "maxDateTimeFilter" => max_date_time_filter, "maxResults" => max_results, "minDateTimeFilter" => min_date_time_filter, "nameFilter" => name_filter, "nextToken" => next_token, "sort" => sort, "supplierAdProductIdFilter" => supplier_ad_product_id_filter, "supplierProposalDestinationIdFilter" => supplier_proposal_destination_id_filter, "supplierPublisherIdFilter" => supplier_publisher_id_filter }.compact)
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module AmazonAds
|
|
4
|
+
class SupplierProposalDestinations < API
|
|
5
|
+
# Query supplier proposal destinations
|
|
6
|
+
#: (?max_results: Integer?, ?next_token: String?, ?sort: Array[untyped]?, ?supplier_proposal_destination_id_filter: untyped?, ?supplier_proposal_destination_name_filter: untyped?) -> HTTP::Response
|
|
7
|
+
def query_supplier_proposal_destination(max_results: nil, next_token: nil, sort: nil, supplier_proposal_destination_id_filter: nil, supplier_proposal_destination_name_filter: nil)
|
|
8
|
+
request(:post, "/adsApi/v1/query/supplierProposalDestinations", json: { "maxResults" => max_results, "nextToken" => next_token, "sort" => sort, "supplierProposalDestinationIdFilter" => supplier_proposal_destination_id_filter, "supplierProposalDestinationNameFilter" => supplier_proposal_destination_name_filter }.compact)
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module AmazonAds
|
|
4
|
+
class SupplierProposals < API
|
|
5
|
+
# Create supplier proposal
|
|
6
|
+
#: (supplier_proposals: Array[untyped]) -> HTTP::Response
|
|
7
|
+
def create_supplier_proposal(supplier_proposals:)
|
|
8
|
+
request(:post, "/adsApi/v1/create/supplierProposals", json: { "supplierProposals" => supplier_proposals }.compact)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# Query supplier proposal
|
|
12
|
+
#: (ad_product_filter: untyped, advertiser_account_id_filter: untyped, ?countries_filter: untyped?, ?end_date_time_filter: untyped?, ?max_results: Integer?, ?name_filter: untyped?, ?next_token: String?, ?start_date_time_filter: untyped?, ?status_filter: untyped?, ?supplier_proposal_destination_id_filter: untyped?, ?supplier_proposal_id_filter: untyped?) -> HTTP::Response
|
|
13
|
+
def query_supplier_proposal(ad_product_filter:, advertiser_account_id_filter:, countries_filter: nil, end_date_time_filter: nil, max_results: nil, name_filter: nil, next_token: nil, start_date_time_filter: nil, status_filter: nil, supplier_proposal_destination_id_filter: nil, supplier_proposal_id_filter: nil)
|
|
14
|
+
request(:post, "/adsApi/v1/query/supplierProposals", json: { "adProductFilter" => ad_product_filter, "advertiserAccountIdFilter" => advertiser_account_id_filter, "countriesFilter" => countries_filter, "endDateTimeFilter" => end_date_time_filter, "maxResults" => max_results, "nameFilter" => name_filter, "nextToken" => next_token, "startDateTimeFilter" => start_date_time_filter, "statusFilter" => status_filter, "supplierProposalDestinationIdFilter" => supplier_proposal_destination_id_filter, "supplierProposalIdFilter" => supplier_proposal_id_filter }.compact)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Update supplier proposal
|
|
18
|
+
#: (supplier_proposals: Array[untyped]) -> HTTP::Response
|
|
19
|
+
def update_supplier_proposal(supplier_proposals:)
|
|
20
|
+
request(:post, "/adsApi/v1/update/supplierProposals", json: { "supplierProposals" => supplier_proposals }.compact)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module AmazonAds
|
|
4
|
+
class SupplierProposedDealForecasts < API
|
|
5
|
+
# Create supplier proposed deal forecast
|
|
6
|
+
#: (supplier_proposed_deal_forecasts: Array[untyped]) -> HTTP::Response
|
|
7
|
+
def create_supplier_proposed_deal_forecast(supplier_proposed_deal_forecasts:)
|
|
8
|
+
request(:post, "/adsApi/v1/create/supplierProposedDealForecasts", json: { "supplierProposedDealForecasts" => supplier_proposed_deal_forecasts }.compact)
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module AmazonAds
|
|
4
|
+
class SupplierProposedDealHistoricalVersions < API
|
|
5
|
+
# Query supplier proposed deal historical versions
|
|
6
|
+
#: (ad_product_filter: untyped, supplier_proposal_destination_id_filter: untyped, supplier_proposed_deal_id_filter: untyped, ?max_results: Integer?, ?next_token: String?) -> HTTP::Response
|
|
7
|
+
def query_supplier_proposed_deal_historical_version(ad_product_filter:, supplier_proposal_destination_id_filter:, supplier_proposed_deal_id_filter:, max_results: nil, next_token: nil)
|
|
8
|
+
request(:post, "/adsApi/v1/query/supplierProposedDealHistoricalVersions", json: { "adProductFilter" => ad_product_filter, "maxResults" => max_results, "nextToken" => next_token, "supplierProposalDestinationIdFilter" => supplier_proposal_destination_id_filter, "supplierProposedDealIdFilter" => supplier_proposed_deal_id_filter }.compact)
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module AmazonAds
|
|
4
|
+
class SupplierProposedDealRevisions < API
|
|
5
|
+
# Create supplier proposed deal revision
|
|
6
|
+
#: (supplier_proposed_deal_revisions: Array[untyped]) -> HTTP::Response
|
|
7
|
+
def create_supplier_proposed_deal_revision(supplier_proposed_deal_revisions:)
|
|
8
|
+
request(:post, "/adsApi/v1/create/supplierProposedDealRevisions", json: { "supplierProposedDealRevisions" => supplier_proposed_deal_revisions }.compact)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# Update supplier proposed deal revision
|
|
12
|
+
#: (supplier_proposed_deal_revisions: Array[untyped]) -> HTTP::Response
|
|
13
|
+
def update_supplier_proposed_deal_revision(supplier_proposed_deal_revisions:)
|
|
14
|
+
request(:post, "/adsApi/v1/update/supplierProposedDealRevisions", json: { "supplierProposedDealRevisions" => supplier_proposed_deal_revisions }.compact)
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module AmazonAds
|
|
4
|
+
class SupplierProposedDeals < API
|
|
5
|
+
# Create supplier proposed deal
|
|
6
|
+
#: (supplier_proposed_deals: Array[untyped]) -> HTTP::Response
|
|
7
|
+
def create_supplier_proposed_deal(supplier_proposed_deals:)
|
|
8
|
+
request(:post, "/adsApi/v1/create/supplierProposedDeals", json: { "supplierProposedDeals" => supplier_proposed_deals }.compact)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# Query supplier proposed deals
|
|
12
|
+
#: (ad_product_filter: untyped, advertiser_account_id_filter: untyped, ?advertising_deal_id_filter: untyped?, ?deal_name_filter: untyped?, ?deal_status_filter: untyped?, ?deal_type_filter: untyped?, ?end_date_time_filter: untyped?, ?external_deal_id_filter: untyped?, ?max_results: Integer?, ?next_token: String?, ?start_date_time_filter: untyped?, ?supplier_proposal_destination_id_filter: untyped?, ?supplier_proposal_id_filter: untyped?, ?supplier_proposed_deal_id_filter: untyped?, ?value_filter: untyped?) -> HTTP::Response
|
|
13
|
+
def query_supplier_proposed_deal(ad_product_filter:, advertiser_account_id_filter:, advertising_deal_id_filter: nil, deal_name_filter: nil, deal_status_filter: nil, deal_type_filter: nil, end_date_time_filter: nil, external_deal_id_filter: nil, max_results: nil, next_token: nil, start_date_time_filter: nil, supplier_proposal_destination_id_filter: nil, supplier_proposal_id_filter: nil, supplier_proposed_deal_id_filter: nil, value_filter: nil)
|
|
14
|
+
request(:post, "/adsApi/v1/query/supplierProposedDeals", json: { "adProductFilter" => ad_product_filter, "advertiserAccountIdFilter" => advertiser_account_id_filter, "advertisingDealIdFilter" => advertising_deal_id_filter, "dealNameFilter" => deal_name_filter, "dealStatusFilter" => deal_status_filter, "dealTypeFilter" => deal_type_filter, "endDateTimeFilter" => end_date_time_filter, "externalDealIdFilter" => external_deal_id_filter, "maxResults" => max_results, "nextToken" => next_token, "startDateTimeFilter" => start_date_time_filter, "supplierProposalDestinationIdFilter" => supplier_proposal_destination_id_filter, "supplierProposalIdFilter" => supplier_proposal_id_filter, "supplierProposedDealIdFilter" => supplier_proposed_deal_id_filter, "valueFilter" => value_filter }.compact)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Update supplier proposed deal
|
|
18
|
+
#: (supplier_proposed_deals: Array[untyped]) -> HTTP::Response
|
|
19
|
+
def update_supplier_proposed_deal(supplier_proposed_deals:)
|
|
20
|
+
request(:post, "/adsApi/v1/update/supplierProposedDeals", json: { "supplierProposedDeals" => supplier_proposed_deals }.compact)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module AmazonAds
|
|
4
|
+
class SupplierPublishers < API
|
|
5
|
+
# Query supplier publishers
|
|
6
|
+
#: (supplier_publisher_type_filter: untyped, ?max_results: Integer?, ?name_filter: untyped?, ?next_token: String?, ?sort: Array[untyped]?) -> HTTP::Response
|
|
7
|
+
def query_supplier_publisher(supplier_publisher_type_filter:, max_results: nil, name_filter: nil, next_token: nil, sort: nil)
|
|
8
|
+
request(:post, "/adsApi/v1/query/supplierPublishers", json: { "maxResults" => max_results, "nameFilter" => name_filter, "nextToken" => next_token, "sort" => sort, "supplierPublisherTypeFilter" => supplier_publisher_type_filter }.compact)
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module AmazonAds
|
|
4
|
+
class SupplierTargetItems < API
|
|
5
|
+
# Fetch supplier target items
|
|
6
|
+
#: (ad_product_filter: untyped, supplier_ad_product_id_filter: untyped, supplier_target_type_filter: untyped, ?category_filter: untyped?, ?countries_filter: untyped?, ?id_filter: untyped?, ?max_results: Integer?, ?name_filter: untyped?, ?next_token: String?, ?sort: Array[untyped]?, ?supplier_proposal_destination_id_filter: untyped?) -> HTTP::Response
|
|
7
|
+
def query_supplier_target_item(ad_product_filter:, supplier_ad_product_id_filter:, supplier_target_type_filter:, category_filter: nil, countries_filter: nil, id_filter: nil, max_results: nil, name_filter: nil, next_token: nil, sort: nil, supplier_proposal_destination_id_filter: nil)
|
|
8
|
+
request(:post, "/adsApi/v1/query/supplierTargetItems", json: { "adProductFilter" => ad_product_filter, "categoryFilter" => category_filter, "countriesFilter" => countries_filter, "idFilter" => id_filter, "maxResults" => max_results, "nameFilter" => name_filter, "nextToken" => next_token, "sort" => sort, "supplierAdProductIdFilter" => supplier_ad_product_id_filter, "supplierProposalDestinationIdFilter" => supplier_proposal_destination_id_filter, "supplierTargetTypeFilter" => supplier_target_type_filter }.compact)
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -3,26 +3,26 @@
|
|
|
3
3
|
module AmazonAds
|
|
4
4
|
class Targets < API
|
|
5
5
|
# Create target
|
|
6
|
-
#: (
|
|
7
|
-
def create_target(targets:
|
|
6
|
+
#: (targets: Array[untyped]) -> HTTP::Response
|
|
7
|
+
def create_target(targets:)
|
|
8
8
|
request(:post, "/adsApi/v1/create/targets", json: { "targets" => targets }.compact)
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
# Delete target
|
|
12
|
-
#: (
|
|
13
|
-
def delete_target(target_ids:
|
|
12
|
+
#: (target_ids: Array[untyped]) -> HTTP::Response
|
|
13
|
+
def delete_target(target_ids:)
|
|
14
14
|
request(:post, "/adsApi/v1/delete/targets", json: { "targetIds" => target_ids }.compact)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
# List target
|
|
18
|
-
#: (ad_product_filter: untyped, ?ad_group_id_filter: untyped?, ?campaign_id_filter: untyped?, ?keyword_filter: untyped?, ?marketplace_scope_filter: untyped?, ?match_type_filter: untyped?, ?max_results: Integer?, ?native_language_locale_filter: untyped?, ?negative_filter: untyped?, ?next_token: String?, ?product_id_filter: untyped?, ?state_filter: untyped?, ?target_id_filter: untyped?, ?target_type_filter: untyped?) -> HTTP::Response
|
|
19
|
-
def query_target(ad_product_filter:, ad_group_id_filter: nil, campaign_id_filter: nil, keyword_filter: nil, marketplace_scope_filter: nil, match_type_filter: nil, max_results: nil, native_language_locale_filter: nil, negative_filter: nil, next_token: nil, product_id_filter: nil, state_filter: nil, target_id_filter: nil, target_type_filter: nil)
|
|
20
|
-
request(:post, "/adsApi/v1/query/targets", json: { "adGroupIdFilter" => ad_group_id_filter, "adProductFilter" => ad_product_filter, "campaignIdFilter" => campaign_id_filter, "keywordFilter" => keyword_filter, "marketplaceScopeFilter" => marketplace_scope_filter, "matchTypeFilter" => match_type_filter, "maxResults" => max_results, "nativeLanguageLocaleFilter" => native_language_locale_filter, "negativeFilter" => negative_filter, "nextToken" => next_token, "productIdFilter" => product_id_filter, "stateFilter" => state_filter, "targetIdFilter" => target_id_filter, "targetTypeFilter" => target_type_filter }.compact)
|
|
18
|
+
#: (ad_product_filter: untyped, ?ad_group_id_filter: untyped?, ?campaign_id_filter: untyped?, ?inventory_source_id_filter: untyped?, ?inventory_source_type_filter: untyped?, ?keyword_filter: untyped?, ?marketplace_scope_filter: untyped?, ?match_type_filter: untyped?, ?max_results: Integer?, ?native_language_locale_filter: untyped?, ?negative_filter: untyped?, ?next_token: String?, ?product_id_filter: untyped?, ?state_filter: untyped?, ?target_id_filter: untyped?, ?target_type_filter: untyped?) -> HTTP::Response
|
|
19
|
+
def query_target(ad_product_filter:, ad_group_id_filter: nil, campaign_id_filter: nil, inventory_source_id_filter: nil, inventory_source_type_filter: nil, keyword_filter: nil, marketplace_scope_filter: nil, match_type_filter: nil, max_results: nil, native_language_locale_filter: nil, negative_filter: nil, next_token: nil, product_id_filter: nil, state_filter: nil, target_id_filter: nil, target_type_filter: nil)
|
|
20
|
+
request(:post, "/adsApi/v1/query/targets", json: { "adGroupIdFilter" => ad_group_id_filter, "adProductFilter" => ad_product_filter, "campaignIdFilter" => campaign_id_filter, "inventorySourceIdFilter" => inventory_source_id_filter, "inventorySourceTypeFilter" => inventory_source_type_filter, "keywordFilter" => keyword_filter, "marketplaceScopeFilter" => marketplace_scope_filter, "matchTypeFilter" => match_type_filter, "maxResults" => max_results, "nativeLanguageLocaleFilter" => native_language_locale_filter, "negativeFilter" => negative_filter, "nextToken" => next_token, "productIdFilter" => product_id_filter, "stateFilter" => state_filter, "targetIdFilter" => target_id_filter, "targetTypeFilter" => target_type_filter }.compact)
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
# Update target
|
|
24
|
-
#: (
|
|
25
|
-
def update_target(targets:
|
|
24
|
+
#: (targets: Array[untyped]) -> HTTP::Response
|
|
25
|
+
def update_target(targets:)
|
|
26
26
|
request(:post, "/adsApi/v1/update/targets", json: { "targets" => targets }.compact)
|
|
27
27
|
end
|
|
28
28
|
end
|
data/lib/amazon_ads/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: amazon-ads
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Hakan Ensari
|
|
@@ -65,6 +65,7 @@ files:
|
|
|
65
65
|
- lib/amazon_ads/apis/ad_extensions.rb
|
|
66
66
|
- lib/amazon_ads/apis/ad_groups.rb
|
|
67
67
|
- lib/amazon_ads/apis/ads.rb
|
|
68
|
+
- lib/amazon_ads/apis/advertiser_accounts.rb
|
|
68
69
|
- lib/amazon_ads/apis/advertising_deal_targets.rb
|
|
69
70
|
- lib/amazon_ads/apis/advertising_deals.rb
|
|
70
71
|
- lib/amazon_ads/apis/brand_store_edition_publish_versions.rb
|
|
@@ -76,12 +77,28 @@ files:
|
|
|
76
77
|
- lib/amazon_ads/apis/campaigns.rb
|
|
77
78
|
- lib/amazon_ads/apis/commitment_spends.rb
|
|
78
79
|
- lib/amazon_ads/apis/commitments.rb
|
|
80
|
+
- lib/amazon_ads/apis/deal_preferences.rb
|
|
81
|
+
- lib/amazon_ads/apis/geo_locations.rb
|
|
79
82
|
- lib/amazon_ads/apis/keyword_reservation_validations.rb
|
|
83
|
+
- lib/amazon_ads/apis/location_indexes.rb
|
|
84
|
+
- lib/amazon_ads/apis/manager_accounts.rb
|
|
80
85
|
- lib/amazon_ads/apis/marketing_stream.rb
|
|
81
86
|
- lib/amazon_ads/apis/profiles.rb
|
|
82
87
|
- lib/amazon_ads/apis/recommendation_types.rb
|
|
83
88
|
- lib/amazon_ads/apis/recommendations.rb
|
|
84
89
|
- lib/amazon_ads/apis/reporting.rb
|
|
90
|
+
- lib/amazon_ads/apis/reserved_target_pricings.rb
|
|
91
|
+
- lib/amazon_ads/apis/selling_accounts.rb
|
|
92
|
+
- lib/amazon_ads/apis/supplier_ad_product_prices.rb
|
|
93
|
+
- lib/amazon_ads/apis/supplier_ad_products.rb
|
|
94
|
+
- lib/amazon_ads/apis/supplier_proposal_destinations.rb
|
|
95
|
+
- lib/amazon_ads/apis/supplier_proposals.rb
|
|
96
|
+
- lib/amazon_ads/apis/supplier_proposed_deal_forecasts.rb
|
|
97
|
+
- lib/amazon_ads/apis/supplier_proposed_deal_historical_versions.rb
|
|
98
|
+
- lib/amazon_ads/apis/supplier_proposed_deal_revisions.rb
|
|
99
|
+
- lib/amazon_ads/apis/supplier_proposed_deals.rb
|
|
100
|
+
- lib/amazon_ads/apis/supplier_publishers.rb
|
|
101
|
+
- lib/amazon_ads/apis/supplier_target_items.rb
|
|
85
102
|
- lib/amazon_ads/apis/targets.rb
|
|
86
103
|
- lib/amazon_ads/error.rb
|
|
87
104
|
- lib/amazon_ads/lwa.rb
|