sw_fac 0.3.58 → 0.3.62
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/lib/sw_fac/config.rb +19 -3
- data/lib/sw_fac/facturacion.rb +929 -722
- data/lib/sw_fac/tools.rb +9 -9
- data/lib/sw_fac/version.rb +1 -1
- metadata +3 -3
data/lib/sw_fac/tools.rb
CHANGED
@@ -4,11 +4,11 @@ module SwFac
|
|
4
4
|
def consulta_saldo
|
5
5
|
# Servicio utilizado para consultar los timbres disponibles en el entorno productivo
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
url_prod = URI("#{SwFac::UrlProduction}account/balance")
|
8
|
+
http = Net::HTTP.new(url_prod.host, url_prod.port)
|
9
9
|
request = Net::HTTP::Get.new(url_prod)
|
10
10
|
request["Authorization"] = "bearer #{@production_token}"
|
11
|
-
|
11
|
+
request.content_type = "application/json"
|
12
12
|
request["Cache-Control"] = 'no-cache'
|
13
13
|
|
14
14
|
response_1 = http.request(request)
|
@@ -41,11 +41,11 @@ module SwFac
|
|
41
41
|
http = Net::HTTP.new(url.host, url.port)
|
42
42
|
request = Net::HTTP::Get.new(url)
|
43
43
|
request["Authorization"] = "bearer #{@production_token}"
|
44
|
-
|
44
|
+
request.content_type = "application/json"
|
45
45
|
request["Cache-Control"] = 'no-cache'
|
46
|
-
|
46
|
+
request["Postman-Token"] = 'a663ff71-f97d-57c9-be0b-1b1cdc06871e'
|
47
47
|
|
48
|
-
|
48
|
+
pet = http.request(request)
|
49
49
|
parsed = JSON.parse(pet.body)
|
50
50
|
response = {}
|
51
51
|
|
@@ -76,11 +76,11 @@ module SwFac
|
|
76
76
|
http = Net::HTTP.new(url.host, url.port)
|
77
77
|
request = Net::HTTP::Get.new(url)
|
78
78
|
request["Authorization"] = "bearer #{@production_token}"
|
79
|
-
|
79
|
+
request.content_type = "application/json"
|
80
80
|
request["Cache-Control"] = 'no-cache'
|
81
|
-
|
81
|
+
request["Postman-Token"] = 'e17ee551-7f7a-32a7-8fd8-6b53ea70e3c9'
|
82
82
|
|
83
|
-
|
83
|
+
pet = http.request(request)
|
84
84
|
parsed = JSON.parse(pet.body)
|
85
85
|
response = {}
|
86
86
|
|
data/lib/sw_fac/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sw_fac
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.62
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Angel Padilla
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 1.10.9
|
69
69
|
description: Gem used to fetch the Smarter Web API for the mexican billing system
|
70
|
-
(SAT), this gem was builted and is currently used by the team at
|
70
|
+
(SAT), this gem was builted and is currently used by the team at mfactura.com
|
71
71
|
email:
|
72
72
|
- angelpadillam@gmail.com
|
73
73
|
executables: []
|