Module: Spree::API::Client::Properties
- Included in:
- Spree::API::Client
- Defined in:
- lib/spree-api-client/properties.rb
Instance Method Summary collapse
- #create_property(product_id, options = {}) ⇒ Object
- #delete_property(product_id, property_id, options = {}) ⇒ Object
- #new_property(product_id, options = {}) ⇒ Object
- #properties(product_id, options = {}) ⇒ Object
- #property(product_id, property_id, options = {}) ⇒ Object
- #update_property(product_id, property_id, options = {}) ⇒ Object
Instance Method Details
#create_property(product_id, options = {}) ⇒ Object
17 18 19 |
# File 'lib/spree-api-client/properties.rb', line 17 def create_property(product_id, ={}) post("products/#{product_id}/product_properties/", ) end |
#delete_property(product_id, property_id, options = {}) ⇒ Object
25 26 27 |
# File 'lib/spree-api-client/properties.rb', line 25 def delete_property(product_id, property_id, ={}) delete("products/#{product_id}/product_properties/#{property_id}", ) end |
#new_property(product_id, options = {}) ⇒ Object
13 14 15 |
# File 'lib/spree-api-client/properties.rb', line 13 def new_property(product_id, ={}) get("products/#{product_id}/product_properties/new", ) end |
#properties(product_id, options = {}) ⇒ Object
5 6 7 |
# File 'lib/spree-api-client/properties.rb', line 5 def properties(product_id, ={}) get("products/#{product_id}/product_properties", )['product_properties'] end |
#property(product_id, property_id, options = {}) ⇒ Object
9 10 11 |
# File 'lib/spree-api-client/properties.rb', line 9 def property(product_id, property_id, ={}) get("products/#{product_id}/product_properties/#{property_id}", ) end |
#update_property(product_id, property_id, options = {}) ⇒ Object
21 22 23 |
# File 'lib/spree-api-client/properties.rb', line 21 def update_property(product_id, property_id, ={}) put("products/#{product_id}/product_properties/#{property_id}", ) end |