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(version: DEFAULT_SDK_VERSION, environment: :production, developer_token:, client_id:, oauth_store:, client_secret: nil) ⇒ Api
constructor
A new instance of Api.
- #reporting ⇒ Object
- #set_customer(account_id:, customer_id:) ⇒ Object
Constructor Details
#initialize(version: DEFAULT_SDK_VERSION, environment: :production, developer_token:, client_id:, oauth_store:, client_secret: nil) ⇒ Api
Returns a new instance of Api.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/bing_ads_ruby_sdk/api.rb', line 26 def initialize(version: DEFAULT_SDK_VERSION, environment: :production, developer_token:, client_id:, oauth_store:, 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
42 43 44 |
# File 'lib/bing_ads_ruby_sdk/api.rb', line 42 def ad_insight build_service(BingAdsRubySdk::Services::AdInsight) end |
#bulk ⇒ Object
46 47 48 |
# File 'lib/bing_ads_ruby_sdk/api.rb', line 46 def bulk build_service(BingAdsRubySdk::Services::Bulk) end |
#campaign_management ⇒ Object
50 51 52 |
# File 'lib/bing_ads_ruby_sdk/api.rb', line 50 def campaign_management build_service(BingAdsRubySdk::Services::CampaignManagement) end |
#customer_billing ⇒ Object
54 55 56 |
# File 'lib/bing_ads_ruby_sdk/api.rb', line 54 def customer_billing build_service(BingAdsRubySdk::Services::CustomerBilling) end |
#customer_management ⇒ Object
58 59 60 |
# File 'lib/bing_ads_ruby_sdk/api.rb', line 58 def customer_management build_service(BingAdsRubySdk::Services::CustomerManagement) end |
#reporting ⇒ Object
62 63 64 |
# File 'lib/bing_ads_ruby_sdk/api.rb', line 62 def reporting build_service(BingAdsRubySdk::Services::Reporting) end |
#set_customer(account_id:, customer_id:) ⇒ Object
66 67 68 |
# File 'lib/bing_ads_ruby_sdk/api.rb', line 66 def set_customer(account_id:, customer_id:) header.set_customer(account_id: account_id, customer_id: customer_id) end |