module Spree::API::Client::Variants
Public Instance Methods
create_variant(product_id, options={})
click to toggle source
# File lib/spree-api-client/variants.rb, line 17 def create_variant(product_id, options={}) post("products/#{product_id}/variants/", options) end
delete_variant(product_id, variant_id, options={})
click to toggle source
# File lib/spree-api-client/variants.rb, line 25 def delete_variant(product_id, variant_id, options={}) delete("products/#{product_id}/variants/#{variant_id}", options) end
new_variant(product_id, options={})
click to toggle source
# File lib/spree-api-client/variants.rb, line 13 def new_variant(product_id, options={}) get("products/#{product_id}/variants/new", options) end
update_variant(product_id, variant_id, options={})
click to toggle source
# File lib/spree-api-client/variants.rb, line 21 def update_variant(product_id, variant_id, options={}) put("products/#{product_id}/variants/#{variant_id}", options) end
variant(product_id, variant_id, options={})
click to toggle source
# File lib/spree-api-client/variants.rb, line 9 def variant(product_id, variant_id, options={}) get("products/#{product_id}/variants/#{variant_id}", options) end
variants(product_id, options={})
click to toggle source
# File lib/spree-api-client/variants.rb, line 5 def variants(product_id, options={}) get("products/#{product_id}/variants", options)['variants'] end