Class: EPlat::Shop
- Defined in:
- lib/e_plat/resource/shop.rb
Direct Known Subclasses
Bigcommerce::Shop, EPlat::Shopify::Shop, EPlat::ShopifyWebhook::Shop
Constant Summary
Constants included from Concerns::GraphQLable
Concerns::GraphQLable::FILTER_ARGS, Concerns::GraphQLable::QUERY_ARG_ARGS
Instance Attribute Summary
Attributes inherited from Base
Attributes included from Concerns::Aliases
Class Method Summary collapse
- .current ⇒ Object
-
.find_single(scope, options) ⇒ Object
Need to override for BigCommerce, since it doesn’t have a /shop endpoint Is threadsafe as the path is determined and used all within this method.
Methods inherited from Base
cached_shopify_webhook?, client, #client, exclude_from_json, #formatted_id, #graphql_input, #headers, #include_root_in_json, inherited, #initialize, initialize_singleton!, #mapped?, #native_keys, platform_specific_class?, prefix=, #read_only?
Methods included from Countable
Methods included from Concerns::GraphQLable
#graphql_mutation_string, #mutate_graphql, #remove_mutation_root_from
Methods included from Concerns::Aliases
Methods included from Concerns::FullJson
Methods included from Concerns::OverwriteRequestMethods
#collection_path, #element_path, included
Methods included from Concerns::OverwriteInstanceMethods
#as_eplat_json, #as_json, #create, #create_resource_for, #to_eplat_json, #to_json, #update
Constructor Details
This class inherits a constructor from EPlat::Base
Class Method Details
.current ⇒ Object
16 17 18 |
# File 'lib/e_plat/resource/shop.rb', line 16 def current find(1) end |
.find_single(scope, options) ⇒ Object
Need to override for BigCommerce, since it doesn’t have a /shop endpoint Is threadsafe as the path is determined and used all within this method
9 10 11 12 13 14 |
# File 'lib/e_plat/resource/shop.rb', line 9 def find_single(scope, ) , = ([:params]) path = (client.bigcommerce?) ? "/stores/#{ client.store_hash }/v2/store.json" : "#{ client.url_prefix }shop.json" instantiate_record(format.decode(connection.get(path, client.headers).body), ) end |