Class: Unit::CheckDeposit::GetRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/unit/models/check_deposit/get_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(deposit_id, include = nil) ⇒ GetRequest

Returns a new instance of GetRequest.

Parameters:

  • deposit_id (String)
  • include (Array<String>) (defaults to: nil)
    • optional



12
13
14
15
# File 'lib/unit/models/check_deposit/get_request.rb', line 12

def initialize(deposit_id, include = nil)
  @deposit_id = deposit_id
  @include = include
end

Instance Attribute Details

#deposit_idObject (readonly)

Returns the value of attribute deposit_id.



8
9
10
# File 'lib/unit/models/check_deposit/get_request.rb', line 8

def deposit_id
  @deposit_id
end

#includeObject (readonly)

Returns the value of attribute include.



8
9
10
# File 'lib/unit/models/check_deposit/get_request.rb', line 8

def include
  @include
end

Instance Method Details

#to_hashObject



17
18
19
# File 'lib/unit/models/check_deposit/get_request.rb', line 17

def to_hash
  { include: include&.join(",") }.compact
end