README.md in bing-ads-0.1.2 vs README.md in bing-ads-0.1.3

- old
+ new

@@ -1,6 +1,7 @@ [![Gem Version](https://img.shields.io/gem/v/bing-ads.svg)](https://rubygems.org/gems/bing-ads) +[![Build Status](https://travis-ci.org/FindHotel/bing-ads.svg?branch=master)](https://travis-ci.org/FindHotel/bing-ads) # Bing::Ads A Ruby client for Bing Ads API that includes a proxy to all Bing Ads API web services and abstracts low level details of authentication with OAuth. @@ -20,10 +21,32 @@ $ gem install bing-ads ## Usage +### Customer Management Service +#### Initialization +```ruby +# Authentication token is not supported in sandbox, use `username` and `password` instead +# https://msdn.microsoft.com/en-us/library/dn277356.aspx + +options = { + environment: :sandbox, + authentication_token: '39b290146bea6ce975c37cfc23', + developer_token: 'BBD37VB98', + customer_id: '21027149', + # client_settings: { logger: LOGGER::STDOUT } +} + +service = Bing::Ads::API::V11::Services::CustomerManagement.new(options) +``` + +#### Getting accounts info +```ruby +response = service.get_accounts_info +``` + ### Campaign Management Service #### Initialization ```ruby # Authentication token is not supported in sandbox, use `username` and `password` instead # https://msdn.microsoft.com/en-us/library/dn277356.aspx @@ -50,11 +73,10 @@ ```ruby account_id = 5278183 campaigns = [ { budget_type: Bing::Ads::API::V11.constants.campaign_management.budget_limit_type.daily_budget_standard, - conversion_tracking_enabled: "false", daily_budget: 2000, description: 'Amsterdam-based global campaign', name: '51 - Global - Chain - Mixed - N -en- Amsterdam - 100 - 26479', status: Bing::Ads::API::V11.constants.campaign_management.campaign_status.paused, time_zone: Bing::Ads::API::V11.constants.time_zones.amsterdam_berlin_bern_rome_stockholm_vienna @@ -70,16 +92,14 @@ account_id = 5278183 campaigns = [ { id: 813721838, budget_type: Bing::Ads::API::V11.constants.campaign_management.budget_limit_type.daily_budget_standard, - conversion_tracking_enabled: "false", }, { id: 813721849, budget_type: Bing::Ads::API::V11.constants.campaign_management.budget_limit_type.daily_budget_standard, - conversion_tracking_enabled: "false", }, # ... ] response = service.update_campaigns(account_id, campaigns) @@ -285,14 +305,17 @@ ``` ### Bulk Service Not yet supported -### Customer Management Service -Not yet supported - ### Reporting Service Not yet supported. Use: https://github.com/FindHotel/bing-ads-reporting + +### Errors raised +* `Bing::Ads::API::Errors::AuthenticationParamsMissing` +No username/password or authentication_token. +* `Bing::Ads::API::Errors::AuthenticationTokenExpired` Authentication token needs to be refreshed. +* `Bing::Ads::API::Errors::LimitError` An API limit has been exceeded on a specific request. Check message for details. ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. To install this gem onto your local machine, run `bundle exec rake install`.