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 included from Countable
Methods inherited from ActiveResource::Base
Class Method Details
.current ⇒ Object
5 6 7 |
# File 'lib/shopify_api/resources/shop.rb', line 5 def self.current find(:one, :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 |
#events ⇒ Object
19 20 21 |
# File 'lib/shopify_api/resources/shop.rb', line 19 def events Event.find(:all) end |
#metafields ⇒ Object
9 10 11 |
# File 'lib/shopify_api/resources/shop.rb', line 9 def Metafield.find(:all) end |