Class: BingAdsRubySdk::Api
- Inherits:
-
Object
- Object
- BingAdsRubySdk::Api
- Defined in:
- lib/bing_ads_ruby_sdk/api.rb
Instance Attribute Summary collapse
-
#header ⇒ Object
readonly
Returns the value of attribute header.
Instance Method Summary collapse
- #ad_insight ⇒ Object
- #bulk ⇒ Object
- #campaign_management ⇒ Object
- #customer_billing ⇒ Object
- #customer_management ⇒ Object
-
#initialize(developer_token:, client_id:, oauth_store:, version: DEFAULT_SDK_VERSION, environment: :production, client_secret: nil) ⇒ Api
constructor
A new instance of Api.
- #reporting ⇒ Object
- #set_customer(account_id:, customer_id:) ⇒ Object
Constructor Details
#initialize(developer_token:, client_id:, oauth_store:, version: DEFAULT_SDK_VERSION, environment: :production, client_secret: nil) ⇒ Api
Returns a new instance of Api.
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/bing_ads_ruby_sdk/api.rb', line 26 def initialize(developer_token:, client_id:, oauth_store:, version: DEFAULT_SDK_VERSION, environment: :production, client_secret: nil) @version = version @environment = environment @header = Header.new( developer_token: developer_token, client_id: client_id, client_secret: client_secret, store: oauth_store ) end |
Instance Attribute Details
#header ⇒ Object (readonly)
Returns the value of attribute header.
18 19 20 |
# File 'lib/bing_ads_ruby_sdk/api.rb', line 18 def header @header end |
Instance Method Details
#ad_insight ⇒ Object
39 40 41 |
# File 'lib/bing_ads_ruby_sdk/api.rb', line 39 def ad_insight build_service(BingAdsRubySdk::Services::AdInsight) end |
#bulk ⇒ Object
43 44 45 |
# File 'lib/bing_ads_ruby_sdk/api.rb', line 43 def bulk build_service(BingAdsRubySdk::Services::Bulk) end |
#campaign_management ⇒ Object
47 48 49 |
# File 'lib/bing_ads_ruby_sdk/api.rb', line 47 def campaign_management build_service(BingAdsRubySdk::Services::CampaignManagement) end |
#customer_billing ⇒ Object
51 52 53 |
# File 'lib/bing_ads_ruby_sdk/api.rb', line 51 def customer_billing build_service(BingAdsRubySdk::Services::CustomerBilling) end |
#customer_management ⇒ Object
55 56 57 |
# File 'lib/bing_ads_ruby_sdk/api.rb', line 55 def customer_management build_service(BingAdsRubySdk::Services::CustomerManagement) end |
#reporting ⇒ Object
59 60 61 |
# File 'lib/bing_ads_ruby_sdk/api.rb', line 59 def reporting build_service(BingAdsRubySdk::Services::Reporting) end |
#set_customer(account_id:, customer_id:) ⇒ Object
63 64 65 |
# File 'lib/bing_ads_ruby_sdk/api.rb', line 63 def set_customer(account_id:, customer_id:) header.set_customer(account_id: account_id, customer_id: customer_id) end |