amazon-ads 0.5.0 → 0.6.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ca37ac82a931b7caf155e83c72450a70b37b1e00ed1e161ff8df8707d1594940
4
- data.tar.gz: 6595ca8f52d77efd69c38436bb4b8d0f78b27a8bd06c3e444e28cafd16dc8a5a
3
+ metadata.gz: 0bd923abf235c0e748ef0b854039f38184d7d4d3ae2b950cacbede975c3d5da9
4
+ data.tar.gz: df5bc82d510edde2a07a51aaf4dceca74ac43e338ee76de932ae08c6155f4754
5
5
  SHA512:
6
- metadata.gz: f974f8dfcd535e8c084a5a3c7d7e790f315d1190dfa5a42a15ed6aeced63d205e15545c9e580b9bafeaf025dc4de11bc3f0190ac961f7efac880e25a4ae4696b
7
- data.tar.gz: 2bbd82c0a5375b827ea8411cf008fc9ad5ee11f7fd20c743da1ec830235fa1853081724c6a0d28d4e97d845f0a88a7ec81eab0462178058fa70e5266c72a2775
6
+ metadata.gz: c9251bab189b3f7dbb6fb589cff0ea0efd1833b264c07e8b783035ad9894ad0780bffaafa509735d817f0c3df8d65f663e9843aab65e8f4f893c409b9dece675
7
+ data.tar.gz: 39f823049c274b59e835d5c5fc1265118c08f0926a741f9a41c255b216513b42d7437575f480dd085a7d2ca6e95d1726c287a5ce0ef0abfc7c1cac411aa2ede0
@@ -10,7 +10,7 @@ module AmazonAds
10
10
  # @rbs notes: String -- Additional details associated with the subscription
11
11
  #: (client_request_token: String, data_set_id: String, ?destination: untyped?, ?destination_arn: String?, ?notes: String?) -> HTTP::Response
12
12
  def create_dsp_stream_subscription(client_request_token:, data_set_id:, destination: nil, destination_arn: nil, notes: nil)
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" })
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", "Accept" => "application/vnd.amazonmarketingstreamsubscriptions.v1+json" })
14
14
  end
15
15
 
16
16
  # Create a new subscription Note: trailing slash in request uri is not allowed
@@ -20,7 +20,7 @@ module AmazonAds
20
20
  # @rbs notes: String -- Additional details associated with the subscription
21
21
  #: (client_request_token: String, data_set_id: String, ?destination: untyped?, ?destination_arn: String?, ?notes: String?) -> HTTP::Response
22
22
  def create_stream_subscription(client_request_token:, data_set_id:, destination: nil, destination_arn: nil, notes: nil)
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" })
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", "Accept" => "application/vnd.amazonmarketingstreamsubscriptions.v1+json" })
24
24
  end
25
25
 
26
26
  # Fetch a specific subscription by Id Note: trailing slash in request uri is not allowed
@@ -58,7 +58,7 @@ module AmazonAds
58
58
  # @rbs notes: String -- Additional details associated with the subscription
59
59
  #: (String, ?notes: String?, ?status: untyped?) -> HTTP::Response
60
60
  def update_dsp_stream_subscription(subscription_id, notes: nil, status: nil)
61
- request(:put, "/dsp/streams/subscriptions/#{subscription_id}", json: { "notes" => notes, "status" => status }.compact, headers: { "Content-Type" => "application/vnd.amazonmarketingstreamsubscriptions.v1+json" })
61
+ request(:put, "/dsp/streams/subscriptions/#{subscription_id}", json: { "notes" => notes, "status" => status }.compact, headers: { "Content-Type" => "application/vnd.amazonmarketingstreamsubscriptions.v1+json", "Accept" => "application/vnd.amazonmarketingstreamsubscriptions.v1+json" })
62
62
  end
63
63
 
64
64
  # Update an existing subscription Note: trailing slash in request uri is not allowed
@@ -66,7 +66,7 @@ module AmazonAds
66
66
  # @rbs notes: String -- Additional details associated with the subscription
67
67
  #: (String, ?notes: String?, ?status: untyped?) -> HTTP::Response
68
68
  def update_stream_subscription(subscription_id, notes: nil, status: nil)
69
- request(:put, "/streams/subscriptions/#{subscription_id}", json: { "notes" => notes, "status" => status }.compact, headers: { "Content-Type" => "application/vnd.amazonmarketingstreamsubscriptions.v1+json" })
69
+ request(:put, "/streams/subscriptions/#{subscription_id}", json: { "notes" => notes, "status" => status }.compact, headers: { "Content-Type" => "application/vnd.amazonmarketingstreamsubscriptions.v1+json", "Accept" => "application/vnd.amazonmarketingstreamsubscriptions.v1+json" })
70
70
  end
