gdexpress 0.1.0 → 0.1.1
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/gdexpress.gemspec +1 -1
- data/lib/gdexpress/client.rb +5 -1
- data/lib/gdexpress/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 65610ae445706e2c1e6c767971e1dd650468e3c2
|
|
4
|
+
data.tar.gz: f598e7d69b4207605b022312d6af06d67d65a4d3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9079e21300851ee895b6e4cef5aa1078f7859f1d53b89e468a637c6d182cdd96c79e635aefb1da152e59b25f76a2b14fa952123db93b0df458e69df55bb5d2a4
|
|
7
|
+
data.tar.gz: 18aaaa5ba1c937a7b29fdbb66f31f239fe06627dc20fb0216a74d1ee23f34040b4e3730c0afd831459b2f2f9437ca9e360e0ddb3f1e5fb25fc92cc77c9dadd04
|
data/gdexpress.gemspec
CHANGED
|
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
|
|
|
8
8
|
spec.version = Gdexpress::VERSION
|
|
9
9
|
spec.authors = ["Patricio Bruna"]
|
|
10
10
|
spec.email = ["pbruna@gmail.com"]
|
|
11
|
-
spec.description =
|
|
11
|
+
spec.description = "GDexpress API Wrapper: www.gdexpress.cl"
|
|
12
12
|
spec.summary = ["Permite comunicarse con la API WS de GDexpress para emitir DTEs en Chile"]
|
|
13
13
|
spec.homepage = "https://github.com/pbruna/gdexpress"
|
|
14
14
|
spec.license = "MIT"
|
data/lib/gdexpress/client.rb
CHANGED
|
@@ -4,6 +4,10 @@ module Gdexpress
|
|
|
4
4
|
class Client
|
|
5
5
|
|
|
6
6
|
CONFIG_OPTIONS = [:api_token, :dte_box, :environment]
|
|
7
|
+
ENVIROMENTS = {
|
|
8
|
+
testing: "T",
|
|
9
|
+
production: "P"
|
|
10
|
+
}
|
|
7
11
|
API_ENDPOINTS = {
|
|
8
12
|
fiscal_status: "/api/Core.svc/Core/FiscalStatus/",
|
|
9
13
|
tracking: "/api/Core.svc/Core/Tracking/",
|
|
@@ -92,7 +96,7 @@ module Gdexpress
|
|
|
92
96
|
end
|
|
93
97
|
|
|
94
98
|
def make_uri(dte, method)
|
|
95
|
-
base_uri = "http://#{dte_box}#{API_ENDPOINTS[method.to_sym]}/#{environment}/"
|
|
99
|
+
base_uri = "http://#{dte_box}#{API_ENDPOINTS[method.to_sym]}/#{ENVIROMENTS[environment]}/"
|
|
96
100
|
|
|
97
101
|
# Se tiene que poner 2 veces el rut cuando se pide PDF o XML
|
|
98
102
|
# según lo que sale en http://IP_GD_BOX/api/Core.svc/core/help
|
data/lib/gdexpress/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gdexpress
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Patricio Bruna
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-12-
|
|
11
|
+
date: 2014-12-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: nokogiri
|
|
@@ -94,7 +94,7 @@ dependencies:
|
|
|
94
94
|
- - "~>"
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
96
|
version: 1.0.0.beta3
|
|
97
|
-
description: '
|
|
97
|
+
description: 'GDexpress API Wrapper: www.gdexpress.cl'
|
|
98
98
|
email:
|
|
99
99
|
- pbruna@gmail.com
|
|
100
100
|
executables: []
|