Class: Ingenico::Connect::SDK::Domain::Payout::CreatePayoutRequest

Inherits:
Ingenico::Connect::SDK::DataObject show all
Defined in:
lib/ingenico/connect/sdk/domain/payout/create_payout_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ingenico::Connect::SDK::DataObject

new_from_hash

Instance Attribute Details

#amount_of_moneyIngenico::Connect::SDK::Domain::Definitions::AmountOfMoney

Returns the current value of amount_of_money.

Returns:



28
29
30
# File 'lib/ingenico/connect/sdk/domain/payout/create_payout_request.rb', line 28

def amount_of_money
  @amount_of_money
end

#bank_account_bbanObject

Deprecated.

Moved to BankTransferPayoutMethodSpecificInput



28
29
30
# File 'lib/ingenico/connect/sdk/domain/payout/create_payout_request.rb', line 28

def 
  
end

#bank_account_ibanObject

Deprecated.

Moved to BankTransferPayoutMethodSpecificInput



28
29
30
# File 'lib/ingenico/connect/sdk/domain/payout/create_payout_request.rb', line 28

def 
  
end

#bank_transfer_payout_method_specific_inputIngenico::Connect::SDK::Domain::Payout::BankTransferPayoutMethodSpecificInput

Returns the current value of bank_transfer_payout_method_specific_input.

Returns:



28
29
30
# File 'lib/ingenico/connect/sdk/domain/payout/create_payout_request.rb', line 28

def bank_transfer_payout_method_specific_input
  @bank_transfer_payout_method_specific_input
end

#card_payout_method_specific_inputIngenico::Connect::SDK::Domain::Payout::CardPayoutMethodSpecificInput

Returns the current value of card_payout_method_specific_input.

Returns:



28
29
30
# File 'lib/ingenico/connect/sdk/domain/payout/create_payout_request.rb', line 28

def card_payout_method_specific_input
  @card_payout_method_specific_input
end

#customerObject

Deprecated.

Moved to BankTransferPayoutMethodSpecificInput



28
29
30
# File 'lib/ingenico/connect/sdk/domain/payout/create_payout_request.rb', line 28

def customer
  @customer
end

#payout_dateObject

Deprecated.

Moved to BankTransferPayoutMethodSpecificInput



28
29
30
# File 'lib/ingenico/connect/sdk/domain/payout/create_payout_request.rb', line 28

def payout_date
  @payout_date
end

#payout_textObject

Deprecated.

Moved to BankTransferPayoutMethodSpecificInput



28
29
30
# File 'lib/ingenico/connect/sdk/domain/payout/create_payout_request.rb', line 28

def payout_text
  @payout_text
end

#referencesIngenico::Connect::SDK::Domain::Payout::PayoutReferences

Returns the current value of references.

Returns:



28
29
30
# File 'lib/ingenico/connect/sdk/domain/payout/create_payout_request.rb', line 28

def references
  @references
end

#swift_codeObject

Deprecated.

Moved to BankTransferPayoutMethodSpecificInput



28
29
30
# File 'lib/ingenico/connect/sdk/domain/payout/create_payout_request.rb', line 28

def swift_code
  @swift_code
end

Instance Method Details

#from_hash(hash) ⇒ Object



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# File 'lib/ingenico/connect/sdk/domain/payout/create_payout_request.rb', line 78

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 = Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney.new_from_hash(hash['amountOfMoney'])
  end
  if hash.has_key? 'bankAccountBban'
    raise TypeError, "value '%s' is not a Hash" % [hash['bankAccountBban']] unless hash['bankAccountBban'].is_a? Hash
     = Ingenico::Connect::SDK::Domain::Definitions::BankAccountBban.new_from_hash(hash['bankAccountBban'])
  end
  if hash.has_key? 'bankAccountIban'
    raise TypeError, "value '%s' is not a Hash" % [hash['bankAccountIban']] unless hash['bankAccountIban'].is_a? Hash
     = Ingenico::Connect::SDK::Domain::Definitions::BankAccountIban.new_from_hash(hash['bankAccountIban'])
  end
  if hash.has_key? 'bankTransferPayoutMethodSpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['bankTransferPayoutMethodSpecificInput']] unless hash['bankTransferPayoutMethodSpecificInput'].is_a? Hash
    @bank_transfer_payout_method_specific_input = Ingenico::Connect::SDK::Domain::Payout::BankTransferPayoutMethodSpecificInput.new_from_hash(hash['bankTransferPayoutMethodSpecificInput'])
  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 = Ingenico::Connect::SDK::Domain::Payout::CardPayoutMethodSpecificInput.new_from_hash(hash['cardPayoutMethodSpecificInput'])
  end
  if hash.has_key? 'customer'
    raise TypeError, "value '%s' is not a Hash" % [hash['customer']] unless hash['customer'].is_a? Hash
    @customer = Ingenico::Connect::SDK::Domain::Payout::PayoutCustomer.new_from_hash(hash['customer'])
  end
  if hash.has_key? 'payoutDate'
    @payout_date = hash['payoutDate']
  end
  if hash.has_key? 'payoutText'
    @payout_text = hash['payoutText']
  end
  if hash.has_key? 'references'
    raise TypeError, "value '%s' is not a Hash" % [hash['references']] unless hash['references'].is_a? Hash
    @references = Ingenico::Connect::SDK::Domain::Payout::PayoutReferences.new_from_hash(hash['references'])
  end
  if hash.has_key? 'swiftCode'
    @swift_code = hash['swiftCode']
  end
end

#to_hHash

Returns:

  • (Hash)


63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/ingenico/connect/sdk/domain/payout/create_payout_request.rb', line 63

def to_h
  hash = super
  hash['amountOfMoney'] = @amount_of_money.to_h unless @amount_of_money.nil?
  hash['bankAccountBban'] = .to_h unless .nil?
  hash['bankAccountIban'] = .to_h unless .nil?
  hash['bankTransferPayoutMethodSpecificInput'] = @bank_transfer_payout_method_specific_input.to_h unless @bank_transfer_payout_method_specific_input.nil?
  hash['cardPayoutMethodSpecificInput'] = @card_payout_method_specific_input.to_h unless @card_payout_method_specific_input.nil?
  hash['customer'] = @customer.to_h unless @customer.nil?
  hash['payoutDate'] = @payout_date unless @payout_date.nil?
  hash['payoutText'] = @payout_text unless @payout_text.nil?
  hash['references'] = @references.to_h unless @references.nil?
  hash['swiftCode'] = @swift_code unless @swift_code.nil?
  hash
end