anaf-web_services 0.2.0 → 0.3.0

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: 3ece423043302125d41bc7368423ae8495b2085dbf80c995e83479fe0c26f004
4
+ data.tar.gz: 496546e3c7f3b4b75f4e2c8a1be23cdea37dbe303070093f5ed2d07c4541916c
5
5
  SHA512:
6
- metadata.gz: bad370fd19627644c046508af33a5c4ed449a3892a17cfec7f4212690f2b2daff6dd7533483aaa49513ecc226a7416479b91fdecd6c26c5bd0030bad23898b38
7
- data.tar.gz: 97ed4b44ed844257e2a83a6aba132863b8e59df9741cd6ee64444c04a9b3c3f25cefdbb5b5ffea54592d53119b5057581ac4c34e3d7a6f0a2aef09f1f60d6347
6
+ metadata.gz: a4137c7b57648c8364a30be2475659b9d9aa0e116a3f2056f3ac44f88fc71c9bec6a915d8f3d7b72990acdce84145b42350367af7e30518f8b975ee4a69b060a
7
+ data.tar.gz: cae4cc8386a3f80d76f5bd6b71e648474d26d93ed15d3d4c08ad5eb6e818a94dfafa577eb4980cd2c405a648d0a79738023433560676041aece9156ab439fd7e
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.0)
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.0'
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.0
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