Class: OnlinePayments::SDK::Domain::CreatePayoutRequest
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::CreatePayoutRequest
- Defined in:
- lib/onlinepayments/sdk/domain/create_payout_request.rb
Instance Attribute Summary collapse
-
#amount_of_money ⇒ OnlinePayments::SDK::Domain::AmountOfMoney
The current value of amount_of_money.
-
#card_payout_method_specific_input ⇒ OnlinePayments::SDK::Domain::CardPayoutMethodSpecificInput
The current value of card_payout_method_specific_input.
-
#descriptor ⇒ String
The current value of descriptor.
-
#feedbacks ⇒ OnlinePayments::SDK::Domain::Feedbacks
The current value of feedbacks.
-
#omnichannel_payout_specific_input ⇒ OnlinePayments::SDK::Domain::OmnichannelPayoutSpecificInput
The current value of omnichannel_payout_specific_input.
-
#references ⇒ OnlinePayments::SDK::Domain::PaymentReferences
The current value of references.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#amount_of_money ⇒ OnlinePayments::SDK::Domain::AmountOfMoney
Returns the current value of amount_of_money.
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_input ⇒ OnlinePayments::SDK::Domain::CardPayoutMethodSpecificInput
Returns the current value of card_payout_method_specific_input.
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 |
#descriptor ⇒ String
Returns the current value of descriptor.
20 21 22 |
# File 'lib/onlinepayments/sdk/domain/create_payout_request.rb', line 20 def descriptor @descriptor end |
#feedbacks ⇒ OnlinePayments::SDK::Domain::Feedbacks
Returns the current value of feedbacks.
20 21 22 |
# File 'lib/onlinepayments/sdk/domain/create_payout_request.rb', line 20 def feedbacks @feedbacks end |
#omnichannel_payout_specific_input ⇒ OnlinePayments::SDK::Domain::OmnichannelPayoutSpecificInput
Returns the current value of omnichannel_payout_specific_input.
20 21 22 |
# File 'lib/onlinepayments/sdk/domain/create_payout_request.rb', line 20 def omnichannel_payout_specific_input @omnichannel_payout_specific_input end |
#references ⇒ OnlinePayments::SDK::Domain::PaymentReferences
Returns the current value of references.
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_h ⇒ 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 |