Class: Nfe::Generated::Nfeio::ResourceInfo

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeResourceInfo

Returns a new instance of ResourceInfo.

Parameters:

  • id: (Integer)
  • name: (String, nil)
  • outputs: (Array[untyped], nil)


13
# File 'sig/nfe/generated/nfeio/resource_info.rbs', line 13

def initialize: (?id: Integer, ?name: String?, ?outputs: Array[untyped]?) -> void

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



9
10
11
# File 'lib/nfe/generated/nfeio/resource_info.rb', line 9

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



9
10
11
# File 'lib/nfe/generated/nfeio/resource_info.rb', line 9

def name
  @name
end

#outputsObject (readonly)

Returns the value of attribute outputs

Returns:

  • (Object)

    the current value of outputs



9
10
11
# File 'lib/nfe/generated/nfeio/resource_info.rb', line 9

def outputs
  @outputs
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
# File 'lib/nfe/generated/nfeio/resource_info.rb', line 10

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

  new(
    id: payload["id"],
    name: payload["name"],
    outputs: payload["outputs"],
  )
end

.newinstance

Parameters:

  • id: (Integer)
  • name: (String, nil)
  • outputs: (Array[untyped], nil)

Returns:

  • (instance)


12
# File 'sig/nfe/generated/nfeio/resource_info.rbs', line 12

def self.new: (?id: Integer, ?name: String?, ?outputs: Array[untyped]?) -> instance