Class: Ingenico::Connect::SDK::Domain::Mandates::MandateCustomer
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Mandates::MandateCustomer
- Defined in:
- lib/ingenico/connect/sdk/domain/mandates/mandate_customer.rb
Instance Attribute Summary collapse
- #bank_account_iban ⇒ Object
-
#company_name ⇒ Object
String.
- #contact_details ⇒ Object
- #mandate_address ⇒ Object
- #personal_information ⇒ Object
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#bank_account_iban ⇒ Object
18 19 20 |
# File 'lib/ingenico/connect/sdk/domain/mandates/mandate_customer.rb', line 18 def bank_account_iban @bank_account_iban end |
#company_name ⇒ Object
String
21 22 23 |
# File 'lib/ingenico/connect/sdk/domain/mandates/mandate_customer.rb', line 21 def company_name @company_name end |
#contact_details ⇒ Object
24 25 26 |
# File 'lib/ingenico/connect/sdk/domain/mandates/mandate_customer.rb', line 24 def contact_details @contact_details end |
#mandate_address ⇒ Object
27 28 29 |
# File 'lib/ingenico/connect/sdk/domain/mandates/mandate_customer.rb', line 27 def mandate_address @mandate_address end |
#personal_information ⇒ Object
30 31 32 |
# File 'lib/ingenico/connect/sdk/domain/mandates/mandate_customer.rb', line 30 def personal_information @personal_information end |
Instance Method Details
#from_hash(hash) ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/ingenico/connect/sdk/domain/mandates/mandate_customer.rb', line 42 def from_hash(hash) super 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?('companyName') @company_name = hash['companyName'] end if hash.has_key?('contactDetails') if !(hash['contactDetails'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['contactDetails']] end @contact_details = Ingenico::Connect::SDK::Domain::Mandates::MandateContactDetails.new_from_hash(hash['contactDetails']) end if hash.has_key?('mandateAddress') if !(hash['mandateAddress'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['mandateAddress']] end @mandate_address = Ingenico::Connect::SDK::Domain::Mandates::MandateAddress.new_from_hash(hash['mandateAddress']) end if hash.has_key?('personalInformation') if !(hash['personalInformation'].is_a? Hash) raise TypeError, "value '%s' is not a Hash" % [hash['personalInformation']] end @personal_information = Ingenico::Connect::SDK::Domain::Mandates::MandatePersonalInformation.new_from_hash(hash['personalInformation']) end end |
#to_h ⇒ Object
32 33 34 35 36 37 38 39 40 |
# File 'lib/ingenico/connect/sdk/domain/mandates/mandate_customer.rb', line 32 def to_h hash = super add_to_hash(hash, 'bankAccountIban', @bank_account_iban) add_to_hash(hash, 'companyName', @company_name) add_to_hash(hash, 'contactDetails', @contact_details) add_to_hash(hash, 'mandateAddress', @mandate_address) add_to_hash(hash, 'personalInformation', @personal_information) hash end |