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

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

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

new_from_hash

Instance Attribute Details

#amount_of_moneyObject



20
21
22
# File 'lib/ingenico/connect/sdk/domain/payout/create_payout_request.rb', line 20

def amount_of_money
  @amount_of_money
end

#bank_account_bbanObject



23
24
25
# File 'lib/ingenico/connect/sdk/domain/payout/create_payout_request.rb', line 23

def 
  @bank_account_bban
end

#bank_account_ibanObject



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

def 
  @bank_account_iban
end

#customerObject



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

def customer
  @customer
end

#payout_dateObject

String



32
33
34
# File 'lib/ingenico/connect/sdk/domain/payout/create_payout_request.rb', line 32

def payout_date
  @payout_date
end

#payout_textObject

String



35
36
37
# File 'lib/ingenico/connect/sdk/domain/payout/create_payout_request.rb', line 35

def payout_text
  @payout_text
end

#referencesObject



38
39
40
# File 'lib/ingenico/connect/sdk/domain/payout/create_payout_request.rb', line 38

def references
  @references
end

#swift_codeObject

String



41
42
43
# File 'lib/ingenico/connect/sdk/domain/payout/create_payout_request.rb', line 41

def swift_code
  @swift_code
end

Instance Method Details

#from_hash(hash) ⇒ Object



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/ingenico/connect/sdk/domain/payout/create_payout_request.rb', line 56

def from_hash(hash)
  super
  if hash.has_key?('amountOfMoney')
    if !(hash['amountOfMoney'].is_a? Hash)
      raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoney']]
    end
    @amount_of_money = Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney.new_from_hash(hash['amountOfMoney'])
  end
  if hash.has_key?('bankAccountBban')
    if !(hash['bankAccountBban'].is_a? Hash)
      raise TypeError, "value '%s' is not a Hash" % [hash['bankAccountBban']]
    end
    @bank_account_bban = Ingenico::Connect::SDK::Domain::Definitions::BankAccountBban.new_from_hash(hash['bankAccountBban'])
  end
  if hash.has_key?('bankAccountIban')
    if !(hash['bankAccountIban'].is_a? Hash)
      raise TypeError, "value '%s' is not a Hash" % [hash['bankAccountIban']]
    end
    @bank_account_iban = Ingenico::Connect::SDK::Domain::Definitions::BankAccountIban.new_from_hash(hash['bankAccountIban'])
  end
  if hash.has_key?('customer')
    if !(hash['customer'].is_a? Hash)
      raise TypeError, "value '%s' is not a Hash" % [hash['customer']]
    end
    @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')
    if !(hash['references'].is_a? Hash)
      raise TypeError, "value '%s' is not a Hash" % [hash['references']]
    end
    @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_hObject



43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/ingenico/connect/sdk/domain/payout/create_payout_request.rb', line 43

def to_h
  hash = super
  add_to_hash(hash, 'amountOfMoney', @amount_of_money)
  add_to_hash(hash, 'bankAccountBban', @bank_account_bban)
  add_to_hash(hash, 'bankAccountIban', @bank_account_iban)
  add_to_hash(hash, 'customer', @customer)
  add_to_hash(hash, 'payoutDate', @payout_date)
  add_to_hash(hash, 'payoutText', @payout_text)
  add_to_hash(hash, 'references', @references)
  add_to_hash(hash, 'swiftCode', @swift_code)
  hash
end