amazon-ads 0.2.0 → 0.3.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/README.md +4 -17
- data/lib/amazon_ads/api.rb +8 -6
- data/lib/amazon_ads/apis/ad_associations.rb +1 -2
- data/lib/amazon_ads/apis/ad_extensions.rb +1 -2
- data/lib/amazon_ads/apis/ad_groups.rb +1 -2
- data/lib/amazon_ads/apis/ads.rb +1 -2
- data/lib/amazon_ads/apis/advertising_deal_targets.rb +1 -2
- data/lib/amazon_ads/apis/advertising_deals.rb +1 -2
- data/lib/amazon_ads/apis/brand_store_edition_publish_versions.rb +1 -2
- data/lib/amazon_ads/apis/brand_store_editions.rb +0 -1
- data/lib/amazon_ads/apis/brand_store_pages.rb +1 -2
- data/lib/amazon_ads/apis/brand_stores.rb +1 -2
- data/lib/amazon_ads/apis/branded_keywords_pricings.rb +0 -1
- data/lib/amazon_ads/apis/campaign_forecasts.rb +0 -1
- data/lib/amazon_ads/apis/campaigns.rb +1 -2
- data/lib/amazon_ads/apis/commitment_spends.rb +0 -1
- data/lib/amazon_ads/apis/commitments.rb +0 -1
- data/lib/amazon_ads/apis/keyword_reservation_validations.rb +0 -1
- data/lib/amazon_ads/apis/marketing_stream.rb +4 -5
- data/lib/amazon_ads/apis/profiles.rb +0 -1
- data/lib/amazon_ads/apis/recommendation_types.rb +0 -1
- data/lib/amazon_ads/apis/recommendations.rb +0 -1
- data/lib/amazon_ads/apis/reporting.rb +0 -1
- data/lib/amazon_ads/apis/targets.rb +1 -2
- data/lib/amazon_ads/lwa.rb +3 -7
- data/lib/amazon_ads/version.rb +1 -1
- data/lib/amazon_ads.rb +28 -32
- metadata +6 -33
- data/sig/generated/amazon_ads/api.rbs +0 -43
- data/sig/generated/amazon_ads/apis/ad_associations.rbs +0 -21
- data/sig/generated/amazon_ads/apis/ad_extensions.rbs +0 -17
- data/sig/generated/amazon_ads/apis/ad_groups.rbs +0 -21
- data/sig/generated/amazon_ads/apis/ads.rbs +0 -21
- data/sig/generated/amazon_ads/apis/advertising_deal_targets.rbs +0 -17
- data/sig/generated/amazon_ads/apis/advertising_deals.rbs +0 -21
- data/sig/generated/amazon_ads/apis/brand_store_edition_publish_versions.rbs +0 -13
- data/sig/generated/amazon_ads/apis/brand_store_editions.rbs +0 -9
- data/sig/generated/amazon_ads/apis/brand_store_pages.rbs +0 -9
- data/sig/generated/amazon_ads/apis/brand_stores.rbs +0 -9
- data/sig/generated/amazon_ads/apis/branded_keywords_pricings.rbs +0 -9
- data/sig/generated/amazon_ads/apis/campaign_forecasts.rbs +0 -9
- data/sig/generated/amazon_ads/apis/campaigns.rbs +0 -21
- data/sig/generated/amazon_ads/apis/commitment_spends.rbs +0 -9
- data/sig/generated/amazon_ads/apis/commitments.rbs +0 -21
- data/sig/generated/amazon_ads/apis/keyword_reservation_validations.rbs +0 -9
- data/sig/generated/amazon_ads/apis/marketing_stream.rbs +0 -56
- data/sig/generated/amazon_ads/apis/profiles.rbs +0 -22
- data/sig/generated/amazon_ads/apis/recommendation_types.rbs +0 -9
- data/sig/generated/amazon_ads/apis/recommendations.rbs +0 -9
- data/sig/generated/amazon_ads/apis/reporting.rbs +0 -23
- data/sig/generated/amazon_ads/apis/sponsored_products.rbs +0 -52
- data/sig/generated/amazon_ads/apis/streams.rbs +0 -40
- data/sig/generated/amazon_ads/apis/targets.rbs +0 -21
- data/sig/generated/amazon_ads/lwa.rbs +0 -37
- data/sig/generated/amazon_ads.rbs +0 -30
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 01b624dd728e5d50d55c9d199671a1730ce61c260210d0d13c2173241edc297e
|
|
4
|
+
data.tar.gz: 6a8cc4aa441d12b1c12905fbec987935c82807b2495a520e0d304830c36ceadc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8afd9e71ec2e8006cf99de7f66bc202cbc8589fbe9809a591d42a7948ed032dfad3d7b1d2d9c536548643de93a15824e6fa94724424e2d0c76c5ace11610387e
|
|
7
|
+
data.tar.gz: 6cca951e838bf718be509b0f0882ef54c4e6ee8d2955d25982f0ab9d6a595e08535b4f3ed63f17b84103fef1a3f813c23d282e6e34f253afbbbe688bbcaab061
|
data/README.md
CHANGED
|
@@ -42,13 +42,13 @@ Make requests:
|
|
|
42
42
|
|
|
43
43
|
```ruby
|
|
44
44
|
# List advertising profiles
|
|
45
|
-
profiles = AmazonAds::Profiles.new(region:
|
|
45
|
+
profiles = AmazonAds::Profiles.new(region: "NA", access_token:)
|
|
46
46
|
profiles.list_profiles
|
|
47
47
|
|
|
48
48
|
# List campaigns under a profile
|
|
49
49
|
campaigns = AmazonAds::Campaigns.new(
|
|
50
|
-
region:
|
|
51
|
-
access_token
|
|
50
|
+
region: "NA",
|
|
51
|
+
access_token:,
|
|
52
52
|
profile_id: "123456789",
|
|
53
53
|
)
|
|
54
54
|
campaigns.list_campaigns
|
|
@@ -56,17 +56,4 @@ campaigns.list_campaigns
|
|
|
56
56
|
|
|
57
57
|
## Development
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
bin/setup # Install dependencies
|
|
61
|
-
rake test # Run tests
|
|
62
|
-
rake rubocop # Lint
|
|
63
|
-
rake steep # Type check
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
## Contributing
|
|
67
|
-
|
|
68
|
-
Bug reports and pull requests are welcome on [GitHub](https://github.com/lineofflight/amazon-ads-ruby).
|
|
69
|
-
|
|
70
|
-
## License
|
|
71
|
-
|
|
72
|
-
MIT
|
|
59
|
+
See [AGENTS.md](AGENTS.md).
|
data/lib/amazon_ads/api.rb
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# rbs_inline: enabled
|
|
4
|
-
|
|
5
3
|
require "http"
|
|
6
4
|
|
|
7
5
|
module AmazonAds
|
|
@@ -62,11 +60,11 @@ module AmazonAds
|
|
|
62
60
|
|
|
63
61
|
private
|
|
64
62
|
|
|
65
|
-
#: (
|
|
63
|
+
#: (HTTP::verb, String, **untyped) -> HTTP::Response
|
|
66
64
|
def request(method, path, **options)
|
|
67
65
|
url = endpoint
|
|
68
66
|
url.path = path
|
|
69
|
-
http.request(method, url, **options)
|
|
67
|
+
http.request(method, url.to_s, **options)
|
|
70
68
|
end
|
|
71
69
|
|
|
72
70
|
#: () -> Hash[String, String]
|
|
@@ -77,8 +75,12 @@ module AmazonAds
|
|
|
77
75
|
"Content-Type" => "application/json",
|
|
78
76
|
"Accept" => "application/json",
|
|
79
77
|
}
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
if (scope = profile_id)
|
|
79
|
+
headers["Amazon-Advertising-API-Scope"] = scope
|
|
80
|
+
end
|
|
81
|
+
if (account = account_id)
|
|
82
|
+
headers["Amazon-Ads-AccountId"] = account
|
|
83
|
+
end
|
|
82
84
|
|
|
83
85
|
headers
|
|
84
86
|
end
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
# rbs_inline: enabled
|
|
3
2
|
|
|
4
3
|
module AmazonAds
|
|
5
4
|
class AdAssociations < API
|
|
@@ -16,7 +15,7 @@ module AmazonAds
|
|
|
16
15
|
end
|
|
17
16
|
|
|
18
17
|
# Query Ad Association
|
|
19
|
-
#: (?ad_association_id_filter:
|
|
18
|
+
#: (?ad_association_id_filter: untyped?, ?ad_group_id_filter: untyped?, ?ad_id_filter: untyped?, ?max_results: Integer?, ?next_token: String?) -> HTTP::Response
|
|
20
19
|
def query_ad_association(ad_association_id_filter: nil, ad_group_id_filter: nil, ad_id_filter: nil, max_results: nil, next_token: nil)
|
|
21
20
|
request(:post, "/adsApi/v1/query/adAssociations", json: { "adAssociationIdFilter" => ad_association_id_filter, "adGroupIdFilter" => ad_group_id_filter, "adIdFilter" => ad_id_filter, "maxResults" => max_results, "nextToken" => next_token }.compact)
|
|
22
21
|
end
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
# rbs_inline: enabled
|
|
3
2
|
|
|
4
3
|
module AmazonAds
|
|
5
4
|
class AdExtensions < API
|
|
@@ -10,7 +9,7 @@ module AmazonAds
|
|
|
10
9
|
end
|
|
11
10
|
|
|
12
11
|
# Query ad_extension - API is in open beta
|
|
13
|
-
#: (?ad_extension_id_filter:
|
|
12
|
+
#: (?ad_extension_id_filter: untyped?, ?ad_extension_status_filter: untyped?, ?ad_extension_type_filter: untyped?, ?ad_group_id_filter: untyped?, ?ad_id_filter: untyped?, ?ad_product_filter: untyped?, ?max_results: Integer?, ?next_token: String?, ?state_filter: untyped?) -> HTTP::Response
|
|
14
13
|
def query_ad_extension(ad_extension_id_filter: nil, ad_extension_status_filter: nil, ad_extension_type_filter: nil, ad_group_id_filter: nil, ad_id_filter: nil, ad_product_filter: nil, max_results: nil, next_token: nil, state_filter: nil)
|
|
15
14
|
request(:post, "/adsApi/v1/query/adExtensions", json: { "adExtensionIdFilter" => ad_extension_id_filter, "adExtensionStatusFilter" => ad_extension_status_filter, "adExtensionTypeFilter" => ad_extension_type_filter, "adGroupIdFilter" => ad_group_id_filter, "adIdFilter" => ad_id_filter, "adProductFilter" => ad_product_filter, "maxResults" => max_results, "nextToken" => next_token, "stateFilter" => state_filter }.compact)
|
|
16
15
|
end
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
# rbs_inline: enabled
|
|
3
2
|
|
|
4
3
|
module AmazonAds
|
|
5
4
|
class AdGroups < API
|
|
@@ -16,7 +15,7 @@ module AmazonAds
|
|
|
16
15
|
end
|
|
17
16
|
|
|
18
17
|
# List ad groups
|
|
19
|
-
#: (ad_product_filter:
|
|
18
|
+
#: (ad_product_filter: untyped, ?ad_group_id_filter: untyped?, ?campaign_id_filter: untyped?, ?marketplace_scope_filter: untyped?, ?max_results: Integer?, ?name_filter: untyped?, ?next_token: String?, ?state_filter: untyped?) -> HTTP::Response
|
|
20
19
|
def query_ad_group(ad_product_filter:, ad_group_id_filter: nil, campaign_id_filter: nil, marketplace_scope_filter: nil, max_results: nil, name_filter: nil, next_token: nil, state_filter: nil)
|
|
21
20
|
request(:post, "/adsApi/v1/query/adGroups", json: { "adGroupIdFilter" => ad_group_id_filter, "adProductFilter" => ad_product_filter, "campaignIdFilter" => campaign_id_filter, "marketplaceScopeFilter" => marketplace_scope_filter, "maxResults" => max_results, "nameFilter" => name_filter, "nextToken" => next_token, "stateFilter" => state_filter }.compact)
|
|
22
21
|
end
|
data/lib/amazon_ads/apis/ads.rb
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
# rbs_inline: enabled
|
|
3
2
|
|
|
4
3
|
module AmazonAds
|
|
5
4
|
class Ads < API
|
|
@@ -16,7 +15,7 @@ module AmazonAds
|
|
|
16
15
|
end
|
|
17
16
|
|
|
18
17
|
# List ads
|
|
19
|
-
#: (ad_product_filter:
|
|
18
|
+
#: (ad_product_filter: untyped, ?ad_group_id_filter: untyped?, ?ad_id_filter: untyped?, ?campaign_id_filter: untyped?, ?marketplace_scope_filter: untyped?, ?max_results: Integer?, ?name_filter: untyped?, ?next_token: String?, ?state_filter: untyped?) -> HTTP::Response
|
|
20
19
|
def query_ad(ad_product_filter:, ad_group_id_filter: nil, ad_id_filter: nil, campaign_id_filter: nil, marketplace_scope_filter: nil, max_results: nil, name_filter: nil, next_token: nil, state_filter: nil)
|
|
21
20
|
request(:post, "/adsApi/v1/query/ads", json: { "adGroupIdFilter" => ad_group_id_filter, "adIdFilter" => ad_id_filter, "adProductFilter" => ad_product_filter, "campaignIdFilter" => campaign_id_filter, "marketplaceScopeFilter" => marketplace_scope_filter, "maxResults" => max_results, "nameFilter" => name_filter, "nextToken" => next_token, "stateFilter" => state_filter }.compact)
|
|
22
21
|
end
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
# rbs_inline: enabled
|
|
3
2
|
|
|
4
3
|
module AmazonAds
|
|
5
4
|
class AdvertisingDealTargets < API
|
|
@@ -16,7 +15,7 @@ module AmazonAds
|
|
|
16
15
|
end
|
|
17
16
|
|
|
18
17
|
# Query advertisingDealTarget
|
|
19
|
-
#: (advertising_deal_id_filter:
|
|
18
|
+
#: (advertising_deal_id_filter: untyped, ?max_results: Integer?, ?next_token: String?) -> HTTP::Response
|
|
20
19
|
def sb_query_advertising_deal_target(advertising_deal_id_filter:, max_results: nil, next_token: nil)
|
|
21
20
|
request(:post, "/adsApi/v1/query/advertisingDealTargets/sb", json: { "advertisingDealIdFilter" => advertising_deal_id_filter, "maxResults" => max_results, "nextToken" => next_token }.compact)
|
|
22
21
|
end
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
# rbs_inline: enabled
|
|
3
2
|
|
|
4
3
|
module AmazonAds
|
|
5
4
|
class AdvertisingDeals < API
|
|
@@ -16,7 +15,7 @@ module AmazonAds
|
|
|
16
15
|
end
|
|
17
16
|
|
|
18
17
|
# Query advertisingDeal
|
|
19
|
-
#: (?advertising_deal_id_filter:
|
|
18
|
+
#: (?advertising_deal_id_filter: untyped?, ?max_results: Integer?, ?name_filter: untyped?, ?next_token: String?) -> HTTP::Response
|
|
20
19
|
def sb_query_advertising_deal(advertising_deal_id_filter: nil, max_results: nil, name_filter: nil, next_token: nil)
|
|
21
20
|
request(:post, "/adsApi/v1/query/advertisingDeals/sb", json: { "advertisingDealIdFilter" => advertising_deal_id_filter, "maxResults" => max_results, "nameFilter" => name_filter, "nextToken" => next_token }.compact)
|
|
22
21
|
end
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
# rbs_inline: enabled
|
|
3
2
|
|
|
4
3
|
module AmazonAds
|
|
5
4
|
class BrandStoreEditionPublishVersions < API
|
|
6
5
|
# Query store edition publish versions
|
|
7
|
-
#: (edition_id_filter:
|
|
6
|
+
#: (edition_id_filter: untyped, publish_status_filter: untyped, store_id_filter: untyped, ?max_results: Integer?, ?next_token: String?) -> HTTP::Response
|
|
8
7
|
def query_brand_store_edition_publish_version(edition_id_filter:, publish_status_filter:, store_id_filter:, max_results: nil, next_token: nil)
|
|
9
8
|
request(:post, "/adsApi/v1/query/brandStoreEditionPublishVersions", json: { "editionIdFilter" => edition_id_filter, "maxResults" => max_results, "nextToken" => next_token, "publishStatusFilter" => publish_status_filter, "storeIdFilter" => store_id_filter }.compact)
|
|
10
9
|
end
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
# rbs_inline: enabled
|
|
3
2
|
|
|
4
3
|
module AmazonAds
|
|
5
4
|
class BrandStorePages < API
|
|
6
5
|
# Retrieve brand store page content
|
|
7
|
-
#: (edition_id_filter:
|
|
6
|
+
#: (edition_id_filter: untyped, page_id_filter: untyped, store_id_filter: untyped, ?max_results: Integer?, ?next_token: String?, ?store_edition_publish_id_filter: untyped?) -> HTTP::Response
|
|
8
7
|
def query_brand_store_page(edition_id_filter:, page_id_filter:, store_id_filter:, max_results: nil, next_token: nil, store_edition_publish_id_filter: nil)
|
|
9
8
|
request(:post, "/adsApi/v1/query/brandStorePages", json: { "editionIdFilter" => edition_id_filter, "maxResults" => max_results, "nextToken" => next_token, "pageIdFilter" => page_id_filter, "storeEditionPublishIdFilter" => store_edition_publish_id_filter, "storeIdFilter" => store_id_filter }.compact)
|
|
10
9
|
end
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
# rbs_inline: enabled
|
|
3
2
|
|
|
4
3
|
module AmazonAds
|
|
5
4
|
class BrandStores < API
|
|
6
5
|
# Query brand store content
|
|
7
|
-
#: (store_name_filter:
|
|
6
|
+
#: (store_name_filter: untyped, ?max_results: Integer?, ?next_token: String?, ?sort: Array[untyped]?) -> HTTP::Response
|
|
8
7
|
def query_brand_store(store_name_filter:, max_results: nil, next_token: nil, sort: nil)
|
|
9
8
|
request(:post, "/adsApi/v1/query/brandStores", json: { "maxResults" => max_results, "nextToken" => next_token, "sort" => sort, "storeNameFilter" => store_name_filter }.compact)
|
|
10
9
|
end
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
# rbs_inline: enabled
|
|
3
2
|
|
|
4
3
|
module AmazonAds
|
|
5
4
|
class Campaigns < API
|
|
@@ -16,7 +15,7 @@ module AmazonAds
|
|
|
16
15
|
end
|
|
17
16
|
|
|
18
17
|
# Query campaign
|
|
19
|
-
#: (ad_product_filter:
|
|
18
|
+
#: (ad_product_filter: untyped, ?campaign_id_filter: untyped?, ?goal_filter: untyped?, ?marketplace_scope_filter: untyped?, ?max_results: Integer?, ?name_filter: untyped?, ?next_token: String?, ?portfolio_id_filter: untyped?, ?state_filter: untyped?) -> HTTP::Response
|
|
20
19
|
def query_campaign(ad_product_filter:, campaign_id_filter: nil, goal_filter: nil, marketplace_scope_filter: nil, max_results: nil, name_filter: nil, next_token: nil, portfolio_id_filter: nil, state_filter: nil)
|
|
21
20
|
request(:post, "/adsApi/v1/query/campaigns", json: { "adProductFilter" => ad_product_filter, "campaignIdFilter" => campaign_id_filter, "goalFilter" => goal_filter, "marketplaceScopeFilter" => marketplace_scope_filter, "maxResults" => max_results, "nameFilter" => name_filter, "nextToken" => next_token, "portfolioIdFilter" => portfolio_id_filter, "stateFilter" => state_filter }.compact)
|
|
22
21
|
end
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
# rbs_inline: enabled
|
|
3
2
|
|
|
4
3
|
module AmazonAds
|
|
5
4
|
# Amazon Marketing Stream
|
|
@@ -9,7 +8,7 @@ module AmazonAds
|
|
|
9
8
|
# @rbs data_set_id: String -- Identifier of data set, callers can be subscribed to. Please refer to https://advertising.amazon.com/API/docs/en-us/amazon-marketing-stream/data-guide for the list of all data sets.
|
|
10
9
|
# @rbs destination_arn: String -- AWS ARN of the destination endpoint associated with the subscription. Supported destination types: - SQS
|
|
11
10
|
# @rbs notes: String -- Additional details associated with the subscription
|
|
12
|
-
#: (client_request_token: String, data_set_id: String, ?destination:
|
|
11
|
+
#: (client_request_token: String, data_set_id: String, ?destination: untyped?, ?destination_arn: String?, ?notes: String?) -> HTTP::Response
|
|
13
12
|
def create_dsp_stream_subscription(client_request_token:, data_set_id:, destination: nil, destination_arn: nil, notes: nil)
|
|
14
13
|
request(:post, "/dsp/streams/subscriptions", json: { "clientRequestToken" => client_request_token, "dataSetId" => data_set_id, "destination" => destination, "destinationArn" => destination_arn, "notes" => notes }.compact, headers: { "Content-Type" => "application/vnd.amazonmarketingstreamsubscriptions.v1+json" })
|
|
15
14
|
end
|
|
@@ -19,7 +18,7 @@ module AmazonAds
|
|
|
19
18
|
# @rbs data_set_id: String -- Identifier of data set, callers can be subscribed to. Please refer to https://advertising.amazon.com/API/docs/en-us/amazon-marketing-stream/data-guide for the list of all data sets.
|
|
20
19
|
# @rbs destination_arn: String -- AWS ARN of the destination endpoint associated with the subscription. Supported destination types: - SQS
|
|
21
20
|
# @rbs notes: String -- Additional details associated with the subscription
|
|
22
|
-
#: (client_request_token: String, data_set_id: String, ?destination:
|
|
21
|
+
#: (client_request_token: String, data_set_id: String, ?destination: untyped?, ?destination_arn: String?, ?notes: String?) -> HTTP::Response
|
|
23
22
|
def create_stream_subscription(client_request_token:, data_set_id:, destination: nil, destination_arn: nil, notes: nil)
|
|
24
23
|
request(:post, "/streams/subscriptions", json: { "clientRequestToken" => client_request_token, "dataSetId" => data_set_id, "destination" => destination, "destinationArn" => destination_arn, "notes" => notes }.compact, headers: { "Content-Type" => "application/vnd.amazonmarketingstreamsubscriptions.v1+json" })
|
|
25
24
|
end
|
|
@@ -57,7 +56,7 @@ module AmazonAds
|
|
|
57
56
|
# Update an existing subscription Note: trailing slash in request uri is not allowed
|
|
58
57
|
# @rbs subscription_id: String -- Unique subscription identifier
|
|
59
58
|
# @rbs notes: String -- Additional details associated with the subscription
|
|
60
|
-
#: (String, ?notes: String?, ?status:
|
|
59
|
+
#: (String, ?notes: String?, ?status: untyped?) -> HTTP::Response
|
|
61
60
|
def update_dsp_stream_subscription(subscription_id, notes: nil, status: nil)
|
|
62
61
|
request(:put, "/dsp/streams/subscriptions/#{subscription_id}", json: { "notes" => notes, "status" => status }.compact, headers: { "Content-Type" => "application/vnd.amazonmarketingstreamsubscriptions.v1+json" })
|
|
63
62
|
end
|
|
@@ -65,7 +64,7 @@ module AmazonAds
|
|
|
65
64
|
# Update an existing subscription Note: trailing slash in request uri is not allowed
|
|
66
65
|
# @rbs subscription_id: String -- Unique subscription identifier
|
|
67
66
|
# @rbs notes: String -- Additional details associated with the subscription
|
|
68
|
-
#: (String, ?notes: String?, ?status:
|
|
67
|
+
#: (String, ?notes: String?, ?status: untyped?) -> HTTP::Response
|
|
69
68
|
def update_stream_subscription(subscription_id, notes: nil, status: nil)
|
|
70
69
|
request(:put, "/streams/subscriptions/#{subscription_id}", json: { "notes" => notes, "status" => status }.compact, headers: { "Content-Type" => "application/vnd.amazonmarketingstreamsubscriptions.v1+json" })
|
|
71
70
|
end
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
# rbs_inline: enabled
|
|
3
2
|
|
|
4
3
|
module AmazonAds
|
|
5
4
|
class Targets < API
|
|
@@ -16,7 +15,7 @@ module AmazonAds
|
|
|
16
15
|
end
|
|
17
16
|
|
|
18
17
|
# List target
|
|
19
|
-
#: (ad_product_filter:
|
|
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
|
|
20
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)
|
|
21
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)
|
|
22
21
|
end
|
data/lib/amazon_ads/lwa.rb
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# rbs_inline: enabled
|
|
4
|
-
|
|
5
3
|
require "http"
|
|
6
4
|
|
|
7
5
|
module AmazonAds
|
|
@@ -14,11 +12,9 @@ module AmazonAds
|
|
|
14
12
|
# The OAuth refresh token
|
|
15
13
|
attr_reader :refresh_token #: String
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
new(...).request
|
|
21
|
-
end
|
|
15
|
+
#: (refresh_token: String, ?http: untyped) -> Hash[String, untyped]
|
|
16
|
+
def self.request(...)
|
|
17
|
+
new(...).request
|
|
22
18
|
end
|
|
23
19
|
|
|
24
20
|
#: (refresh_token: String, ?http: untyped) -> void
|
data/lib/amazon_ads/version.rb
CHANGED
data/lib/amazon_ads.rb
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# rbs_inline: enabled
|
|
4
|
-
|
|
5
3
|
require "zeitwerk"
|
|
6
4
|
|
|
7
5
|
loader = Zeitwerk::Loader.for_gem
|
|
@@ -13,38 +11,36 @@ loader.setup
|
|
|
13
11
|
# Amazon Ads API client for Ruby
|
|
14
12
|
module AmazonAds
|
|
15
13
|
class << self
|
|
16
|
-
# Returns the client ID
|
|
17
|
-
# Falls back to the `AMAZON_ADS_CLIENT_ID` env var
|
|
18
|
-
#: () -> String?
|
|
19
|
-
def client_id
|
|
20
|
-
@client_id || ENV["AMAZON_ADS_CLIENT_ID"]
|
|
21
|
-
end
|
|
22
|
-
|
|
23
14
|
# Sets the client ID
|
|
24
|
-
|
|
25
|
-
attr_writer :client_id
|
|
26
|
-
|
|
27
|
-
# Returns the client ID or raises
|
|
28
|
-
#: () -> String
|
|
29
|
-
def client_id!
|
|
30
|
-
client_id or raise ArgumentError, "client id is required"
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
# Returns the client secret
|
|
34
|
-
# Falls back to the `AMAZON_ADS_CLIENT_SECRET` env var
|
|
35
|
-
#: () -> String?
|
|
36
|
-
def client_secret
|
|
37
|
-
@client_secret || ENV["AMAZON_ADS_CLIENT_SECRET"]
|
|
38
|
-
end
|
|
15
|
+
attr_writer :client_id #: String?
|
|
39
16
|
|
|
40
17
|
# Sets the client secret
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
18
|
+
attr_writer :client_secret #: String?
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# Returns the client ID
|
|
22
|
+
# Falls back to the `AMAZON_ADS_CLIENT_ID` env var
|
|
23
|
+
#: () -> String?
|
|
24
|
+
def self.client_id
|
|
25
|
+
@client_id || ENV["AMAZON_ADS_CLIENT_ID"]
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns the client ID or raises
|
|
29
|
+
#: () -> String
|
|
30
|
+
def self.client_id!
|
|
31
|
+
client_id or raise ArgumentError, "client id is required"
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Returns the client secret
|
|
35
|
+
# Falls back to the `AMAZON_ADS_CLIENT_SECRET` env var
|
|
36
|
+
#: () -> String?
|
|
37
|
+
def self.client_secret
|
|
38
|
+
@client_secret || ENV["AMAZON_ADS_CLIENT_SECRET"]
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns the client secret or raises
|
|
42
|
+
#: () -> String
|
|
43
|
+
def self.client_secret!
|
|
44
|
+
client_secret or raise ArgumentError, "client secret is required"
|
|
49
45
|
end
|
|
50
46
|
end
|
metadata
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: amazon-ads
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Hakan Ensari
|
|
8
|
-
bindir:
|
|
8
|
+
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
@@ -29,14 +29,14 @@ dependencies:
|
|
|
29
29
|
requirements:
|
|
30
30
|
- - "~>"
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: '
|
|
32
|
+
version: '6.0'
|
|
33
33
|
type: :runtime
|
|
34
34
|
prerelease: false
|
|
35
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
36
36
|
requirements:
|
|
37
37
|
- - "~>"
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: '
|
|
39
|
+
version: '6.0'
|
|
40
40
|
- !ruby/object:Gem::Dependency
|
|
41
41
|
name: zeitwerk
|
|
42
42
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -85,33 +85,6 @@ files:
|
|
|
85
85
|
- lib/amazon_ads/apis/targets.rb
|
|
86
86
|
- lib/amazon_ads/lwa.rb
|
|
87
87
|
- lib/amazon_ads/version.rb
|
|
88
|
-
- sig/generated/amazon_ads.rbs
|
|
89
|
-
- sig/generated/amazon_ads/api.rbs
|
|
90
|
-
- sig/generated/amazon_ads/apis/ad_associations.rbs
|
|
91
|
-
- sig/generated/amazon_ads/apis/ad_extensions.rbs
|
|
92
|
-
- sig/generated/amazon_ads/apis/ad_groups.rbs
|
|
93
|
-
- sig/generated/amazon_ads/apis/ads.rbs
|
|
94
|
-
- sig/generated/amazon_ads/apis/advertising_deal_targets.rbs
|
|
95
|
-
- sig/generated/amazon_ads/apis/advertising_deals.rbs
|
|
96
|
-
- sig/generated/amazon_ads/apis/brand_store_edition_publish_versions.rbs
|
|
97
|
-
- sig/generated/amazon_ads/apis/brand_store_editions.rbs
|
|
98
|
-
- sig/generated/amazon_ads/apis/brand_store_pages.rbs
|
|
99
|
-
- sig/generated/amazon_ads/apis/brand_stores.rbs
|
|
100
|
-
- sig/generated/amazon_ads/apis/branded_keywords_pricings.rbs
|
|
101
|
-
- sig/generated/amazon_ads/apis/campaign_forecasts.rbs
|
|
102
|
-
- sig/generated/amazon_ads/apis/campaigns.rbs
|
|
103
|
-
- sig/generated/amazon_ads/apis/commitment_spends.rbs
|
|
104
|
-
- sig/generated/amazon_ads/apis/commitments.rbs
|
|
105
|
-
- sig/generated/amazon_ads/apis/keyword_reservation_validations.rbs
|
|
106
|
-
- sig/generated/amazon_ads/apis/marketing_stream.rbs
|
|
107
|
-
- sig/generated/amazon_ads/apis/profiles.rbs
|
|
108
|
-
- sig/generated/amazon_ads/apis/recommendation_types.rbs
|
|
109
|
-
- sig/generated/amazon_ads/apis/recommendations.rbs
|
|
110
|
-
- sig/generated/amazon_ads/apis/reporting.rbs
|
|
111
|
-
- sig/generated/amazon_ads/apis/sponsored_products.rbs
|
|
112
|
-
- sig/generated/amazon_ads/apis/streams.rbs
|
|
113
|
-
- sig/generated/amazon_ads/apis/targets.rbs
|
|
114
|
-
- sig/generated/amazon_ads/lwa.rbs
|
|
115
88
|
homepage: https://github.com/lineofflight/amazon-ads-ruby
|
|
116
89
|
licenses:
|
|
117
90
|
- MIT
|
|
@@ -127,14 +100,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
127
100
|
requirements:
|
|
128
101
|
- - ">="
|
|
129
102
|
- !ruby/object:Gem::Version
|
|
130
|
-
version: 3.3
|
|
103
|
+
version: '3.3'
|
|
131
104
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
105
|
requirements:
|
|
133
106
|
- - ">="
|
|
134
107
|
- !ruby/object:Gem::Version
|
|
135
108
|
version: '0'
|
|
136
109
|
requirements: []
|
|
137
|
-
rubygems_version: 4.0.
|
|
110
|
+
rubygems_version: 4.0.16
|
|
138
111
|
specification_version: 4
|
|
139
112
|
summary: Amazon Ads API client for Ruby
|
|
140
113
|
test_files: []
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
# Generated from lib/amazon_ads/api.rb with RBS::Inline
|
|
2
|
-
|
|
3
|
-
module AmazonAds
|
|
4
|
-
# Base class for Amazon Ads API endpoints
|
|
5
|
-
class API
|
|
6
|
-
ENDPOINTS: untyped
|
|
7
|
-
|
|
8
|
-
# API endpoint region
|
|
9
|
-
attr_reader region: Symbol
|
|
10
|
-
|
|
11
|
-
# LWA access token
|
|
12
|
-
attr_reader access_token: String
|
|
13
|
-
|
|
14
|
-
# Advertiser profile, scopes requests to a marketplace
|
|
15
|
-
attr_reader profile_id: String?
|
|
16
|
-
|
|
17
|
-
# Advertiser account
|
|
18
|
-
attr_reader account_id: String?
|
|
19
|
-
|
|
20
|
-
# Number of retries when throttled (default: 0)
|
|
21
|
-
attr_reader retries: Integer
|
|
22
|
-
|
|
23
|
-
# : (region: Symbol | String, access_token: String, ?profile_id: String?, ?account_id: String?, ?retries: Integer, ?http: untyped) -> void
|
|
24
|
-
def initialize: (region: Symbol | String, access_token: String, ?profile_id: String?, ?account_id: String?, ?retries: Integer, ?http: untyped) -> void
|
|
25
|
-
|
|
26
|
-
# : () -> URI::HTTPS
|
|
27
|
-
def endpoint: () -> URI::HTTPS
|
|
28
|
-
|
|
29
|
-
# : () -> HTTP::Client
|
|
30
|
-
def http: () -> HTTP::Client
|
|
31
|
-
|
|
32
|
-
private
|
|
33
|
-
|
|
34
|
-
# : (Symbol, String, **untyped) -> HTTP::Response
|
|
35
|
-
def request: (Symbol, String, **untyped) -> HTTP::Response
|
|
36
|
-
|
|
37
|
-
# : () -> Hash[String, String]
|
|
38
|
-
def default_headers: () -> Hash[String, String]
|
|
39
|
-
|
|
40
|
-
# : () -> String
|
|
41
|
-
def client_id: () -> String
|
|
42
|
-
end
|
|
43
|
-
end
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Generated from lib/amazon_ads/apis/ad_associations.rb with RBS::Inline
|
|
2
|
-
|
|
3
|
-
module AmazonAds
|
|
4
|
-
class AdAssociations < API
|
|
5
|
-
# Create Ad Association
|
|
6
|
-
# : (?ad_associations: Array[untyped]?) -> HTTP::Response
|
|
7
|
-
def create_ad_association: (?ad_associations: Array[untyped]?) -> HTTP::Response
|
|
8
|
-
|
|
9
|
-
# Delete Ad Association
|
|
10
|
-
# : (?ad_association_ids: Array[untyped]?) -> HTTP::Response
|
|
11
|
-
def delete_ad_association: (?ad_association_ids: Array[untyped]?) -> HTTP::Response
|
|
12
|
-
|
|
13
|
-
# Query Ad Association
|
|
14
|
-
# : (?ad_association_id_filter: String?, ?ad_group_id_filter: String?, ?ad_id_filter: String?, ?max_results: Integer?, ?next_token: String?) -> HTTP::Response
|
|
15
|
-
def query_ad_association: (?ad_association_id_filter: String?, ?ad_group_id_filter: String?, ?ad_id_filter: String?, ?max_results: Integer?, ?next_token: String?) -> HTTP::Response
|
|
16
|
-
|
|
17
|
-
# Update Ad Association
|
|
18
|
-
# : (?ad_associations: Array[untyped]?) -> HTTP::Response
|
|
19
|
-
def update_ad_association: (?ad_associations: Array[untyped]?) -> HTTP::Response
|
|
20
|
-
end
|
|
21
|
-
end
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# Generated from lib/amazon_ads/apis/ad_extensions.rb with RBS::Inline
|
|
2
|
-
|
|
3
|
-
module AmazonAds
|
|
4
|
-
class AdExtensions < API
|
|
5
|
-
# Create ad extensions - API is in open beta
|
|
6
|
-
# : (?ad_extensions: Array[untyped]?) -> HTTP::Response
|
|
7
|
-
def create_ad_extension: (?ad_extensions: Array[untyped]?) -> HTTP::Response
|
|
8
|
-
|
|
9
|
-
# Query ad_extension - API is in open beta
|
|
10
|
-
# : (?ad_extension_id_filter: String?, ?ad_extension_status_filter: String?, ?ad_extension_type_filter: String?, ?ad_group_id_filter: String?, ?ad_id_filter: String?, ?ad_product_filter: String?, ?max_results: Integer?, ?next_token: String?, ?state_filter: String?) -> HTTP::Response
|
|
11
|
-
def query_ad_extension: (?ad_extension_id_filter: String?, ?ad_extension_status_filter: String?, ?ad_extension_type_filter: String?, ?ad_group_id_filter: String?, ?ad_id_filter: String?, ?ad_product_filter: String?, ?max_results: Integer?, ?next_token: String?, ?state_filter: String?) -> HTTP::Response
|
|
12
|
-
|
|
13
|
-
# Update ad_extension - API is in open beta
|
|
14
|
-
# : (?ad_extensions: Array[untyped]?) -> HTTP::Response
|
|
15
|
-
def update_ad_extension: (?ad_extensions: Array[untyped]?) -> HTTP::Response
|
|
16
|
-
end
|
|
17
|
-
end
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Generated from lib/amazon_ads/apis/ad_groups.rb with RBS::Inline
|
|
2
|
-
|
|
3
|
-
module AmazonAds
|
|
4
|
-
class AdGroups < API
|
|
5
|
-
# Create ad groups
|
|
6
|
-
# : (?ad_groups: Array[untyped]?) -> HTTP::Response
|
|
7
|
-
def create_ad_group: (?ad_groups: Array[untyped]?) -> HTTP::Response
|
|
8
|
-
|
|
9
|
-
# Delete ad groups
|
|
10
|
-
# : (?ad_group_ids: Array[untyped]?) -> HTTP::Response
|
|
11
|
-
def delete_ad_group: (?ad_group_ids: Array[untyped]?) -> HTTP::Response
|
|
12
|
-
|
|
13
|
-
# List ad groups
|
|
14
|
-
# : (ad_product_filter: String, ?ad_group_id_filter: String?, ?campaign_id_filter: String?, ?marketplace_scope_filter: String?, ?max_results: Integer?, ?name_filter: String?, ?next_token: String?, ?state_filter: String?) -> HTTP::Response
|
|
15
|
-
def query_ad_group: (ad_product_filter: String, ?ad_group_id_filter: String?, ?campaign_id_filter: String?, ?marketplace_scope_filter: String?, ?max_results: Integer?, ?name_filter: String?, ?next_token: String?, ?state_filter: String?) -> HTTP::Response
|
|
16
|
-
|
|
17
|
-
# Update ad groups
|
|
18
|
-
# : (?ad_groups: Array[untyped]?) -> HTTP::Response
|
|
19
|
-
def update_ad_group: (?ad_groups: Array[untyped]?) -> HTTP::Response
|
|
20
|
-
end
|
|
21
|
-
end
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Generated from lib/amazon_ads/apis/ads.rb with RBS::Inline
|
|
2
|
-
|
|
3
|
-
module AmazonAds
|
|
4
|
-
class Ads < API
|
|
5
|
-
# Create ads
|
|
6
|
-
# : (?ads: Array[untyped]?) -> HTTP::Response
|
|
7
|
-
def create_ad: (?ads: Array[untyped]?) -> HTTP::Response
|
|
8
|
-
|
|
9
|
-
# Delete ads
|
|
10
|
-
# : (?ad_ids: Array[untyped]?) -> HTTP::Response
|
|
11
|
-
def delete_ad: (?ad_ids: Array[untyped]?) -> HTTP::Response
|
|
12
|
-
|
|
13
|
-
# List ads
|
|
14
|
-
# : (ad_product_filter: String, ?ad_group_id_filter: String?, ?ad_id_filter: String?, ?campaign_id_filter: String?, ?marketplace_scope_filter: String?, ?max_results: Integer?, ?name_filter: String?, ?next_token: String?, ?state_filter: String?) -> HTTP::Response
|
|
15
|
-
def query_ad: (ad_product_filter: String, ?ad_group_id_filter: String?, ?ad_id_filter: String?, ?campaign_id_filter: String?, ?marketplace_scope_filter: String?, ?max_results: Integer?, ?name_filter: String?, ?next_token: String?, ?state_filter: String?) -> HTTP::Response
|
|
16
|
-
|
|
17
|
-
# Update ads
|
|
18
|
-
# : (?ads: Array[untyped]?) -> HTTP::Response
|
|
19
|
-
def update_ad: (?ads: Array[untyped]?) -> HTTP::Response
|
|
20
|
-
end
|
|
21
|
-
end
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# Generated from lib/amazon_ads/apis/advertising_deal_targets.rb with RBS::Inline
|
|
2
|
-
|
|
3
|
-
module AmazonAds
|
|
4
|
-
class AdvertisingDealTargets < API
|
|
5
|
-
# Create advertisingDealTarget
|
|
6
|
-
# : (?advertising_deal_targets: Array[untyped]?) -> HTTP::Response
|
|
7
|
-
def sb_create_advertising_deal_target: (?advertising_deal_targets: Array[untyped]?) -> HTTP::Response
|
|
8
|
-
|
|
9
|
-
# Delete advertisingDealTarget
|
|
10
|
-
# : (?advertising_deal_target_ids: Array[untyped]?) -> HTTP::Response
|
|
11
|
-
def sb_delete_advertising_deal_target: (?advertising_deal_target_ids: Array[untyped]?) -> HTTP::Response
|
|
12
|
-
|
|
13
|
-
# Query advertisingDealTarget
|
|
14
|
-
# : (advertising_deal_id_filter: String, ?max_results: Integer?, ?next_token: String?) -> HTTP::Response
|
|
15
|
-
def sb_query_advertising_deal_target: (advertising_deal_id_filter: String, ?max_results: Integer?, ?next_token: String?) -> HTTP::Response
|
|
16
|
-
end
|
|
17
|
-
end
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Generated from lib/amazon_ads/apis/advertising_deals.rb with RBS::Inline
|
|
2
|
-
|
|
3
|
-
module AmazonAds
|
|
4
|
-
class AdvertisingDeals < API
|
|
5
|
-
# Create advertisingDeal
|
|
6
|
-
# : (?advertising_deals: Array[untyped]?) -> HTTP::Response
|
|
7
|
-
def sb_create_advertising_deal: (?advertising_deals: Array[untyped]?) -> HTTP::Response
|
|
8
|
-
|
|
9
|
-
# Delete advertisingDeal
|
|
10
|
-
# : (?advertising_deal_ids: Array[untyped]?) -> HTTP::Response
|
|
11
|
-
def sb_delete_advertising_deal: (?advertising_deal_ids: Array[untyped]?) -> HTTP::Response
|
|
12
|
-
|
|
13
|
-
# Query advertisingDeal
|
|
14
|
-
# : (?advertising_deal_id_filter: String?, ?max_results: Integer?, ?name_filter: String?, ?next_token: String?) -> HTTP::Response
|
|
15
|
-
def sb_query_advertising_deal: (?advertising_deal_id_filter: String?, ?max_results: Integer?, ?name_filter: String?, ?next_token: String?) -> HTTP::Response
|
|
16
|
-
|
|
17
|
-
# Update advertisingDeal
|
|
18
|
-
# : (?advertising_deals: Array[untyped]?) -> HTTP::Response
|
|
19
|
-
def sb_update_advertising_deal: (?advertising_deals: Array[untyped]?) -> HTTP::Response
|
|
20
|
-
end
|
|
21
|
-
end
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# Generated from lib/amazon_ads/apis/brand_store_edition_publish_versions.rb with RBS::Inline
|
|
2
|
-
|
|
3
|
-
module AmazonAds
|
|
4
|
-
class BrandStoreEditionPublishVersions < API
|
|
5
|
-
# Query store edition publish versions
|
|
6
|
-
# : (edition_id_filter: String, publish_status_filter: String, store_id_filter: String, ?max_results: Integer?, ?next_token: String?) -> HTTP::Response
|
|
7
|
-
def query_brand_store_edition_publish_version: (edition_id_filter: String, publish_status_filter: String, store_id_filter: String, ?max_results: Integer?, ?next_token: String?) -> HTTP::Response
|
|
8
|
-
|
|
9
|
-
# Update store edition publish versions
|
|
10
|
-
# : (?brand_store_edition_publish_versions: Array[untyped]?) -> HTTP::Response
|
|
11
|
-
def update_brand_store_edition_publish_version: (?brand_store_edition_publish_versions: Array[untyped]?) -> HTTP::Response
|
|
12
|
-
end
|
|
13
|
-
end
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# Generated from lib/amazon_ads/apis/brand_store_editions.rb with RBS::Inline
|
|
2
|
-
|
|
3
|
-
module AmazonAds
|
|
4
|
-
class BrandStoreEditions < API
|
|
5
|
-
# Retrieve brand store page content
|
|
6
|
-
# : (brand_store_id: String, ?next_token: String?, ?max_results: Integer?) -> HTTP::Response
|
|
7
|
-
def list_brand_store_edition: (brand_store_id: String, ?next_token: String?, ?max_results: Integer?) -> HTTP::Response
|
|
8
|
-
end
|
|
9
|
-
end
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# Generated from lib/amazon_ads/apis/brand_store_pages.rb with RBS::Inline
|
|
2
|
-
|
|
3
|
-
module AmazonAds
|
|
4
|
-
class BrandStorePages < API
|
|
5
|
-
# Retrieve brand store page content
|
|
6
|
-
# : (edition_id_filter: String, page_id_filter: String, store_id_filter: String, ?max_results: Integer?, ?next_token: String?, ?store_edition_publish_id_filter: String?) -> HTTP::Response
|
|
7
|
-
def query_brand_store_page: (edition_id_filter: String, page_id_filter: String, store_id_filter: String, ?max_results: Integer?, ?next_token: String?, ?store_edition_publish_id_filter: String?) -> HTTP::Response
|
|
8
|
-
end
|
|
9
|
-
end
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# Generated from lib/amazon_ads/apis/brand_stores.rb with RBS::Inline
|
|
2
|
-
|
|
3
|
-
module AmazonAds
|
|
4
|
-
class BrandStores < API
|
|
5
|
-
# Query brand store content
|
|
6
|
-
# : (store_name_filter: String, ?max_results: Integer?, ?next_token: String?, ?sort: Array[untyped]?) -> HTTP::Response
|
|
7
|
-
def query_brand_store: (store_name_filter: String, ?max_results: Integer?, ?next_token: String?, ?sort: Array[untyped]?) -> HTTP::Response
|
|
8
|
-
end
|
|
9
|
-
end
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# Generated from lib/amazon_ads/apis/branded_keywords_pricings.rb with RBS::Inline
|
|
2
|
-
|
|
3
|
-
module AmazonAds
|
|
4
|
-
class BrandedKeywordsPricings < API
|
|
5
|
-
# Create brandedKeywords pricing
|
|
6
|
-
# : (?branded_keywords_pricings: Array[untyped]?) -> HTTP::Response
|
|
7
|
-
def sb_create_branded_keywords_pricing: (?branded_keywords_pricings: Array[untyped]?) -> HTTP::Response
|
|
8
|
-
end
|
|
9
|
-
end
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# Generated from lib/amazon_ads/apis/campaign_forecasts.rb with RBS::Inline
|
|
2
|
-
|
|
3
|
-
module AmazonAds
|
|
4
|
-
class CampaignForecasts < API
|
|
5
|
-
# Retrieve campaign forecast
|
|
6
|
-
# : (?campaign_forecast_descriptions: Array[untyped]?) -> HTTP::Response
|
|
7
|
-
def dsp_retrieve_campaign_forecast: (?campaign_forecast_descriptions: Array[untyped]?) -> HTTP::Response
|
|
8
|
-
end
|
|
9
|
-
end
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Generated from lib/amazon_ads/apis/campaigns.rb with RBS::Inline
|
|
2
|
-
|
|
3
|
-
module AmazonAds
|
|
4
|
-
class Campaigns < API
|
|
5
|
-
# Create campaigns
|
|
6
|
-
# : (?campaigns: Array[untyped]?) -> HTTP::Response
|
|
7
|
-
def create_campaign: (?campaigns: Array[untyped]?) -> HTTP::Response
|
|
8
|
-
|
|
9
|
-
# Delete campaigns
|
|
10
|
-
# : (?campaign_ids: Array[untyped]?) -> HTTP::Response
|
|
11
|
-
def delete_campaign: (?campaign_ids: Array[untyped]?) -> HTTP::Response
|
|
12
|
-
|
|
13
|
-
# Query campaign
|
|
14
|
-
# : (ad_product_filter: String, ?campaign_id_filter: String?, ?goal_filter: String?, ?marketplace_scope_filter: String?, ?max_results: Integer?, ?name_filter: String?, ?next_token: String?, ?portfolio_id_filter: String?, ?state_filter: String?) -> HTTP::Response
|
|
15
|
-
def query_campaign: (ad_product_filter: String, ?campaign_id_filter: String?, ?goal_filter: String?, ?marketplace_scope_filter: String?, ?max_results: Integer?, ?name_filter: String?, ?next_token: String?, ?portfolio_id_filter: String?, ?state_filter: String?) -> HTTP::Response
|
|
16
|
-
|
|
17
|
-
# Update campaign
|
|
18
|
-
# : (?campaigns: Array[untyped]?) -> HTTP::Response
|
|
19
|
-
def update_campaign: (?campaigns: Array[untyped]?) -> HTTP::Response
|
|
20
|
-
end
|
|
21
|
-
end
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# Generated from lib/amazon_ads/apis/commitment_spends.rb with RBS::Inline
|
|
2
|
-
|
|
3
|
-
module AmazonAds
|
|
4
|
-
class CommitmentSpends < API
|
|
5
|
-
# Retrieve commitment spend
|
|
6
|
-
# : (?commitment_ids: Array[untyped]?) -> HTTP::Response
|
|
7
|
-
def dsp_retrieve_commitment_spend: (?commitment_ids: Array[untyped]?) -> HTTP::Response
|
|
8
|
-
end
|
|
9
|
-
end
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Generated from lib/amazon_ads/apis/commitments.rb with RBS::Inline
|
|
2
|
-
|
|
3
|
-
module AmazonAds
|
|
4
|
-
class Commitments < API
|
|
5
|
-
# Create commitments
|
|
6
|
-
# : (?commitments: Array[untyped]?) -> HTTP::Response
|
|
7
|
-
def dsp_create_commitment: (?commitments: Array[untyped]?) -> HTTP::Response
|
|
8
|
-
|
|
9
|
-
# List commitments
|
|
10
|
-
# : (?next_token: String?, ?max_results: Integer?) -> HTTP::Response
|
|
11
|
-
def dsp_list_commitment: (?next_token: String?, ?max_results: Integer?) -> HTTP::Response
|
|
12
|
-
|
|
13
|
-
# Get Commitments
|
|
14
|
-
# : (?commitment_ids: Array[untyped]?) -> HTTP::Response
|
|
15
|
-
def dsp_retrieve_commitment: (?commitment_ids: Array[untyped]?) -> HTTP::Response
|
|
16
|
-
|
|
17
|
-
# Update commitments
|
|
18
|
-
# : (?commitments: Array[untyped]?) -> HTTP::Response
|
|
19
|
-
def dsp_update_commitment: (?commitments: Array[untyped]?) -> HTTP::Response
|
|
20
|
-
end
|
|
21
|
-
end
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# Generated from lib/amazon_ads/apis/keyword_reservation_validations.rb with RBS::Inline
|
|
2
|
-
|
|
3
|
-
module AmazonAds
|
|
4
|
-
class KeywordReservationValidations < API
|
|
5
|
-
# Validate keyword reservation
|
|
6
|
-
# : (?keyword_reservation_validations: Array[untyped]?) -> HTTP::Response
|
|
7
|
-
def sb_create_keyword_reservation_validation: (?keyword_reservation_validations: Array[untyped]?) -> HTTP::Response
|
|
8
|
-
end
|
|
9
|
-
end
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# Generated from lib/amazon_ads/apis/marketing_stream.rb with RBS::Inline
|
|
2
|
-
|
|
3
|
-
module AmazonAds
|
|
4
|
-
# Amazon Marketing Stream
|
|
5
|
-
class MarketingStream < API
|
|
6
|
-
# Create a new subscription Note: trailing slash in request uri is not allowed
|
|
7
|
-
# @rbs client_request_token: String -- Unique value supplied by the caller used to track identical API requests. Should request be re-tried, the caller should supply the same value. We recommend using GUID.
|
|
8
|
-
# @rbs data_set_id: String -- Identifier of data set, callers can be subscribed to. Please refer to https://advertising.amazon.com/API/docs/en-us/amazon-marketing-stream/data-guide for the list of all data sets.
|
|
9
|
-
# @rbs destination_arn: String -- AWS ARN of the destination endpoint associated with the subscription. Supported destination types: - SQS
|
|
10
|
-
# @rbs notes: String -- Additional details associated with the subscription
|
|
11
|
-
# : (client_request_token: String, data_set_id: String, ?destination: String?, ?destination_arn: String?, ?notes: String?) -> HTTP::Response
|
|
12
|
-
def create_dsp_stream_subscription: (client_request_token: String, data_set_id: String, ?destination: String?, ?destination_arn: String?, ?notes: String?) -> HTTP::Response
|
|
13
|
-
|
|
14
|
-
# Create a new subscription Note: trailing slash in request uri is not allowed
|
|
15
|
-
# @rbs client_request_token: String -- Unique value supplied by the caller used to track identical API requests. Should request be re-tried, the caller should supply the same value. We recommend using GUID.
|
|
16
|
-
# @rbs data_set_id: String -- Identifier of data set, callers can be subscribed to. Please refer to https://advertising.amazon.com/API/docs/en-us/amazon-marketing-stream/data-guide for the list of all data sets.
|
|
17
|
-
# @rbs destination_arn: String -- AWS ARN of the destination endpoint associated with the subscription. Supported destination types: - SQS
|
|
18
|
-
# @rbs notes: String -- Additional details associated with the subscription
|
|
19
|
-
# : (client_request_token: String, data_set_id: String, ?destination: String?, ?destination_arn: String?, ?notes: String?) -> HTTP::Response
|
|
20
|
-
def create_stream_subscription: (client_request_token: String, data_set_id: String, ?destination: String?, ?destination_arn: String?, ?notes: String?) -> HTTP::Response
|
|
21
|
-
|
|
22
|
-
# Fetch a specific subscription by Id Note: trailing slash in request uri is not allowed
|
|
23
|
-
# @rbs subscription_id: String -- Unique subscription identifier
|
|
24
|
-
# : (String) -> HTTP::Response
|
|
25
|
-
def get_dsp_stream_subscription: (String) -> HTTP::Response
|
|
26
|
-
|
|
27
|
-
# Fetch a specific subscription by Id Note: trailing slash in request uri is not allowed
|
|
28
|
-
# @rbs subscription_id: String -- Unique subscription identifier
|
|
29
|
-
# : (String) -> HTTP::Response
|
|
30
|
-
def get_stream_subscription: (String) -> HTTP::Response
|
|
31
|
-
|
|
32
|
-
# List subscriptions Note: trailing slash in request uri is not allowed
|
|
33
|
-
# @rbs max_results: Numeric -- desired number of entries in the response, defaults to maximum value
|
|
34
|
-
# @rbs starting_token: String -- Token which can be used to get the next page of results, if more entries exist
|
|
35
|
-
# : (?max_results: Numeric?, ?starting_token: String?) -> HTTP::Response
|
|
36
|
-
def list_dsp_stream_subscriptions: (?max_results: Numeric?, ?starting_token: String?) -> HTTP::Response
|
|
37
|
-
|
|
38
|
-
# List subscriptions Note: trailing slash in request uri is not allowed
|
|
39
|
-
# @rbs max_results: Numeric -- desired number of entries in the response, defaults to maximum value
|
|
40
|
-
# @rbs starting_token: String -- Token which can be used to get the next page of results, if more entries exist
|
|
41
|
-
# : (?max_results: Numeric?, ?starting_token: String?) -> HTTP::Response
|
|
42
|
-
def list_stream_subscriptions: (?max_results: Numeric?, ?starting_token: String?) -> HTTP::Response
|
|
43
|
-
|
|
44
|
-
# Update an existing subscription Note: trailing slash in request uri is not allowed
|
|
45
|
-
# @rbs subscription_id: String -- Unique subscription identifier
|
|
46
|
-
# @rbs notes: String -- Additional details associated with the subscription
|
|
47
|
-
# : (String, ?notes: String?, ?status: String?) -> HTTP::Response
|
|
48
|
-
def update_dsp_stream_subscription: (String, ?notes: String?, ?status: String?) -> HTTP::Response
|
|
49
|
-
|
|
50
|
-
# Update an existing subscription Note: trailing slash in request uri is not allowed
|
|
51
|
-
# @rbs subscription_id: String -- Unique subscription identifier
|
|
52
|
-
# @rbs notes: String -- Additional details associated with the subscription
|
|
53
|
-
# : (String, ?notes: String?, ?status: String?) -> HTTP::Response
|
|
54
|
-
def update_stream_subscription: (String, ?notes: String?, ?status: String?) -> HTTP::Response
|
|
55
|
-
end
|
|
56
|
-
end
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# Generated from lib/amazon_ads/apis/profiles.rb with RBS::Inline
|
|
2
|
-
|
|
3
|
-
module AmazonAds
|
|
4
|
-
# Amazon Ads API - Profiles
|
|
5
|
-
class Profiles < API
|
|
6
|
-
# Gets a profile specified by identifier.
|
|
7
|
-
# : (Integer) -> HTTP::Response
|
|
8
|
-
def get_profile_by_id: (Integer) -> HTTP::Response
|
|
9
|
-
|
|
10
|
-
# Gets a list of profiles.
|
|
11
|
-
# @rbs api_program: String -- Filters response to include profiles that have permissions for the specified Advertising API program only. Setting `apiProgram=billing` filters the response to include only profiles to which the user and application associated with the access token have permission to view or edit billing information.
|
|
12
|
-
# @rbs access_level: String -- Filters response to include profiles that have specified permissions for the specified Advertising API program only. Currently, the only supported access level is `view` and `edit`. Setting `accessLevel=view` filters the response to include only profiles to which the user and application associated with the access token have view permission to the provided api program.
|
|
13
|
-
# @rbs profile_type_filter: String -- Filters response to include profiles that are of the specified types in the comma-delimited list. Default is all types. Note that this filter performs an inclusive AND operation on the types.
|
|
14
|
-
# @rbs valid_payment_method_filter: String -- Filter response to include profiles that have valid payment methods. Default is to include all profiles. Setting this filter to `true` returns only profiles with either no `validPaymentMethod` field, or the `validPaymentMethod` field set to `true`. Setting this to `false` returns profiles with the `validPaymentMethod` field set to `false` only.
|
|
15
|
-
# : (?api_program: String?, ?access_level: String?, ?profile_type_filter: String?, ?valid_payment_method_filter: String?) -> HTTP::Response
|
|
16
|
-
def list_profiles: (?api_program: String?, ?access_level: String?, ?profile_type_filter: String?, ?valid_payment_method_filter: String?) -> HTTP::Response
|
|
17
|
-
|
|
18
|
-
# Update the daily budget for one or more profiles.
|
|
19
|
-
# : (?json: untyped) -> HTTP::Response
|
|
20
|
-
def update_profiles: (?json: untyped) -> HTTP::Response
|
|
21
|
-
end
|
|
22
|
-
end
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# Generated from lib/amazon_ads/apis/recommendation_types.rb with RBS::Inline
|
|
2
|
-
|
|
3
|
-
module AmazonAds
|
|
4
|
-
class RecommendationTypes < API
|
|
5
|
-
# Query RecommendationTypes
|
|
6
|
-
# : (?max_results: Integer?, ?next_token: String?) -> HTTP::Response
|
|
7
|
-
def sb_query_recommendation_type: (?max_results: Integer?, ?next_token: String?) -> HTTP::Response
|
|
8
|
-
end
|
|
9
|
-
end
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# Generated from lib/amazon_ads/apis/recommendations.rb with RBS::Inline
|
|
2
|
-
|
|
3
|
-
module AmazonAds
|
|
4
|
-
class Recommendations < API
|
|
5
|
-
# Create recommendations
|
|
6
|
-
# : (?recommendations: Array[untyped]?) -> HTTP::Response
|
|
7
|
-
def sb_create_recommendation: (?recommendations: Array[untyped]?) -> HTTP::Response
|
|
8
|
-
end
|
|
9
|
-
end
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# Generated from lib/amazon_ads/apis/reporting.rb with RBS::Inline
|
|
2
|
-
|
|
3
|
-
module AmazonAds
|
|
4
|
-
# Offline Report
|
|
5
|
-
class Reporting < API
|
|
6
|
-
# Creates a report request
|
|
7
|
-
# @rbs end_date: String -- YYYY-MM-DD format. The maximum lookback window supported depends on the selection of reportTypeId. Most report types support `95 days` as lookback window.
|
|
8
|
-
# @rbs name: String -- The name of the report.
|
|
9
|
-
# @rbs start_date: String -- YYYY-MM-DD format. The maximum lookback window supported depends on the selection of reportTypeId. Most report types support `95 days` as lookback window.
|
|
10
|
-
# : (configuration: untyped, end_date: String, start_date: String, ?name: String?) -> HTTP::Response
|
|
11
|
-
def create_async_report: (configuration: untyped, end_date: String, start_date: String, ?name: String?) -> HTTP::Response
|
|
12
|
-
|
|
13
|
-
# Deletes a report by id
|
|
14
|
-
# @rbs report_id: String -- The identifier of the requested report.
|
|
15
|
-
# : (String) -> HTTP::Response
|
|
16
|
-
def delete_async_report: (String) -> HTTP::Response
|
|
17
|
-
|
|
18
|
-
# Gets a generation status of report by id
|
|
19
|
-
# @rbs report_id: String -- The identifier of the requested report.
|
|
20
|
-
# : (String) -> HTTP::Response
|
|
21
|
-
def get_async_report: (String) -> HTTP::Response
|
|
22
|
-
end
|
|
23
|
-
end
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# Generated from lib/amazon_ads/apis/sponsored_products.rb with RBS::Inline
|
|
2
|
-
|
|
3
|
-
module AmazonAds
|
|
4
|
-
# Amazon Ads API - Sponsored Products
|
|
5
|
-
#
|
|
6
|
-
# @see https://advertising.amazon.com/API/docs/en-us/sponsored-products
|
|
7
|
-
class SponsoredProducts < API
|
|
8
|
-
# Gets a bid recommendation for an ad group. [PLANNED DEPRECATION 3/27/2024]
|
|
9
|
-
# : (Numeric) -> untyped
|
|
10
|
-
def get_ad_group_bid_recommendations: (Numeric) -> untyped
|
|
11
|
-
|
|
12
|
-
# Gets a bid recommendation for a keyword. [PLANNED DEPRECATION 3/27/2024]
|
|
13
|
-
# : (Numeric) -> untyped
|
|
14
|
-
def get_keyword_bid_recommendations: (Numeric) -> untyped
|
|
15
|
-
|
|
16
|
-
# Gets bid recommendations for keywords. [PLANNED DEPRECATION 3/27/2024]
|
|
17
|
-
# : (?body: Hash[String, untyped]) -> untyped
|
|
18
|
-
def create_keyword_bid_recommendations: (?body: Hash[String, untyped]) -> untyped
|
|
19
|
-
|
|
20
|
-
# Gets suggested keywords for the specified ad group.
|
|
21
|
-
# : (Numeric, ?max_num_suggestions: Integer?, ?ad_state_filter: String?) -> untyped
|
|
22
|
-
def get_ad_group_suggested_keywords: (Numeric, ?max_num_suggestions: Integer?, ?ad_state_filter: String?) -> untyped
|
|
23
|
-
|
|
24
|
-
# Gets suggested keywords with extended data for the specified ad group.
|
|
25
|
-
# : (Numeric, ?max_num_suggestions: Integer?, ?suggest_bids: String?, ?ad_state_filter: String?) -> untyped
|
|
26
|
-
def get_ad_group_suggested_keywords_ex: (Numeric, ?max_num_suggestions: Integer?, ?suggest_bids: String?, ?ad_state_filter: String?) -> untyped
|
|
27
|
-
|
|
28
|
-
# Gets suggested keywords for the specified ASIN.
|
|
29
|
-
# : (String, ?max_num_suggestions: Integer?) -> untyped
|
|
30
|
-
def get_asin_suggested_keywords: (String, ?max_num_suggestions: Integer?) -> untyped
|
|
31
|
-
|
|
32
|
-
# Gets suggested keyword for a specified list of ASINs.
|
|
33
|
-
# : (?body: Hash[String, untyped]) -> untyped
|
|
34
|
-
def bulk_get_asin_suggested_keywords: (?body: Hash[String, untyped]) -> untyped
|
|
35
|
-
|
|
36
|
-
# Gets a list of bid recommendations for keyword, product, or auto targeting expressions.
|
|
37
|
-
# : (?body: Hash[String, untyped]) -> untyped
|
|
38
|
-
def get_bid_recommendations: (?body: Hash[String, untyped]) -> untyped
|
|
39
|
-
|
|
40
|
-
# Request a snapshot
|
|
41
|
-
# : (String, ?body: Hash[String, untyped]) -> untyped
|
|
42
|
-
def request_snapshot: (String, ?body: Hash[String, untyped]) -> untyped
|
|
43
|
-
|
|
44
|
-
# Get the status of a requested snapshot
|
|
45
|
-
# : (Numeric) -> untyped
|
|
46
|
-
def get_snapshot_status: (Numeric) -> untyped
|
|
47
|
-
|
|
48
|
-
# Download requested snapshot
|
|
49
|
-
# : (Numeric) -> untyped
|
|
50
|
-
def download_snapshot: (Numeric) -> untyped
|
|
51
|
-
end
|
|
52
|
-
end
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# Generated from lib/amazon_ads/apis/streams.rb with RBS::Inline
|
|
2
|
-
|
|
3
|
-
module AmazonAds
|
|
4
|
-
# Amazon Marketing Stream subscription management
|
|
5
|
-
class Streams < API
|
|
6
|
-
CONTENT_TYPE: ::String
|
|
7
|
-
|
|
8
|
-
# Lists stream subscriptions
|
|
9
|
-
# : (?max_results: Integer?, ?starting_token: String?) -> HTTP::Response
|
|
10
|
-
def list_subscriptions: (?max_results: Integer?, ?starting_token: String?) -> HTTP::Response
|
|
11
|
-
|
|
12
|
-
# Creates a new stream subscription
|
|
13
|
-
# : (?json: untyped) -> HTTP::Response
|
|
14
|
-
def create_subscription: (?json: untyped) -> HTTP::Response
|
|
15
|
-
|
|
16
|
-
# Fetches a specific subscription by ID
|
|
17
|
-
# : (String) -> HTTP::Response
|
|
18
|
-
def get_subscription: (String) -> HTTP::Response
|
|
19
|
-
|
|
20
|
-
# Updates an existing subscription
|
|
21
|
-
# : (String, ?json: untyped) -> HTTP::Response
|
|
22
|
-
def update_subscription: (String, ?json: untyped) -> HTTP::Response
|
|
23
|
-
|
|
24
|
-
# Lists DSP stream subscriptions
|
|
25
|
-
# : (?max_results: Integer?, ?starting_token: String?) -> HTTP::Response
|
|
26
|
-
def dsp_list_subscriptions: (?max_results: Integer?, ?starting_token: String?) -> HTTP::Response
|
|
27
|
-
|
|
28
|
-
# Creates a new DSP stream subscription
|
|
29
|
-
# : (?json: untyped) -> HTTP::Response
|
|
30
|
-
def dsp_create_subscription: (?json: untyped) -> HTTP::Response
|
|
31
|
-
|
|
32
|
-
# Fetches a specific DSP subscription by ID
|
|
33
|
-
# : (String) -> HTTP::Response
|
|
34
|
-
def dsp_get_subscription: (String) -> HTTP::Response
|
|
35
|
-
|
|
36
|
-
# Updates an existing DSP subscription
|
|
37
|
-
# : (String, ?json: untyped) -> HTTP::Response
|
|
38
|
-
def dsp_update_subscription: (String, ?json: untyped) -> HTTP::Response
|
|
39
|
-
end
|
|
40
|
-
end
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Generated from lib/amazon_ads/apis/targets.rb with RBS::Inline
|
|
2
|
-
|
|
3
|
-
module AmazonAds
|
|
4
|
-
class Targets < API
|
|
5
|
-
# Create target
|
|
6
|
-
# : (?targets: Array[untyped]?) -> HTTP::Response
|
|
7
|
-
def create_target: (?targets: Array[untyped]?) -> HTTP::Response
|
|
8
|
-
|
|
9
|
-
# Delete target
|
|
10
|
-
# : (?target_ids: Array[untyped]?) -> HTTP::Response
|
|
11
|
-
def delete_target: (?target_ids: Array[untyped]?) -> HTTP::Response
|
|
12
|
-
|
|
13
|
-
# List target
|
|
14
|
-
# : (ad_product_filter: String, ?ad_group_id_filter: String?, ?campaign_id_filter: String?, ?keyword_filter: String?, ?marketplace_scope_filter: String?, ?match_type_filter: String?, ?max_results: Integer?, ?native_language_locale_filter: String?, ?negative_filter: String?, ?next_token: String?, ?product_id_filter: String?, ?state_filter: String?, ?target_id_filter: String?, ?target_type_filter: String?) -> HTTP::Response
|
|
15
|
-
def query_target: (ad_product_filter: String, ?ad_group_id_filter: String?, ?campaign_id_filter: String?, ?keyword_filter: String?, ?marketplace_scope_filter: String?, ?match_type_filter: String?, ?max_results: Integer?, ?native_language_locale_filter: String?, ?negative_filter: String?, ?next_token: String?, ?product_id_filter: String?, ?state_filter: String?, ?target_id_filter: String?, ?target_type_filter: String?) -> HTTP::Response
|
|
16
|
-
|
|
17
|
-
# Update target
|
|
18
|
-
# : (?targets: Array[untyped]?) -> HTTP::Response
|
|
19
|
-
def update_target: (?targets: Array[untyped]?) -> HTTP::Response
|
|
20
|
-
end
|
|
21
|
-
end
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# Generated from lib/amazon_ads/lwa.rb with RBS::Inline
|
|
2
|
-
|
|
3
|
-
module AmazonAds
|
|
4
|
-
# Requests Login with Amazon (LWA) access tokens for the Amazon Ads API
|
|
5
|
-
# Stateless: each call to #request hits the token endpoint; the caller
|
|
6
|
-
# owns caching
|
|
7
|
-
class LWA
|
|
8
|
-
URL: String
|
|
9
|
-
|
|
10
|
-
# The OAuth refresh token
|
|
11
|
-
attr_reader refresh_token: String
|
|
12
|
-
|
|
13
|
-
# : (**untyped) -> Hash[String, untyped]
|
|
14
|
-
def self.request: (**untyped) -> Hash[String, untyped]
|
|
15
|
-
|
|
16
|
-
# : (refresh_token: String, ?http: untyped) -> void
|
|
17
|
-
def initialize: (refresh_token: String, ?http: untyped) -> void
|
|
18
|
-
|
|
19
|
-
# Requests a fresh access token from LWA
|
|
20
|
-
# : () -> Hash[String, untyped]
|
|
21
|
-
def request: () -> Hash[String, untyped]
|
|
22
|
-
|
|
23
|
-
private
|
|
24
|
-
|
|
25
|
-
# : () -> HTTP::Client
|
|
26
|
-
def http: () -> HTTP::Client
|
|
27
|
-
|
|
28
|
-
# : () -> Hash[Symbol, String]
|
|
29
|
-
def params: () -> Hash[Symbol, String]
|
|
30
|
-
|
|
31
|
-
# : () -> String
|
|
32
|
-
def client_id: () -> String
|
|
33
|
-
|
|
34
|
-
# : () -> String
|
|
35
|
-
def client_secret: () -> String
|
|
36
|
-
end
|
|
37
|
-
end
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# Generated from lib/amazon_ads.rb with RBS::Inline
|
|
2
|
-
|
|
3
|
-
# Amazon Ads API client for Ruby
|
|
4
|
-
module AmazonAds
|
|
5
|
-
# Returns the client ID
|
|
6
|
-
# Falls back to the `AMAZON_ADS_CLIENT_ID` env var
|
|
7
|
-
# : () -> String?
|
|
8
|
-
def self.client_id: () -> String?
|
|
9
|
-
|
|
10
|
-
# Sets the client ID
|
|
11
|
-
# : (String?) -> String?
|
|
12
|
-
attr_writer client_id: untyped
|
|
13
|
-
|
|
14
|
-
# Returns the client ID or raises
|
|
15
|
-
# : () -> String
|
|
16
|
-
def self.client_id!: () -> String
|
|
17
|
-
|
|
18
|
-
# Returns the client secret
|
|
19
|
-
# Falls back to the `AMAZON_ADS_CLIENT_SECRET` env var
|
|
20
|
-
# : () -> String?
|
|
21
|
-
def self.client_secret: () -> String?
|
|
22
|
-
|
|
23
|
-
# Sets the client secret
|
|
24
|
-
# : (String?) -> String?
|
|
25
|
-
attr_writer client_secret: untyped
|
|
26
|
-
|
|
27
|
-
# Returns the client secret or raises
|
|
28
|
-
# : () -> String
|
|
29
|
-
def self.client_secret!: () -> String
|
|
30
|
-
end
|