anaf-web_services 0.2.0 → 0.3.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
  SHA256:
3
- metadata.gz: f10a08468acf2d6ac008cf8fec9131c8281f94b57616692d68b2f53fcf01bfdf
4
- data.tar.gz: 1415ffa899b1c117102ee3d8ddec115414e30eb8ac7eea1e26276532da6a8e93
3
+ metadata.gz: 8b453cc31c6acb0335bf5b06c0b5210354489cc0e37f16d25cf063ef80659ba5
4
+ data.tar.gz: 925fe3081b4026260b5b57d0526c32e9058a1c0e8cbf4878871fb045497fc92a
5
5
  SHA512:
6
- metadata.gz: bad370fd19627644c046508af33a5c4ed449a3892a17cfec7f4212690f2b2daff6dd7533483aaa49513ecc226a7416479b91fdecd6c26c5bd0030bad23898b38
7
- data.tar.gz: 97ed4b44ed844257e2a83a6aba132863b8e59df9741cd6ee64444c04a9b3c3f25cefdbb5b5ffea54592d53119b5057581ac4c34e3d7a6f0a2aef09f1f60d6347
6
+ metadata.gz: '09545f95bbb772727fa83180c569c0e2a7cd291fa5f349fdd068a8ead6bc6b8ce5c7e9dc00d261acd8ae72332024654113ea2d2c4878ba965042374d5c7115df'
7
+ data.tar.gz: fcd69df8f1dac81fb0eb5c006b74a2182ca5a9b6a174d25fe65b5f6a5ddc4f95f476efa357851ce99f2b984fb5181f0403b791c49ddc6d1b2a312f7266849413
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- anaf-web_services (0.2.0)
4
+ anaf-web_services (0.3.1)
5
5
  faraday (>= 1.0.0, < 3.0)
6
6
 
7
7
  GEM
@@ -96,6 +96,7 @@ GEM
96
96
  hashdiff (>= 0.4.0, < 2.0.0)
97
97
 
98
98
  PLATFORMS
99
+ arm64-darwin-22
99
100
  x86_64-darwin-21
100
101
  x86_64-linux
101
102
 
@@ -109,4 +110,4 @@ DEPENDENCIES
109
110
  webmock (~> 3.18, >= 3.18.1)
110
111
 
111
112
  BUNDLED WITH
112
- 2.2.32
113
+ 2.4.22
data/README.md CHANGED
@@ -40,7 +40,14 @@ The APIs operate based on this **CUI** number.
40
40
 
41
41
  This API returns some information about the companies but is mainly focused on the VAT status of the company, if it's VAT liable or not.
42
42
 
43
- For more details about the underlying API see [here](https://static.anaf.ro/static/10/Anaf/Informatii_R/doc_WS_V6.txt) the official documentation but it's only in Romanian.
43
+ For more details about the underlying API see the official documentation for the corresponding version, but it's only in Romanian.
44
+
45
+ #### API versions
46
+
47
+ | GEM | ANAF API | Docs |
48
+ |-------|----------|-------------------------------------------------------------------------------|
49
+ | 0.2.0 | V6 | https://static.anaf.ro/static/10/Anaf/Informatii_R/doc_WS_V6.txt |
50
+ | 0.3.0 | V8 | https://static.anaf.ro/static/10/Anaf/Informatii_R/Servicii_web/doc_WS_V8.txt |
44
51
 
45
52
  #### Get a company by CUI
46
53
 
@@ -6,7 +6,7 @@ module ANAF
6
6
  module WebServices
7
7
  class VatRegistry # :nodoc:
8
8
  BASE_URL = 'https://webservicesp.anaf.ro'
9
- PATH = '/PlatitorTvaRest/api/v6/ws/tva'
9
+ PATH = '/PlatitorTvaRest/api/v8/ws/tva'
10
10
 
11
11
  attr_reader :ids
12
12
 
@@ -26,7 +26,7 @@ module ANAF
26
26
  rescue JSON::ParserError
27
27
  raise InvalidRequest, response.body
28
28
  rescue Faraday::TimeoutError, Faraday::ConnectionFailed
29
- nil
29
+ raise TimeoutError
30
30
  end
31
31
 
32
32
  def request_body
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ANAF
4
4
  module WebServices
5
- VERSION = '0.2.0'
5
+ VERSION = '0.3.1'
6
6
  end
7
7
  end
@@ -6,5 +6,6 @@ require_relative 'web_services/balance_sheet'
6
6
  module ANAF
7
7
  module WebServices
8
8
  class InvalidRequest < StandardError; end
9
+ class TimeoutError < StandardError; end
9
10
  end
10
11
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anaf-web_services
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mariusz Siklodi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-10-26 00:00:00.000000000 Z
11
+ date: 2023-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -72,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  - !ruby/object:Gem::Version
73
73
  version: '0'
74
74
  requirements: []
75
- rubygems_version: 3.2.32
75
+ rubygems_version: 3.4.19
76
76
  signing_key:
77
77
  specification_version: 4
78
78
  summary: Ruby Client library for ANAF API