Class: Worldline::Connect::SDK::V1::Domain::CreatePayoutRequest

Inherits:
Domain::DataObject show all
Defined in:
lib/worldline/connect/sdk/v1/domain/create_payout_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#amount_of_moneyObject

Deprecated.

Moved to PayoutDetails



33
34
35
# File 'lib/worldline/connect/sdk/v1/domain/create_payout_request.rb', line 33

def amount_of_money
  @amount_of_money
end

#bank_account_bbanObject

Deprecated.

Moved to BankTransferPayoutMethodSpecificInput



33
34
35
# File 'lib/worldline/connect/sdk/v1/domain/create_payout_request.rb', line 33

def 
  @bank_account_bban
end

#bank_account_ibanObject

Deprecated.

Moved to BankTransferPayoutMethodSpecificInput



33
34
35
# File 'lib/worldline/connect/sdk/v1/domain/create_payout_request.rb', line 33

def 
  @bank_account_iban
end

#bank_transfer_payout_method_specific_inputWorldline::Connect::SDK::V1::Domain::BankTransferPayoutMethodSpecificInput

Returns the current value of bank_transfer_payout_method_specific_input.

Returns:



33
34
35
# File 'lib/worldline/connect/sdk/v1/domain/create_payout_request.rb', line 33

def bank_transfer_payout_method_specific_input
  @bank_transfer_payout_method_specific_input
end

#card_payout_method_specific_inputWorldline::Connect::SDK::V1::Domain::CardPayoutMethodSpecificInput

Returns the current value of card_payout_method_specific_input.

Returns:



33
34
35
# File 'lib/worldline/connect/sdk/v1/domain/create_payout_request.rb', line 33

def card_payout_method_specific_input
  @card_payout_method_specific_input
end

#customerObject

Deprecated.

Moved to PayoutDetails



33
34
35
# File 'lib/worldline/connect/sdk/v1/domain/create_payout_request.rb', line 33

def customer
  @customer
end

#merchantWorldline::Connect::SDK::V1::Domain::PayoutMerchant

Returns the current value of merchant.

Returns:



33
34
35
# File 'lib/worldline/connect/sdk/v1/domain/create_payout_request.rb', line 33

def merchant
  @merchant
end

#payout_dateObject

Deprecated.

Moved to BankTransferPayoutMethodSpecificInput



33
34
35
# File 'lib/worldline/connect/sdk/v1/domain/create_payout_request.rb', line 33

def payout_date
  @payout_date
end

#payout_detailsWorldline::Connect::SDK::V1::Domain::PayoutDetails

Returns the current value of payout_details.

Returns:



33
34
35
# File 'lib/worldline/connect/sdk/v1/domain/create_payout_request.rb', line 33

def payout_details
  @payout_details
end

#payout_textObject

Deprecated.

Moved to BankTransferPayoutMethodSpecificInput



33
34
35
# File 'lib/worldline/connect/sdk/v1/domain/create_payout_request.rb', line 33

def payout_text
  @payout_text
end

#referencesObject

Deprecated.

Moved to PayoutDetails



33
34
35
# File 'lib/worldline/connect/sdk/v1/domain/create_payout_request.rb', line 33

def references
  @references
end

#swift_codeObject

Deprecated.

Moved to BankTransferPayoutMethodSpecificInput



33
34
35
# File 'lib/worldline/connect/sdk/v1/domain/create_payout_request.rb', line 33

def swift_code
  @swift_code
end

Instance Method Details

#from_hash(hash) ⇒ Object



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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# File 'lib/worldline/connect/sdk/v1/domain/create_payout_request.rb', line 85

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 = Worldline::Connect::SDK::V1::Domain::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
    @bank_account_bban = Worldline::Connect::SDK::V1::Domain::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
    @bank_account_iban = Worldline::Connect::SDK::V1::Domain::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 = Worldline::Connect::SDK::V1::Domain::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 = Worldline::Connect::SDK::V1::Domain::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 = Worldline::Connect::SDK::V1::Domain::PayoutCustomer.new_from_hash(hash['customer'])
  end
  if hash.has_key? 'merchant'
    raise TypeError, "value '%s' is not a Hash" % [hash['merchant']] unless hash['merchant'].is_a? Hash
    @merchant = Worldline::Connect::SDK::V1::Domain::PayoutMerchant.new_from_hash(hash['merchant'])
  end
  if hash.has_key? 'payoutDate'
    @payout_date = hash['payoutDate']
  end
  if hash.has_key? 'payoutDetails'
    raise TypeError, "value '%s' is not a Hash" % [hash['payoutDetails']] unless hash['payoutDetails'].is_a? Hash
    @payout_details = Worldline::Connect::SDK::V1::Domain::PayoutDetails.new_from_hash(hash['payoutDetails'])
  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 = Worldline::Connect::SDK::V1::Domain::PayoutReferences.new_from_hash(hash['references'])
  end
  if hash.has_key? 'swiftCode'
    @swift_code = hash['swiftCode']
  end
end

#to_hHash

Returns:

  • (Hash)


68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/worldline/connect/sdk/v1/domain/create_payout_request.rb', line 68

def to_h
  hash = super
  hash['amountOfMoney'] = @amount_of_money.to_h unless @amount_of_money.nil?
  hash['bankAccountBban'] = @bank_account_bban.to_h unless @bank_account_bban.nil?
  hash['bankAccountIban'] = @bank_account_iban.to_h unless @bank_account_iban.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['merchant'] = @merchant.to_h unless @merchant.nil?
  hash['payoutDate'] = @payout_date unless @payout_date.nil?
  hash['payoutDetails'] = @payout_details.to_h unless @payout_details.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