Class: Worldline::Acquiring::SDK::V1::Domain::MerchantData

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#addressString

Returns the current value of address.

Returns:

  • (String)

    the current value of address



18
19
20
# File 'lib/worldline/acquiring/sdk/v1/domain/merchant_data.rb', line 18

def address
  @address
end

#cityString

Returns the current value of city.

Returns:

  • (String)

    the current value of city



18
19
20
# File 'lib/worldline/acquiring/sdk/v1/domain/merchant_data.rb', line 18

def city
  @city
end

#country_codeString

Returns the current value of country_code.

Returns:

  • (String)

    the current value of country_code



18
19
20
# File 'lib/worldline/acquiring/sdk/v1/domain/merchant_data.rb', line 18

def country_code
  @country_code
end

#merchant_category_codeInteger

Returns the current value of merchant_category_code.

Returns:

  • (Integer)

    the current value of merchant_category_code



18
19
20
# File 'lib/worldline/acquiring/sdk/v1/domain/merchant_data.rb', line 18

def merchant_category_code
  @merchant_category_code
end

#nameString

Returns the current value of name.

Returns:

  • (String)

    the current value of name



18
19
20
# File 'lib/worldline/acquiring/sdk/v1/domain/merchant_data.rb', line 18

def name
  @name
end

#postal_codeString

Returns the current value of postal_code.

Returns:

  • (String)

    the current value of postal_code



18
19
20
# File 'lib/worldline/acquiring/sdk/v1/domain/merchant_data.rb', line 18

def postal_code
  @postal_code
end

#state_codeString

Returns the current value of state_code.

Returns:

  • (String)

    the current value of state_code



18
19
20
# File 'lib/worldline/acquiring/sdk/v1/domain/merchant_data.rb', line 18

def state_code
  @state_code
end

Instance Method Details

#from_hash(hash) ⇒ Object



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/worldline/acquiring/sdk/v1/domain/merchant_data.rb', line 47

def from_hash(hash)
  super
  if hash.has_key? 'address'
    @address = hash['address']
  end
  if hash.has_key? 'city'
    @city = hash['city']
  end
  if hash.has_key? 'countryCode'
    @country_code = hash['countryCode']
  end
  if hash.has_key? 'merchantCategoryCode'
    @merchant_category_code = hash['merchantCategoryCode']
  end
  if hash.has_key? 'name'
    @name = hash['name']
  end
  if hash.has_key? 'postalCode'
    @postal_code = hash['postalCode']
  end
  if hash.has_key? 'stateCode'
    @state_code = hash['stateCode']
  end
end

#to_hHash

Returns:

  • (Hash)


35
36
37
38
39
40
41
42
43
44
45
# File 'lib/worldline/acquiring/sdk/v1/domain/merchant_data.rb', line 35

def to_h
  hash = super
  hash['address'] = @address unless @address.nil?
  hash['city'] = @city unless @city.nil?
  hash['countryCode'] = @country_code unless @country_code.nil?
  hash['merchantCategoryCode'] = @merchant_category_code unless @merchant_category_code.nil?
  hash['name'] = @name unless @name.nil?
  hash['postalCode'] = @postal_code unless @postal_code.nil?
  hash['stateCode'] = @state_code unless @state_code.nil?
  hash
end