Class: SunatInvoice::ConsultClient
- Defined in:
- lib/sunat_invoice/clients/consult_client.rb
Instance Method Summary collapse
- #get_status(ticket) ⇒ Object
- #get_status_cdr(options = {}) ⇒ Object
-
#wsdl ⇒ Object
consult CDR and ticket state.
Methods inherited from Client
Constructor Details
This class inherits a constructor from SunatInvoice::Client
Instance Method Details
#get_status(ticket) ⇒ Object
11 12 13 |
# File 'lib/sunat_invoice/clients/consult_client.rb', line 11 def get_status(ticket) @soap_client.call(:get_status, message: { ticket: ticket }) end |
#get_status_cdr(options = {}) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/sunat_invoice/clients/consult_client.rb', line 15 def get_status_cdr( = {}) # Available document_type to use: # 01: Factura. # 07: Nota de crédito. # 08: Nota de débito @soap_client.call(:get_status, message: { rucComprobante: [:ruc], tipoComprobante: [:document_type], serieComprobante: [:document_serial], numeroComprobante: [:document_number] }) end |
#wsdl ⇒ Object
consult CDR and ticket state
7 8 9 |
# File 'lib/sunat_invoice/clients/consult_client.rb', line 7 def wsdl 'https://www.sunat.gob.pe/ol-it-wsconscpegem/billConsultService?wsdl' end |