class HermesAPI::WebTracking

Constants

MAPPING

Public Class Methods

find(barcode) click to toggle source
# File lib/hermes_api/resources/web_tracking.rb, line 29
def self.find(barcode)
  uniqueId = format.decode(connection.get("#{prefix}/search/#{barcode}", headers).body).first
  return nil if uniqueId.nil?

  find_single("", params: {uniqueIds: uniqueId})
end

Public Instance Methods

load(attributes, remove_root = false, persisted = false) click to toggle source
Calls superclass method
# File lib/hermes_api/resources/web_tracking.rb, line 23
def load(attributes, remove_root = false, persisted = false)
  attributes = attributes.dig("results", 0)
  attributes.deep_transform_keys! { |k| k.to_s.underscore }
  super
end