Class: Nfe::Generated::NfConsumidorV2::EconomicActivityResource

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeEconomicActivityResource

Returns a new instance of EconomicActivityResource.

Parameters:

  • code: (Integer, nil)
  • type: (Object)


12
# File 'sig/nfe/generated/nf_consumidor_v2/economic_activity_resource.rbs', line 12

def initialize: (?code: Integer?, ?type: untyped) -> void

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code

Returns:

  • (Object)

    the current value of code



9
10
11
# File 'lib/nfe/generated/nf_consumidor_v2/economic_activity_resource.rb', line 9

def code
  @code
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



9
10
11
# File 'lib/nfe/generated/nf_consumidor_v2/economic_activity_resource.rb', line 9

def type
  @type
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_consumidor_v2/economic_activity_resource.rb', line 10

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

  new(
    code: payload["code"],
    type: payload["type"],
  )
end

.newinstance

Parameters:

  • code: (Integer, nil)
  • type: (Object)

Returns:

  • (instance)


11
# File 'sig/nfe/generated/nf_consumidor_v2/economic_activity_resource.rbs', line 11

def self.new: (?code: Integer?, ?type: untyped) -> instance