Class: Nfe::Resources::ServiceInvoiceRtcPending

Inherits:
Data
  • Object
show all
Defined in:
lib/nfe/resources/responses/service_invoice_rtc_pending.rb,
sig/nfe/resources/responses/service_invoice_rtc_pending.rbs

Overview

Result of an asynchronous (HTTP 202) RTC service-invoice (NFS-e) emission: the API accepted the request and is processing it. The document is not yet materialized.

invoice_id is parsed from the Location header's final path segment; location is the raw header value. Discriminate against ServiceInvoiceRtcIssued with +pending?+/+issued?+ or case pattern matching, then poll until the document settles.

RTC and classic NFS-e share the same endpoint; the RTC layout is selected by the presence of the ibsCbs group in the create payload, so the async 202 shape is identical to the classic flow.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeServiceInvoiceRtcPending

Returns a new instance of ServiceInvoiceRtcPending.

Parameters:

  • invoice_id: (String)
  • location: (String)


11
# File 'sig/nfe/resources/responses/service_invoice_rtc_pending.rbs', line 11

def initialize: (invoice_id: String, location: String) -> void

Instance Attribute Details

#invoice_idString (readonly)

Returns the value of attribute invoice_id.

Returns:

  • (String)


4
5
6
# File 'sig/nfe/resources/responses/service_invoice_rtc_pending.rbs', line 4

def invoice_id
  @invoice_id
end

#locationString (readonly)

Returns the value of attribute location.

Returns:

  • (String)


5
6
7
# File 'sig/nfe/resources/responses/service_invoice_rtc_pending.rbs', line 5

def location
  @location
end

Class Method Details

.newinstance

Parameters:

  • invoice_id: (String)
  • location: (String)

Returns:

  • (instance)


10
# File 'sig/nfe/resources/responses/service_invoice_rtc_pending.rbs', line 10

def self.new: (invoice_id: String, location: String) -> instance

Instance Method Details

#issued?false

Returns this is not an immediate (issued) result.

Returns:

  • (false)

    this is not an immediate (issued) result.



24
25
26
# File 'lib/nfe/resources/responses/service_invoice_rtc_pending.rb', line 24

def issued?
  false
end

#pending?true

Returns this is an async (pending) result.

Returns:

  • (true)

    this is an async (pending) result.



19
20
21
# File 'lib/nfe/resources/responses/service_invoice_rtc_pending.rb', line 19

def pending?
  true
end