Class: Unit::Payment::GetRequest

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payment_id, include = nil) ⇒ GetRequest

Returns a new instance of GetRequest.

Parameters:

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



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

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

Instance Attribute Details

#includeObject (readonly)

Returns the value of attribute include.



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

def include
  @include
end

#payment_idObject (readonly)

Returns the value of attribute payment_id.



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

def payment_id
  @payment_id
end

Instance Method Details

#to_hashObject



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

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