class Ingenico::Connect::SDK::Domain::Payment::Merchant

@attr [String] contact_website_url @attr [Ingenico::Connect::SDK::Domain::Payment::Seller] seller @attr [String] website_url

Attributes

contact_website_url[RW]
seller[RW]
website_url[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/connect/sdk/domain/payment/merchant.rb, line 32
def from_hash(hash)
  super
  if hash.has_key? 'contactWebsiteUrl'
    @contact_website_url = hash['contactWebsiteUrl']
  end
  if hash.has_key? 'seller'
    raise TypeError, "value '%s' is not a Hash" % [hash['seller']] unless hash['seller'].is_a? Hash
    @seller = Ingenico::Connect::SDK::Domain::Payment::Seller.new_from_hash(hash['seller'])
  end
  if hash.has_key? 'websiteUrl'
    @website_url = hash['websiteUrl']
  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/payment/merchant.rb, line 24
def to_h
  hash = super
  hash['contactWebsiteUrl'] = @contact_website_url unless @contact_website_url.nil?
  hash['seller'] = @seller.to_h unless @seller.nil?
  hash['websiteUrl'] = @website_url unless @website_url.nil?
  hash
end