Class: Worldline::Connect::SDK::V1::Domain::PayoutResult

Inherits:
AbstractOrderStatus show all
Defined in:
lib/worldline/connect/sdk/v1/domain/payout_result.rb

Direct Known Subclasses

PayoutResponse

Instance Attribute Summary collapse

Attributes inherited from AbstractOrderStatus

#id

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#payout_outputWorldline::Connect::SDK::V1::Domain::OrderOutput

Returns the current value of payout_output.

Returns:



17
18
19
# File 'lib/worldline/connect/sdk/v1/domain/payout_result.rb', line 17

def payout_output
  @payout_output
end

#statusString

Returns the current value of status.

Returns:

  • (String)

    the current value of status



17
18
19
# File 'lib/worldline/connect/sdk/v1/domain/payout_result.rb', line 17

def status
  @status
end

#status_outputWorldline::Connect::SDK::V1::Domain::OrderStatusOutput

Returns the current value of status_output.

Returns:



17
18
19
# File 'lib/worldline/connect/sdk/v1/domain/payout_result.rb', line 17

def status_output
  @status_output
end

Instance Method Details

#from_hash(hash) ⇒ Object



34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/worldline/connect/sdk/v1/domain/payout_result.rb', line 34

def from_hash(hash)
  super
  if hash.has_key? 'payoutOutput'
    raise TypeError, "value '%s' is not a Hash" % [hash['payoutOutput']] unless hash['payoutOutput'].is_a? Hash
    @payout_output = Worldline::Connect::SDK::V1::Domain::OrderOutput.new_from_hash(hash['payoutOutput'])
  end
  if hash.has_key? 'status'
    @status = hash['status']
  end
  if hash.has_key? 'statusOutput'
    raise TypeError, "value '%s' is not a Hash" % [hash['statusOutput']] unless hash['statusOutput'].is_a? Hash
    @status_output = Worldline::Connect::SDK::V1::Domain::OrderStatusOutput.new_from_hash(hash['statusOutput'])
  end
end

#to_hHash

Returns:

  • (Hash)


26
27
28
29
30
31
32
# File 'lib/worldline/connect/sdk/v1/domain/payout_result.rb', line 26

def to_h
  hash = super
  hash['payoutOutput'] = @payout_output.to_h unless @payout_output.nil?
  hash['status'] = @status unless @status.nil?
  hash['statusOutput'] = @status_output.to_h unless @status_output.nil?
  hash
end