Class: SatMx::VerifyRequestBody

Inherits:
Object
  • Object
show all
Includes:
Body
Defined in:
lib/sat_mx/verify_request_body.rb

Constant Summary

Constants included from Body

Body::DES, Body::DS, Body::ENVELOPE_ATTRS, Body::NAMESPACE, Body::S11, Body::XMLNS

Instance Method Summary collapse

Constructor Details

#initialize(certificate:, request_id:, requester_rfc:) ⇒ VerifyRequestBody



5
6
7
8
9
# File 'lib/sat_mx/verify_request_body.rb', line 5

def initialize(certificate:, request_id:, requester_rfc:)
  @certificate = certificate
  @request_id = request_id
  @requester_rfc = requester_rfc
end

Instance Method Details

#generateObject



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/sat_mx/verify_request_body.rb', line 11

def generate
  envelope do |xml|
    xml[Body::DES].VerificaSolicitudDescarga do
      xml[Body::DES].solicitud(
        "IdSolicitud" => request_id,
        "RfcSolicitante" => requester_rfc
      ) do
        signature(xml)
      end
    end
  end
end