oca-epak 1.6.0 → 1.7.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
  SHA1:
3
- metadata.gz: 28d1b13cc67bd420e4bc7838c2bf4c122a8bf01d
4
- data.tar.gz: a92563151e81a485126934f34d86dd85fe827900
3
+ metadata.gz: 18522b659f4d135aec8f0c6b8e13b6f6dde7ad38
4
+ data.tar.gz: bed9358a8796df6d83bf1fb028bfbbd21717b4c6
5
5
  SHA512:
6
- metadata.gz: d7bd05bde365ba9cef7ab983ed152e8c318add7f5e54e947a4541acbfca8b1fb8ea3cf6a26703db5ccbb4f7544f9573f3d3e75233d12d410606606a9ca5b53ef
7
- data.tar.gz: 2b6f084a2e742a46bc853f2bea23c89491f6d9aa78038f239dd57bdb149835b2d6c76553a75f5d45ae4df4470638ec8afa8c76b7f14cc0fc5bd5ab996294244f
6
+ metadata.gz: 5217cec0b4224d924f572869f3bc700ebdce8c2d7e90d982668ca288d6e9681a4e19b35288334f09ee7e75877389e0bbf2a9be003661b223b40342b393977923
7
+ data.tar.gz: 0e221c45a3b8e9432e13e93f30aa3969551b71d96ecaf6375297ae3297e2d054145015af43399b2e67c7860152a9647fb0d70989c9c1bdc233cfe6148dd84114
@@ -83,6 +83,15 @@ module Oca
83
83
  parse_results_table(response, method)
84
84
  end
85
85
 
86
+ # Returns all existing Taxation Centers with services
87
+ #
88
+ # @return [Array, nil] Information for all the Oca Taxation Centers with services
89
+ def taxation_centers_with_services
90
+ method = :get_centros_imposicion_con_servicios
91
+ response = client.call(method)
92
+ parse_result(response, method)
93
+ end
94
+
86
95
  # Returns all operation codes
87
96
  #
88
97
  # @return [Array, nil] Returns all operation codes available for the user
@@ -117,6 +126,22 @@ module Oca
117
126
  body[:get_provincias_result][:provincias][:provincia]
118
127
  end
119
128
  end
129
+
130
+ # Get the tracking history of an object
131
+ #
132
+ # @param [Hash] opts
133
+ # @option opts [String] :cuit Client's CUIT e.g: 30-99999999-7
134
+ # @option opts [String] :pieza Tracking number
135
+ # @return [Hash, nil] Contains the history of object's movement.
136
+ def tracking_object(opts = {})
137
+ message = {
138
+ "Cuit" => opts[:cuit],
139
+ "Pieza" => opts[:pieza]
140
+ }
141
+
142
+ response = client.call(:tracking_pieza, message: message)
143
+ parse_result(response, :tracking_pieza)
144
+ end
120
145
  end
121
146
  end
122
147
  end
@@ -1,25 +1,22 @@
1
1
  module Oca
2
2
  class Logger
3
- attr_accessor :log, :pretty_print_xml, :log_level
3
+ attr_reader :logger_options
4
4
 
5
- # Receives a hash with keys `log`, `pretty_print_xml` and `log_level`.
5
+ # Receives a hash with keys `log`, `pretty_print_xml`, `log_level` and
6
+ # `logger`.
6
7
  # `log_level` can be :info, :debug, :warn, :error or :fatal
7
8
  #
8
9
  # @param opts [Hash]
9
10
  # @option opts [Boolean] :log
10
11
  # @option opts [Boolean] :pretty_print_xml
11
12
  # @option opts [Symbol] :log_level
13
+ # @option opts [Logger] :logger
12
14
  def initialize(opts = {})
13
- @log = opts[:log] || false
14
- @pretty_print_xml = opts[:pretty_print_xml] || false
15
- @log_level = opts[:log_level] || :info
16
- end
17
-
18
- # Returns a hash with the logging options for Savon.
19
- #
20
- # @return [Hash]
21
- def logger_options
22
- { log: log, pretty_print_xml: pretty_print_xml, log_level: log_level }
15
+ @logger_options = {}
16
+ @logger_options[:log] = opts[:log] || false
17
+ @logger_options[:pretty_print_xml] = opts[:pretty_print_xml] || false
18
+ @logger_options[:log_level] = opts[:log_level] || :info
19
+ @logger_options[:logger] = opts[:logger] if opts[:logger]
23
20
  end
24
21
 
25
22
  def self.options=(opts = {})
@@ -1,5 +1,5 @@
1
1
  module Oca
2
2
  module Epak
3
- VERSION = '1.6.0'
3
+ VERSION = '1.7.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oca-epak
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mauro Otonelli
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-07-16 00:00:00.000000000 Z
12
+ date: 2017-01-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: savon
@@ -25,6 +25,20 @@ dependencies:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
27
  version: '2.11'
28
+ - !ruby/object:Gem::Dependency
29
+ name: rack
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: '1.6'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '1.6'
28
42
  - !ruby/object:Gem::Dependency
29
43
  name: rspec
30
44
  requirement: !ruby/object:Gem::Requirement
@@ -147,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
161
  version: '0'
148
162
  requirements: []
149
163
  rubyforge_project:
150
- rubygems_version: 2.4.6
164
+ rubygems_version: 2.4.8
151
165
  signing_key:
152
166
  specification_version: 4
153
167
  summary: OCA E-Pak