sw-sdk-ruby 0.0.2.2.pre → 0.0.2.3.pre

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 84a76dd98feda41bc5a481b9bbeee672f16f49e8312a30dad22cdee6c066fad5
4
- data.tar.gz: a1b5ea10e0e97669266eb15d05ab4f7b58503895c0ccb5b1eff28c71e7ebbab1
3
+ metadata.gz: beb64e500be8a822226e779b4cdef7ea973ed4d997db2ab1318b6d3e8db958a0
4
+ data.tar.gz: e7b034b351bc3fb5b86e3faf1d914435c7ad3e7e43a04bcb14e95705bc79bb18
5
5
  SHA512:
6
- metadata.gz: 70261ad1f5c360bf9f21eac2734b3a62895fd2c66741661cac962d96315e6796af9d8b2844b66bad37e35ef7012143d0744c353a10f6b96f44803b491a14b0c1
7
- data.tar.gz: 2854d41336fa6b3721185e96c4a47b369641ce27f53f6fb4819b251be6b58031f44d7d9641e65bbdd923bd53d732620f7bd178ac5c0db45bac3122e28b71b42b
6
+ metadata.gz: 3e8e978fa85bbfe485f69a5f90bbab0a83984f701f45b1f30ec4cca18848b980b0b0fa77296cdb69d8546b520029fc81c88e60353f398e98483b190bcebce81b
7
+ data.tar.gz: 8dfda55d9c02b858d7dfab43ffd28c13d3b5a65559c583f62d0eefe9cfe9cc006c916439d82986c9e581e32087c08d652161c59f97010182f5e9c45cfbe57228
@@ -9,4 +9,4 @@ class Auth < Services
9
9
  def self.authentication
10
10
  return SwAuthentication::authentication(Services::get_url, Services::get_user, Services::get_password)
11
11
  end
12
- end
12
+ end
@@ -9,4 +9,4 @@ class Balance < Services
9
9
  def self.account_balance()
10
10
  return SwAccountBalance::account_balance(Services::get_url, Services::get_token)
11
11
  end
12
- end
12
+ end
@@ -21,4 +21,4 @@ class Cancelation < Services
21
21
  def self.cancel_xml(xml)
22
22
  return SwCancelation::cancel_xml(Services::get_url, Services::get_token, xml)
23
23
  end
24
- end
24
+ end
@@ -29,4 +29,4 @@ class Issue < Services
29
29
  def self.issue_JSON_v4(json)
30
30
  SwIssue::issue_JSON(Services::get_url, Services::get_token, 'v4', json)
31
31
  end
32
- end
32
+ end
@@ -9,4 +9,4 @@ class Pdf < Services
9
9
  def self.generate_pdf(xml, template_id = nil, extras = nil)
10
10
  return SWPdf::pdf(Services::get_url, Services::get_token, xml)
11
11
  end
12
- end
12
+ end
@@ -9,4 +9,4 @@ class Pendings < Services
9
9
  def self.get_pendings(rfc)
10
10
  return SwPendings::pendings(Services::get_url, Services::get_token, rfc)
11
11
  end
12
- end
12
+ end
@@ -21,4 +21,4 @@ class Relations < Services
21
21
  def self.relations_xml(xml)
22
22
  return SwRelations::relations_xml(Services::get_url, Services::get_token, xml)
23
23
  end
24
- end
24
+ end
File without changes
@@ -17,4 +17,4 @@ class Validate < Services
17
17
  def self.validate_LCO(numero_certificado)
18
18
  SwValidate::validate_LCO(Services::get_url, Services::get_token, numero_certificado)
19
19
  end
20
- end
20
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sw-sdk-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2.2.pre
4
+ version: 0.0.2.3.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gamez
@@ -19,34 +19,33 @@ extensions: []
19
19
  extra_rdoc_files: []
20
20
  files:
21
21
  - README.md
22
- - Response.rb
23
22
  - lib/AcceptReject/accept_reject.rb
24
23
  - lib/AcceptReject/accept_reject_request.rb
25
- - lib/Authentication/Auth.rb
24
+ - lib/Authentication/auth.rb
26
25
  - lib/Authentication/auth_request.rb
27
26
  - lib/Authentication/auth_response.rb
28
- - lib/Balance/Balance.rb
27
+ - lib/Balance/balance.rb
29
28
  - lib/Balance/balance_request.rb
30
- - lib/Cancelation/Cancelation.rb
29
+ - lib/Cancelation/cancelation.rb
31
30
  - lib/Cancelation/cancelation_request.rb
32
- - lib/Issue/Issue.rb
31
+ - lib/Issue/issue.rb
33
32
  - lib/Issue/issue_request.rb
34
- - lib/Pdf/Pdf.rb
33
+ - lib/Pdf/pdf.rb
35
34
  - lib/Pdf/pdf_request.rb
36
35
  - lib/Pdf/pdf_response.rb
37
- - lib/Pendings/Pendings.rb
36
+ - lib/Pendings/pendings.rb
38
37
  - lib/Pendings/pendings_request.rb
39
- - lib/Relations/Relations.rb
38
+ - lib/Relations/relations.rb
40
39
  - lib/Relations/relations_request.rb
41
40
  - lib/Response.rb
42
41
  - lib/Response/generic_response.rb
43
42
  - lib/Services.rb
44
- - lib/Stamp/Stamp.rb
43
+ - lib/Stamp/stamp.rb
45
44
  - lib/Stamp/stamp_request.rb
46
45
  - lib/StatusCfdi/status_cfdi.rb
47
46
  - lib/StatusCfdi/status_cfdi_request.rb
48
47
  - lib/StatusCfdi/status_cfdi_response.rb
49
- - lib/Validation/Validate.rb
48
+ - lib/Validation/validate.rb
50
49
  - lib/Validation/validate_request.rb
51
50
  homepage: https://sw.com.mx/
52
51
  licenses:
data/Response.rb DELETED
@@ -1,47 +0,0 @@
1
- require_relative 'Services.rb'
2
- class Response
3
- @status = nil
4
- @message = nil
5
- @messageDetail = nil
6
- @data = nil
7
- @statusCode = nil
8
- @response = nil
9
-
10
- def getStatus()
11
- return @status
12
- end
13
- def getMessage()
14
- return @message
15
- end
16
- def getMessageDetail()
17
- return @messageDetail
18
- end
19
- def getData()
20
- return @data
21
- end
22
- def getStatusCode()
23
- return @statusCode
24
- end
25
- def getResponse()
26
- return @response
27
- end
28
-
29
- def validateStatusCode(response)
30
- if(response.getStatus == 'success')
31
- return response
32
- else
33
- case response.getStatusCode.to_i
34
- when 300..399
35
- Services::raiseException("\nmessage: #{response.getMessage}\nmessageDetail: #{response.getMessageDetail}\nstatus: #{response.getStatus}\nstatusCode: #{response.getStatusCode} Redireccion")
36
- when 400..499
37
- if response.getMessage =~ /^307/
38
- return response
39
- end
40
- Services::raiseException("\nmessage: #{response.getMessage}\nmessageDetail: #{response.getMessageDetail}\nstatus: #{response.getStatus}\nstatusCode: #{response.getStatusCode} Error del cliente")
41
- when 500..599
42
- Services::raiseException("\nmessage: #{response.getMessage}\nmessageDetail: #{response.getMessageDetail}\nstatus: #{response.getStatus}\nstatusCode: #{response.getStatusCode} Error del servidor")
43
- end
44
- end
45
-
46
- end
47
- end