Class: BingAdsApi::PartialErrors

Inherits:
DataObject show all
Defined in:
lib/bing-ads-api/fault/partial_errors.rb

Overview

Public : Defines an array of error that occur when adding ads

Author

[email protected]

Instance Attribute Summary collapse

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 = {}) ⇒ PartialErrors

Public : Constructor

Author

[email protected]

attributes - Hash with the initial attributes

Attributes

  • tracking_id : the operation tracking id value

  • batch_error : array of hashes with the batch errors



21
22
23
24
25
26
# File 'lib/bing-ads-api/fault/partial_errors.rb', line 21

def initialize(attributes={})
  super(attributes)
  if attributes
    initialize_batch_errors(attributes)
  end
end

Instance Attribute Details

#batch_errorsObject

Returns the value of attribute batch_errors.



10
11
12
# File 'lib/bing-ads-api/fault/partial_errors.rb', line 10

def batch_errors
  @batch_errors
end

Instance Method Details

#to_sObject

Public : Specified to string method

Author

[email protected]



32
33
34
35
36
37
38
39
# File 'lib/bing-ads-api/fault/partial_errors.rb', line 32

def to_s
  str = "  Batch Errors:\n"
  if batch_errors
    str += batch_errors.map{ |be| "\t" + be.to_s }.join("\n")
  end
  
  return str
end