Module: Bigcommerce::ResourceActions::ClassMethods
- Defined in:
- lib/bigcommerce/resource_actions.rb
Instance Method Summary collapse
- #all(params = {}) ⇒ Object
- #create(params = {}) ⇒ Object
- #destroy(resource_id, params = {}) ⇒ Object
- #destroy_all(params = {}) ⇒ Object
- #find(resource_id, params = {}) ⇒ Object
- #update(resource_id, params = {}) ⇒ Object
Instance Method Details
#all(params = {}) ⇒ Object
28 29 30 |
# File 'lib/bigcommerce/resource_actions.rb', line 28 def all(params = {}) get path.build, params end |
#create(params = {}) ⇒ Object
38 39 40 |
# File 'lib/bigcommerce/resource_actions.rb', line 38 def create(params = {}) post path.build, params end |
#destroy(resource_id, params = {}) ⇒ Object
48 49 50 51 52 |
# File 'lib/bigcommerce/resource_actions.rb', line 48 def destroy(resource_id, params = {}) raise ArgumentError if resource_id.nil? delete path.build(resource_id), params end |
#destroy_all(params = {}) ⇒ Object
54 55 56 |
# File 'lib/bigcommerce/resource_actions.rb', line 54 def destroy_all(params = {}) delete path.build, params end |
#find(resource_id, params = {}) ⇒ Object
32 33 34 35 36 |
# File 'lib/bigcommerce/resource_actions.rb', line 32 def find(resource_id, params = {}) raise ArgumentError if resource_id.nil? get path.build(resource_id), params end |
#update(resource_id, params = {}) ⇒ Object
42 43 44 45 46 |
# File 'lib/bigcommerce/resource_actions.rb', line 42 def update(resource_id, params = {}) raise ArgumentError if resource_id.nil? put path.build(resource_id), params end |