Module: Spree::API::Client::OptionTypes

Defined in:
lib/spree-api-client/option_types.rb

Instance Method Summary collapse

Instance Method Details

#create_option_type(options = {}) ⇒ Object



17
18
19
# File 'lib/spree-api-client/option_types.rb', line 17

def create_option_type(options={})
  post("option_types", options)
end

#delete_option_type(permalink_or_id, options = {}) ⇒ Object



25
26
27
# File 'lib/spree-api-client/option_types.rb', line 25

def delete_option_type(permalink_or_id, options={})
  delete("option_types/#{permalink_or_id}", options)
end

#new_option_type(options = {}) ⇒ Object



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

def new_option_type(options={})
  get("option_types/#{permalink_or_id}/new", options)
end

#option_type(permalink_or_id, options = {}) ⇒ Object



9
10
11
# File 'lib/spree-api-client/option_types.rb', line 9

def option_type(permalink_or_id, options={})
  get("option_types/#{permalink_or_id}", options)
end

#option_types(options = {}) ⇒ Object



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

def option_types(options={})
  get('option_types', options)['option_types']
end

#update_option_type(permalink_or_id, options = {}) ⇒ Object



21
22
23
# File 'lib/spree-api-client/option_types.rb', line 21

def update_option_type(permalink_or_id, options={})
  put("option_types/#{permalink_or_id}", options)
end