Class: ShopifyAPI::Variant

Inherits:
Base show all
Includes:
DisablePrefixCheck, Metafields
Defined in:
lib/shopify_api/resources/variant.rb

Class Method Summary collapse

Methods included from Metafields

#add_metafield, #metafields

Methods included from Countable

#count

Methods inherited from ActiveResource::Base

#encode

Class Method Details

.prefix(options = {}) ⇒ Object



8
9
10
# File 'lib/shopify_api/resources/variant.rb', line 8

def self.prefix(options={})
  options[:product_id].nil? ? "/admin/" : "/admin/products/#{options[:product_id]}/"
end