Class: Nfe::Resources::ProductInvoicePending
- Inherits:
-
Data
- Object
- Data
- Nfe::Resources::ProductInvoicePending
- Defined in:
- lib/nfe/resources/responses/product_invoice_pending.rb,
sig/nfe/resources/responses/product_invoice_pending.rbs
Overview
Result of an asynchronous (HTTP 202) product-invoice (NF-e) emission: the API enqueued the request and is processing it. Completion is notified via webhook.
invoice_id is parsed from the Location header's final path segment;
location is the raw header value. Discriminate against
ProductInvoiceIssued 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 ⇒ ProductInvoicePending
constructor
A new instance of ProductInvoicePending.
-
#issued? ⇒ false
This is not an immediate (issued) result.
-
#pending? ⇒ true
This is an async (pending) result.
Constructor Details
#initialize ⇒ ProductInvoicePending
Returns a new instance of ProductInvoicePending.
11 |
# File 'sig/nfe/resources/responses/product_invoice_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_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_pending.rbs', line 5 def location @location end |
Class Method Details
.new ⇒ instance
10 |
# File 'sig/nfe/resources/responses/product_invoice_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.
20 21 22 |
# File 'lib/nfe/resources/responses/product_invoice_pending.rb', line 20 def issued? false end |
#pending? ⇒ true
Returns this is an async (pending) result.
15 16 17 |
# File 'lib/nfe/resources/responses/product_invoice_pending.rb', line 15 def pending? true end |