xsys 0.19.1 → 0.19.2

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: a3533db74957efb83cb9859c3cd444d7fdfd9b9f
4
- data.tar.gz: 5c6f08c4f2abde0a0be273a8aeedf1b1504efade
3
+ metadata.gz: 9aca7283d2a561984f6e56638ce1283280c40a08
4
+ data.tar.gz: a16a7f535431f90427b5300eafa5a59f490fb9f5
5
5
  SHA512:
6
- metadata.gz: 92d0c4d9eba68c55f39b3c632386c9bb7b588526bc833a2846e3ad3c6e74a5e46d27a9bf34a9c468f5490b4110a5ef3a0c529ce495570c03992e677cf79eb062
7
- data.tar.gz: 914244c09ff1545798dc70f256b84babb4d173e5dabb564609daaf799bf4e98d4f6e31d14eddde4fba8c2f95197b0ca003be16165c013cb97836e74cae13eeab
6
+ metadata.gz: 88c5b9347061b962b519ae6eb0e9c2d2d9651739504820ab3a73a467cee456c382fd98a4ffec67282ac18a6748d5102854b9f5319a97eecfbca03d114bf3befc
7
+ data.tar.gz: '0842e56e1b432a6d241ab87b86c9f084d29e0ec8f857d7b595e302fd68a3e19bed593bec9c268e06baa08f8a1ac4bed613f451e940cc54dc1ca6cb75c5209383'
data/CHANGELOG.md CHANGED
@@ -377,3 +377,7 @@
377
377
  ## v0.19.1
378
378
 
379
379
  * Add real online stock to products
380
+
381
+ ## v0.19.2
382
+
383
+ * Capture null case when search company by cuit
data/lib/xsys/api.rb CHANGED
@@ -208,7 +208,13 @@ module Xsys
208
208
  end
209
209
 
210
210
  def self.get_company(code)
211
- Model::Company.new(get_request("/companies/#{code}")[:body])
211
+ result = get_request("/companies/#{code}")[:body]
212
+
213
+ if result == 'null'
214
+ nil
215
+ else
216
+ Model::Company.new(get_request("/companies/#{code}")[:body])
217
+ end
212
218
  end
213
219
 
214
220
  def self.calculate_company_taxes(company_code, items)
data/lib/xsys/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Xsys
2
- VERSION = "0.19.1"
2
+ VERSION = "0.19.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xsys
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.1
4
+ version: 0.19.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matias Hick
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-18 00:00:00.000000000 Z
11
+ date: 2017-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler