module Bigcommerce::SubresourceActions::ClassMethods
Public Instance Methods
all(parent_id, params = {})
click to toggle source
# File lib/bigcommerce/subresource_actions.rb, line 12 def all(parent_id, params = {}) raise ArgumentError if parent_id.nil? get path.build(parent_id), params end
create(parent_id, params = {})
click to toggle source
# File lib/bigcommerce/subresource_actions.rb, line 22 def create(parent_id, params = {}) raise ArgumentError if parent_id.nil? post path.build(parent_id), params end
destroy(parent_id, resource_id, params = {})
click to toggle source
# File lib/bigcommerce/subresource_actions.rb, line 32 def destroy(parent_id, resource_id, params = {}) raise ArgumentError if [parent_id, resource_id].any?(&:nil?) delete path.build([parent_id, resource_id]), params end
destroy_all(parent_id, params = {})
click to toggle source
# File lib/bigcommerce/subresource_actions.rb, line 37 def destroy_all(parent_id, params = {}) raise ArgumentError if parent_id.nil? delete path.build(parent_id), params end
find(parent_id, resource_id, params = {})
click to toggle source
# File lib/bigcommerce/subresource_actions.rb, line 17 def find(parent_id, resource_id, params = {}) raise ArgumentError if [parent_id, resource_id].any?(&:nil?) get path.build([parent_id, resource_id]), params end
update(parent_id, resource_id, params = {})
click to toggle source
# File lib/bigcommerce/subresource_actions.rb, line 27 def update(parent_id, resource_id, params = {}) raise ArgumentError if [parent_id, resource_id].any?(&:nil?) put path.build([parent_id, resource_id]), params end