Class: Nfe::Generated::ServiceInvoiceRtcV1::ActivityEvent

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeActivityEvent

Returns a new instance of ActivityEvent.

Parameters:

  • code: (String)
  • address: (AddressDefinition)
  • begin_on: (String)
  • end_on: (String)
  • name: (String)


15
# File 'sig/nfe/generated/service_invoice_rtc_v1/activity_event.rbs', line 15

def initialize: (?code: String, ?address: AddressDefinition, ?begin_on: String, ?end_on: String, ?name: String) -> void

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address

Returns:

  • (Object)

    the current value of address



9
10
11
# File 'lib/nfe/generated/service_invoice_rtc_v1/activity_event.rb', line 9

def address
  @address
end

#begin_onObject (readonly)

Returns the value of attribute begin_on

Returns:

  • (Object)

    the current value of begin_on



9
10
11
# File 'lib/nfe/generated/service_invoice_rtc_v1/activity_event.rb', line 9

def begin_on
  @begin_on
end

#codeObject (readonly)

Returns the value of attribute code

Returns:

  • (Object)

    the current value of code



9
10
11
# File 'lib/nfe/generated/service_invoice_rtc_v1/activity_event.rb', line 9

def code
  @code
end

#end_onObject (readonly)

Returns the value of attribute end_on

Returns:

  • (Object)

    the current value of end_on



9
10
11
# File 'lib/nfe/generated/service_invoice_rtc_v1/activity_event.rb', line 9

def end_on
  @end_on
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



9
10
11
# File 'lib/nfe/generated/service_invoice_rtc_v1/activity_event.rb', line 9

def name
  @name
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/service_invoice_rtc_v1/activity_event.rb', line 10

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

  new(
    code: payload["Code"],
    address: AddressDefinition.from_api(payload["address"]),
    begin_on: payload["beginOn"],
    end_on: payload["endOn"],
    name: payload["name"],
  )
end

.newinstance

Parameters:

  • code: (String)
  • address: (AddressDefinition)
  • begin_on: (String)
  • end_on: (String)
  • name: (String)

Returns:

  • (instance)


14
# File 'sig/nfe/generated/service_invoice_rtc_v1/activity_event.rbs', line 14

def self.new: (?code: String, ?address: AddressDefinition, ?begin_on: String, ?end_on: String, ?name: String) -> instance