freshbooks.rb 3.0.15 → 3.0.16
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/freshbooks.rb +1 -1
- data/lib/freshbooks/client.rb +2 -2
- data/lib/freshbooks/xml_serializer/serializers.rb +4 -2
- metadata +2 -2
data/lib/freshbooks.rb
CHANGED
@@ -60,7 +60,7 @@ require 'logger'
|
|
60
60
|
#
|
61
61
|
#==============================================================================
|
62
62
|
module FreshBooks
|
63
|
-
VERSION = '3.0.
|
63
|
+
VERSION = '3.0.16' # Gem version
|
64
64
|
API_VERSION = '2.1' # FreshBooks API version
|
65
65
|
SERVICE_URL = "/api/#{API_VERSION}/xml-in"
|
66
66
|
|
data/lib/freshbooks/client.rb
CHANGED
@@ -6,7 +6,7 @@ module FreshBooks
|
|
6
6
|
s.string :mobile, :fax, :notes, :p_street1, :p_street2, :p_city
|
7
7
|
s.string :p_state, :p_country, :p_code, :s_street1, :s_street2
|
8
8
|
s.string :s_city, :s_state, :s_country, :s_code
|
9
|
-
s.float :credit
|
9
|
+
s.float :credit, :read_only => true
|
10
10
|
s.date_time :updated, :read_only => true
|
11
11
|
s.fixnum :client_id
|
12
12
|
s.object :links, :read_only => true
|
@@ -19,4 +19,4 @@ module FreshBooks
|
|
19
19
|
Invoice::list(options)
|
20
20
|
end
|
21
21
|
end
|
22
|
-
end
|
22
|
+
end
|
@@ -36,8 +36,7 @@ module FreshBooks
|
|
36
36
|
Date.parse(xml_val.text.to_s)
|
37
37
|
rescue ArgumentError => e
|
38
38
|
# Sometimes freshbooks gives dates that look like this 0000-00-00 00:00:00
|
39
|
-
|
40
|
-
Date.new
|
39
|
+
nil
|
41
40
|
end
|
42
41
|
end
|
43
42
|
end
|
@@ -103,6 +102,9 @@ module FreshBooks
|
|
103
102
|
|
104
103
|
def self.to_value(xml_val)
|
105
104
|
DateTime.parse(xml_val.text.to_s + " -04:00").utc # hack to convert from gmt-4 to utc
|
105
|
+
rescue ArgumentError => e
|
106
|
+
# Sometimes freshbooks gives dates that look like this 0000-00-00 00:00:00
|
107
|
+
nil
|
106
108
|
end
|
107
109
|
end
|
108
110
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: freshbooks.rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Curren
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-10-
|
12
|
+
date: 2009-10-27 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|