Class: Kount::RIS::Location

Inherits:
Base
  • Object
show all
Defined in:
app/models/kount/ris/location.rb

Constant Summary

Constants inherited from Base

Base::COUNTRY_CODES

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cityObject

Returns the value of attribute city.



4
5
6
# File 'app/models/kount/ris/location.rb', line 4

def city
  @city
end

#country_codeObject

Returns the value of attribute country_code.



4
5
6
# File 'app/models/kount/ris/location.rb', line 4

def country_code
  @country_code
end

#ip_addressObject

Returns the value of attribute ip_address.



4
5
6
# File 'app/models/kount/ris/location.rb', line 4

def ip_address
  @ip_address
end

#latitudeObject

Returns the value of attribute latitude.



4
5
6
# File 'app/models/kount/ris/location.rb', line 4

def latitude
  @latitude
end

#longitudeObject

Returns the value of attribute longitude.



4
5
6
# File 'app/models/kount/ris/location.rb', line 4

def longitude
  @longitude
end

#ownerObject

Returns the value of attribute owner.



4
5
6
# File 'app/models/kount/ris/location.rb', line 4

def owner
  @owner
end

#regionObject

Returns the value of attribute region.



4
5
6
# File 'app/models/kount/ris/location.rb', line 4

def region
  @region
end

Instance Method Details

#to_hObject



14
15
16
17
18
19
20
21
22
23
24
# File 'app/models/kount/ris/location.rb', line 14

def to_h
  {
    ip_address: ip_address,
    country_code: country_code,
    latitude: latitude,
    longitude: longitude,
    city: city,
    region: region,
    owner: owner,
  }
end