cesri 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/.rspec +1 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +144 -0
- data/Rakefile +2 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/cesri.gemspec +29 -0
- data/lib/cesri.rb +23 -0
- data/lib/cesri/autorizacion_comprobante_response.rb +36 -0
- data/lib/cesri/autorizacion_comprobante_service.rb +35 -0
- data/lib/cesri/configuration.rb +32 -0
- data/lib/cesri/recepcion_comprobante_response.rb +36 -0
- data/lib/cesri/recepcion_comprobante_service.rb +35 -0
- data/lib/cesri/response_message.rb +35 -0
- data/lib/cesri/version.rb +3 -0
- data/lib/generators/cesri/install/install_generator.rb +15 -0
- data/lib/generators/cesri/install/templates/cesri.rb +23 -0
- metadata +137 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: bae2644536418cf7cba64f03b94c148281b7f767
|
4
|
+
data.tar.gz: ae7a5be18428fff00cc5a1cea8e851972e8b9c3a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5fd4630a4761acbb8d3b357f55501b6ec0f9c5b8734203ab71d39702c03dd950c471098e1ee9ad1006e849b125d3408ee7c6360a570fe86797e7fcd692eeedd1
|
7
|
+
data.tar.gz: a08ff53ea047e78c8d10526818a9377a12aba9792c636b3d310224712938726b8609e159870b8ebc9faa9762f4b746253a04632955f3238e481cb23789ba4688
|
data/.gitignore
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
cesri
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.2.3
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
+
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
|
6
|
+
|
7
|
+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
+
|
9
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
+
|
11
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
+
|
13
|
+
This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Jose Carrion
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,144 @@
|
|
1
|
+
# Cesri
|
2
|
+
|
3
|
+
Cesri es una Gema Ruby que permite consumir los servicios Web de Comprobantes Electrónicos del Servicio de Rentas Internas, para fines de la facturación electrónica en Ecuador.
|
4
|
+
|
5
|
+
Esta versión soporta únicamente la nueva modalidad "OFFLINE" del SRI.
|
6
|
+
|
7
|
+
## Instalación
|
8
|
+
|
9
|
+
Agregar esta linea al archivo Gemfile de la aplicación:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'cesri'
|
13
|
+
```
|
14
|
+
|
15
|
+
Luego ejecutar:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
O instalar la gema manualmente:
|
20
|
+
|
21
|
+
$ gem install cesri
|
22
|
+
|
23
|
+
## Instalar
|
24
|
+
|
25
|
+
$ rails generate cesri:install
|
26
|
+
|
27
|
+
## Configuración
|
28
|
+
Para configurar se puede sobreescribir los valores por defecto en: `config/initializers/cesri.rb`, esto por lo general no sera necesario a menos que las URL's de los servicios web que del SRI cambien por algún motivo.
|
29
|
+
|
30
|
+
Por defecto esta gema funciona bajo el ambiente de pruebas, para cambiar a un ambiente de producción es necesario cambiar la variable `config.sandbox` a `false,` en el archivo `config/initializers/cesri.rb` de tal manera que:
|
31
|
+
|
32
|
+
```ruby
|
33
|
+
Cesri.configure do |config|
|
34
|
+
#...
|
35
|
+
config.sandbox = false
|
36
|
+
end
|
37
|
+
```
|
38
|
+
|
39
|
+
## Como se usa
|
40
|
+
|
41
|
+
Para usar esta Gema existen 2 clases importantes:
|
42
|
+
|
43
|
+
```
|
44
|
+
# Clase para la recepción de comprobantes
|
45
|
+
Cesri::RecepcionComprobanteService
|
46
|
+
|
47
|
+
# Clase para la autorización de comprobantes
|
48
|
+
Cesri::AutorizacionComprobanteService
|
49
|
+
```
|
50
|
+
|
51
|
+
### Recepción de comprobantes
|
52
|
+
|
53
|
+
```ruby
|
54
|
+
recepcion = Cesri::RecepcionComprobanteService.validar(xml_plano_firmado)
|
55
|
+
=> true
|
56
|
+
```
|
57
|
+
|
58
|
+
```ruby
|
59
|
+
puts recepcion.success?
|
60
|
+
=> true
|
61
|
+
|
62
|
+
puts recepcion.state
|
63
|
+
=> "RECIBIDA"
|
64
|
+
```
|
65
|
+
|
66
|
+
En caso de que el comprobante no haya sido validado
|
67
|
+
|
68
|
+
```ruby
|
69
|
+
puts recepcion.success?
|
70
|
+
=> false
|
71
|
+
|
72
|
+
puts recepcion.state
|
73
|
+
=> "DEVUELTA"
|
74
|
+
```
|
75
|
+
Mostrar los mensajes
|
76
|
+
|
77
|
+
```ruby
|
78
|
+
recepcion.messages.each do |m|
|
79
|
+
puts m.identificador
|
80
|
+
puts m.mensaje
|
81
|
+
puts m.tipo
|
82
|
+
end
|
83
|
+
```
|
84
|
+
```
|
85
|
+
45
|
86
|
+
ERROR SECUENCIAL REGISTRADO
|
87
|
+
ERROR
|
88
|
+
```
|
89
|
+
|
90
|
+
### Autorización de comprobantes
|
91
|
+
|
92
|
+
```ruby
|
93
|
+
autorizacion = Cesri::AutorizacionComprobanteService.autorizar(clave_de_acceso)
|
94
|
+
```
|
95
|
+
|
96
|
+
```ruby
|
97
|
+
puts autorizacion.success?
|
98
|
+
=> true
|
99
|
+
|
100
|
+
puts autorizacion.state
|
101
|
+
=> "AUTORIZADO"
|
102
|
+
```
|
103
|
+
|
104
|
+
En caso de que el comprobante no haya sido autorizado
|
105
|
+
|
106
|
+
```ruby
|
107
|
+
puts autorizacion.success?
|
108
|
+
=> false
|
109
|
+
|
110
|
+
puts autorizacion.state
|
111
|
+
=> "NO AUTORIZADO"
|
112
|
+
```
|
113
|
+
|
114
|
+
Mostrar los mensajes
|
115
|
+
|
116
|
+
```ruby
|
117
|
+
autorizacion.messages.each do |m|
|
118
|
+
puts m.identificador
|
119
|
+
puts m.mensaje
|
120
|
+
puts m.informacion_adicional
|
121
|
+
puts m.tipo
|
122
|
+
end
|
123
|
+
```
|
124
|
+
```
|
125
|
+
39
|
126
|
+
FIRMA INVALIDA
|
127
|
+
La firma es invalida [Firma inválida (firma y/o certificados alterados)]
|
128
|
+
ERROR
|
129
|
+
```
|
130
|
+
|
131
|
+
## Licencia
|
132
|
+
|
133
|
+
Cesri es software libre, y puede ser redistribuido bajo los términos especificados en el archivo de licencia. [`LICENSE`] file.
|
134
|
+
|
135
|
+
[`LICENSE`]: /LICENSE
|
136
|
+
|
137
|
+
## Para contribuir
|
138
|
+
|
139
|
+
1. Fork it ( https://github.com/joselo/cesri/fork )
|
140
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
141
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
142
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
143
|
+
5. Create a new Pull Request
|
144
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "cesri"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/cesri.gemspec
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'cesri/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "cesri"
|
8
|
+
spec.version = Cesri::VERSION
|
9
|
+
spec.authors = ["Jose Carrion"]
|
10
|
+
spec.email = ["joseloc@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Gema Ruby que permite consumir los servicios web expuestos por el SRI para comprobantes electronicos en Ecuador.}
|
13
|
+
spec.description = %q{Cesri es una Gema Ruby que permite consumir los servicios Web de Comprobantes Electrónicos del Servicio de Rentas Internas, para fines de la facturación electrónica en Ecuador. Esta versión soporta únicamente la nueva modalidad "OFFLINE" del SRI.}
|
14
|
+
spec.homepage = "https://github.com/joselo/cesri"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.bindir = "exe"
|
19
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
21
|
+
spec.require_paths = ["lib"]
|
22
|
+
|
23
|
+
spec.add_dependency "savon", '~> 2.3', '>= 2.3.0'
|
24
|
+
|
25
|
+
spec.add_development_dependency 'bundler', '~> 1.10', '>= 1.10.6'
|
26
|
+
spec.add_development_dependency 'rake', '~> 0'
|
27
|
+
spec.add_development_dependency 'rspec', '~> 3.3'
|
28
|
+
|
29
|
+
end
|
data/lib/cesri.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
require "cesri/version"
|
2
|
+
require "cesri/configuration"
|
3
|
+
require "cesri/autorizacion_comprobante_response"
|
4
|
+
require "cesri/recepcion_comprobante_response"
|
5
|
+
require "cesri/autorizacion_comprobante_service"
|
6
|
+
require "cesri/recepcion_comprobante_service"
|
7
|
+
require "cesri/response_message"
|
8
|
+
require "savon"
|
9
|
+
require "nokogiri"
|
10
|
+
|
11
|
+
module Cesri
|
12
|
+
|
13
|
+
class << self
|
14
|
+
attr_accessor :configuration
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.configure
|
18
|
+
self.configuration ||= Configuration.new
|
19
|
+
yield(configuration)
|
20
|
+
end
|
21
|
+
|
22
|
+
|
23
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module Cesri
|
2
|
+
class AutorizacionComprobanteResponse
|
3
|
+
|
4
|
+
attr_reader :response, :state, :messages
|
5
|
+
|
6
|
+
def initialize(response)
|
7
|
+
@response = response
|
8
|
+
@state = state_value
|
9
|
+
@messages = []
|
10
|
+
|
11
|
+
load_messages
|
12
|
+
end
|
13
|
+
|
14
|
+
def success?
|
15
|
+
@state == 'AUTORIZADO'
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def state_value
|
21
|
+
doc.xpath('//estado').first.content if doc.xpath('//estado').first
|
22
|
+
end
|
23
|
+
|
24
|
+
def load_messages
|
25
|
+
doc.xpath('//mensajes//mensaje').each do |message|
|
26
|
+
response_message = ResponseMessage.new(message)
|
27
|
+
messages << response_message if response_message.identificador
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def doc
|
32
|
+
@doc ||= Nokogiri::XML(@response.to_s)
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module Cesri
|
2
|
+
class AutorizacionComprobanteService
|
3
|
+
|
4
|
+
def initialize
|
5
|
+
@client = Savon.client wsdl: request_url, ssl_verify_mode: :none
|
6
|
+
end
|
7
|
+
|
8
|
+
def autorizar(clave_acceso)
|
9
|
+
service_response = autorizacion_comprobante(clave_acceso)
|
10
|
+
AutorizacionComprobanteResponse.new(service_response)
|
11
|
+
end
|
12
|
+
|
13
|
+
def autorizacion_comprobante(clave_acceso)
|
14
|
+
@client.call :autorizacion_comprobante, autorizacion_comprobante_request(clave_acceso)
|
15
|
+
end
|
16
|
+
|
17
|
+
def autorizacion_comprobante_request(clave_acceso)
|
18
|
+
{
|
19
|
+
soap_action: false,
|
20
|
+
message: {
|
21
|
+
clave_acceso_comprobante: clave_acceso
|
22
|
+
}
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
def request_url
|
27
|
+
if Cesri.configuration.sandbox
|
28
|
+
Cesri.configuration.sandbox_authorization_url
|
29
|
+
else
|
30
|
+
Cesri.configuration.authorization_url
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Cesri
|
2
|
+
|
3
|
+
class Configuration
|
4
|
+
attr_accessor :sandbox_reception_url
|
5
|
+
attr_accessor :sandbox_authorization_url
|
6
|
+
attr_accessor :recepcion_url
|
7
|
+
attr_accessor :authorization_url
|
8
|
+
attr_accessor :sandbox
|
9
|
+
|
10
|
+
def initialize
|
11
|
+
@sandbox_reception_url = 'https://celcer.sri.gob.ec/comprobantes-electronicos-ws/RecepcionComprobantesOffline?wsdl'
|
12
|
+
@sandbox_authorization_url = 'https://celcer.sri.gob.ec/comprobantes-electronicos-ws/AutorizacionComprobantesOffline?wsdl'
|
13
|
+
@recepcion_url = 'TODO'
|
14
|
+
@authorization_url = 'TODO'
|
15
|
+
@sandbox = true
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.configuration
|
19
|
+
@configuration ||= Configuration.new
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.configuration=(config)
|
23
|
+
@configuration = config
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.configure
|
27
|
+
yield configuration if block_given?
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module Cesri
|
2
|
+
class RecepcionComprobanteResponse
|
3
|
+
|
4
|
+
attr_reader :response, :state, :messages
|
5
|
+
|
6
|
+
def initialize(response)
|
7
|
+
@response = response
|
8
|
+
@state = state_value
|
9
|
+
@messages = []
|
10
|
+
|
11
|
+
load_messages
|
12
|
+
end
|
13
|
+
|
14
|
+
def success?
|
15
|
+
@state == 'RECIBIDA'
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def state_value
|
21
|
+
doc.xpath('//estado').first.content if doc.xpath('//estado').first
|
22
|
+
end
|
23
|
+
|
24
|
+
def load_messages
|
25
|
+
doc.xpath('//mensajes//mensaje').each do |message|
|
26
|
+
response_message = ResponseMessage.new(message)
|
27
|
+
messages << response_message if response_message.identificador
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def doc
|
32
|
+
@doc ||= Nokogiri::XML(@response.to_s)
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module Cesri
|
2
|
+
class RecepcionComprobanteService
|
3
|
+
|
4
|
+
def initialize
|
5
|
+
@client = Savon.client wsdl: request_url, ssl_verify_mode: :none
|
6
|
+
end
|
7
|
+
|
8
|
+
def validar(xml_raw)
|
9
|
+
service_response = validar_comprobante(xml_raw)
|
10
|
+
RecepcionComprobanteResponse.new(service_response)
|
11
|
+
end
|
12
|
+
|
13
|
+
def validar_comprobante(xml_raw)
|
14
|
+
@client.call :validar_comprobante, validar_comprobante_request(xml_raw)
|
15
|
+
end
|
16
|
+
|
17
|
+
def validar_comprobante_request(xml_raw)
|
18
|
+
{
|
19
|
+
soap_action: false,
|
20
|
+
message: {
|
21
|
+
xml: Base64.encode64(xml_raw)
|
22
|
+
}
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
def request_url
|
27
|
+
if Cesri.configuration.sandbox
|
28
|
+
Cesri.configuration.sandbox_reception_url
|
29
|
+
else
|
30
|
+
Cesri.configuration.recepcion_url
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module Cesri
|
2
|
+
class ResponseMessage
|
3
|
+
|
4
|
+
attr_reader :identificador
|
5
|
+
attr_reader :mensaje
|
6
|
+
attr_reader :informacion_adicional
|
7
|
+
attr_reader :tipo
|
8
|
+
|
9
|
+
def initialize(message)
|
10
|
+
@identificador = identificador_value(message)
|
11
|
+
@mensaje = mensaje_value(message)
|
12
|
+
@informacion_adicional = informacion_adicional_value(message)
|
13
|
+
@tipo = tipo_value(message)
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def identificador_value(message)
|
19
|
+
message.xpath('identificador').first.content if message.xpath('identificador').first
|
20
|
+
end
|
21
|
+
|
22
|
+
def mensaje_value(message)
|
23
|
+
message.xpath('mensaje').first.content if message.xpath('mensaje').first
|
24
|
+
end
|
25
|
+
|
26
|
+
def informacion_adicional_value(message)
|
27
|
+
message.xpath('informacionAdicional').first.content if message.xpath('informacionAdicional').first
|
28
|
+
end
|
29
|
+
|
30
|
+
def tipo_value(message)
|
31
|
+
message.xpath('tipo').first.content if message.xpath('tipo').first
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'rails/generators/base'
|
2
|
+
|
3
|
+
module Cesri
|
4
|
+
module Generators
|
5
|
+
class InstallGenerator < Rails::Generators::Base
|
6
|
+
|
7
|
+
source_root File.expand_path('../templates', __FILE__)
|
8
|
+
|
9
|
+
def create_clearance_initializer
|
10
|
+
copy_file 'cesri.rb', 'config/initializers/cesri.rb'
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
Cesri.configure do |config|
|
2
|
+
|
3
|
+
# Todas las variables de abajo están comentadas, sus valores por defecto son los indicados, en caso de
|
4
|
+
# que cambien, es suficiente con descomentar la variable y colocar el valor deseado.
|
5
|
+
# Por defecto se usa las URL's de ambiente de pruebas, para cambiar a usar las URL's de producción
|
6
|
+
# descomentar config.sandbox, de tal manera que sea igual a false, esto hará que las recepcioines y
|
7
|
+
# autorizaciones se realicen en ambiente de producción.
|
8
|
+
|
9
|
+
# URL de recepción de comprobantes en ambiente de pruebas
|
10
|
+
#config.sandbox_reception_url = 'https://celcer.sri.gob.ec/comprobantes-electronicos-ws/RecepcionComprobantesOffline?wsdl'
|
11
|
+
|
12
|
+
# URL de autorización de comprobantes en ambiente de pruebas.
|
13
|
+
#config.sandbox_authorization_url = 'https://celcer.sri.gob.ec/comprobantes-electronicos-ws/AutorizacionComprobantesOffline?wsdl'
|
14
|
+
|
15
|
+
# URL de recepción de comprobantes en ambiente de producción
|
16
|
+
#config.recepcion_url = ''
|
17
|
+
|
18
|
+
# URL de autorización de comprobantes en ambiente de producción
|
19
|
+
#config.authorization_url = ''
|
20
|
+
|
21
|
+
# Por defecto es true, especifíca si esta en un ambiente de pruebas o no, para producción colocar config.sandbox = false
|
22
|
+
#config.sandbox = true
|
23
|
+
end
|
metadata
ADDED
@@ -0,0 +1,137 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cesri
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jose Carrion
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-10-26 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: savon
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.3'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 2.3.0
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '2.3'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 2.3.0
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: bundler
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '1.10'
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 1.10.6
|
43
|
+
type: :development
|
44
|
+
prerelease: false
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '1.10'
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 1.10.6
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: rake
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - "~>"
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '0'
|
60
|
+
type: :development
|
61
|
+
prerelease: false
|
62
|
+
version_requirements: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - "~>"
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '0'
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
name: rspec
|
69
|
+
requirement: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - "~>"
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '3.3'
|
74
|
+
type: :development
|
75
|
+
prerelease: false
|
76
|
+
version_requirements: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - "~>"
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '3.3'
|
81
|
+
description: Cesri es una Gema Ruby que permite consumir los servicios Web de Comprobantes
|
82
|
+
Electrónicos del Servicio de Rentas Internas, para fines de la facturación electrónica
|
83
|
+
en Ecuador. Esta versión soporta únicamente la nueva modalidad "OFFLINE" del SRI.
|
84
|
+
email:
|
85
|
+
- joseloc@gmail.com
|
86
|
+
executables: []
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files: []
|
89
|
+
files:
|
90
|
+
- ".gitignore"
|
91
|
+
- ".rspec"
|
92
|
+
- ".ruby-gemset"
|
93
|
+
- ".ruby-version"
|
94
|
+
- CODE_OF_CONDUCT.md
|
95
|
+
- Gemfile
|
96
|
+
- LICENSE.txt
|
97
|
+
- README.md
|
98
|
+
- Rakefile
|
99
|
+
- bin/console
|
100
|
+
- bin/setup
|
101
|
+
- cesri.gemspec
|
102
|
+
- lib/cesri.rb
|
103
|
+
- lib/cesri/autorizacion_comprobante_response.rb
|
104
|
+
- lib/cesri/autorizacion_comprobante_service.rb
|
105
|
+
- lib/cesri/configuration.rb
|
106
|
+
- lib/cesri/recepcion_comprobante_response.rb
|
107
|
+
- lib/cesri/recepcion_comprobante_service.rb
|
108
|
+
- lib/cesri/response_message.rb
|
109
|
+
- lib/cesri/version.rb
|
110
|
+
- lib/generators/cesri/install/install_generator.rb
|
111
|
+
- lib/generators/cesri/install/templates/cesri.rb
|
112
|
+
homepage: https://github.com/joselo/cesri
|
113
|
+
licenses:
|
114
|
+
- MIT
|
115
|
+
metadata: {}
|
116
|
+
post_install_message:
|
117
|
+
rdoc_options: []
|
118
|
+
require_paths:
|
119
|
+
- lib
|
120
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - ">="
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '0'
|
130
|
+
requirements: []
|
131
|
+
rubyforge_project:
|
132
|
+
rubygems_version: 2.4.5.1
|
133
|
+
signing_key:
|
134
|
+
specification_version: 4
|
135
|
+
summary: Gema Ruby que permite consumir los servicios web expuestos por el SRI para
|
136
|
+
comprobantes electronicos en Ecuador.
|
137
|
+
test_files: []
|