Sha256: d4b54e469dd140f8604c42b61f5693724ba7d1f0c91b92643ae3e8255aa05299

Contents?: true

Size: 998 Bytes

Versions: 1

Compression:

Stored size: 998 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
              }
              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

1 entries across 1 versions & 1 rubygems

Version Path
bing-ads-0.1.3 lib/bing/ads/api/v11/services/customer_management.rb