Class: Zype::GeoIp

Inherits:
BaseModel show all
Defined in:
lib/zype/models/geo_ip.rb

Overview

This class does not support all, create, update or delete methods. Read more at docs.zype.com/v1.0/reference#getgeoip-1

Since:

  • 0.10.0

Constant Summary

Constants inherited from BaseModel

BaseModel::ACCEPTED_KEYS

Instance Attribute Summary

Attributes inherited from BaseModel

#client

Instance Method Summary collapse

Methods inherited from BaseModel

#all, #auth=, #create, #delete, #initialize, #update

Constructor Details

This class inherits a constructor from Zype::BaseModel

Instance Method Details

#find(ip_address:) ⇒ Hash

Retrieve the GeoIP object for a specific IP Address

Parameters:

  • ip_address (String)

    value for the IP Adress you want to look up

Returns:

  • (Hash)

Since:

  • 0.10.0



17
18
19
# File 'lib/zype/models/geo_ip.rb', line 17

def find(ip_address:)
  client.execute(method: :get, path: "/#{path}", params: { ip_address: ip_address })
end