Class: Nfe::Generated::ProductInvoiceRtcV1::InvoiceEventsResource

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeInvoiceEventsResource

Returns a new instance of InvoiceEventsResource.

Parameters:

  • account_id: (String, nil)
  • company_id: (String, nil)
  • events: (Array[ActivityResource], nil)
  • has_more: (Boolean, nil)
  • id: (String, nil)


15
# File 'sig/nfe/generated/product_invoice_rtc_v1/invoice_events_resource.rbs', line 15

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

Instance Attribute Details

#account_idObject (readonly)

Returns the value of attribute account_id

Returns:

  • (Object)

    the current value of account_id



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/invoice_events_resource.rb', line 9

def 
  @account_id
end

#company_idObject (readonly)

Returns the value of attribute company_id

Returns:

  • (Object)

    the current value of company_id



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/invoice_events_resource.rb', line 9

def company_id
  @company_id
end

#eventsObject (readonly)

Returns the value of attribute events

Returns:

  • (Object)

    the current value of events



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/invoice_events_resource.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/product_invoice_rtc_v1/invoice_events_resource.rb', line 9

def has_more
  @has_more
end

#idObject (readonly)

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/invoice_events_resource.rb', line 9

def id
  @id
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
18
19
20
# File 'lib/nfe/generated/product_invoice_rtc_v1/invoice_events_resource.rb', line 10

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

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

.newinstance

Parameters:

  • account_id: (String, nil)
  • company_id: (String, nil)
  • events: (Array[ActivityResource], nil)
  • has_more: (Boolean, nil)
  • id: (String, nil)

Returns:

  • (instance)


14
# File 'sig/nfe/generated/product_invoice_rtc_v1/invoice_events_resource.rbs', line 14

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