Class: OnlinePayments::SDK::Domain::CreatePayoutRequest

Inherits:
DataObject
  • Object
show all
Defined in:
lib/onlinepayments/sdk/domain/create_payout_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#amount_of_moneyOnlinePayments::SDK::Domain::AmountOfMoney

Returns the current value of amount_of_money.

Returns:



20
21
22
# File 'lib/onlinepayments/sdk/domain/create_payout_request.rb', line 20

def amount_of_money
  @amount_of_money
end

#card_payout_method_specific_inputOnlinePayments::SDK::Domain::CardPayoutMethodSpecificInput

Returns the current value of card_payout_method_specific_input.

Returns:



20
21
22
# File 'lib/onlinepayments/sdk/domain/create_payout_request.rb', line 20

def card_payout_method_specific_input
  @card_payout_method_specific_input
end

#descriptorString

Returns the current value of descriptor.

Returns:

  • (String)

    the current value of descriptor



20
21
22
# File 'lib/onlinepayments/sdk/domain/create_payout_request.rb', line 20

def descriptor
  @descriptor
end

#feedbacksOnlinePayments::SDK::Domain::Feedbacks

Returns the current value of feedbacks.

Returns:



20
21
22
# File 'lib/onlinepayments/sdk/domain/create_payout_request.rb', line 20

def feedbacks
  @feedbacks
end

#omnichannel_payout_specific_inputOnlinePayments::SDK::Domain::OmnichannelPayoutSpecificInput

Returns the current value of omnichannel_payout_specific_input.

Returns:



20
21
22
# File 'lib/onlinepayments/sdk/domain/create_payout_request.rb', line 20

def omnichannel_payout_specific_input
  @omnichannel_payout_specific_input
end

#referencesOnlinePayments::SDK::Domain::PaymentReferences

Returns the current value of references.

Returns:



20
21
22
# File 'lib/onlinepayments/sdk/domain/create_payout_request.rb', line 20

def references
  @references
end

Instance Method Details

#from_hash(hash) ⇒ Object



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/onlinepayments/sdk/domain/create_payout_request.rb', line 46

def from_hash(hash)
  super
  if hash.has_key? 'amountOfMoney'
    raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoney']] unless hash['amountOfMoney'].is_a? Hash
    @amount_of_money = OnlinePayments::SDK::Domain::AmountOfMoney.new_from_hash(hash['amountOfMoney'])
  end
  if hash.has_key? 'cardPayoutMethodSpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['cardPayoutMethodSpecificInput']] unless hash['cardPayoutMethodSpecificInput'].is_a? Hash
    @card_payout_method_specific_input = OnlinePayments::SDK::Domain::CardPayoutMethodSpecificInput.new_from_hash(hash['cardPayoutMethodSpecificInput'])
  end
  if hash.has_key? 'descriptor'
    @descriptor = hash['descriptor']
  end
  if hash.has_key? 'feedbacks'
    raise TypeError, "value '%s' is not a Hash" % [hash['feedbacks']] unless hash['feedbacks'].is_a? Hash
    @feedbacks = OnlinePayments::SDK::Domain::Feedbacks.new_from_hash(hash['feedbacks'])
  end
  if hash.has_key? 'omnichannelPayoutSpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['omnichannelPayoutSpecificInput']] unless hash['omnichannelPayoutSpecificInput'].is_a? Hash
    @omnichannel_payout_specific_input = OnlinePayments::SDK::Domain::OmnichannelPayoutSpecificInput.new_from_hash(hash['omnichannelPayoutSpecificInput'])
  end
  if hash.has_key? 'references'
    raise TypeError, "value '%s' is not a Hash" % [hash['references']] unless hash['references'].is_a? Hash
    @references = OnlinePayments::SDK::Domain::PaymentReferences.new_from_hash(hash['references'])
  end
end

#to_hHash

Returns:

  • (Hash)


35
36
37
38
39
40
41
42
43
44
# File 'lib/onlinepayments/sdk/domain/create_payout_request.rb', line 35

def to_h
  hash = super
  hash['amountOfMoney'] = @amount_of_money.to_h unless @amount_of_money.nil?
  hash['cardPayoutMethodSpecificInput'] = @card_payout_method_specific_input.to_h unless @card_payout_method_specific_input.nil?
  hash['descriptor'] = @descriptor unless @descriptor.nil?
  hash['feedbacks'] = @feedbacks.to_h unless @feedbacks.nil?
  hash['omnichannelPayoutSpecificInput'] = @omnichannel_payout_specific_input.to_h unless @omnichannel_payout_specific_input.nil?
  hash['references'] = @references.to_h unless @references.nil?
  hash
end