class Ingenico::Connect::SDK::Domain::Definitions::CustomerBase

@attr [Ingenico::Connect::SDK::Domain::Definitions::CompanyInformation] company_information @attr [String] merchant_customer_id @attr [String] vat_number

Attributes

company_information[RW]
merchant_customer_id[RW]
vat_number[RW]

@deprecated Use companyInformation.vatNumber instead

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/connect/sdk/domain/definitions/customer_base.rb, line 34
def from_hash(hash)
  super
  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? 'merchantCustomerId'
    @merchant_customer_id = hash['merchantCustomerId']
  end
  if hash.has_key? 'vatNumber'
    @vat_number = hash['vatNumber']
  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/definitions/customer_base.rb, line 26
def to_h
  hash = super
  hash['companyInformation'] = @company_information.to_h unless @company_information.nil?
  hash['merchantCustomerId'] = @merchant_customer_id unless @merchant_customer_id.nil?
  hash['vatNumber'] = @vat_number unless @vat_number.nil?
  hash
end