Class: AmazonAds::Profiles

Inherits:
API
  • Object
show all
Defined in:
lib/amazon_ads/apis/profiles.rb

Overview

Amazon Ads API - Profiles

Constant Summary

Constants inherited from API

API::ENDPOINTS

Instance Attribute Summary

Attributes inherited from API

#access_token, #account_id, #profile_id, #region, #retries

Instance Method Summary collapse

Methods inherited from API

#endpoint, #http, #initialize

Constructor Details

This class inherits a constructor from AmazonAds::API

Instance Method Details

#get_profile_by_id(profile_id) ⇒ Object

Gets a profile specified by identifier. : (Integer) -> HTTP::Response



8
9
10
# File 'lib/amazon_ads/apis/profiles.rb', line 8

def get_profile_by_id(profile_id)
  request(:get, "/v2/profiles/#{profile_id}")
end

#list_profiles(api_program: nil, access_level: nil, profile_type_filter: nil, valid_payment_method_filter: nil) ⇒ Object

Gets a list of profiles. : (?api_program: String?, ?access_level: String?, ?profile_type_filter: String?, ?valid_payment_method_filter: String?) -> HTTP::Response



18
19
20
# File 'lib/amazon_ads/apis/profiles.rb', line 18

def list_profiles(api_program: nil, access_level: nil, profile_type_filter: nil, valid_payment_method_filter: nil)
  request(:get, "/v2/profiles", params: { "apiProgram" => api_program, "accessLevel" => access_level, "profileTypeFilter" => profile_type_filter, "validPaymentMethodFilter" => valid_payment_method_filter }.compact)
end

#update_profiles(json: {}) ⇒ Object

Update the daily budget for one or more profiles. : (?json: untyped) -> HTTP::Response



24
25
26
# File 'lib/amazon_ads/apis/profiles.rb', line 24

def update_profiles(json: {})
  request(:put, "/v2/profiles", json: json)
end