zoho_invoice 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -94,9 +94,9 @@ module ZohoInvoice
94
94
  @errors = []
95
95
 
96
96
  action = 'create'
97
- action = 'update' if !send("#{self.class.to_s.downcase}_id").nil?
97
+ action = 'update' if !send("#{self.class.to_s.split('::').last.downcase}_id").nil?
98
98
 
99
- result = client.post("/api/#{self.class.to_s.downcase + 's'}/#{action}", :XMLString => self.to_xml)
99
+ result = client.post("/api/#{self.class.to_s.split('::').last.downcase + 's'}/#{action}", :XMLString => self.to_xml)
100
100
 
101
101
  if action == 'create' && !result.body.nil? && !result.body[self.class.to_s].nil?
102
102
  self.send("#{self.class.to_s.downcase}_id=", result.body[self.class.to_s]["#{self.class}ID"])
@@ -1,3 +1,3 @@
1
1
  module ZohoInvoice
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zoho_invoice
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: