module Spree::API::Client::Taxons

Public Instance Methods

create_taxon(taxonomy_id, options={}) click to toggle source
# File lib/spree-api-client/taxons.rb, line 22
def create_taxon(taxonomy_id, options={})
  post("taxonomies/#{taxonomy_id}/taxons/", options)
end
delete_taxon(taxonomy_id, taxon_id, options={}) click to toggle source
# File lib/spree-api-client/taxons.rb, line 30
def delete_taxon(taxonomy_id, taxon_id, options={})
  delete("taxonomies/#{taxonomy_id}/taxons/#{taxon_id}", options)
end
taxon(taxon_ids, options={}) click to toggle source
# File lib/spree-api-client/taxons.rb, line 9
def taxon(taxon_ids, options={})
  return [] unless taxon_ids.length
  get("taxons/?ids=#{taxon_ids.join(',')}", options)
end
taxonomy_taxon(taxonomy_id, taxon_id, options={}) click to toggle source
# File lib/spree-api-client/taxons.rb, line 18
def taxonomy_taxon(taxonomy_id, taxon_id, options={})
  get("taxonomies/#{taxonomy_id}/taxons/#{taxon_id}", options)
end
taxonomy_taxons(taxonomy_id, options={}) click to toggle source
# File lib/spree-api-client/taxons.rb, line 14
def taxonomy_taxons(taxonomy_id, options={})
  get("taxonomies/#{taxonomy_id}/taxons", options)['taxons']
end
taxons(options={}) click to toggle source
# File lib/spree-api-client/taxons.rb, line 5
def taxons(options={})
  get("taxons", options)['taxons']
end
update_taxon(taxonomy_id, taxon_id, options={}) click to toggle source
# File lib/spree-api-client/taxons.rb, line 26
def update_taxon(taxonomy_id, taxon_id, options={})
  put("taxonomies/#{taxonomy_id}/taxons/#{taxon_id}", options)
end