Module: Spree::API::Client::Properties

Included in:
Spree::API::Client
Defined in:
lib/spree-api-client/properties.rb

Instance Method Summary collapse

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, options={})
  post("products/#{product_id}/product_properties/", options)
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, options={})
  delete("products/#{product_id}/product_properties/#{property_id}", options)
end

#new_property(product_id, options = {}) ⇒ Object



13
14
15
# File 'lib/spree-api-client/properties.rb', line 13

def new_property(product_id, options={})
  get("products/#{product_id}/product_properties/new", options)
end

#properties(product_id, options = {}) ⇒ Object



5
6
7
# File 'lib/spree-api-client/properties.rb', line 5

def properties(product_id, options={})
  get("products/#{product_id}/product_properties", options)['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, options={})
  get("products/#{product_id}/product_properties/#{property_id}", options)
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, options={})
  put("products/#{product_id}/product_properties/#{property_id}", options)
end