Class: Nfe::Generated::NfProdutoV2::InvoiceEventsResourceBase

Inherits:
Data
  • Object
show all
Defined in:
lib/nfe/generated/nf_produto_v2/invoice_events_resource_base.rb,
sig/nfe/generated/nf_produto_v2/invoice_events_resource_base.rbs

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeInvoiceEventsResourceBase

Returns a new instance of InvoiceEventsResourceBase.

Parameters:



12
# File 'sig/nfe/generated/nf_produto_v2/invoice_events_resource_base.rbs', line 12

def initialize: (?events: Array[ActivityResource]?, ?has_more: bool?) -> void

Instance Attribute Details

#eventsObject (readonly)

Returns the value of attribute events

Returns:

  • (Object)

    the current value of events



9
10
11
# File 'lib/nfe/generated/nf_produto_v2/invoice_events_resource_base.rb', line 9

def events
  @events
end

#has_moreObject (readonly)

Returns the value of attribute has_more

Returns:

  • (Object)

    the current value of has_more



9
10
11
# File 'lib/nfe/generated/nf_produto_v2/invoice_events_resource_base.rb', line 9

def has_more
  @has_more
end

Class Method Details

.from_api(payload) ⇒ instance?

Parameters:

  • payload (Hash[String, untyped], nil)

Returns:

  • (instance, nil)


10
11
12
13
14
15
16
17
# File 'lib/nfe/generated/nf_produto_v2/invoice_events_resource_base.rb', line 10

def self.from_api(payload)
  return nil if payload.nil?

  new(
    events: (payload["events"] || []).map { |e| ActivityResource.from_api(e) },
    has_more: payload["hasMore"],
  )
end

.newinstance

Parameters:

Returns:

  • (instance)


11
# File 'sig/nfe/generated/nf_produto_v2/invoice_events_resource_base.rbs', line 11

def self.new: (?events: Array[ActivityResource]?, ?has_more: bool?) -> instance