xero_gateway 2.0.2 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,21 @@
1
+ # Tacking categories look like:
2
+ #
3
+ # <TrackingCategory>
4
+ # <Name>Region</Name>
5
+ # <Status>ACTIVE</Status>
6
+ # <TrackingCategoryID>e4a95e64-ebaa-401e-81cf-b625c7532d01</TrackingCategoryID>
7
+ # <Options>
8
+ # <Option>
9
+ # <TrackingOptionID>ea7f7b6a-0d22-4d5c-9317-54542a10215e</TrackingOptionID>
10
+ # <Name>North</Name>
11
+ # </Option>
12
+ # <Option>
13
+ # <TrackingOptionID>8e8b8d7b-fa75-4b24-b429-8cbc1a21af23</TrackingOptionID>
14
+ # <Name>South</Name>
15
+ # </Option>
16
+ # </Options>
17
+ # </TrackingCategory>
18
+ #
1
19
  module XeroGateway
2
20
  class TrackingCategory
3
21
  attr_accessor :name, :options
@@ -46,7 +64,10 @@ module XeroGateway
46
64
  tracking_category_element.children.each do |element|
47
65
  case(element.name)
48
66
  when "Name" then tracking_category.name = element.text
49
- when "Options" then element.children.each {|option| tracking_category.options << option.children.first.text}
67
+ when "Options" then
68
+ element.children.each do |option_child|
69
+ tracking_category.options << option_child.children.detect {|c| c.name == "Name"}.text
70
+ end
50
71
  end
51
72
  end
52
73
  tracking_category
data/xero_gateway.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "xero_gateway"
3
- s.version = "2.0.2"
4
- s.date = "2010-08-24"
3
+ s.version = "2.0.3"
4
+ s.date = "2010-09-30"
5
5
  s.summary = "Enables ruby based applications to communicate with the Xero API"
6
6
  s.email = "tim@connorsoftware.com"
7
7
  s.homepage = "http://github.com/tlconnor/xero_gateway"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xero_gateway
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease: false
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
- - 2
10
- version: 2.0.2
9
+ - 3
10
+ version: 2.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tim Connor
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-08-24 00:00:00 +12:00
19
+ date: 2010-09-30 00:00:00 +13:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency