module ShopifyClient::API::ScriptTag

Public Instance Methods

create_script_tag(attributes) click to toggle source
# File lib/shopify_client/api/script_tag.rb, line 18
def create_script_tag(attributes)
  response = post("script_tags.json", script_tag: attributes)
  ShopifyClient::ScriptTag.from_response(response)
end
destroy_script_tag(id_or_object) click to toggle source
# File lib/shopify_client/api/script_tag.rb, line 23
def destroy_script_tag(id_or_object)
  id = id_or_object.is_a?(ShopifyClient::ScriptTag) ? id_or_object.id : id_or_object
  delete("script_tags/#{id}.json")
  true
end
script_tag(id, params = {}) click to toggle source
# File lib/shopify_client/api/script_tag.rb, line 13
def script_tag(id, params = {})
  response = get("script_tags/#{id}.json", params)
  ShopifyClient::ScriptTag.from_response(response)
end
script_tags(params = {}) click to toggle source
# File lib/shopify_client/api/script_tag.rb, line 8
def script_tags(params = {})
  response = get("script_tags.json", params)
  ShopifyClient::ScriptTag.array_from_response(response)
end