Class: Nfe::Resources::ServiceInvoiceRtcPending
- Inherits:
-
Data
- Object
- Data
- Nfe::Resources::ServiceInvoiceRtcPending
- 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
-
#invoice_id ⇒ String
readonly
Returns the value of attribute invoice_id.
-
#location ⇒ String
readonly
Returns the value of attribute location.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ ServiceInvoiceRtcPending
constructor
A new instance of ServiceInvoiceRtcPending.
-
#issued? ⇒ false
This is not an immediate (issued) result.
-
#pending? ⇒ true
This is an async (pending) result.
Constructor Details
#initialize ⇒ ServiceInvoiceRtcPending
Returns a new instance of ServiceInvoiceRtcPending.
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_id ⇒ String (readonly)
Returns the value of attribute invoice_id.
4 5 6 |
# File 'sig/nfe/resources/responses/service_invoice_rtc_pending.rbs', line 4 def invoice_id @invoice_id end |
#location ⇒ String (readonly)
Returns the value of attribute location.
5 6 7 |
# File 'sig/nfe/resources/responses/service_invoice_rtc_pending.rbs', line 5 def location @location end |
Class Method Details
.new ⇒ 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.
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.
19 20 21 |
# File 'lib/nfe/resources/responses/service_invoice_rtc_pending.rb', line 19 def pending? true end |