Class: Worldline::Connect::SDK::V1::Domain::BankData

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#new_bank_nameString

Returns the current value of new_bank_name.

Returns:

  • (String)

    the current value of new_bank_name



16
17
18
# File 'lib/worldline/connect/sdk/v1/domain/bank_data.rb', line 16

def new_bank_name
  @new_bank_name
end

#reformatted_account_numberString

Returns the current value of reformatted_account_number.

Returns:

  • (String)

    the current value of reformatted_account_number



16
17
18
# File 'lib/worldline/connect/sdk/v1/domain/bank_data.rb', line 16

def 
  @reformatted_account_number
end

#reformatted_bank_codeString

Returns the current value of reformatted_bank_code.

Returns:

  • (String)

    the current value of reformatted_bank_code



16
17
18
# File 'lib/worldline/connect/sdk/v1/domain/bank_data.rb', line 16

def reformatted_bank_code
  @reformatted_bank_code
end

#reformatted_branch_codeString

Returns the current value of reformatted_branch_code.

Returns:

  • (String)

    the current value of reformatted_branch_code



16
17
18
# File 'lib/worldline/connect/sdk/v1/domain/bank_data.rb', line 16

def reformatted_branch_code
  @reformatted_branch_code
end

Instance Method Details

#from_hash(hash) ⇒ Object



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/worldline/connect/sdk/v1/domain/bank_data.rb', line 36

def from_hash(hash)
  super
  if hash.has_key? 'newBankName'
    @new_bank_name = hash['newBankName']
  end
  if hash.has_key? 'reformattedAccountNumber'
    @reformatted_account_number = hash['reformattedAccountNumber']
  end
  if hash.has_key? 'reformattedBankCode'
    @reformatted_bank_code = hash['reformattedBankCode']
  end
  if hash.has_key? 'reformattedBranchCode'
    @reformatted_branch_code = hash['reformattedBranchCode']
  end
end

#to_hHash

Returns:

  • (Hash)


27
28
29
30
31
32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/bank_data.rb', line 27

def to_h
  hash = super
  hash['newBankName'] = @new_bank_name unless @new_bank_name.nil?
  hash['reformattedAccountNumber'] = @reformatted_account_number unless @reformatted_account_number.nil?
  hash['reformattedBankCode'] = @reformatted_bank_code unless @reformatted_bank_code.nil?
  hash['reformattedBranchCode'] = @reformatted_branch_code unless @reformatted_branch_code.nil?
  hash
end