class Ingenico::Connect::SDK::Domain::Mandates::MandateCustomer
@attr [Ingenico::Connect::SDK::Domain::Definitions::BankAccountIban] bank_account_iban
@attr [String] company_name
@attr [Ingenico::Connect::SDK::Domain::Mandates::MandateContactDetails] contact_details
@attr [Ingenico::Connect::SDK::Domain::Mandates::MandateAddress] mandate_address
@attr [Ingenico::Connect::SDK::Domain::Mandates::MandatePersonalInformation] personal_information
Attributes
bank_account_iban[RW]
company_name[RW]
contact_details[RW]
mandate_address[RW]
personal_information[RW]
Public Instance Methods
from_hash(hash)
click to toggle source
Calls superclass method
Ingenico::Connect::SDK::DataObject#from_hash
# File lib/ingenico/connect/sdk/domain/mandates/mandate_customer.rb, line 43 def from_hash(hash) super if hash.has_key? 'bankAccountIban' raise TypeError, "value '%s' is not a Hash" % [hash['bankAccountIban']] unless hash['bankAccountIban'].is_a? Hash @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' raise TypeError, "value '%s' is not a Hash" % [hash['contactDetails']] unless hash['contactDetails'].is_a? Hash @contact_details = Ingenico::Connect::SDK::Domain::Mandates::MandateContactDetails.new_from_hash(hash['contactDetails']) end if hash.has_key? 'mandateAddress' raise TypeError, "value '%s' is not a Hash" % [hash['mandateAddress']] unless hash['mandateAddress'].is_a? Hash @mandate_address = Ingenico::Connect::SDK::Domain::Mandates::MandateAddress.new_from_hash(hash['mandateAddress']) end if hash.has_key? 'personalInformation' raise TypeError, "value '%s' is not a Hash" % [hash['personalInformation']] unless hash['personalInformation'].is_a? Hash @personal_information = Ingenico::Connect::SDK::Domain::Mandates::MandatePersonalInformation.new_from_hash(hash['personalInformation']) end end
to_h()
click to toggle source
@return (Hash)
Calls superclass method
Ingenico::Connect::SDK::DataObject#to_h
# File lib/ingenico/connect/sdk/domain/mandates/mandate_customer.rb, line 33 def to_h hash = super hash['bankAccountIban'] = @bank_account_iban.to_h unless @bank_account_iban.nil? hash['companyName'] = @company_name unless @company_name.nil? hash['contactDetails'] = @contact_details.to_h unless @contact_details.nil? hash['mandateAddress'] = @mandate_address.to_h unless @mandate_address.nil? hash['personalInformation'] = @personal_information.to_h unless @personal_information.nil? hash end