xero_gateway 2.0.18 → 2.0.19
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/xero_gateway/payment.rb +7 -4
- data/xero_gateway.gemspec +2 -2
- metadata +4 -4
data/lib/xero_gateway/payment.rb
CHANGED
@@ -7,7 +7,7 @@ module XeroGateway
|
|
7
7
|
attr_reader :errors
|
8
8
|
|
9
9
|
# All accessible fields
|
10
|
-
attr_accessor :date, :amount
|
10
|
+
attr_accessor :payment_id, :date, :amount, :reference, :currency_rate
|
11
11
|
|
12
12
|
def initialize(params = {})
|
13
13
|
@errors ||= []
|
@@ -21,15 +21,18 @@ module XeroGateway
|
|
21
21
|
payment = Payment.new
|
22
22
|
payment_element.children.each do | element |
|
23
23
|
case element.name
|
24
|
-
when '
|
25
|
-
when '
|
24
|
+
when 'PaymentID' then payment.payment_id = element.text
|
25
|
+
when 'Date' then payment.date = parse_date_time(element.text)
|
26
|
+
when 'Amount' then payment.amount = BigDecimal.new(element.text)
|
27
|
+
when 'Reference' then payment.reference = element.text
|
28
|
+
when 'CurrencyRate' then payment.currency_rate = BigDecimal.new(element.text)
|
26
29
|
end
|
27
30
|
end
|
28
31
|
payment
|
29
32
|
end
|
30
33
|
|
31
34
|
def ==(other)
|
32
|
-
[:date, :amount].each do |field|
|
35
|
+
[:payment_id, :date, :amount].each do |field|
|
33
36
|
return false if send(field) != other.send(field)
|
34
37
|
end
|
35
38
|
return true
|
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.
|
4
|
-
s.date = "2012-07-
|
3
|
+
s.version = "2.0.19"
|
4
|
+
s.date = "2012-07-13"
|
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:
|
4
|
+
hash: 41
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 2.0.
|
9
|
+
- 19
|
10
|
+
version: 2.0.19
|
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: 2012-07-
|
19
|
+
date: 2012-07-13 00:00:00 +12:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|