Class: VersacommerceAPI::Shop
- Inherits:
-
Base
- Object
- ActiveResource::Base
- Base
- VersacommerceAPI::Shop
show all
- Includes:
- Metafieldable
- Defined in:
- lib/versacommerce_api/resources/shop.rb
Overview
Shop object. Use Shop.current to receive the shop.
Class Method Summary
collapse
Instance Method Summary
collapse
#add_metafield, #metafields
Methods inherited from Base
activate_session, all, clear_session, headers, root!
Methods included from Countable
#count
Class Method Details
.collection_name ⇒ Object
7
8
9
|
# File 'lib/versacommerce_api/resources/shop.rb', line 7
def self.collection_name
'shop'
end
|
.current ⇒ Object
15
16
17
|
# File 'lib/versacommerce_api/resources/shop.rb', line 15
def self.current
find(:one, from: '/api/shop.xml')
end
|
.element_path(id, prefix_options = {}, query_options = nil) ⇒ Object
11
12
13
|
# File 'lib/versacommerce_api/resources/shop.rb', line 11
def self.element_path(id, prefix_options = {}, query_options = nil)
"#{prefix(prefix_options)}#{collection_name}#{format_extension}#{query_string(query_options)}"
end
|
Instance Method Details
#to_xml(options = {}) ⇒ Object
19
20
21
|
# File 'lib/versacommerce_api/resources/shop.rb', line 19
def to_xml(options = {})
super(only: [:current_design, :current_sandbox_design, :current_facebook_design])
end
|