Class: Worldline::Connect::SDK::V1::Domain::Merchant

Inherits:
Domain::DataObject show all
Defined in:
lib/worldline/connect/sdk/v1/domain/merchant.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#configuration_idString

Returns the current value of configuration_id.

Returns:

  • (String)

    the current value of configuration_id



17
18
19
# File 'lib/worldline/connect/sdk/v1/domain/merchant.rb', line 17

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



17
18
19
# File 'lib/worldline/connect/sdk/v1/domain/merchant.rb', line 17

def contact_website_url
  @contact_website_url
end

#sellerWorldline::Connect::SDK::V1::Domain::Seller

Returns the current value of seller.

Returns:



17
18
19
# File 'lib/worldline/connect/sdk/v1/domain/merchant.rb', line 17

def seller
  @seller
end

#website_urlString

Returns the current value of website_url.

Returns:

  • (String)

    the current value of website_url



17
18
19
# File 'lib/worldline/connect/sdk/v1/domain/merchant.rb', line 17

def website_url
  @website_url
end

Instance Method Details

#from_hash(hash) ⇒ Object



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

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 = Worldline::Connect::SDK::V1::Domain::Seller.new_from_hash(hash['seller'])
  end
  if hash.has_key? 'websiteUrl'
    @website_url = hash['websiteUrl']
  end
end

#to_hHash

Returns:

  • (Hash)


28
29
30
31
32
33
34
35
# File 'lib/worldline/connect/sdk/v1/domain/merchant.rb', line 28

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