Class: XeroGateway::TrackingCategory::Option
- Inherits:
-
Object
- Object
- XeroGateway::TrackingCategory::Option
- Defined in:
- lib/xero_gateway/tracking_category.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#status ⇒ Object
Returns the value of attribute status.
-
#tracking_option_id ⇒ Object
Returns the value of attribute tracking_option_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Option
constructor
A new instance of Option.
Constructor Details
#initialize(params = {}) ⇒ Option
Returns a new instance of Option.
27 28 29 30 31 |
# File 'lib/xero_gateway/tracking_category.rb', line 27 def initialize(params = {}) params.each do |k,v| self.send("#{k}=", v) end end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
25 26 27 |
# File 'lib/xero_gateway/tracking_category.rb', line 25 def name @name end |
#status ⇒ Object
Returns the value of attribute status.
25 26 27 |
# File 'lib/xero_gateway/tracking_category.rb', line 25 def status @status end |
#tracking_option_id ⇒ Object
Returns the value of attribute tracking_option_id.
25 26 27 |
# File 'lib/xero_gateway/tracking_category.rb', line 25 def tracking_option_id @tracking_option_id end |
Class Method Details
.from_xml(option_element) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 |
# 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 |