Class: BingAdsApi::AdApiFaultDetail
- Inherits:
-
ApplicationFault
- Object
- DataObject
- ApplicationFault
- BingAdsApi::AdApiFaultDetail
- Defined in:
- lib/bing-ads-api/fault/ad_api_fault_detail.rb
Overview
Public : Defines a fault object that operations return when generic errors occur, such as an authentication error.
- Author
Instance Attribute Summary collapse
-
#errors ⇒ Object
Returns the value of attribute errors.
Attributes inherited from ApplicationFault
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ AdApiFaultDetail
constructor
Public : Constructor .
-
#to_s ⇒ Object
Public : Specified to string method .
Methods included from SOAPHasheable
#date_to_hash, #get_attribute_key, #normalize_hash_keys, #object_to_hash, #to_hash
Constructor Details
#initialize(attributes = {}) ⇒ AdApiFaultDetail
Public : Constructor
- Author
attributes - Hash with the initial attributes
Attributes
-
tracking_id : the operation tracking id value
-
errors : array of hashes with the Ad api errors
22 23 24 25 26 27 |
# File 'lib/bing-ads-api/fault/ad_api_fault_detail.rb', line 22 def initialize(attributes={}) super(attributes) if attributes initialize_errors(attributes[:errors]) end end |
Instance Attribute Details
#errors ⇒ Object
Returns the value of attribute errors.
11 12 13 |
# File 'lib/bing-ads-api/fault/ad_api_fault_detail.rb', line 11 def errors @errors end |
Instance Method Details
#to_s ⇒ Object
Public : Specified to string method
- Author
32 33 34 35 36 37 38 39 |
# File 'lib/bing-ads-api/fault/ad_api_fault_detail.rb', line 32 def to_s str = super.to_s + ":\n" if errors str += "\tErrors:\n" + errors.map{ |e| "\t" + e.to_s }.join("\n") end return str end |