quaderno 1.13.2 → 1.14.0
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 +1 -1
- data/VERSION +1 -1
- data/lib/quaderno-ruby/report.rb +40 -0
- data/quaderno.gemspec +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49d80c0d072a8aab6e98b5ad65b1199fa69f5456
|
4
|
+
data.tar.gz: 39ec40ab5595d592c86143f64d54f7609c1b7ac0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38fdadda9ffe62b7d83ab6daa5de07966ba459daae1143a043d2e80a8ccdd5fa196c225c170855b4237d3d264a305733b1f00bf13f7b00eaef7e251ea5ffc3a8
|
7
|
+
data.tar.gz: 8f0d1fd974e747572cd4ab53ddc58fca3912178497aea7607c48d5b599e7dc12cdb0ad8341cd3f150f7334784d835c899a61fac034068aef3796086cd14aaafb
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Quaderno-ruby is a ruby wrapper for [Quaderno API] (https://github.com/quaderno/quaderno-api).
|
4
4
|
|
5
|
-
Current version is 1.
|
5
|
+
Current version is 1.14.0 See the changelog [here](https://github.com/quaderno/quaderno-ruby/blob/master/changelog.md)
|
6
6
|
|
7
7
|
## Installation & Configuration
|
8
8
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.14.0
|
data/lib/quaderno-ruby/report.rb
CHANGED
@@ -36,5 +36,45 @@ module Quaderno
|
|
36
36
|
|
37
37
|
response.parsed_response
|
38
38
|
end
|
39
|
+
|
40
|
+
def self.domestic_taxes(options = {})
|
41
|
+
request_tax_report('domestic_taxes', options)
|
42
|
+
end
|
43
|
+
|
44
|
+
def self.sales_taxes(options = {})
|
45
|
+
request_tax_report('sales_taxes', options)
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.vat_moss(options = {})
|
49
|
+
request_tax_report('vat_moss', options)
|
50
|
+
end
|
51
|
+
|
52
|
+
def self.ec_sales(options = {})
|
53
|
+
request_tax_report('ec_sales', options)
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.international_taxes(options = {})
|
57
|
+
request_tax_report('international_taxes', options)
|
58
|
+
end
|
59
|
+
|
60
|
+
private
|
61
|
+
|
62
|
+
def self.request_tax_report(tax_report_type, options)
|
63
|
+
authentication = get_authentication(options.merge(api_model: api_model))
|
64
|
+
filter = options.delete_if { |k,v| %w(auth_token access_token api_url mode api_model).include? k.to_s }
|
65
|
+
|
66
|
+
response = get("#{authentication[:url]}#{api_model.api_path}/#{tax_report_type}.json",
|
67
|
+
query: filter,
|
68
|
+
basic_auth: authentication[:basic_auth],
|
69
|
+
headers: version_header.merge(authentication[:headers])
|
70
|
+
)
|
71
|
+
|
72
|
+
check_exception_for(response, { rate_limit: true, subdomain_or_token: true })
|
73
|
+
|
74
|
+
collection = Array.new
|
75
|
+
response.parsed_response.each { |tax_report| collection << self.new(tax_report) }
|
76
|
+
|
77
|
+
collection
|
78
|
+
end
|
39
79
|
end
|
40
80
|
end
|
data/quaderno.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: quaderno 1.
|
5
|
+
# stub: quaderno 1.14.0 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "quaderno"
|
9
|
-
s.version = "1.
|
9
|
+
s.version = "1.14.0"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Recrea"]
|
14
|
-
s.date = "2017-
|
14
|
+
s.date = "2017-12-21"
|
15
15
|
s.description = " A ruby wrapper for Quaderno API "
|
16
16
|
s.email = "carlos@recrea.es"
|
17
17
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quaderno
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Recrea
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|