Class: Ingenico::Connect::SDK::Domain::Payment::Merchant

Inherits:
Ingenico::Connect::SDK::DataObject show all
Defined in:
lib/ingenico/connect/sdk/domain/payment/merchant.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ingenico::Connect::SDK::DataObject

new_from_hash

Instance Attribute Details

#configuration_idString

Returns the current value of configuration_id.

Returns:

  • (String)

    the current value of configuration_id



16
17
18
# File 'lib/ingenico/connect/sdk/domain/payment/merchant.rb', line 16

def configuration_id
  @configuration_id
end

#contact_website_urlString

Returns the current value of contact_website_url.

Returns:

  • (String)

    the current value of contact_website_url



16
17
18
# File 'lib/ingenico/connect/sdk/domain/payment/merchant.rb', line 16

def contact_website_url
  @contact_website_url
end

#sellerIngenico::Connect::SDK::Domain::Payment::Seller

Returns the current value of seller.

Returns:



16
17
18
# File 'lib/ingenico/connect/sdk/domain/payment/merchant.rb', line 16

def seller
  @seller
end

#website_urlString

Returns the current value of website_url.

Returns:

  • (String)

    the current value of website_url



16
17
18
# File 'lib/ingenico/connect/sdk/domain/payment/merchant.rb', line 16

def website_url
  @website_url
end

Instance Method Details

#from_hash(hash) ⇒ Object



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/ingenico/connect/sdk/domain/payment/merchant.rb', line 36

def from_hash(hash)
  super
  if hash.has_key? 'configurationId'
    @configuration_id = hash['configurationId']
  end
  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_hHash

Returns:

  • (Hash)


27
28
29
30
31
32
33
34
# File 'lib/ingenico/connect/sdk/domain/payment/merchant.rb', line 27

def to_h
  hash = super
  hash['configurationId'] = @configuration_id unless @configuration_id.nil?
  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