zoho_invoice 0.3.5 → 0.3.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 91bc4a03fded5b24c2f39246cf932148cf2475af
4
- data.tar.gz: 6cda23d376936ec7ea1f31829c8a7177e0dce01a
3
+ metadata.gz: be61def063a3989ceae927f8f1c5c5e692581e0b
4
+ data.tar.gz: 406ca99386eb3bd893c0a7e6088c3a79480af2b6
5
5
  SHA512:
6
- metadata.gz: 4f609f6c5175b806c2d64d87c07f15e9d0bb5598b3e5077c6cf60f51bacb60c705f7b0d77d7954b5504023107a614a117caa82ee35201906accf82da3b26d7e2
7
- data.tar.gz: d04b4faa618386aecda45a6865f4189852e19e91f944997c1ea58c461125e04b1356c43f832a7d0a173d2211c3990130a611c8ff6953ad9a9a0624cdfc8cc392
6
+ metadata.gz: cf9fb3ff087be36d4dcc0c6feba5dd6b2f55638152242e58173762319b2ee52399eab618c818313083d37a02a49b5340c1946287c0ed19bf8cc8849e02ec4237
7
+ data.tar.gz: 27c8c9a27784cdaca450f93ac8b017022d1e21ada372d4ef04cb0424d2e57e086f8ea0b45b9c24b5ce78fae496c54c0563b5382892b4b53e5c23b6279e2966a9
@@ -77,13 +77,15 @@ module ZohoInvoice
77
77
  #
78
78
  def save
79
79
 
80
+ klass_name = self.class.to_s.split('::').last
81
+
80
82
  action = 'create'
81
- action = 'update' if !send("#{self.class.to_s.split('::').last.downcase}_id").nil?
83
+ action = 'update' if !send("#{klass_name.downcase}_id").nil?
82
84
 
83
- result = client.post("/api/#{self.class.to_s.split('::').last.downcase + 's'}/#{action}", :XMLString => self.to_xml)
85
+ result = client.post("/api/#{klass_name.downcase + 's'}/#{action}", :XMLString => self.to_xml)
84
86
 
85
- if action == 'create' && !result.body.nil? && !result.body['Response'][self.class.to_s].nil?
86
- self.send("#{self.class.to_s.downcase}_id=", result.body['Response'][self.class.to_s]["#{self.class}ID"])
87
+ if action == 'create' && !result.body.nil? && !result.body['Response'][klass_name].nil?
88
+ self.send("#{self.class.to_s.downcase}_id=", result.body['Response'][klass_name]["#{klass_name}ID"])
87
89
  end
88
90
 
89
91
  self
@@ -1,3 +1,3 @@
1
1
  module ZohoInvoice
2
- VERSION = "0.3.5"
2
+ VERSION = "0.3.5.1"
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.3.5
4
+ version: 0.3.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rimas Silkaitis