Class: Vacuum::Response::ProductAdvertising
- Defined in:
- lib/vacuum/response/product_advertising.rb
Overview
A Product Advertising API response.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#errors ⇒ Object
Returns an Array of errors.
-
#has_errors? ⇒ Boolean
Returns whether the response has errors.
Methods inherited from Base
#find, #initialize, #to_hash, #valid?, #xml
Constructor Details
This class inherits a constructor from Vacuum::Response::Base
Instance Method Details
#errors ⇒ Object
Returns an Array of errors.
6 7 8 |
# File 'lib/vacuum/response/product_advertising.rb', line 6 def errors find 'Error' end |
#has_errors? ⇒ Boolean
Returns whether the response has errors.
Note that a response with errors is still technically valid, i.e. the response code is 200.
14 15 16 |
# File 'lib/vacuum/response/product_advertising.rb', line 14 def has_errors? errors.count > 0 end |