Class: OnlinePayments::SDK::Domain::MandateCustomerResponse
- Inherits:
-
OnlinePayments::SDK::DataObject
- Object
- OnlinePayments::SDK::DataObject
- OnlinePayments::SDK::Domain::MandateCustomerResponse
- Defined in:
- lib/onlinepayments/sdk/domain/mandate_customer_response.rb
Instance Attribute Summary collapse
-
#bank_account_iban ⇒ OnlinePayments::SDK::Domain::BankAccountIban
The current value of bank_account_iban.
-
#company_name ⇒ String
The current value of company_name.
-
#contact_details ⇒ OnlinePayments::SDK::Domain::MandateContactDetails
The current value of contact_details.
-
#mandate_address ⇒ OnlinePayments::SDK::Domain::MandateAddressResponse
The current value of mandate_address.
-
#personal_information ⇒ OnlinePayments::SDK::Domain::MandatePersonalInformationResponse
The current value of personal_information.
Instance Method Summary collapse
Methods inherited from OnlinePayments::SDK::DataObject
Instance Attribute Details
#bank_account_iban ⇒ OnlinePayments::SDK::Domain::BankAccountIban
Returns the current value of bank_account_iban.
18 19 20 |
# File 'lib/onlinepayments/sdk/domain/mandate_customer_response.rb', line 18 def bank_account_iban @bank_account_iban end |
#company_name ⇒ String
Returns the current value of company_name.
18 19 20 |
# File 'lib/onlinepayments/sdk/domain/mandate_customer_response.rb', line 18 def company_name @company_name end |
#contact_details ⇒ OnlinePayments::SDK::Domain::MandateContactDetails
Returns the current value of contact_details.
18 19 20 |
# File 'lib/onlinepayments/sdk/domain/mandate_customer_response.rb', line 18 def contact_details @contact_details end |
#mandate_address ⇒ OnlinePayments::SDK::Domain::MandateAddressResponse
Returns the current value of mandate_address.
18 19 20 |
# File 'lib/onlinepayments/sdk/domain/mandate_customer_response.rb', line 18 def mandate_address @mandate_address end |
#personal_information ⇒ OnlinePayments::SDK::Domain::MandatePersonalInformationResponse
Returns the current value of personal_information.
18 19 20 |
# File 'lib/onlinepayments/sdk/domain/mandate_customer_response.rb', line 18 def personal_information @personal_information end |
Instance Method Details
#from_hash(hash) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/onlinepayments/sdk/domain/mandate_customer_response.rb', line 36 def from_hash(hash) super if hash.key? 'bankAccountIban' raise TypeError, "value '%s' is not a Hash" % [hash['bankAccountIban']] unless hash['bankAccountIban'].is_a? Hash @bank_account_iban = OnlinePayments::SDK::Domain::BankAccountIban.new_from_hash(hash['bankAccountIban']) end @company_name = hash['companyName'] if hash.key? 'companyName' if hash.key? 'contactDetails' raise TypeError, "value '%s' is not a Hash" % [hash['contactDetails']] unless hash['contactDetails'].is_a? Hash @contact_details = OnlinePayments::SDK::Domain::MandateContactDetails.new_from_hash(hash['contactDetails']) end if hash.key? 'mandateAddress' raise TypeError, "value '%s' is not a Hash" % [hash['mandateAddress']] unless hash['mandateAddress'].is_a? Hash @mandate_address = OnlinePayments::SDK::Domain::MandateAddressResponse.new_from_hash(hash['mandateAddress']) end if hash.key? 'personalInformation' raise TypeError, "value '%s' is not a Hash" % [hash['personalInformation']] unless hash['personalInformation'].is_a? Hash @personal_information = OnlinePayments::SDK::Domain::MandatePersonalInformationResponse.new_from_hash(hash['personalInformation']) end end |
#to_h ⇒ Hash
26 27 28 29 30 31 32 33 34 |
# File 'lib/onlinepayments/sdk/domain/mandate_customer_response.rb', line 26 def to_h hash = super hash['bankAccountIban'] = @bank_account_iban.to_h if @bank_account_iban hash['companyName'] = @company_name unless @company_name.nil? hash['contactDetails'] = @contact_details.to_h if @contact_details hash['mandateAddress'] = @mandate_address.to_h if @mandate_address hash['personalInformation'] = @personal_information.to_h if @personal_information hash end |