Sha256: 74e4d17886058195aac137ef7f88282eba1c08a47a2f8f1d04d797d5b845ebe8

Contents?: true

Size: 1013 Bytes

Versions: 7

Compression:

Stored size: 1013 Bytes

Contents

module Bing
  module Ads
    module API
      module V11
        module Services
          # Bing::Ads::API::V11::Services::CustomerManagement
          class CustomerManagement < Base
            def initialize(options = {})
              super(options)
            end

            def get_accounts_info(customer_id = @customer_id, only_parent_accounts = false)
              payload = {
                customer_id: customer_id,
                only_parent_accounts: (only_parent_accounts == true).to_s
              }
              response = call(:get_accounts_info, payload.compact)
              response_body = response_body(response, __method__)
              response_body[:accounts_info][:account_info]
            end

            # TODO operations: https://msdn.microsoft.com/en-us/library/bing-ads-customer-management-service-operations.aspx

            private

            def service_name
              'customer_management'
            end
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
bing-ads-0.2.0 lib/bing/ads/api/v11/services/customer_management.rb
bing-ads-0.1.11 lib/bing/ads/api/v11/services/customer_management.rb
bing-ads-0.1.10 lib/bing/ads/api/v11/services/customer_management.rb
bing-ads-0.1.7 lib/bing/ads/api/v11/services/customer_management.rb
bing-ads-0.1.6 lib/bing/ads/api/v11/services/customer_management.rb
bing-ads-0.1.5 lib/bing/ads/api/v11/services/customer_management.rb
bing-ads-0.1.4 lib/bing/ads/api/v11/services/customer_management.rb