class BigcommerceAPI::OptionSetOption

Attributes

display_name[RW]
id[RW]
is_required[RW]
option_id[RW]
option_resource[RW]
option_set_id[RW]
sort_order[RW]

Public Class Methods

all(option_set_id, params={}) click to toggle source
# File lib/bigcommerce_api/option_set_option.rb, line 27
def all(option_set_id, params={})
  resources = BigcommerceAPI::Base.get("/option_sets/#{option_set_id}/options", query: date_adjust(params))
  (resources.success? and !resources.nil?) ? resources.collect{|r| self.new(r)} : []
end
find(option_set_id, id) click to toggle source
# File lib/bigcommerce_api/option_set_option.rb, line 32
def find(option_set_id, id)
  r = BigcommerceAPI::Base.get("/option_sets/#{option_set_id}/options/#{id}")
  (r.success? and !r.nil?) ? self.new(r) : nil
end

Public Instance Methods

find_for_reload() click to toggle source
# File lib/bigcommerce_api/option_set_option.rb, line 22
def find_for_reload
  self.class.find(self.option_set_id, self.id)
end
parent() click to toggle source
# File lib/bigcommerce_api/option_set_option.rb, line 18
def parent
  'option_set'
end
resource_url() click to toggle source
# File lib/bigcommerce_api/option_set_option.rb, line 14
def resource_url
  "option_sets/#{self.option_set_id}/options"
end