Class: Dto::Infra::VcnEntityPayload

Inherits:
Object
  • Object
show all
Defined in:
lib/dto/infra/vcn_entity_payload.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, id) ⇒ VcnEntityPayload

Returns a new instance of VcnEntityPayload.



9
10
11
12
# File 'lib/dto/infra/vcn_entity_payload.rb', line 9

def initialize(name, id)
  @name = name
  @id = id
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



7
8
9
# File 'lib/dto/infra/vcn_entity_payload.rb', line 7

def id
  @id
end

#nameObject

Returns the value of attribute name.



7
8
9
# File 'lib/dto/infra/vcn_entity_payload.rb', line 7

def name
  @name
end

Instance Method Details

#to_hashObject



14
15
16
17
18
19
# File 'lib/dto/infra/vcn_entity_payload.rb', line 14

def to_hash
  {
    name: @name,
    id: @id
  }.compact
end