ideal_postcodes 2.0.0 → 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 +5 -5
- 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 -175
- data/.travis.yml +0 -9
- 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 -33
- data/lib/idealpostcodes/key.rb +0 -13
- data/lib/idealpostcodes/postcode.rb +0 -22
- data/lib/idealpostcodes/util.rb +0 -29
- data/lib/idealpostcodes/version.rb +0 -3
- data/lib/idealpostcodes.rb +0 -112
- 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 -66
- data/spec/spec_helper.rb +0 -68
- 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,247 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Generated from the OpenAPI spec. Do not edit.
|
|
4
|
+
|
|
5
|
+
module IdealPostcodes
|
|
6
|
+
module Types
|
|
7
|
+
# Switzerland and Liechtenstein Address
|
|
8
|
+
#
|
|
9
|
+
# An address in the Swisstopo dataset, which covers Switzerland and Liechtenstein.
|
|
10
|
+
#
|
|
11
|
+
# Fields are grouped by the upstream Swisstopo product they come from: the building address
|
|
12
|
+
# directory (`gebaeudeadressverzeichnis`), the street directory (`strassenverzeichnis`) and the
|
|
13
|
+
# official directory of towns and cities (`amtovz`).
|
|
14
|
+
#
|
|
15
|
+
# Records marked as multilingual upstream are split into one address per street name, so
|
|
16
|
+
# `language` identifies the language of the street name.
|
|
17
|
+
class SwtAddress < Model
|
|
18
|
+
# Globally unique internally generated identifier for an address
|
|
19
|
+
#
|
|
20
|
+
# @return [String]
|
|
21
|
+
def id = @hash["id"]
|
|
22
|
+
|
|
23
|
+
# @return [String]
|
|
24
|
+
def dataset = @hash["dataset"]
|
|
25
|
+
|
|
26
|
+
# Full country names (ISO 3166)
|
|
27
|
+
#
|
|
28
|
+
# @return [String]
|
|
29
|
+
def country = @hash["country"]
|
|
30
|
+
|
|
31
|
+
# 3 letter country code (ISO 3166-1)
|
|
32
|
+
#
|
|
33
|
+
# @return [String]
|
|
34
|
+
def country_iso = @hash["country_iso"]
|
|
35
|
+
|
|
36
|
+
# 2 letter country code (ISO 3166-1)
|
|
37
|
+
#
|
|
38
|
+
# @return [String]
|
|
39
|
+
def country_iso_2 = @hash["country_iso_2"]
|
|
40
|
+
|
|
41
|
+
# Language represented by 2 letter ISO Code (639-1)
|
|
42
|
+
#
|
|
43
|
+
# @return [String]
|
|
44
|
+
def language = @hash["language"]
|
|
45
|
+
|
|
46
|
+
# Canton name, in the language of the address (e.g. `"Basel-Stadt"`, `"Grigioni"`,
|
|
47
|
+
# `"Grischun"`). For Liechtenstein addresses this is the district.
|
|
48
|
+
#
|
|
49
|
+
# @return [String]
|
|
50
|
+
def canton = @hash["canton"]
|
|
51
|
+
|
|
52
|
+
# House number. Same value as `adr_number`.
|
|
53
|
+
#
|
|
54
|
+
# @return [String]
|
|
55
|
+
def address = @hash["address"]
|
|
56
|
+
|
|
57
|
+
# First address line. The building name where present, otherwise the street name and house
|
|
58
|
+
# number.
|
|
59
|
+
#
|
|
60
|
+
# @return [String]
|
|
61
|
+
def line_1 = @hash["line_1"]
|
|
62
|
+
|
|
63
|
+
# Second address line. The street name and house number where `line_1` holds a building name.
|
|
64
|
+
#
|
|
65
|
+
# @return [String]
|
|
66
|
+
def line_2 = @hash["line_2"]
|
|
67
|
+
|
|
68
|
+
# The latitude of the address or postcode (WGS84).
|
|
69
|
+
#
|
|
70
|
+
# @return [String, Float]
|
|
71
|
+
def latitude = @hash["latitude"]
|
|
72
|
+
|
|
73
|
+
# The longitude of the address or postcode (WGS84).
|
|
74
|
+
#
|
|
75
|
+
# @return [String, Float]
|
|
76
|
+
def longitude = @hash["longitude"]
|
|
77
|
+
|
|
78
|
+
# Federal building address identifier (Eidgenössischer Gebäudeadressidentifikator).
|
|
79
|
+
#
|
|
80
|
+
# @return [Integer]
|
|
81
|
+
def adr_egaid = @hash["adr_egaid"]
|
|
82
|
+
|
|
83
|
+
# Federal street identifier (Eidgenössischer Strassenidentifikator). Joins the address to the
|
|
84
|
+
# street directory.
|
|
85
|
+
#
|
|
86
|
+
# @return [Integer]
|
|
87
|
+
def str_esid = @hash["str_esid"]
|
|
88
|
+
|
|
89
|
+
# Federal building identifier (Eidgenössischer Gebäudeidentifikator).
|
|
90
|
+
#
|
|
91
|
+
# @return [Integer]
|
|
92
|
+
def bdg_egid = @hash["bdg_egid"]
|
|
93
|
+
|
|
94
|
+
# Entrance identifier within the building.
|
|
95
|
+
#
|
|
96
|
+
# @return [Integer]
|
|
97
|
+
def adr_edid = @hash["adr_edid"]
|
|
98
|
+
|
|
99
|
+
# Street name label. For French and Italian addresses the leading street type is lowercased
|
|
100
|
+
# (e.g. `"rue de la Gare"`).
|
|
101
|
+
#
|
|
102
|
+
# @return [String]
|
|
103
|
+
def stn_label = @hash["stn_label"]
|
|
104
|
+
|
|
105
|
+
# House/address number (e.g. `"12"`, `"12A"`).
|
|
106
|
+
#
|
|
107
|
+
# @return [String]
|
|
108
|
+
def adr_number = @hash["adr_number"]
|
|
109
|
+
|
|
110
|
+
# Building category from the Federal Building and Dwelling Register (GWR), e.g.
|
|
111
|
+
# `"residential"`, `"non_residential"`.
|
|
112
|
+
#
|
|
113
|
+
# @return [String]
|
|
114
|
+
def bdg_category = @hash["bdg_category"]
|
|
115
|
+
|
|
116
|
+
# Building name.
|
|
117
|
+
#
|
|
118
|
+
# @return [String]
|
|
119
|
+
def bdg_name = @hash["bdg_name"]
|
|
120
|
+
|
|
121
|
+
# Postal code and locality label (e.g. `"8001 Zürich"`).
|
|
122
|
+
#
|
|
123
|
+
# @return [String]
|
|
124
|
+
def zip_label = @hash["zip_label"]
|
|
125
|
+
|
|
126
|
+
# Federal municipality number assigned by the Federal Statistical Office (FSO/BFS).
|
|
127
|
+
#
|
|
128
|
+
# @return [Integer]
|
|
129
|
+
def com_fosnr = @hash["com_fosnr"]
|
|
130
|
+
|
|
131
|
+
# Municipality name.
|
|
132
|
+
#
|
|
133
|
+
# @return [String]
|
|
134
|
+
def com_name = @hash["com_name"]
|
|
135
|
+
|
|
136
|
+
# Canton abbreviation (e.g. `"ZH"`, `"BE"`).
|
|
137
|
+
#
|
|
138
|
+
# @return [String]
|
|
139
|
+
def com_canton = @hash["com_canton"]
|
|
140
|
+
|
|
141
|
+
# Address status from the GWR, e.g. `"real"`, `"projected"`.
|
|
142
|
+
#
|
|
143
|
+
# @return [String]
|
|
144
|
+
def adr_status = @hash["adr_status"]
|
|
145
|
+
|
|
146
|
+
# Whether the address is an official address.
|
|
147
|
+
#
|
|
148
|
+
# @return [Boolean]
|
|
149
|
+
def adr_official = @hash["adr_official"]
|
|
150
|
+
|
|
151
|
+
# Date the address record was last modified, formatted `DD.MM.YYYY`.
|
|
152
|
+
#
|
|
153
|
+
# @return [String]
|
|
154
|
+
def adr_modified = @hash["adr_modified"]
|
|
155
|
+
|
|
156
|
+
# Easting coordinate of the address in the Swiss coordinate system CH1903+/LV95 (EPSG:2056),
|
|
157
|
+
# in metres.
|
|
158
|
+
#
|
|
159
|
+
# @return [String]
|
|
160
|
+
def adr_easting = @hash["adr_easting"]
|
|
161
|
+
|
|
162
|
+
# Northing coordinate of the address in the Swiss coordinate system CH1903+/LV95 (EPSG:2056),
|
|
163
|
+
# in metres.
|
|
164
|
+
#
|
|
165
|
+
# @return [String]
|
|
166
|
+
def adr_northing = @hash["adr_northing"]
|
|
167
|
+
|
|
168
|
+
# Street type, e.g. `"Street"`, `"Area"`.
|
|
169
|
+
#
|
|
170
|
+
# @return [String]
|
|
171
|
+
def str_type = @hash["str_type"]
|
|
172
|
+
|
|
173
|
+
# Street status, e.g. `"real"`, `"projected"`.
|
|
174
|
+
#
|
|
175
|
+
# @return [String]
|
|
176
|
+
def str_status = @hash["str_status"]
|
|
177
|
+
|
|
178
|
+
# Whether the street name is official.
|
|
179
|
+
#
|
|
180
|
+
# @return [Boolean]
|
|
181
|
+
def str_official = @hash["str_official"]
|
|
182
|
+
|
|
183
|
+
# Date the street record was last modified, formatted `DD.MM.YYYY`.
|
|
184
|
+
#
|
|
185
|
+
# @return [String]
|
|
186
|
+
def str_modified = @hash["str_modified"]
|
|
187
|
+
|
|
188
|
+
# Easting coordinate of the street centroid in the Swiss coordinate system CH1903+/LV95
|
|
189
|
+
# (EPSG:2056), in metres.
|
|
190
|
+
#
|
|
191
|
+
# @return [String]
|
|
192
|
+
def str_easting = @hash["str_easting"]
|
|
193
|
+
|
|
194
|
+
# Northing coordinate of the street centroid in the Swiss coordinate system CH1903+/LV95
|
|
195
|
+
# (EPSG:2056), in metres.
|
|
196
|
+
#
|
|
197
|
+
# @return [String]
|
|
198
|
+
def str_northing = @hash["str_northing"]
|
|
199
|
+
|
|
200
|
+
# Locality name from the Official Directory of Towns and Cities (Amtliches
|
|
201
|
+
# Ortschaftenverzeichnis).
|
|
202
|
+
#
|
|
203
|
+
# @return [String]
|
|
204
|
+
def ortschaftsname = @hash["ortschaftsname"]
|
|
205
|
+
|
|
206
|
+
# 4-digit Swiss postal code, zero padded.
|
|
207
|
+
#
|
|
208
|
+
# @return [String]
|
|
209
|
+
def plz4 = @hash["plz4"]
|
|
210
|
+
|
|
211
|
+
# 2-digit supplementary code distinguishing localities that share a 4-digit postal code.
|
|
212
|
+
#
|
|
213
|
+
# @return [String, nil]
|
|
214
|
+
def zusatzziffer = @hash["zusatzziffer"]
|
|
215
|
+
|
|
216
|
+
# Unique identifier for the postal code record.
|
|
217
|
+
#
|
|
218
|
+
# @return [Integer, nil]
|
|
219
|
+
def zip_id = @hash["zip_id"]
|
|
220
|
+
|
|
221
|
+
# Municipality name (Gemeindename) from the locality directory.
|
|
222
|
+
#
|
|
223
|
+
# @return [String, nil]
|
|
224
|
+
def gemeindename = @hash["gemeindename"]
|
|
225
|
+
|
|
226
|
+
# Federal municipality number assigned by the Federal Statistical Office (BFS-Nr).
|
|
227
|
+
#
|
|
228
|
+
# @return [Integer, nil]
|
|
229
|
+
def bfs_nr = @hash["bfs_nr"]
|
|
230
|
+
|
|
231
|
+
# Canton abbreviation from the locality directory (e.g. `"ZH"`, `"GE"`).
|
|
232
|
+
#
|
|
233
|
+
# @return [String]
|
|
234
|
+
def kantonskürzel = @hash["kantonskürzel"]
|
|
235
|
+
|
|
236
|
+
# Language of the address, mirroring `language`.
|
|
237
|
+
#
|
|
238
|
+
# @return [String, nil]
|
|
239
|
+
def sprache = @hash["sprache"]
|
|
240
|
+
|
|
241
|
+
# Date the postal code record became valid, formatted `YYYY-MM-DD`.
|
|
242
|
+
#
|
|
243
|
+
# @return [String, nil]
|
|
244
|
+
def validity = @hash["validity"]
|
|
245
|
+
end
|
|
246
|
+
end
|
|
247
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Generated from the OpenAPI spec. Do not edit.
|
|
4
|
+
|
|
5
|
+
module IdealPostcodes
|
|
6
|
+
module Types
|
|
7
|
+
# UK Address Suggestion
|
|
8
|
+
#
|
|
9
|
+
# Represents a possible address given an autocomplete query.
|
|
10
|
+
#
|
|
11
|
+
# UK Address Suggestions will return a UDPRN attribute if it references a deliverable endpoint
|
|
12
|
+
# found on Royal Mail's Postcode Address File dataset.
|
|
13
|
+
#
|
|
14
|
+
# UK Address Suggestion will return a UMPRN if it references a multiple occupancy premise found
|
|
15
|
+
# on Royal Mail's Multiple Residence dataset.
|
|
16
|
+
class UkAddressSuggestion < Model
|
|
17
|
+
# Globally unique internally generated identifier for an address
|
|
18
|
+
#
|
|
19
|
+
# @return [String]
|
|
20
|
+
def id = @hash["id"]
|
|
21
|
+
|
|
22
|
+
# Address suggestion for a given query.
|
|
23
|
+
#
|
|
24
|
+
# @return [String]
|
|
25
|
+
def suggestion = @hash["suggestion"]
|
|
26
|
+
|
|
27
|
+
# UDPRN stands for 'Unique Delivery Point Reference Number'. Royal Mail assigns a unique UDPRN
|
|
28
|
+
# code for each premise on PAF. Simple, unique reference number for each Delivery Point.
|
|
29
|
+
# Unlikely to be reused when an address expires.
|
|
30
|
+
#
|
|
31
|
+
# @return [Integer]
|
|
32
|
+
def udprn = @hash["udprn"]
|
|
33
|
+
|
|
34
|
+
# Optionally returned field, representing the UMPRN of a Multiple Residence household
|
|
35
|
+
#
|
|
36
|
+
# @return [Integer, nil]
|
|
37
|
+
def umprn = @hash["umprn"]
|
|
38
|
+
|
|
39
|
+
# URLs
|
|
40
|
+
#
|
|
41
|
+
# @return [Types::UkAddressSuggestionUrls]
|
|
42
|
+
def urls = read("urls") { |v| Types::UkAddressSuggestionUrls.from_hash(v) }
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Generated from the OpenAPI spec. Do not edit.
|
|
4
|
+
|
|
5
|
+
module IdealPostcodes
|
|
6
|
+
module Types
|
|
7
|
+
# URLs
|
|
8
|
+
class UkAddressSuggestionUrls < Model
|
|
9
|
+
# URL to retrieve the entire details for a given address suggestion by the UDPRN
|
|
10
|
+
#
|
|
11
|
+
# @return [String]
|
|
12
|
+
def udprn = @hash["udprn"]
|
|
13
|
+
|
|
14
|
+
# Optionally returned field, to retrieve the entire details for a suggested Multiple Residence
|
|
15
|
+
# household
|
|
16
|
+
#
|
|
17
|
+
# @return [String, nil]
|
|
18
|
+
def umprn = @hash["umprn"]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Generated from the OpenAPI spec. Do not edit.
|
|
4
|
+
|
|
5
|
+
module IdealPostcodes
|
|
6
|
+
module Types
|
|
7
|
+
# Unknown Email Object
|
|
8
|
+
class UnknownEmail < Model
|
|
9
|
+
# @return [String]
|
|
10
|
+
def result = @hash["result"]
|
|
11
|
+
|
|
12
|
+
# Deliverability is not known
|
|
13
|
+
#
|
|
14
|
+
# @return [nil]
|
|
15
|
+
def deliverable = @hash["deliverable"]
|
|
16
|
+
|
|
17
|
+
# Disposability is not known
|
|
18
|
+
#
|
|
19
|
+
# @return [nil]
|
|
20
|
+
def disposable = @hash["disposable"]
|
|
21
|
+
|
|
22
|
+
# Free email provider is not known
|
|
23
|
+
#
|
|
24
|
+
# @return [nil]
|
|
25
|
+
def free = @hash["free"]
|
|
26
|
+
|
|
27
|
+
# Role is not known
|
|
28
|
+
#
|
|
29
|
+
# @return [nil]
|
|
30
|
+
def role = @hash["role"]
|
|
31
|
+
|
|
32
|
+
# Catch-all status is not known
|
|
33
|
+
#
|
|
34
|
+
# @return [nil]
|
|
35
|
+
def catchall = @hash["catchall"]
|
|
36
|
+
|
|
37
|
+
# Suggestions will be empty
|
|
38
|
+
#
|
|
39
|
+
# @return [Array<String>]
|
|
40
|
+
def suggestions = @hash["suggestions"]
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|