Class: BingAdsApi::DataObject

Inherits:
Object
  • Object
show all
Includes:
SOAPHasheable
Defined in:
lib/bing-ads-api/data_object.rb

Overview

Public : Base Class to define Bing API data objects Do not use this class directly, use any of the derived classes

Author

[email protected]

Instance Method Summary collapse

Methods included from SOAPHasheable

#date_to_hash, #get_attribute_key, #normalize_hash_keys, #object_to_hash, #to_hash

Constructor Details

#initialize(attributes = {}) ⇒ DataObject

Public : Constructor in a ActiveRecord style, with a hash of attributes as input

Author

[email protected]

attributes - Hash with the objects attributes



21
22
23
# File 'lib/bing-ads-api/data_object.rb', line 21

def initialize(attributes={})
  attributes.each { |key, val| send("#{key}=", val) if respond_to?("#{key}=") }
end

Instance Method Details

#to_sObject

Public : Specified to string method

Author

[email protected]



29
30
31
# File 'lib/bing-ads-api/data_object.rb', line 29

def to_s
  to_hash.to_s
end