class XeroGateway::TrackingCategory::Option

Attributes

name[RW]
status[RW]
tracking_option_id[RW]

Public Class Methods

from_xml(option_element) click to toggle source
# File lib/xero_gateway/tracking_category.rb, line 33
def self.from_xml(option_element)
  option = Option.new
  option_element.children.each do |element|
    case(element.name)
      when "TrackingOptionID" then option.tracking_option_id = element.text
      when "Name" then option.name = element.text
      when "Status" then option.status = element.text
    end
  end
  option
end
new(params = {}) click to toggle source
# File lib/xero_gateway/tracking_category.rb, line 27
def initialize(params = {})
  params.each do |k,v|
    self.send("#{k}=", v)
  end
end