71
71
  end
72
72
  end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AmazonAds
4
+ # Portfolios
5
+ class Portfolios < API
6
+ # @rbs portfolios: Array[untyped] -- An array of portfolio to create.
7
+ #: (portfolios: Array[untyped]) -> HTTP::Response
8
+ def create_portfolios(portfolios:)
9
+ request(:post, "/portfolios", json: { "portfolios" => portfolios }.compact, headers: { "Content-Type" => "application/vnd.spPortfolio.v3+json", "Accept" => "application/vnd.spPortfolio.v3+json" })
10
+ end
11
+
12
+ # @rbs include_extended_data_fields: bool -- whether to get a list of targetingClauses with extended data fields (creationDate, lastUpdateDate, servingStatus).
13
+ # @rbs next_token: String -- token value allowing to navigate to the next response page
14
+ #: (?include_extended_data_fields: bool?, ?name_filter: untyped?, ?next_token: String?, ?portfolio_id_filter: untyped?, ?state_filter: untyped?) -> HTTP::Response
15
+ def list_portfolios(include_extended_data_fields: nil, name_filter: nil, next_token: nil, portfolio_id_filter: nil, state_filter: nil)
16
+ request(:post, "/portfolios/list", json: { "includeExtendedDataFields" => include_extended_data_fields, "nameFilter" => name_filter, "nextToken" => next_token, "portfolioIdFilter" => portfolio_id_filter, "stateFilter" => state_filter }.compact, headers: { "Content-Type" => "application/vnd.spPortfolio.v3+json", "Accept" => "application/vnd.spPortfolio.v3+json" })
17
+ end
18
+
19
+ # Budget usage API for portfolios
20
+ # @rbs portfolio_ids: Array[untyped] -- A list of portfolio IDs.
21
+ #: (?portfolio_ids: Array[untyped]?) -> HTTP::Response
22
+ def portfolio_budget_usage(portfolio_ids: nil)
23
+ request(:post, "/portfolios/budget/usage", json: { "portfolioIds" => portfolio_ids }.compact, headers: { "Content-Type" => "application/vnd.portfoliobudgetusage.v1+json", "Accept" => "application/vnd.portfoliobudgetusage.v1+json" })
24
+ end
25
+
26
+ # @rbs portfolios: Array[untyped] -- An array of portfolio with updated values.
27
+ #: (portfolios: Array[untyped]) -> HTTP::Response
28
+ def update_portfolios(portfolios:)
29
+ request(:put, "/portfolios", json: { "portfolios" => portfolios }.compact, headers: { "Content-Type" => "application/vnd.spPortfolio.v3+json", "Accept" => "application/vnd.spPortfolio.v3+json" })
30
+ end
31
+ end
32
+ end
@@ -9,7 +9,7 @@ module AmazonAds
9
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
10
  #: (configuration: untyped, end_date: String, start_date: String, ?name: String?) -> HTTP::Response
11
11
  def create_async_report(configuration:, end_date:, start_date:, name: nil)
12
- request(:post, "/reporting/reports", json: { "configuration" => configuration, "endDate" => end_date, "name" => name, "startDate" => start_date }.compact, headers: { "Content-Type" => "application/vnd.createasyncreportrequest.v3+json" })
12
+ request(:post, "/reporting/reports", json: { "configuration" => configuration, "endDate" => end_date, "name" => name, "startDate" => start_date }.compact, headers: { "Content-Type" => "application/vnd.createasyncreportrequest.v3+json", "Accept" => "application/vnd.createasyncreportrequest.v3+json" })
13
13
  end
14
14
 
15
15
  # Deletes a report by id
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AmazonAds
4
- VERSION = "0.5.0"
4
+ VERSION = "0.6.0"
5
5
  end
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.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hakan Ensari
@@ -83,6 +83,7 @@ files:
83
83
  - lib/amazon_ads/apis/location_indexes.rb
84
84
  - lib/amazon_ads/apis/manager_accounts.rb
85
85
  - lib/amazon_ads/apis/marketing_stream.rb
86
+ - lib/amazon_ads/apis/portfolios.rb
86
87
  - lib/amazon_ads/apis/profiles.rb
87
88
  - lib/amazon_ads/apis/recommendation_types.rb
88
89
  - lib/amazon_ads/apis/recommendations.rb