Class: Nfe::Resources::ProductInvoiceRtcPending

Inherits:
Data
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeProductInvoiceRtcPending

Returns a new instance of ProductInvoiceRtcPending.

Parameters:

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


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_idString (readonly)

Returns the value of attribute invoice_id.

Returns:

  • (String)


4
5
6
# File 'sig/nfe/resources/responses/product_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/product_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/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.

Returns:

  • (false)

    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.

Returns:

  • (true)

    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