1GeoIP2::Model::EnterpriUssee(r3)Contributed Perl DocumenGteaotIiPo2n::Model::Enterprise(3)
2
3
4

NAME

6       GeoIP2::Model::Enterprise - Model class for GeoIP2 Enterprise
7

VERSION

9       version 2.006002
10

SYNOPSIS

12         use 5.008;
13
14         use GeoIP2::WebService::Client;
15
16         my $reader = GeoIP2::Database::Reader->new(
17             file    => '/path/to/database',
18             locales => [ 'en', 'de', ]
19         );
20
21         my $enterprise = $reader->enterprise( ip => '24.24.24.24' );
22
23         my $city_rec = $enterprise->city();
24         print $city_rec->name(), "\n";
25

DESCRIPTION

27       This class provides a model for the data returned by the GeoIP2
28       Enterprise database.
29
30       The only difference between the City and Enterprise model classes is
31       which fields in each record may be populated. See
32       <http://dev.maxmind.com/geoip/geoip2/web-services> for more details.
33

METHODS

35       This class provides the following methods.
36
37   $enterprise->city()
38       Returns a GeoIP2::Record::City object representing city data for the
39       requested IP address.
40
41   $enterprise->continent()
42       Returns a GeoIP2::Record::Continent object representing continent data
43       for the requested IP address.
44
45   $enterprise->country()
46       Returns a GeoIP2::Record::Country object representing country data for
47       the requested IP address. This record represents the country where
48       MaxMind believes the IP is located.
49
50   $enterprise->location()
51       Returns a GeoIP2::Record::Location object representing location data
52       for the requested IP address.
53
54   $enterprise->postal()
55       Returns a GeoIP2::Record::Postal object representing postal code data
56       for the requested IP address.
57
58   $enterprise->registered_country()
59       Returns a GeoIP2::Record::Country object representing the registered
60       country data for the requested IP address. This record represents the
61       country where the ISP has registered a given IP block and may differ
62       from the user's country.
63
64   $enterprise->represented_country()
65       Returns a GeoIP2::Record::RepresentedCountry object for the country
66       represented by the requested IP address. The represented country may
67       differ from the "country" for things like military bases.
68
69   $enterprise->subdivisions()
70       Returns an array of GeoIP2::Record::Subdivision objects representing
71       the country subdivisions for the requested IP address. The number and
72       type of subdivisions varies by country, but a subdivision is typically
73       a state, province, county, etc.
74
75       Some countries have multiple levels of subdivisions. For instance, the
76       subdivisions array for Oxford in the United Kingdom would have England
77       as the first element and Oxfordshire as the second element. The
78       subdivisions array for Minneapolis in the United States would have a
79       single object for Minnesota.
80
81       If the response did not contain any subdivisions, this method returns
82       an empty list.
83
84   $enterprise->most_specific_subdivision()
85       Returns a single GeoIP2::Record::Subdivision object representing the
86       most specific subdivision returned.
87
88       If the response did not contain any subdivisions, this method returns a
89       GeoIP2::Record::Subdivision object with no values.
90
91   $enterprise->traits()
92       Returns a GeoIP2::Record::Traits object representing the traits for the
93       requested IP address.
94

SUPPORT

96       Bugs may be submitted through
97       <https://github.com/maxmind/GeoIP2-perl/issues>.
98

AUTHORS

100       •   Dave Rolsky <drolsky@maxmind.com>
101
102       •   Greg Oschwald <goschwald@maxmind.com>
103
104       •   Mark Fowler <mfowler@maxmind.com>
105
106       •   Olaf Alders <oalders@maxmind.com>
107
109       This software is copyright (c) 2013 - 2019 by MaxMind, Inc.
110
111       This is free software; you can redistribute it and/or modify it under
112       the same terms as the Perl 5 programming language system itself.
113
114
115
116perl v5.34.0                      2021-07-22      GeoIP2::Model::Enterprise(3)
Impressum