Class: Minfraud::Model::Address

Inherits:
Abstract
  • Object
show all
Defined in:
lib/minfraud/model/address.rb

Overview

Abstract model for a postal address.

Direct Known Subclasses

BillingAddress, ShippingAddress

Instance Attribute Summary collapse

Instance Attribute Details

#distance_to_ip_locationInteger? (readonly)

The distance in kilometers from the address to the IP location.

Returns:

  • (Integer, nil)


12
13
14
# File 'lib/minfraud/model/address.rb', line 12

def distance_to_ip_location
  @distance_to_ip_location
end

#is_in_ip_countryBoolean? (readonly)

This property is true if the address is in the IP country. The property is false when the address is not in the IP country. If the address could not be parsed or was not provided or if the IP address could not be geolocated, the property will be nil.

Returns:

  • (Boolean, nil)


20
21
22
# File 'lib/minfraud/model/address.rb', line 20

def is_in_ip_country
  @is_in_ip_country
end

#is_postal_in_cityBoolean? (readonly)

This property is true if the postal code provided with the address is in the city for the address. The property is false when the postal code is not in the city. If the address was not provided or could not be parsed, the property will be nil.

Returns:

  • (Boolean, nil)


28
29
30
# File 'lib/minfraud/model/address.rb', line 28

def is_postal_in_city
  @is_postal_in_city
end

#latitudeFloat? (readonly)

The latitude associated with the address.

Returns:

  • (Float, nil)


33
34
35
# File 'lib/minfraud/model/address.rb', line 33

def latitude
  @latitude
end

#longitudeFloat? (readonly)

The longitude associated with the address.

Returns:

  • (Float, nil)


38
39
40
# File 'lib/minfraud/model/address.rb', line 38

def longitude
  @longitude
end