Class: SatMx::DownloadRequestReceivedBody Private
- Inherits:
-
Object
- Object
- SatMx::DownloadRequestReceivedBody
- Includes:
- Body
- Defined in:
- lib/sat_mx/download_request_received_body.rb
Overview
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.
Constant Summary collapse
- REQUEST_TYPES =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
{ cfdi: "CFDI", metadata: "Metadata" }.freeze
- DOCUMENT_STATUS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
%w[ Todos Cancelado Vigente ].freeze
- COMPLEMENT_TYPES =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
%w[ acreditamientoieps10 aerolineas certificadodedestruccion cfdiregistrofiscal comercioexterior10 comercioexterior11 comprobante consumodecombustibles consumodecombustibles11 detallista divisas donat11 ecc11 ecc12 gastoshidrocarbonos10 iedu implocal ine11 ingresoshidrocarbonos leyendasfisc nomina11 nomina12 notariospublicos obrasarteantiguedades pagoenespecie pagos10 pfic renovacionysustitucionvehiculos servicioparcialconstruccion spei terceros11 turistapasajeroextranjero valesdedespensa vehiculousado ventavehiculos11 ].freeze
Constants included from Body
Body::DES, Body::DS, Body::ENVELOPE_ATTRS, Body::NAMESPACE, Body::S11, Body::XMLNS
Instance Attribute Summary collapse
- #complement ⇒ Object readonly private
- #document_status ⇒ Object readonly private
Instance Method Summary collapse
- #generate ⇒ Object private
-
#initialize(start_date:, end_date:, request_type:, recipient_rfc:, requester_rfc:, certificate:, issuing_rfc: nil, complement: nil, document_status: nil) ⇒ DownloadRequestReceivedBody
constructor
private
A new instance of DownloadRequestReceivedBody.
Constructor Details
#initialize(start_date:, end_date:, request_type:, recipient_rfc:, requester_rfc:, certificate:, issuing_rfc: nil, complement: nil, document_status: nil) ⇒ DownloadRequestReceivedBody
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 DownloadRequestReceivedBody.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/sat_mx/download_request_received_body.rb', line 57 def initialize( start_date:, end_date:, request_type:, recipient_rfc:, requester_rfc:, certificate:, issuing_rfc: nil, complement: nil, document_status: nil ) @start_date = start_date @end_date = end_date @request_type = request_type @recipient_rfc = recipient_rfc @requester_rfc = requester_rfc @certificate = certificate @issuing_rfc = issuing_rfc @complement = complement @document_status = document_status end |
Instance Attribute Details
#complement ⇒ Object (readonly)
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.
100 101 102 |
# File 'lib/sat_mx/download_request_received_body.rb', line 100 def complement @complement end |
#document_status ⇒ Object (readonly)
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.
100 101 102 |
# File 'lib/sat_mx/download_request_received_body.rb', line 100 def document_status @document_status end |
Instance Method Details
#generate ⇒ 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.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/sat_mx/download_request_received_body.rb', line 79 def generate envelope do |xml| xml[Body::DES].SolicitaDescargaRecibidos do attrs = { "FechaInicial" => start_date, "FechaFinal" => end_date, "TipoSolicitud" => request_type, "RfcReceptor" => recipient_rfc } attrs["RfcEmisor"] = issuing_rfc if issuing_rfc attrs["RfcSolicitante"] = requester_rfc if requester_rfc attrs["Complemento"] = complement if complement attrs["EstadoComprobante"] = document_status if document_status xml[Body::DES].solicitud(attrs) do signature(xml) end end end end |