Class: SpiffyStoresAPI::Metafield

Inherits:
Base show all
Includes:
DisablePrefixCheck
Defined in:
lib/spiffy_stores_api/resources/metafield.rb

Instance Method Summary collapse

Methods inherited from Base

activate_session, #as_json, clear_session, #encode, #headers, init_prefix, init_prefix_explicit, #persisted?

Methods included from Countable

#count

Methods inherited from ActiveResource::Base

delete, headers

Instance Method Details

#valueObject



7
8
9
10
# File 'lib/spiffy_stores_api/resources/metafield.rb', line 7

def value
  return if attributes["value"].nil?
  attributes["value_type"] == "integer" ? attributes["value"].to_i : attributes["value"]
end