ideal_postcodes 2.0.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -16
- data/LICENSE +1 -21
- data/README.md +13 -332
- data/lib/ideal_postcodes/base_client.rb +88 -0
- data/lib/ideal_postcodes/client.rb +42 -0
- data/lib/ideal_postcodes/errors.rb +59 -0
- data/lib/ideal_postcodes/generated.rb +83 -0
- data/lib/ideal_postcodes/model.rb +73 -0
- data/lib/ideal_postcodes/operations.rb +866 -0
- data/lib/ideal_postcodes/responses/address_response.rb +19 -0
- data/lib/ideal_postcodes/responses/api_key_details_response.rb +21 -0
- data/lib/ideal_postcodes/responses/api_key_response.rb +21 -0
- data/lib/ideal_postcodes/responses/api_key_usage_response.rb +21 -0
- data/lib/ideal_postcodes/responses/autocomplete_response.rb +19 -0
- data/lib/ideal_postcodes/responses/cleanse_response.rb +31 -0
- data/lib/ideal_postcodes/responses/config_response.rb +21 -0
- data/lib/ideal_postcodes/responses/configs_response.rb +21 -0
- data/lib/ideal_postcodes/responses/delete_config_response.rb +19 -0
- data/lib/ideal_postcodes/responses/delete_licensee_response.rb +19 -0
- data/lib/ideal_postcodes/responses/email_response.rb +31 -0
- data/lib/ideal_postcodes/responses/gbr_resolve_address_response.rb +21 -0
- data/lib/ideal_postcodes/responses/licensee_response.rb +21 -0
- data/lib/ideal_postcodes/responses/licensees_response.rb +21 -0
- data/lib/ideal_postcodes/responses/phone_number_response.rb +31 -0
- data/lib/ideal_postcodes/responses/place_response.rb +19 -0
- data/lib/ideal_postcodes/responses/postcode_response.rb +30 -0
- data/lib/ideal_postcodes/responses/resolve_place_response.rb +24 -0
- data/lib/ideal_postcodes/transport.rb +61 -0
- data/lib/ideal_postcodes/types/ab_address.rb +283 -0
- data/lib/ideal_postcodes/types/abp_address.rb +674 -0
- data/lib/ideal_postcodes/types/address.rb +290 -0
- data/lib/ideal_postcodes/types/address_list_item.rb +592 -0
- data/lib/ideal_postcodes/types/address_result.rb +24 -0
- data/lib/ideal_postcodes/types/address_suggestion.rb +27 -0
- data/lib/ideal_postcodes/types/api_key.rb +27 -0
- data/lib/ideal_postcodes/types/api_key_automated_topup.rb +17 -0
- data/lib/ideal_postcodes/types/api_key_current_purchase.rb +27 -0
- data/lib/ideal_postcodes/types/api_key_daily_limit.rb +21 -0
- data/lib/ideal_postcodes/types/api_key_datasets.rb +202 -0
- data/lib/ideal_postcodes/types/api_key_details.rb +90 -0
- data/lib/ideal_postcodes/types/api_key_individual_limit.rb +16 -0
- data/lib/ideal_postcodes/types/api_key_monthly_limit.rb +21 -0
- data/lib/ideal_postcodes/types/api_key_notifications.rb +35 -0
- data/lib/ideal_postcodes/types/autocomplete_result.rb +25 -0
- data/lib/ideal_postcodes/types/available_context.rb +35 -0
- data/lib/ideal_postcodes/types/ban_address.rb +179 -0
- data/lib/ideal_postcodes/types/bev_address.rb +288 -0
- data/lib/ideal_postcodes/types/cannar_address.rb +297 -0
- data/lib/ideal_postcodes/types/carrier.rb +31 -0
- data/lib/ideal_postcodes/types/config.rb +34 -0
- data/lib/ideal_postcodes/types/configs_result.rb +15 -0
- data/lib/ideal_postcodes/types/deleted_config.rb +13 -0
- data/lib/ideal_postcodes/types/deleted_licensee.rb +13 -0
- data/lib/ideal_postcodes/types/ecad_address.rb +393 -0
- data/lib/ideal_postcodes/types/ecaf_address.rb +204 -0
- data/lib/ideal_postcodes/types/email.rb +45 -0
- data/lib/ideal_postcodes/types/fodbosa_address.rb +201 -0
- data/lib/ideal_postcodes/types/gbr_cleanse_match.rb +70 -0
- data/lib/ideal_postcodes/types/gbr_cleanse_no_match.rb +47 -0
- data/lib/ideal_postcodes/types/geonames_place.rb +153 -0
- data/lib/ideal_postcodes/types/gnaf_address.rb +463 -0
- data/lib/ideal_postcodes/types/here_address.rb +174 -0
- data/lib/ideal_postcodes/types/invalid_phone_number.rb +50 -0
- data/lib/ideal_postcodes/types/kadaster_address.rb +480 -0
- data/lib/ideal_postcodes/types/kartverket_address.rb +342 -0
- data/lib/ideal_postcodes/types/key_usage_day.rb +16 -0
- data/lib/ideal_postcodes/types/key_usage_result.rb +36 -0
- data/lib/ideal_postcodes/types/licensee.rb +50 -0
- data/lib/ideal_postcodes/types/licensee_daily_usage.rb +29 -0
- data/lib/ideal_postcodes/types/licensees_result.rb +23 -0
- data/lib/ideal_postcodes/types/mois_address.rb +440 -0
- data/lib/ideal_postcodes/types/mr_address.rb +99 -0
- data/lib/ideal_postcodes/types/native_record.rb +368 -0
- data/lib/ideal_postcodes/types/nyb_address.rb +99 -0
- data/lib/ideal_postcodes/types/paf_address.rb +96 -0
- data/lib/ideal_postcodes/types/pafa_address.rb +104 -0
- data/lib/ideal_postcodes/types/pafw_address.rb +99 -0
- data/lib/ideal_postcodes/types/phone_number.rb +50 -0
- data/lib/ideal_postcodes/types/place.rb +79 -0
- data/lib/ideal_postcodes/types/place_result.rb +21 -0
- data/lib/ideal_postcodes/types/place_suggestion.rb +32 -0
- data/lib/ideal_postcodes/types/sdfi_address.rb +520 -0
- data/lib/ideal_postcodes/types/swt_address.rb +247 -0
- data/lib/ideal_postcodes/types/uk_address_suggestion.rb +45 -0
- data/lib/ideal_postcodes/types/uk_address_suggestion_urls.rb +21 -0
- data/lib/ideal_postcodes/types/unknown_email.rb +43 -0
- data/lib/ideal_postcodes/types/upujp_address.rb +763 -0
- data/lib/ideal_postcodes/types/usps_address.rb +294 -0
- data/lib/ideal_postcodes/version.rb +5 -0
- data/lib/ideal_postcodes.rb +14 -2
- data/sig/ideal_postcodes/base_client.rbs +40 -0
- data/sig/ideal_postcodes/client.rbs +35 -0
- data/sig/ideal_postcodes/errors.rbs +27 -0
- data/sig/ideal_postcodes/model.rbs +37 -0
- data/sig/ideal_postcodes/operations.rbs +207 -0
- data/sig/ideal_postcodes/responses/address_response.rbs +13 -0
- data/sig/ideal_postcodes/responses/api_key_details_response.rbs +13 -0
- data/sig/ideal_postcodes/responses/api_key_response.rbs +13 -0
- data/sig/ideal_postcodes/responses/api_key_usage_response.rbs +13 -0
- data/sig/ideal_postcodes/responses/autocomplete_response.rbs +13 -0
- data/sig/ideal_postcodes/responses/cleanse_response.rbs +19 -0
- data/sig/ideal_postcodes/responses/config_response.rbs +13 -0
- data/sig/ideal_postcodes/responses/configs_response.rbs +13 -0
- data/sig/ideal_postcodes/responses/delete_config_response.rbs +13 -0
- data/sig/ideal_postcodes/responses/delete_licensee_response.rbs +13 -0
- data/sig/ideal_postcodes/responses/email_response.rbs +19 -0
- data/sig/ideal_postcodes/responses/gbr_resolve_address_response.rbs +13 -0
- data/sig/ideal_postcodes/responses/licensee_response.rbs +13 -0
- data/sig/ideal_postcodes/responses/licensees_response.rbs +13 -0
- data/sig/ideal_postcodes/responses/phone_number_response.rbs +19 -0
- data/sig/ideal_postcodes/responses/place_response.rbs +13 -0
- data/sig/ideal_postcodes/responses/postcode_response.rbs +16 -0
- data/sig/ideal_postcodes/responses/resolve_place_response.rbs +13 -0
- data/sig/ideal_postcodes/transport.rbs +39 -0
- data/sig/ideal_postcodes/types/ab_address.rbs +57 -0
- data/sig/ideal_postcodes/types/abp_address.rbs +126 -0
- data/sig/ideal_postcodes/types/address.rbs +136 -0
- data/sig/ideal_postcodes/types/address_list_item.rbs +160 -0
- data/sig/ideal_postcodes/types/address_result.rbs +12 -0
- data/sig/ideal_postcodes/types/address_suggestion.rbs +11 -0
- data/sig/ideal_postcodes/types/api_key.rbs +11 -0
- data/sig/ideal_postcodes/types/api_key_automated_topup.rbs +9 -0
- data/sig/ideal_postcodes/types/api_key_current_purchase.rbs +11 -0
- data/sig/ideal_postcodes/types/api_key_daily_limit.rbs +10 -0
- data/sig/ideal_postcodes/types/api_key_datasets.rbs +46 -0
- data/sig/ideal_postcodes/types/api_key_details.rbs +22 -0
- data/sig/ideal_postcodes/types/api_key_individual_limit.rbs +9 -0
- data/sig/ideal_postcodes/types/api_key_monthly_limit.rbs +10 -0
- data/sig/ideal_postcodes/types/api_key_notifications.rbs +13 -0
- data/sig/ideal_postcodes/types/autocomplete_result.rbs +15 -0
- data/sig/ideal_postcodes/types/available_context.rbs +13 -0
- data/sig/ideal_postcodes/types/ban_address.rbs +46 -0
- data/sig/ideal_postcodes/types/bev_address.rbs +67 -0
- data/sig/ideal_postcodes/types/cannar_address.rbs +62 -0
- data/sig/ideal_postcodes/types/carrier.rbs +14 -0
- data/sig/ideal_postcodes/types/config.rbs +14 -0
- data/sig/ideal_postcodes/types/configs_result.rbs +9 -0
- data/sig/ideal_postcodes/types/deleted_config.rbs +9 -0
- data/sig/ideal_postcodes/types/deleted_licensee.rbs +9 -0
- data/sig/ideal_postcodes/types/ecad_address.rbs +84 -0
- data/sig/ideal_postcodes/types/ecaf_address.rbs +45 -0
- data/sig/ideal_postcodes/types/email.rbs +16 -0
- data/sig/ideal_postcodes/types/fodbosa_address.rbs +43 -0
- data/sig/ideal_postcodes/types/gbr_cleanse_match.rbs +25 -0
- data/sig/ideal_postcodes/types/gbr_cleanse_no_match.rbs +28 -0
- data/sig/ideal_postcodes/types/geonames_place.rbs +42 -0
- data/sig/ideal_postcodes/types/gnaf_address.rbs +104 -0
- data/sig/ideal_postcodes/types/here_address.rbs +37 -0
- data/sig/ideal_postcodes/types/invalid_phone_number.rbs +17 -0
- data/sig/ideal_postcodes/types/kadaster_address.rbs +98 -0
- data/sig/ideal_postcodes/types/kartverket_address.rbs +78 -0
- data/sig/ideal_postcodes/types/key_usage_day.rbs +10 -0
- data/sig/ideal_postcodes/types/key_usage_result.rbs +13 -0
- data/sig/ideal_postcodes/types/licensee.rbs +17 -0
- data/sig/ideal_postcodes/types/licensee_daily_usage.rbs +12 -0
- data/sig/ideal_postcodes/types/licensees_result.rbs +11 -0
- data/sig/ideal_postcodes/types/mois_address.rbs +97 -0
- data/sig/ideal_postcodes/types/mr_address.rbs +27 -0
- data/sig/ideal_postcodes/types/native_record.rbs +34 -0
- data/sig/ideal_postcodes/types/nyb_address.rbs +27 -0
- data/sig/ideal_postcodes/types/paf_address.rbs +27 -0
- data/sig/ideal_postcodes/types/pafa_address.rbs +27 -0
- data/sig/ideal_postcodes/types/pafw_address.rbs +27 -0
- data/sig/ideal_postcodes/types/phone_number.rbs +17 -0
- data/sig/ideal_postcodes/types/place.rbs +29 -0
- data/sig/ideal_postcodes/types/place_result.rbs +15 -0
- data/sig/ideal_postcodes/types/place_suggestion.rbs +12 -0
- data/sig/ideal_postcodes/types/sdfi_address.rbs +108 -0
- data/sig/ideal_postcodes/types/swt_address.rbs +57 -0
- data/sig/ideal_postcodes/types/uk_address_suggestion.rbs +13 -0
- data/sig/ideal_postcodes/types/uk_address_suggestion_urls.rbs +10 -0
- data/sig/ideal_postcodes/types/unknown_email.rbs +16 -0
- data/sig/ideal_postcodes/types/upujp_address.rbs +156 -0
- data/sig/ideal_postcodes/types/usps_address.rbs +63 -0
- metadata +186 -174
- data/.github/workflows/ci.yml +0 -22
- data/Gemfile +0 -2
- data/Rakefile +0 -15
- data/ideal-postcodes-ruby.gemspec +0 -25
- data/lib/idealpostcodes/address.rb +0 -31
- data/lib/idealpostcodes/errors.rb +0 -38
- data/lib/idealpostcodes/key.rb +0 -14
- data/lib/idealpostcodes/postcode.rb +0 -23
- data/lib/idealpostcodes/util.rb +0 -42
- data/lib/idealpostcodes/version.rb +0 -3
- data/lib/idealpostcodes.rb +0 -124
- data/spec/addresses_spec.rb +0 -68
- data/spec/idealpostcodes_spec.rb +0 -56
- data/spec/keys_spec.rb +0 -25
- data/spec/postcodes_spec.rb +0 -77
- data/spec/spec_helper.rb +0 -89
- data/spec/vcr_cassettes/IdealPostcodes_Address_lookup_raises_an_exception_if_invalid_key.yml +0 -42
- data/spec/vcr_cassettes/IdealPostcodes_Address_lookup_raises_an_exception_if_limit_breached.yml +0 -42
- data/spec/vcr_cassettes/IdealPostcodes_Address_lookup_raises_an_exception_if_no_lookups_remaining.yml +0 -42
- data/spec/vcr_cassettes/IdealPostcodes_Address_lookup_returns_an_address_for_a_valid_UDPRN.yml +0 -74
- data/spec/vcr_cassettes/IdealPostcodes_Address_lookup_returns_nil_for_an_invalid_UDPRN.yml +0 -42
- data/spec/vcr_cassettes/IdealPostcodes_Address_search_is_sensitive_to_limit.yml +0 -81
- data/spec/vcr_cassettes/IdealPostcodes_Address_search_is_sensitive_to_page.yml +0 -369
- data/spec/vcr_cassettes/IdealPostcodes_Address_search_raises_an_exception_if_invalid_key.yml +0 -42
- data/spec/vcr_cassettes/IdealPostcodes_Address_search_raises_an_exception_if_limit_breached.yml +0 -42
- data/spec/vcr_cassettes/IdealPostcodes_Address_search_raises_an_exception_if_no_lookups_remaining.yml +0 -42
- data/spec/vcr_cassettes/IdealPostcodes_Address_search_returns_results_in_a_SearchResult_object.yml +0 -273
- data/spec/vcr_cassettes/IdealPostcodes_Key_lookup_details_returns_key_details.yml +0 -62
- data/spec/vcr_cassettes/IdealPostcodes_Key_lookup_returns_the_availability_status_of_a_key_false_key_.yml +0 -45
- data/spec/vcr_cassettes/IdealPostcodes_Key_lookup_returns_the_availability_status_of_a_key_true_key_.yml +0 -45
- data/spec/vcr_cassettes/IdealPostcodes_Postcode_find_by_location_is_sensitive_to_limit_parameter.yml +0 -52
- data/spec/vcr_cassettes/IdealPostcodes_Postcode_find_by_location_is_sensitive_to_radius_parament.yml +0 -133
- data/spec/vcr_cassettes/IdealPostcodes_Postcode_find_by_location_returns_an_array_of_postcodes_and_locations.yml +0 -84
- data/spec/vcr_cassettes/IdealPostcodes_Postcode_find_by_location_returns_an_empty_array_if_no_results_are_found.yml +0 -43
- data/spec/vcr_cassettes/IdealPostcodes_Postcode_lookup_raises_an_exception_if_invalid_key.yml +0 -42
- data/spec/vcr_cassettes/IdealPostcodes_Postcode_lookup_raises_an_exception_if_key_has_run_out_of_balance.yml +0 -42
- data/spec/vcr_cassettes/IdealPostcodes_Postcode_lookup_raises_an_exception_if_limit_has_been_reached.yml +0 -42
- data/spec/vcr_cassettes/IdealPostcodes_Postcode_lookup_returns_a_list_of_addresses_for_a_postcode.yml +0 -268
- data/spec/vcr_cassettes/IdealPostcodes_Postcode_lookup_returns_an_empty_array_if_postcode_does_not_exist.yml +0 -42
- data/spec/vcr_cassettes/IdealPostcodes_key_available_returns_false_if_key_is_unavailable.yml +0 -45
- data/spec/vcr_cassettes/IdealPostcodes_key_available_returns_true_if_key_is_available.yml +0 -45
- data/spec/vcr_cassettes/IdealPostcodes_key_details_raises_an_exception_if_no_secret_is_provided.yml +0 -45
- data/spec/vcr_cassettes/IdealPostcodes_key_details_returns_key_information.yml +0 -62
- data/spec/vcr_cassettes/IdealPostcodes_request_generates_a_HTTP_request.yml +0 -268
- data/spec/vcr_cassettes/IdealPostcodes_request_raises_authentication_error_if_invalid_key_is_provided.yml +0 -42
- data/spec/vcr_cassettes/IdealPostcodes_request_raises_limit_reached_error_if_a_limit_has_been_breached.yml +0 -42
- data/spec/vcr_cassettes/IdealPostcodes_request_raises_token_exhausted_error_if_key_balance_is_depleted.yml +0 -42
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Generated from the OpenAPI spec. Do not edit.
|
|
4
|
+
|
|
5
|
+
module IdealPostcodes
|
|
6
|
+
module Types
|
|
7
|
+
# Belgium FOD BOSA Address
|
|
8
|
+
#
|
|
9
|
+
# A Belgian address from BeSt Address, the open address register published by FOD BOSA (Federal
|
|
10
|
+
# Public Service Policy and Support), covering Flanders, Wallonia and the Brussels Capital
|
|
11
|
+
# Region. Each address carries its street, house number and, where one exists, box number, the
|
|
12
|
+
# municipality (`municipality_id` is the NIS code), `postcode`, `region_code` and coordinates in
|
|
13
|
+
# both WGS84 (`epsg_4326_*`, mirrored as numeric `latitude` and `longitude`) and Belgian Lambert
|
|
14
|
+
# 72 (`epsg_31370_*`, in metres). Street, municipality and post town names come in Dutch, French
|
|
15
|
+
# and German. FOD BOSA publishes around 6.6 million current addresses and refreshes them weekly.
|
|
16
|
+
#
|
|
17
|
+
# Conventions:
|
|
18
|
+
#
|
|
19
|
+
# - One record per address point per language. The API emits an address once for each language
|
|
20
|
+
# in which it has a street name, or, for the few rows with no street name in any language,
|
|
21
|
+
# each language in which it has a municipality name. A bilingual Brussels address therefore
|
|
22
|
+
# exists as both a Dutch and a French record, sharing `address_id` but differing in `id`,
|
|
23
|
+
# `language` and `line_1`. `id` is `fodbosa_` followed by `address_id`, `street_id`,
|
|
24
|
+
# `municipality_id` and the language code, pipe separated (`fodbosa_1000000|3048|21007|fr`).
|
|
25
|
+
# The resolve endpoints read the trailing language code to find the record.
|
|
26
|
+
# - Every property is always present. A value the register does not hold is an empty string
|
|
27
|
+
# `""`, never null. `latitude` and `longitude` are empty strings when the WGS84 pair does not
|
|
28
|
+
# parse.
|
|
29
|
+
# - `line_1` is the street name and `house_number` joined by a space, with the box number
|
|
30
|
+
# appended after ` - ` and prefixed `bus` in Dutch and German or `boîte` in French: `rue
|
|
31
|
+
# Rodenbach 5 - boîte bt08`. Absent parts are dropped with their separator. There are no
|
|
32
|
+
# further address lines.
|
|
33
|
+
# - `streetname_*` and `municipality_name_*` keep FOD BOSA's casing. `postname_*` is title cased
|
|
34
|
+
# because the register supplies it in upper case (`GENT` becomes `Gent`). The street name
|
|
35
|
+
# inside `line_1` is normalised further: double quotes and a trailing parenthetical are
|
|
36
|
+
# removed, and in French the leading street type is lower cased, so a `streetname_fr` of `Rue
|
|
37
|
+
# Rodenbach` appears in `line_1` as `rue Rodenbach`.
|
|
38
|
+
# - Only `current` addresses are indexed. The register's `proposed`, `retired` and `rejected`
|
|
39
|
+
# records, around 7% of the file, are not served.
|
|
40
|
+
# - FOD BOSA re-surveys address points between vintages, so a coordinate can move by a metre or
|
|
41
|
+
# so between weekly refreshes.
|
|
42
|
+
class FodbosaAddress < Model
|
|
43
|
+
# Globally unique internally generated identifier for an address
|
|
44
|
+
#
|
|
45
|
+
# @return [String]
|
|
46
|
+
def id = @hash["id"]
|
|
47
|
+
|
|
48
|
+
# Dataset the address originates from.
|
|
49
|
+
#
|
|
50
|
+
# @return [String]
|
|
51
|
+
def dataset = @hash["dataset"]
|
|
52
|
+
|
|
53
|
+
# Full country names (ISO 3166)
|
|
54
|
+
#
|
|
55
|
+
# @return [String]
|
|
56
|
+
def country = @hash["country"]
|
|
57
|
+
|
|
58
|
+
# 3 letter country code (ISO 3166-1)
|
|
59
|
+
#
|
|
60
|
+
# @return [String]
|
|
61
|
+
def country_iso = @hash["country_iso"]
|
|
62
|
+
|
|
63
|
+
# 2 letter country code (ISO 3166-1)
|
|
64
|
+
#
|
|
65
|
+
# @return [String]
|
|
66
|
+
def country_iso_2 = @hash["country_iso_2"]
|
|
67
|
+
|
|
68
|
+
# Language represented by 2 letter ISO Code (639-1)
|
|
69
|
+
#
|
|
70
|
+
# @return [String]
|
|
71
|
+
def language = @hash["language"]
|
|
72
|
+
|
|
73
|
+
# House number, duplicated from `house_number` for consistency with other datasets. It does
|
|
74
|
+
# not identify the address on its own: boxes on the same number differ only by `box_number`.
|
|
75
|
+
#
|
|
76
|
+
# @return [String]
|
|
77
|
+
def address = @hash["address"]
|
|
78
|
+
|
|
79
|
+
# First address line. Street name, house number and, where present, box number, rendered in
|
|
80
|
+
# the address language.
|
|
81
|
+
#
|
|
82
|
+
# @return [String]
|
|
83
|
+
def line_1 = @hash["line_1"]
|
|
84
|
+
|
|
85
|
+
# The latitude of the address or postcode (WGS84).
|
|
86
|
+
#
|
|
87
|
+
# @return [String, Float]
|
|
88
|
+
def latitude = @hash["latitude"]
|
|
89
|
+
|
|
90
|
+
# The longitude of the address or postcode (WGS84).
|
|
91
|
+
#
|
|
92
|
+
# @return [String, Float]
|
|
93
|
+
def longitude = @hash["longitude"]
|
|
94
|
+
|
|
95
|
+
# X coordinate of the address in the BD72 / Belgian Lambert 72 (EPSG:31370) coordinate system.
|
|
96
|
+
#
|
|
97
|
+
# @return [String]
|
|
98
|
+
def epsg_31370_x = @hash["epsg_31370_x"]
|
|
99
|
+
|
|
100
|
+
# Y coordinate of the address in the BD72 / Belgian Lambert 72 (EPSG:31370) coordinate system.
|
|
101
|
+
#
|
|
102
|
+
# @return [String]
|
|
103
|
+
def epsg_31370_y = @hash["epsg_31370_y"]
|
|
104
|
+
|
|
105
|
+
# Latitude of the address in the WGS84 (EPSG:4326) coordinate system. String form of
|
|
106
|
+
# `latitude`.
|
|
107
|
+
#
|
|
108
|
+
# @return [String]
|
|
109
|
+
def epsg_4326_lat = @hash["epsg_4326_lat"]
|
|
110
|
+
|
|
111
|
+
# Longitude of the address in the WGS84 (EPSG:4326) coordinate system. String form of
|
|
112
|
+
# `longitude`.
|
|
113
|
+
#
|
|
114
|
+
# @return [String]
|
|
115
|
+
def epsg_4326_lon = @hash["epsg_4326_lon"]
|
|
116
|
+
|
|
117
|
+
# Address local identifier assigned by the data supplier.
|
|
118
|
+
#
|
|
119
|
+
# @return [String]
|
|
120
|
+
def address_id = @hash["address_id"]
|
|
121
|
+
|
|
122
|
+
# Box or apartment number.
|
|
123
|
+
#
|
|
124
|
+
# @return [String]
|
|
125
|
+
def box_number = @hash["box_number"]
|
|
126
|
+
|
|
127
|
+
# House number.
|
|
128
|
+
#
|
|
129
|
+
# @return [String]
|
|
130
|
+
def house_number = @hash["house_number"]
|
|
131
|
+
|
|
132
|
+
# Municipality local identifier (NIS code) assigned by the data supplier.
|
|
133
|
+
#
|
|
134
|
+
# @return [String]
|
|
135
|
+
def municipality_id = @hash["municipality_id"]
|
|
136
|
+
|
|
137
|
+
# Municipality name in German.
|
|
138
|
+
#
|
|
139
|
+
# @return [String]
|
|
140
|
+
def municipality_name_de = @hash["municipality_name_de"]
|
|
141
|
+
|
|
142
|
+
# Municipality name in French.
|
|
143
|
+
#
|
|
144
|
+
# @return [String]
|
|
145
|
+
def municipality_name_fr = @hash["municipality_name_fr"]
|
|
146
|
+
|
|
147
|
+
# Municipality name in Dutch.
|
|
148
|
+
#
|
|
149
|
+
# @return [String]
|
|
150
|
+
def municipality_name_nl = @hash["municipality_name_nl"]
|
|
151
|
+
|
|
152
|
+
# Postal code. 4 digits, first digit non-zero.
|
|
153
|
+
#
|
|
154
|
+
# @return [String]
|
|
155
|
+
def postcode = @hash["postcode"]
|
|
156
|
+
|
|
157
|
+
# Post town name in French.
|
|
158
|
+
#
|
|
159
|
+
# @return [String]
|
|
160
|
+
def postname_fr = @hash["postname_fr"]
|
|
161
|
+
|
|
162
|
+
# Post town name in Dutch.
|
|
163
|
+
#
|
|
164
|
+
# @return [String]
|
|
165
|
+
def postname_nl = @hash["postname_nl"]
|
|
166
|
+
|
|
167
|
+
# Street local identifier assigned by the data supplier.
|
|
168
|
+
#
|
|
169
|
+
# @return [String]
|
|
170
|
+
def street_id = @hash["street_id"]
|
|
171
|
+
|
|
172
|
+
# Street name in German.
|
|
173
|
+
#
|
|
174
|
+
# @return [String]
|
|
175
|
+
def streetname_de = @hash["streetname_de"]
|
|
176
|
+
|
|
177
|
+
# Street name in French.
|
|
178
|
+
#
|
|
179
|
+
# @return [String]
|
|
180
|
+
def streetname_fr = @hash["streetname_fr"]
|
|
181
|
+
|
|
182
|
+
# Street name in Dutch.
|
|
183
|
+
#
|
|
184
|
+
# @return [String]
|
|
185
|
+
def streetname_nl = @hash["streetname_nl"]
|
|
186
|
+
|
|
187
|
+
# ISO 3166-2 code of the region in which the address is located. One of `BE-BRU` (Brussels
|
|
188
|
+
# Capital Region), `BE-VLG` (Flanders) or `BE-WAL` (Wallonia).
|
|
189
|
+
#
|
|
190
|
+
# @return [String]
|
|
191
|
+
def region_code = @hash["region_code"]
|
|
192
|
+
|
|
193
|
+
# Address lifecycle status assigned by the data supplier. Only `current` addresses are indexed
|
|
194
|
+
# and served, so this is always `current`. The supplier's remaining codes (`proposed`,
|
|
195
|
+
# `reserved`, `retired`, `rejected`) are filtered out.
|
|
196
|
+
#
|
|
197
|
+
# @return [String]
|
|
198
|
+
def status = @hash["status"]
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
end
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Generated from the OpenAPI spec. Do not edit.
|
|
4
|
+
|
|
5
|
+
module IdealPostcodes
|
|
6
|
+
module Types
|
|
7
|
+
# Address Match
|
|
8
|
+
class GbrCleanseMatch < Model
|
|
9
|
+
# Originally submitted query
|
|
10
|
+
#
|
|
11
|
+
# @return [String]
|
|
12
|
+
def query = @hash["query"]
|
|
13
|
+
|
|
14
|
+
# Nearest matching address
|
|
15
|
+
#
|
|
16
|
+
# @return [Types::Address]
|
|
17
|
+
def match = read("match") { |v| Types::Address.from_hash(v) }
|
|
18
|
+
|
|
19
|
+
# The number of addresses we matched to the input. We return the closest match by default.
|
|
20
|
+
#
|
|
21
|
+
# @return [Integer]
|
|
22
|
+
def count = @hash["count"]
|
|
23
|
+
|
|
24
|
+
# A score represented as a number between 1 and 0. Fit compares the address elements present
|
|
25
|
+
# in your query against the matching address elements. It does not incorporate elements you
|
|
26
|
+
# have not presented in the score. A partial address (e.g. 12 Pye Green Road) will have a fit
|
|
27
|
+
# of 1 even though it is missing post town and postcode. Its confidence score will be less
|
|
28
|
+
# than 1 however because it is missing some crucial elements.
|
|
29
|
+
#
|
|
30
|
+
# @return [Float]
|
|
31
|
+
def fit = @hash["fit"]
|
|
32
|
+
|
|
33
|
+
# A confidence score represented as a number between 1 and 0. 1 indicates a full match. 0
|
|
34
|
+
# indicates no complete matching elements.
|
|
35
|
+
#
|
|
36
|
+
# @return [Float]
|
|
37
|
+
def confidence = @hash["confidence"]
|
|
38
|
+
|
|
39
|
+
# Match indicator for the organisation
|
|
40
|
+
#
|
|
41
|
+
# @return [String]
|
|
42
|
+
def organisation_match = @hash["organisation_match"]
|
|
43
|
+
|
|
44
|
+
# Match indicator for the premise
|
|
45
|
+
#
|
|
46
|
+
# @return [String]
|
|
47
|
+
def premise_match = @hash["premise_match"]
|
|
48
|
+
|
|
49
|
+
# Match indicator for the postcode
|
|
50
|
+
#
|
|
51
|
+
# @return [String]
|
|
52
|
+
def postcode_match = @hash["postcode_match"]
|
|
53
|
+
|
|
54
|
+
# Match indicator for the street
|
|
55
|
+
#
|
|
56
|
+
# @return [String]
|
|
57
|
+
def thoroughfare_match = @hash["thoroughfare_match"]
|
|
58
|
+
|
|
59
|
+
# Match indicator for the locality
|
|
60
|
+
#
|
|
61
|
+
# @return [String]
|
|
62
|
+
def locality_match = @hash["locality_match"]
|
|
63
|
+
|
|
64
|
+
# Match indicator for the post_town
|
|
65
|
+
#
|
|
66
|
+
# @return [String]
|
|
67
|
+
def post_town_match = @hash["post_town_match"]
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Generated from the OpenAPI spec. Do not edit.
|
|
4
|
+
|
|
5
|
+
module IdealPostcodes
|
|
6
|
+
module Types
|
|
7
|
+
# No Address Match
|
|
8
|
+
class GbrCleanseNoMatch < Model
|
|
9
|
+
# Originally submitted query
|
|
10
|
+
#
|
|
11
|
+
# @return [String]
|
|
12
|
+
def query = @hash["query"]
|
|
13
|
+
|
|
14
|
+
# Nearest matching address
|
|
15
|
+
#
|
|
16
|
+
# @return [Hash{String => Object}, nil]
|
|
17
|
+
def match = @hash["match"]
|
|
18
|
+
|
|
19
|
+
# @return [Integer]
|
|
20
|
+
def count = @hash["count"]
|
|
21
|
+
|
|
22
|
+
# @return [Integer]
|
|
23
|
+
def fit = @hash["fit"]
|
|
24
|
+
|
|
25
|
+
# @return [Integer]
|
|
26
|
+
def confidence = @hash["confidence"]
|
|
27
|
+
|
|
28
|
+
# @return [String]
|
|
29
|
+
def organisation_match = @hash["organisation_match"]
|
|
30
|
+
|
|
31
|
+
# @return [String]
|
|
32
|
+
def premise_match = @hash["premise_match"]
|
|
33
|
+
|
|
34
|
+
# @return [String]
|
|
35
|
+
def postcode_match = @hash["postcode_match"]
|
|
36
|
+
|
|
37
|
+
# @return [String]
|
|
38
|
+
def thoroughfare_match = @hash["thoroughfare_match"]
|
|
39
|
+
|
|
40
|
+
# @return [String]
|
|
41
|
+
def locality_match = @hash["locality_match"]
|
|
42
|
+
|
|
43
|
+
# @return [String]
|
|
44
|
+
def post_town_match = @hash["post_town_match"]
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Generated from the OpenAPI spec. Do not edit.
|
|
4
|
+
|
|
5
|
+
module IdealPostcodes
|
|
6
|
+
module Types
|
|
7
|
+
# GeoNames Place
|
|
8
|
+
#
|
|
9
|
+
# The GeoNames record backing a place, as indexed.
|
|
10
|
+
#
|
|
11
|
+
# Only administrative divisions (feature class `A`) and capital or seat-of-administration cities
|
|
12
|
+
# (feature codes `PPLC` and `PPLA*`) are indexed. Historical features (feature codes ending in
|
|
13
|
+
# `H`) are excluded.
|
|
14
|
+
class GeonamesPlace < Model
|
|
15
|
+
# Unique place ID
|
|
16
|
+
#
|
|
17
|
+
# @return [String]
|
|
18
|
+
def id = @hash["id"]
|
|
19
|
+
|
|
20
|
+
# Indicates the provenance of a place
|
|
21
|
+
#
|
|
22
|
+
# @return [String]
|
|
23
|
+
def dataset = @hash["dataset"]
|
|
24
|
+
|
|
25
|
+
# Unique identifier for GeoNames place
|
|
26
|
+
#
|
|
27
|
+
# @return [Integer]
|
|
28
|
+
def geonameid = @hash["geonameid"]
|
|
29
|
+
|
|
30
|
+
# Place name (UTF8)
|
|
31
|
+
#
|
|
32
|
+
# @return [String]
|
|
33
|
+
def name = @hash["name"]
|
|
34
|
+
|
|
35
|
+
# Place name (ASCII). Empty string if not available
|
|
36
|
+
#
|
|
37
|
+
# @return [String]
|
|
38
|
+
def asciiname = @hash["asciiname"]
|
|
39
|
+
|
|
40
|
+
# List of alternate names for the place
|
|
41
|
+
#
|
|
42
|
+
# @return [Array<String>]
|
|
43
|
+
def alternatenames = @hash["alternatenames"]
|
|
44
|
+
|
|
45
|
+
# Language represented by 2 letter ISO Code (639-1)
|
|
46
|
+
#
|
|
47
|
+
# @return [String]
|
|
48
|
+
def language = @hash["language"]
|
|
49
|
+
|
|
50
|
+
# The latitude of the address or postcode (WGS84).
|
|
51
|
+
#
|
|
52
|
+
# @return [String, Float]
|
|
53
|
+
def latitude = @hash["latitude"]
|
|
54
|
+
|
|
55
|
+
# The longitude of the address or postcode (WGS84).
|
|
56
|
+
#
|
|
57
|
+
# @return [String, Float]
|
|
58
|
+
def longitude = @hash["longitude"]
|
|
59
|
+
|
|
60
|
+
# GeoNames single letter feature class (http://www.geonames.org/export/codes.html). Only two
|
|
61
|
+
# are indexed
|
|
62
|
+
#
|
|
63
|
+
# @return [String]
|
|
64
|
+
def feature_class = @hash["feature_class"]
|
|
65
|
+
|
|
66
|
+
# Full GeoNames feature code (http://www.geonames.org/export/codes.html)
|
|
67
|
+
#
|
|
68
|
+
# @return [String]
|
|
69
|
+
def feature_code = @hash["feature_code"]
|
|
70
|
+
|
|
71
|
+
# 2 letter ISO country code. Empty string if not available
|
|
72
|
+
#
|
|
73
|
+
# @return [String]
|
|
74
|
+
def country_code = @hash["country_code"]
|
|
75
|
+
|
|
76
|
+
# 3 letter ISO country code derived from `country_code`. Empty string if the country cannot be
|
|
77
|
+
# resolved
|
|
78
|
+
#
|
|
79
|
+
# @return [String]
|
|
80
|
+
def country_iso = @hash["country_iso"]
|
|
81
|
+
|
|
82
|
+
# List of other country codes mapping to this place
|
|
83
|
+
#
|
|
84
|
+
# @return [Array<String>]
|
|
85
|
+
def cc2 = @hash["cc2"]
|
|
86
|
+
|
|
87
|
+
# Name of first administrative area. Empty string if not available
|
|
88
|
+
#
|
|
89
|
+
# @return [String]
|
|
90
|
+
def admin1_name = @hash["admin1_name"]
|
|
91
|
+
|
|
92
|
+
# GeoName ID for first administrative area
|
|
93
|
+
#
|
|
94
|
+
# @return [Integer, nil]
|
|
95
|
+
def admin1_geonameid = @hash["admin1_geonameid"]
|
|
96
|
+
|
|
97
|
+
# Fipscode (subject to change to iso code)
|
|
98
|
+
#
|
|
99
|
+
# @return [String]
|
|
100
|
+
def admin1_code = @hash["admin1_code"]
|
|
101
|
+
|
|
102
|
+
# Name of second administrative area. Empty string if not available
|
|
103
|
+
#
|
|
104
|
+
# @return [String]
|
|
105
|
+
def admin2_name = @hash["admin2_name"]
|
|
106
|
+
|
|
107
|
+
# GeoName ID for second administrative area
|
|
108
|
+
#
|
|
109
|
+
# @return [Integer, nil]
|
|
110
|
+
def admin2_geonameid = @hash["admin2_geonameid"]
|
|
111
|
+
|
|
112
|
+
# Code for the second administrative division
|
|
113
|
+
#
|
|
114
|
+
# @return [String]
|
|
115
|
+
def admin2_code = @hash["admin2_code"]
|
|
116
|
+
|
|
117
|
+
# Code for third level administrative division
|
|
118
|
+
#
|
|
119
|
+
# @return [String]
|
|
120
|
+
def admin3_code = @hash["admin3_code"]
|
|
121
|
+
|
|
122
|
+
# Code for fourth level administrative division
|
|
123
|
+
#
|
|
124
|
+
# @return [String]
|
|
125
|
+
def admin4_code = @hash["admin4_code"]
|
|
126
|
+
|
|
127
|
+
# Population at place. Represented as a string as it can be larger than a 32 bit integer
|
|
128
|
+
#
|
|
129
|
+
# @return [String]
|
|
130
|
+
def population = @hash["population"]
|
|
131
|
+
|
|
132
|
+
# Elevation in metres. `null` if not available
|
|
133
|
+
#
|
|
134
|
+
# @return [Integer, nil]
|
|
135
|
+
def elevation = @hash["elevation"]
|
|
136
|
+
|
|
137
|
+
# Digital elevation model (srtm3 or gtopo30), average elevation in metres
|
|
138
|
+
#
|
|
139
|
+
# @return [Integer, nil]
|
|
140
|
+
def dem = @hash["dem"]
|
|
141
|
+
|
|
142
|
+
# The IANA timezone ID. Empty string if not available
|
|
143
|
+
#
|
|
144
|
+
# @return [String]
|
|
145
|
+
def timezone = @hash["timezone"]
|
|
146
|
+
|
|
147
|
+
# Date the GeoNames record was last modified
|
|
148
|
+
#
|
|
149
|
+
# @return [String]
|
|
150
|
+
def modification_date = @hash["modification_date"]
|
|
151
|
+
end
|
|
152
|
+
end
|
|
153
|
+
end
|