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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 18ba0623ca695fdd9f95f1bb922e7002f6482224aa8b793b307bbe233327b0d9
4
- data.tar.gz: 0d3719afdbbfc2739a64513d451444f7bfd268fe9a521e6522f24d160acf7612
3
+ metadata.gz: 87cd629b645c9dccf37590027c38d2f32582e4ecb5f746882a9e4c5e8dce951b
4
+ data.tar.gz: 5b3f2271733c94ba33a0968c647c221a1ae35fe972b85eba28bfda2e847baf4e
5
5
  SHA512:
6
- metadata.gz: 2ce0a701562afa7626f8bc0f6ee19a72f2a36360c65a2aff42732bb6aa2fdfd71fc3f22039c4d910a33ccd01f5df528fe5453ebd6d50d05ae71097b1a0986373
7
- data.tar.gz: 38aeb9bd57999f419ead00c46a4f2382de663b8c18c935dc13c9ea9f5b43d4dfcc80b3cb822d55f7d2c884ac6fe0ad14b679b6e7da43d2bd01e329a310da437f
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 VAT numbers
530
+ ### Validate tax ID
531
531
  ```ruby
532
532
  country = 'IE'
533
- vat_number = 'IE6388047V'
533
+ tax_id = 'IE6388047V'
534
534
 
535
- result = Quaderno::Tax.validate_vat_number(country, vat_number) #=> 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 vat number for the passed country.
540
+ will validate the tax ID or business number for the specified country.
541
541
 
542
542
  ## Evidences
543
543
 
data/changelog.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.2
4
+ * Fix an issue with the parameters sent during the `validate_vat_number` request
5
+ * Renames `validate_vat_number` into `validate_tax_id`
6
+
3
7
  ## 2.0.1
4
8
  * Fix an issue where requests would result in an error due to a missing `require`
5
9
 
@@ -26,11 +26,11 @@ class Quaderno::Tax < Quaderno::Base
26
26
  data
27
27
  end
28
28
 
29
- def self.validate_vat_number(country, vat_number, options = {})
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, vat_number: vat_number },
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))
@@ -1,3 +1,3 @@
1
1
  class Quaderno
2
- VERSION = "2.0.1"
2
+ VERSION = "2.0.2"
3
3
  end
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.1
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.3
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: []