class Ingenico::Connect::SDK::Domain::Refund::RefundCustomer

@attr [Ingenico::Connect::SDK::Domain::Payment::AddressPersonal] address @attr [Ingenico::Connect::SDK::Domain::Definitions::CompanyInformation] company_information @attr [Ingenico::Connect::SDK::Domain::Definitions::ContactDetailsBase] contact_details @attr [String] fiscal_number

Attributes

address[RW]
company_information[RW]
contact_details[RW]
fiscal_number[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/connect/sdk/domain/refund/refund_customer.rb, line 38
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::Payment::AddressPersonal.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? 'fiscalNumber'
    @fiscal_number = hash['fiscalNumber']
  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/refund/refund_customer.rb, line 29
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['fiscalNumber'] = @fiscal_number unless @fiscal_number.nil?
  hash
end