class Ingenico::Connect::SDK::Domain::Payout::PayoutCustomer
@attr [Ingenico::Connect::SDK::Domain::Definitions::Address] address @attr [Ingenico::Connect::SDK::Domain::Definitions::CompanyInformation] company_information
@attr [Ingenico::Connect::SDK::Domain::Definitions::ContactDetailsBase] contact_details
@attr [String] merchant_customer_id
@attr [Ingenico::Connect::SDK::Domain::Payment::PersonalName] name
Attributes
address[RW]
company_information[RW]
contact_details[RW]
merchant_customer_id[RW]
name[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/payout/payout_customer.rb, line 43 def from_hash(hash) super if hash.has_key? 'address' raise TypeError, "value '%s' is not a Hash" % [hash['address']] unless hash['address'].is_a? Hash @address = Ingenico::Connect::SDK::Domain::Definitions::Address.new_from_hash(hash['address']) end if hash.has_key? 'companyInformation' raise TypeError, "value '%s' is not a Hash" % [hash['companyInformation']] unless hash['companyInformation'].is_a? Hash @company_information = Ingenico::Connect::SDK::Domain::Definitions::CompanyInformation.new_from_hash(hash['companyInformation']) 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::Definitions::ContactDetailsBase.new_from_hash(hash['contactDetails']) end if hash.has_key? 'merchantCustomerId' @merchant_customer_id = hash['merchantCustomerId'] end if hash.has_key? 'name' raise TypeError, "value '%s' is not a Hash" % [hash['name']] unless hash['name'].is_a? Hash @name = Ingenico::Connect::SDK::Domain::Payment::PersonalName.new_from_hash(hash['name']) 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/payout/payout_customer.rb, line 33 def to_h hash = super hash['address'] = @address.to_h unless @address.nil? hash['companyInformation'] = @company_information.to_h unless @company_information.nil? hash['contactDetails'] = @contact_details.to_h unless @contact_details.nil? hash['merchantCustomerId'] = @merchant_customer_id unless @merchant_customer_id.nil? hash['name'] = @name.to_h unless @name.nil? hash end