Class: Worldline::Connect::SDK::V1::Domain::AccountFundingRecipient

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#account_numberString

Returns the current value of account_number.

Returns:

  • (String)

    the current value of account_number



20
21
22
# File 'lib/worldline/connect/sdk/v1/domain/account_funding_recipient.rb', line 20

def 
  @account_number
end

#account_number_typeString

Returns the current value of account_number_type.

Returns:

  • (String)

    the current value of account_number_type



20
21
22
# File 'lib/worldline/connect/sdk/v1/domain/account_funding_recipient.rb', line 20

def 
  @account_number_type
end

#addressWorldline::Connect::SDK::V1::Domain::Address

Returns the current value of address.

Returns:



20
21
22
# File 'lib/worldline/connect/sdk/v1/domain/account_funding_recipient.rb', line 20

def address
  @address
end

#date_of_birthString

Returns the current value of date_of_birth.

Returns:

  • (String)

    the current value of date_of_birth



20
21
22
# File 'lib/worldline/connect/sdk/v1/domain/account_funding_recipient.rb', line 20

def date_of_birth
  @date_of_birth
end

#nameWorldline::Connect::SDK::V1::Domain::AfrName

Returns the current value of name.

Returns:



20
21
22
# File 'lib/worldline/connect/sdk/v1/domain/account_funding_recipient.rb', line 20

def name
  @name
end

#partial_panString

Returns the current value of partial_pan.

Returns:

  • (String)

    the current value of partial_pan



20
21
22
# File 'lib/worldline/connect/sdk/v1/domain/account_funding_recipient.rb', line 20

def partial_pan
  @partial_pan
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
# File 'lib/worldline/connect/sdk/v1/domain/account_funding_recipient.rb', line 46

def from_hash(hash)
  super
  if hash.has_key? 'accountNumber'
    @account_number = hash['accountNumber']
  end
  if hash.has_key? 'accountNumberType'
    @account_number_type = hash['accountNumberType']
  end
  if hash.has_key? 'address'
    raise TypeError, "value '%s' is not a Hash" % [hash['address']] unless hash['address'].is_a? Hash
    @address = Worldline::Connect::SDK::V1::Domain::Address.new_from_hash(hash['address'])
  end
  if hash.has_key? 'dateOfBirth'
    @date_of_birth = hash['dateOfBirth']
  end
  if hash.has_key? 'name'
    raise TypeError, "value '%s' is not a Hash" % [hash['name']] unless hash['name'].is_a? Hash
    @name = Worldline::Connect::SDK::V1::Domain::AfrName.new_from_hash(hash['name'])
  end
  if hash.has_key? 'partialPan'
    @partial_pan = hash['partialPan']
  end
end

#to_hHash

Returns:

  • (Hash)


35
36
37
38
39
40
41
42
43
44
# File 'lib/worldline/connect/sdk/v1/domain/account_funding_recipient.rb', line 35

def to_h
  hash = super
  hash['accountNumber'] = @account_number unless @account_number.nil?
  hash['accountNumberType'] = @account_number_type unless @account_number_type.nil?
  hash['address'] = @address.to_h unless @address.nil?
  hash['dateOfBirth'] = @date_of_birth unless @date_of_birth.nil?
  hash['name'] = @name.to_h unless @name.nil?
  hash['partialPan'] = @partial_pan unless @partial_pan.nil?
  hash
end