Sha256: ed77a426bfebc219b307456011d3f7cd3f5ff89b5ef78becfa9a07d161ff775e

Contents?: true

Size: 435 Bytes

Versions: 5

Compression:

Stored size: 435 Bytes

Contents

module Vacuum
  module Response
    # A Product Advertising API response.
    class ProductAdvertising < Base
      # Returns an Array of errors.
      def errors
        find 'Error'
      end

      # Returns whether the response has errors.
      #
      # Note that a response with errors is still technically valid, i.e. the
      # response code is 200.
      def has_errors?
        errors.count > 0
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
vacuum-0.2.2 lib/vacuum/response/product_advertising.rb
vacuum-0.2.1 lib/vacuum/response/product_advertising.rb
vacuum-0.2.0 lib/vacuum/response/product_advertising.rb
vacuum-0.2.0.pre.1 lib/vacuum/response/product_advertising.rb
vacuum-0.2.0.pre lib/vacuum/response/product_advertising.rb