Class: ShopifyAPI::Shop
- Inherits:
-
Base
- Object
- ActiveResource::Base
- Base
- ShopifyAPI::Shop
- Defined in:
- lib/shopify_api/resources/shop.rb
Overview
Shop object. Use Shop.current to receive the shop.
Class Method Summary collapse
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
Methods inherited from ActiveResource::Base
Class Method Details
.current(options = {}) ⇒ Object
5 6 7 |
# File 'lib/shopify_api/resources/shop.rb', line 5 def self.current(={}) find(:one, .merge({from: "/admin/shop.#{format.extension}"})) end |
Instance Method Details
#add_metafield(metafield) ⇒ Object
13 14 15 16 17 |
# File 'lib/shopify_api/resources/shop.rb', line 13 def () raise ArgumentError, "You can only add metafields to resource that has been saved" if new? .save end |