Class: Worldline::Acquiring::SDK::V1::Domain::ServiceLocationAddress

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#cityString

Returns the current value of city.

Returns:

  • (String)

    the current value of city



15
16
17
# File 'lib/worldline/acquiring/sdk/v1/domain/service_location_address.rb', line 15

def city
  @city
end

#country_codeString

Returns the current value of country_code.

Returns:

  • (String)

    the current value of country_code



15
16
17
# File 'lib/worldline/acquiring/sdk/v1/domain/service_location_address.rb', line 15

def country_code
  @country_code
end

#country_subdivision_codeString

Returns the current value of country_subdivision_code.

Returns:

  • (String)

    the current value of country_subdivision_code



15
16
17
# File 'lib/worldline/acquiring/sdk/v1/domain/service_location_address.rb', line 15

def country_subdivision_code
  @country_subdivision_code
end

#postal_codeString

Returns the current value of postal_code.

Returns:

  • (String)

    the current value of postal_code



15
16
17
# File 'lib/worldline/acquiring/sdk/v1/domain/service_location_address.rb', line 15

def postal_code
  @postal_code
end

Instance Method Details

#from_hash(hash) ⇒ Object



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

def from_hash(hash)
  super
  if hash.has_key? 'city'
    @city = hash['city']
  end
  if hash.has_key? 'countryCode'
    @country_code = hash['countryCode']
  end
  if hash.has_key? 'countrySubdivisionCode'
    @country_subdivision_code = hash['countrySubdivisionCode']
  end
  if hash.has_key? 'postalCode'
    @postal_code = hash['postalCode']
  end
end

#to_hHash

Returns:

  • (Hash)


26
27
28
29
30
31
32
33
# File 'lib/worldline/acquiring/sdk/v1/domain/service_location_address.rb', line 26

def to_h
  hash = super
  hash['city'] = @city unless @city.nil?
  hash['countryCode'] = @country_code unless @country_code.nil?
  hash['countrySubdivisionCode'] = @country_subdivision_code unless @country_subdivision_code.nil?
  hash['postalCode'] = @postal_code unless @postal_code.nil?
  hash
end