quaderno 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/changelog.md +4 -0
- data/lib/quaderno-ruby/tax.rb +4 -2
- data/lib/quaderno-ruby/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87cd629b645c9dccf37590027c38d2f32582e4ecb5f746882a9e4c5e8dce951b
|
4
|
+
data.tar.gz: 5b3f2271733c94ba33a0968c647c221a1ae35fe972b85eba28bfda2e847baf4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 680f294a15ab5efc78d7457de2ad43ff26df3cfb719ff9d5ddfc19d23832488eb7e624092dff185414aa6867a8e142a3b03c21d35808c736d7c93fdc2418c3a5
|
7
|
+
data.tar.gz: af06b1277320b63e3df52dd9be2984d61ce17c1418c4e31b68ba91349ad76f7b59e0428e0e697daf9f7569811d892ab4ff7bf8756b25a08fe41635c4883dad0d
|
data/README.md
CHANGED
@@ -527,17 +527,17 @@ will delete the webhook with the id passed as parameter. If the deletion was suc
|
|
527
527
|
|
528
528
|
will calculate the taxes applied for a customer based on the data pased as parameters.
|
529
529
|
|
530
|
-
### Validate
|
530
|
+
### Validate tax ID
|
531
531
|
```ruby
|
532
532
|
country = 'IE'
|
533
|
-
|
533
|
+
tax_id = 'IE6388047V'
|
534
534
|
|
535
|
-
result = Quaderno::Tax.
|
535
|
+
result = Quaderno::Tax.validate_tax_id(country, tax_id) #=> Quaderno::Tax
|
536
536
|
|
537
537
|
result.valid #=> Boolean or nil
|
538
538
|
```
|
539
539
|
|
540
|
-
will validate the
|
540
|
+
will validate the tax ID or business number for the specified country.
|
541
541
|
|
542
542
|
## Evidences
|
543
543
|
|
data/changelog.md
CHANGED
data/lib/quaderno-ruby/tax.rb
CHANGED
@@ -26,11 +26,11 @@ class Quaderno::Tax < Quaderno::Base
|
|
26
26
|
data
|
27
27
|
end
|
28
28
|
|
29
|
-
def self.
|
29
|
+
def self.validate_tax_id(country, tax_id, options = {})
|
30
30
|
authentication = get_authentication(options.merge(api_model: api_model))
|
31
31
|
|
32
32
|
response = get("#{authentication[:url]}tax_ids/validate.json",
|
33
|
-
query: { country: country,
|
33
|
+
query: { country: country, tax_id: tax_id },
|
34
34
|
basic_auth: authentication[:basic_auth],
|
35
35
|
headers: default_headers.merge(authentication[:headers])
|
36
36
|
)
|
@@ -42,6 +42,8 @@ class Quaderno::Tax < Quaderno::Base
|
|
42
42
|
|
43
43
|
data
|
44
44
|
end
|
45
|
+
# TODO: Temporary alias to be removed in future releases
|
46
|
+
self.singleton_class.send(:alias_method, :validate_vat_number, :validate_tax_id)
|
45
47
|
|
46
48
|
def self.reports(options = {})
|
47
49
|
authentication = get_authentication(options.merge(api_model: api_model))
|
metadata
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quaderno
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Recrea
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
11
|
date: 2018-05-07 00:00:00.000000000 Z
|
@@ -172,7 +172,7 @@ homepage: http://github.com/quaderno/quaderno-ruby
|
|
172
172
|
licenses:
|
173
173
|
- MIT
|
174
174
|
metadata: {}
|
175
|
-
post_install_message:
|
175
|
+
post_install_message:
|
176
176
|
rdoc_options: []
|
177
177
|
require_paths:
|
178
178
|
- lib
|
@@ -187,8 +187,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
187
187
|
- !ruby/object:Gem::Version
|
188
188
|
version: '0'
|
189
189
|
requirements: []
|
190
|
-
rubygems_version: 3.0.
|
191
|
-
signing_key:
|
190
|
+
rubygems_version: 3.0.8
|
191
|
+
signing_key:
|
192
192
|
specification_version: 4
|
193
193
|
summary: Ruby wrapper for the Quaderno API (https://quaderno.io/docs/api)
|
194
194
|
test_files: []
|