Class: SatMx::Client Private
- Inherits:
-
Object
- Object
- SatMx::Client
- Defined in:
- lib/sat_mx/client.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #authenticate(payload) ⇒ Object private
- #download_petition(payload) ⇒ Object private
- #download_request(payload) ⇒ Object private
- #download_request_received(payload) ⇒ Object private
-
#initialize(private_key:, access_token:) ⇒ Client
constructor
private
A new instance of Client.
- #verify_request(payload) ⇒ Object private
Constructor Details
#initialize(private_key:, access_token:) ⇒ Client
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Client.
10 11 12 13 |
# File 'lib/sat_mx/client.rb', line 10 def initialize(private_key:, access_token:) @private_key = private_key @access_token = access_token end |
Instance Method Details
#authenticate(payload) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
15 16 17 18 19 20 21 22 23 |
# File 'lib/sat_mx/client.rb', line 15 def authenticate(payload) HTTPX.post( "https://cfdidescargamasivasolicitud.clouda.sat.gob.mx/Autenticacion/Autenticacion.svc", headers: { "SOAPAction" => "http://DescargaMasivaTerceros.gob.mx/IAutenticacion/Autentica" }.merge(HEADERS), body: sign(payload) ) end |
#download_petition(payload) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
58 59 60 61 62 63 64 65 66 67 |
# File 'lib/sat_mx/client.rb', line 58 def download_petition(payload) HTTPX.post( "https://cfdidescargamasiva.clouda.sat.gob.mx/DescargaMasivaService.svc", headers: { "SOAPAction" => "http://DescargaMasivaTerceros.sat.gob.mx/IDescargaMasivaTercerosService/Descargar" }.merge() .merge(HEADERS), body: sign(payload) ) end |
#download_request(payload) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/sat_mx/client.rb', line 25 def download_request(payload) HTTPX.post( "https://cfdidescargamasivasolicitud.clouda.sat.gob.mx/SolicitaDescargaService.svc", headers: { "SOAPAction" => "http://DescargaMasivaTerceros.sat.gob.mx/ISolicitaDescargaService/SolicitaDescarga" }.merge() .merge(HEADERS), body: sign(payload) ) end |
#download_request_received(payload) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
36 37 38 39 40 41 42 43 44 45 |
# File 'lib/sat_mx/client.rb', line 36 def download_request_received(payload) HTTPX.post( "https://cfdidescargamasivasolicitud.clouda.sat.gob.mx/SolicitaDescargaService.svc", headers: { "SOAPAction" => "http://DescargaMasivaTerceros.sat.gob.mx/ISolicitaDescargaService/SolicitaDescargaRecibidos" }.merge() .merge(HEADERS), body: sign(payload) ) end |
#verify_request(payload) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/sat_mx/client.rb', line 47 def verify_request(payload) HTTPX.post( "https://cfdidescargamasivasolicitud.clouda.sat.gob.mx/VerificaSolicitudDescargaService.svc", headers: { "SOAPAction" => "http://DescargaMasivaTerceros.sat.gob.mx/IVerificaSolicitudDescargaService/VerificaSolicitudDescarga" }.merge() .merge(HEADERS), body: sign(payload) ) end |