Class: Ingenico::Connect::SDK::Domain::Token::Debtor

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

new_from_hash

Instance Attribute Details

#additional_address_infoObject

String



14
15
16
# File 'lib/ingenico/connect/sdk/domain/token/debtor.rb', line 14

def additional_address_info
  @additional_address_info
end

#cityObject

String



17
18
19
# File 'lib/ingenico/connect/sdk/domain/token/debtor.rb', line 17

def city
  @city
end

#country_codeObject

String



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

def country_code
  @country_code
end

#first_nameObject

String



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

def first_name
  @first_name
end

#house_numberObject

String



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

def house_number
  @house_number
end

#stateObject

String



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

def state
  @state
end

#state_codeObject

String



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

def state_code
  @state_code
end

#streetObject

String



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

def street
  @street
end

#surnameObject

String



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

def surname
  @surname
end

#surname_prefixObject

String



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

def surname_prefix
  @surname_prefix
end

#zipObject

String



44
45
46
# File 'lib/ingenico/connect/sdk/domain/token/debtor.rb', line 44

def zip
  @zip
end

Instance Method Details

#from_hash(hash) ⇒ Object



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/token/debtor.rb', line 62

def from_hash(hash)
  super
  if hash.has_key?('additionalAddressInfo')
    @additional_address_info = hash['additionalAddressInfo']
  end
  if hash.has_key?('city')
    @city = hash['city']
  end
  if hash.has_key?('countryCode')
    @country_code = hash['countryCode']
  end
  if hash.has_key?('firstName')
    @first_name = hash['firstName']
  end
  if hash.has_key?('houseNumber')
    @house_number = hash['houseNumber']
  end
  if hash.has_key?('state')
    @state = hash['state']
  end
  if hash.has_key?('stateCode')
    @state_code = hash['stateCode']
  end
  if hash.has_key?('street')
    @street = hash['street']
  end
  if hash.has_key?('surname')
    @surname = hash['surname']
  end
  if hash.has_key?('surnamePrefix')
    @surname_prefix = hash['surnamePrefix']
  end
  if hash.has_key?('zip')
    @zip = hash['zip']
  end
end

#to_hObject



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/ingenico/connect/sdk/domain/token/debtor.rb', line 46

def to_h
  hash = super
  add_to_hash(hash, 'additionalAddressInfo', @additional_address_info)
  add_to_hash(hash, 'city', @city)
  add_to_hash(hash, 'countryCode', @country_code)
  add_to_hash(hash, 'firstName', @first_name)
  add_to_hash(hash, 'houseNumber', @house_number)
  add_to_hash(hash, 'state', @state)
  add_to_hash(hash, 'stateCode', @state_code)
  add_to_hash(hash, 'street', @street)
  add_to_hash(hash, 'surname', @surname)
  add_to_hash(hash, 'surnamePrefix', @surname_prefix)
  add_to_hash(hash, 'zip', @zip)
  hash
end