Class: Nfe::Resources::ProductInvoiceRtcPending
- Inherits:
-
Data
- Object
- Data
- Nfe::Resources::ProductInvoiceRtcPending
- Defined in:
- lib/nfe/resources/responses/product_invoice_rtc_pending.rb,
sig/nfe/resources/responses/product_invoice_rtc_pending.rbs
Overview
Result of an asynchronous (HTTP 202) RTC product-invoice (NF-e/NFC-e under the Reforma Tributária layout) emission: the API enqueued the request and is processing it. Completion is notified via webhook.
invoice_id is parsed from the Location header's productinvoices/{id}
segment; location is the raw header value. Discriminate against
ProductInvoiceRtcIssued with +pending?+/+issued?+ or
case pattern matching, then poll FlowStatus.terminal? until
settled.
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 ⇒ ProductInvoiceRtcPending
constructor
A new instance of ProductInvoiceRtcPending.
-
#issued? ⇒ false
This is not an immediate (issued) result.
-
#pending? ⇒ true
This is an async (pending) result.
Constructor Details
#initialize ⇒ ProductInvoiceRtcPending
Returns a new instance of ProductInvoiceRtcPending.
11 |
# File 'sig/nfe/resources/responses/product_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/product_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/product_invoice_rtc_pending.rbs', line 5 def location @location end |
Class Method Details
.new ⇒ instance
10 |
# File 'sig/nfe/resources/responses/product_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.
21 22 23 |
# File 'lib/nfe/resources/responses/product_invoice_rtc_pending.rb', line 21 def issued? false end |
#pending? ⇒ true
Returns this is an async (pending) result.
16 17 18 |
# File 'lib/nfe/resources/responses/product_invoice_rtc_pending.rb', line 16 def pending? true end |