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.
Files changed (223) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -16
  3. data/LICENSE +1 -21
  4. data/README.md +13 -332
  5. data/lib/ideal_postcodes/base_client.rb +88 -0
  6. data/lib/ideal_postcodes/client.rb +42 -0
  7. data/lib/ideal_postcodes/errors.rb +59 -0
  8. data/lib/ideal_postcodes/generated.rb +83 -0
  9. data/lib/ideal_postcodes/model.rb +73 -0
  10. data/lib/ideal_postcodes/operations.rb +866 -0
  11. data/lib/ideal_postcodes/responses/address_response.rb +19 -0
  12. data/lib/ideal_postcodes/responses/api_key_details_response.rb +21 -0
  13. data/lib/ideal_postcodes/responses/api_key_response.rb +21 -0
  14. data/lib/ideal_postcodes/responses/api_key_usage_response.rb +21 -0
  15. data/lib/ideal_postcodes/responses/autocomplete_response.rb +19 -0
  16. data/lib/ideal_postcodes/responses/cleanse_response.rb +31 -0
  17. data/lib/ideal_postcodes/responses/config_response.rb +21 -0
  18. data/lib/ideal_postcodes/responses/configs_response.rb +21 -0
  19. data/lib/ideal_postcodes/responses/delete_config_response.rb +19 -0
  20. data/lib/ideal_postcodes/responses/delete_licensee_response.rb +19 -0
  21. data/lib/ideal_postcodes/responses/email_response.rb +31 -0
  22. data/lib/ideal_postcodes/responses/gbr_resolve_address_response.rb +21 -0
  23. data/lib/ideal_postcodes/responses/licensee_response.rb +21 -0
  24. data/lib/ideal_postcodes/responses/licensees_response.rb +21 -0
  25. data/lib/ideal_postcodes/responses/phone_number_response.rb +31 -0
  26. data/lib/ideal_postcodes/responses/place_response.rb +19 -0
  27. data/lib/ideal_postcodes/responses/postcode_response.rb +30 -0
  28. data/lib/ideal_postcodes/responses/resolve_place_response.rb +24 -0
  29. data/lib/ideal_postcodes/transport.rb +61 -0
  30. data/lib/ideal_postcodes/types/ab_address.rb +283 -0
  31. data/lib/ideal_postcodes/types/abp_address.rb +674 -0
  32. data/lib/ideal_postcodes/types/address.rb +290 -0
  33. data/lib/ideal_postcodes/types/address_list_item.rb +592 -0
  34. data/lib/ideal_postcodes/types/address_result.rb +24 -0
  35. data/lib/ideal_postcodes/types/address_suggestion.rb +27 -0
  36. data/lib/ideal_postcodes/types/api_key.rb +27 -0
  37. data/lib/ideal_postcodes/types/api_key_automated_topup.rb +17 -0
  38. data/lib/ideal_postcodes/types/api_key_current_purchase.rb +27 -0
  39. data/lib/ideal_postcodes/types/api_key_daily_limit.rb +21 -0
  40. data/lib/ideal_postcodes/types/api_key_datasets.rb +202 -0
  41. data/lib/ideal_postcodes/types/api_key_details.rb +90 -0
  42. data/lib/ideal_postcodes/types/api_key_individual_limit.rb +16 -0
  43. data/lib/ideal_postcodes/types/api_key_monthly_limit.rb +21 -0
  44. data/lib/ideal_postcodes/types/api_key_notifications.rb +35 -0
  45. data/lib/ideal_postcodes/types/autocomplete_result.rb +25 -0
  46. data/lib/ideal_postcodes/types/available_context.rb +35 -0
  47. data/lib/ideal_postcodes/types/ban_address.rb +179 -0
  48. data/lib/ideal_postcodes/types/bev_address.rb +288 -0
  49. data/lib/ideal_postcodes/types/cannar_address.rb +297 -0
  50. data/lib/ideal_postcodes/types/carrier.rb +31 -0
  51. data/lib/ideal_postcodes/types/config.rb +34 -0
  52. data/lib/ideal_postcodes/types/configs_result.rb +15 -0
  53. data/lib/ideal_postcodes/types/deleted_config.rb +13 -0
  54. data/lib/ideal_postcodes/types/deleted_licensee.rb +13 -0
  55. data/lib/ideal_postcodes/types/ecad_address.rb +393 -0
  56. data/lib/ideal_postcodes/types/ecaf_address.rb +204 -0
  57. data/lib/ideal_postcodes/types/email.rb +45 -0
  58. data/lib/ideal_postcodes/types/fodbosa_address.rb +201 -0
  59. data/lib/ideal_postcodes/types/gbr_cleanse_match.rb +70 -0
  60. data/lib/ideal_postcodes/types/gbr_cleanse_no_match.rb +47 -0
  61. data/lib/ideal_postcodes/types/geonames_place.rb +153 -0
  62. data/lib/ideal_postcodes/types/gnaf_address.rb +463 -0
  63. data/lib/ideal_postcodes/types/here_address.rb +174 -0
  64. data/lib/ideal_postcodes/types/invalid_phone_number.rb +50 -0
  65. data/lib/ideal_postcodes/types/kadaster_address.rb +480 -0
  66. data/lib/ideal_postcodes/types/kartverket_address.rb +342 -0
  67. data/lib/ideal_postcodes/types/key_usage_day.rb +16 -0
  68. data/lib/ideal_postcodes/types/key_usage_result.rb +36 -0
  69. data/lib/ideal_postcodes/types/licensee.rb +50 -0
  70. data/lib/ideal_postcodes/types/licensee_daily_usage.rb +29 -0
  71. data/lib/ideal_postcodes/types/licensees_result.rb +23 -0
  72. data/lib/ideal_postcodes/types/mois_address.rb +440 -0
  73. data/lib/ideal_postcodes/types/mr_address.rb +99 -0
  74. data/lib/ideal_postcodes/types/native_record.rb +368 -0
  75. data/lib/ideal_postcodes/types/nyb_address.rb +99 -0
  76. data/lib/ideal_postcodes/types/paf_address.rb +96 -0
  77. data/lib/ideal_postcodes/types/pafa_address.rb +104 -0
  78. data/lib/ideal_postcodes/types/pafw_address.rb +99 -0
  79. data/lib/ideal_postcodes/types/phone_number.rb +50 -0
  80. data/lib/ideal_postcodes/types/place.rb +79 -0
  81. data/lib/ideal_postcodes/types/place_result.rb +21 -0
  82. data/lib/ideal_postcodes/types/place_suggestion.rb +32 -0
  83. data/lib/ideal_postcodes/types/sdfi_address.rb +520 -0
  84. data/lib/ideal_postcodes/types/swt_address.rb +247 -0
  85. data/lib/ideal_postcodes/types/uk_address_suggestion.rb +45 -0
  86. data/lib/ideal_postcodes/types/uk_address_suggestion_urls.rb +21 -0
  87. data/lib/ideal_postcodes/types/unknown_email.rb +43 -0
  88. data/lib/ideal_postcodes/types/upujp_address.rb +763 -0
  89. data/lib/ideal_postcodes/types/usps_address.rb +294 -0
  90. data/lib/ideal_postcodes/version.rb +5 -0
  91. data/lib/ideal_postcodes.rb +14 -2
  92. data/sig/ideal_postcodes/base_client.rbs +40 -0
  93. data/sig/ideal_postcodes/client.rbs +35 -0
  94. data/sig/ideal_postcodes/errors.rbs +27 -0
  95. data/sig/ideal_postcodes/model.rbs +37 -0
  96. data/sig/ideal_postcodes/operations.rbs +207 -0
  97. data/sig/ideal_postcodes/responses/address_response.rbs +13 -0
  98. data/sig/ideal_postcodes/responses/api_key_details_response.rbs +13 -0
  99. data/sig/ideal_postcodes/responses/api_key_response.rbs +13 -0
  100. data/sig/ideal_postcodes/responses/api_key_usage_response.rbs +13 -0
  101. data/sig/ideal_postcodes/responses/autocomplete_response.rbs +13 -0
  102. data/sig/ideal_postcodes/responses/cleanse_response.rbs +19 -0
  103. data/sig/ideal_postcodes/responses/config_response.rbs +13 -0
  104. data/sig/ideal_postcodes/responses/configs_response.rbs +13 -0
  105. data/sig/ideal_postcodes/responses/delete_config_response.rbs +13 -0
  106. data/sig/ideal_postcodes/responses/delete_licensee_response.rbs +13 -0
  107. data/sig/ideal_postcodes/responses/email_response.rbs +19 -0
  108. data/sig/ideal_postcodes/responses/gbr_resolve_address_response.rbs +13 -0
  109. data/sig/ideal_postcodes/responses/licensee_response.rbs +13 -0
  110. data/sig/ideal_postcodes/responses/licensees_response.rbs +13 -0
  111. data/sig/ideal_postcodes/responses/phone_number_response.rbs +19 -0
  112. data/sig/ideal_postcodes/responses/place_response.rbs +13 -0
  113. data/sig/ideal_postcodes/responses/postcode_response.rbs +16 -0
  114. data/sig/ideal_postcodes/responses/resolve_place_response.rbs +13 -0
  115. data/sig/ideal_postcodes/transport.rbs +39 -0
  116. data/sig/ideal_postcodes/types/ab_address.rbs +57 -0
  117. data/sig/ideal_postcodes/types/abp_address.rbs +126 -0
  118. data/sig/ideal_postcodes/types/address.rbs +136 -0
  119. data/sig/ideal_postcodes/types/address_list_item.rbs +160 -0
  120. data/sig/ideal_postcodes/types/address_result.rbs +12 -0
  121. data/sig/ideal_postcodes/types/address_suggestion.rbs +11 -0
  122. data/sig/ideal_postcodes/types/api_key.rbs +11 -0
  123. data/sig/ideal_postcodes/types/api_key_automated_topup.rbs +9 -0
  124. data/sig/ideal_postcodes/types/api_key_current_purchase.rbs +11 -0
  125. data/sig/ideal_postcodes/types/api_key_daily_limit.rbs +10 -0
  126. data/sig/ideal_postcodes/types/api_key_datasets.rbs +46 -0
  127. data/sig/ideal_postcodes/types/api_key_details.rbs +22 -0
  128. data/sig/ideal_postcodes/types/api_key_individual_limit.rbs +9 -0
  129. data/sig/ideal_postcodes/types/api_key_monthly_limit.rbs +10 -0
  130. data/sig/ideal_postcodes/types/api_key_notifications.rbs +13 -0
  131. data/sig/ideal_postcodes/types/autocomplete_result.rbs +15 -0
  132. data/sig/ideal_postcodes/types/available_context.rbs +13 -0
  133. data/sig/ideal_postcodes/types/ban_address.rbs +46 -0
  134. data/sig/ideal_postcodes/types/bev_address.rbs +67 -0
  135. data/sig/ideal_postcodes/types/cannar_address.rbs +62 -0
  136. data/sig/ideal_postcodes/types/carrier.rbs +14 -0
  137. data/sig/ideal_postcodes/types/config.rbs +14 -0
  138. data/sig/ideal_postcodes/types/configs_result.rbs +9 -0
  139. data/sig/ideal_postcodes/types/deleted_config.rbs +9 -0
  140. data/sig/ideal_postcodes/types/deleted_licensee.rbs +9 -0
  141. data/sig/ideal_postcodes/types/ecad_address.rbs +84 -0
  142. data/sig/ideal_postcodes/types/ecaf_address.rbs +45 -0
  143. data/sig/ideal_postcodes/types/email.rbs +16 -0
  144. data/sig/ideal_postcodes/types/fodbosa_address.rbs +43 -0
  145. data/sig/ideal_postcodes/types/gbr_cleanse_match.rbs +25 -0
  146. data/sig/ideal_postcodes/types/gbr_cleanse_no_match.rbs +28 -0
  147. data/sig/ideal_postcodes/types/geonames_place.rbs +42 -0
  148. data/sig/ideal_postcodes/types/gnaf_address.rbs +104 -0
  149. data/sig/ideal_postcodes/types/here_address.rbs +37 -0
  150. data/sig/ideal_postcodes/types/invalid_phone_number.rbs +17 -0
  151. data/sig/ideal_postcodes/types/kadaster_address.rbs +98 -0
  152. data/sig/ideal_postcodes/types/kartverket_address.rbs +78 -0
  153. data/sig/ideal_postcodes/types/key_usage_day.rbs +10 -0
  154. data/sig/ideal_postcodes/types/key_usage_result.rbs +13 -0
  155. data/sig/ideal_postcodes/types/licensee.rbs +17 -0
  156. data/sig/ideal_postcodes/types/licensee_daily_usage.rbs +12 -0
  157. data/sig/ideal_postcodes/types/licensees_result.rbs +11 -0
  158. data/sig/ideal_postcodes/types/mois_address.rbs +97 -0
  159. data/sig/ideal_postcodes/types/mr_address.rbs +27 -0
  160. data/sig/ideal_postcodes/types/native_record.rbs +34 -0
  161. data/sig/ideal_postcodes/types/nyb_address.rbs +27 -0
  162. data/sig/ideal_postcodes/types/paf_address.rbs +27 -0
  163. data/sig/ideal_postcodes/types/pafa_address.rbs +27 -0
  164. data/sig/ideal_postcodes/types/pafw_address.rbs +27 -0
  165. data/sig/ideal_postcodes/types/phone_number.rbs +17 -0
  166. data/sig/ideal_postcodes/types/place.rbs +29 -0
  167. data/sig/ideal_postcodes/types/place_result.rbs +15 -0
  168. data/sig/ideal_postcodes/types/place_suggestion.rbs +12 -0
  169. data/sig/ideal_postcodes/types/sdfi_address.rbs +108 -0
  170. data/sig/ideal_postcodes/types/swt_address.rbs +57 -0
  171. data/sig/ideal_postcodes/types/uk_address_suggestion.rbs +13 -0
  172. data/sig/ideal_postcodes/types/uk_address_suggestion_urls.rbs +10 -0
  173. data/sig/ideal_postcodes/types/unknown_email.rbs +16 -0
  174. data/sig/ideal_postcodes/types/upujp_address.rbs +156 -0
  175. data/sig/ideal_postcodes/types/usps_address.rbs +63 -0
  176. metadata +186 -174
  177. data/.github/workflows/ci.yml +0 -22
  178. data/Gemfile +0 -2
  179. data/Rakefile +0 -15
  180. data/ideal-postcodes-ruby.gemspec +0 -25
  181. data/lib/idealpostcodes/address.rb +0 -31
  182. data/lib/idealpostcodes/errors.rb +0 -38
  183. data/lib/idealpostcodes/key.rb +0 -14
  184. data/lib/idealpostcodes/postcode.rb +0 -23
  185. data/lib/idealpostcodes/util.rb +0 -42
  186. data/lib/idealpostcodes/version.rb +0 -3
  187. data/lib/idealpostcodes.rb +0 -124
  188. data/spec/addresses_spec.rb +0 -68
  189. data/spec/idealpostcodes_spec.rb +0 -56
  190. data/spec/keys_spec.rb +0 -25
  191. data/spec/postcodes_spec.rb +0 -77
  192. data/spec/spec_helper.rb +0 -89
  193. data/spec/vcr_cassettes/IdealPostcodes_Address_lookup_raises_an_exception_if_invalid_key.yml +0 -42
  194. data/spec/vcr_cassettes/IdealPostcodes_Address_lookup_raises_an_exception_if_limit_breached.yml +0 -42
  195. data/spec/vcr_cassettes/IdealPostcodes_Address_lookup_raises_an_exception_if_no_lookups_remaining.yml +0 -42
  196. data/spec/vcr_cassettes/IdealPostcodes_Address_lookup_returns_an_address_for_a_valid_UDPRN.yml +0 -74
  197. data/spec/vcr_cassettes/IdealPostcodes_Address_lookup_returns_nil_for_an_invalid_UDPRN.yml +0 -42
  198. data/spec/vcr_cassettes/IdealPostcodes_Address_search_is_sensitive_to_limit.yml +0 -81
  199. data/spec/vcr_cassettes/IdealPostcodes_Address_search_is_sensitive_to_page.yml +0 -369
  200. data/spec/vcr_cassettes/IdealPostcodes_Address_search_raises_an_exception_if_invalid_key.yml +0 -42
  201. data/spec/vcr_cassettes/IdealPostcodes_Address_search_raises_an_exception_if_limit_breached.yml +0 -42
  202. data/spec/vcr_cassettes/IdealPostcodes_Address_search_raises_an_exception_if_no_lookups_remaining.yml +0 -42
  203. data/spec/vcr_cassettes/IdealPostcodes_Address_search_returns_results_in_a_SearchResult_object.yml +0 -273
  204. data/spec/vcr_cassettes/IdealPostcodes_Key_lookup_details_returns_key_details.yml +0 -62
  205. data/spec/vcr_cassettes/IdealPostcodes_Key_lookup_returns_the_availability_status_of_a_key_false_key_.yml +0 -45
  206. data/spec/vcr_cassettes/IdealPostcodes_Key_lookup_returns_the_availability_status_of_a_key_true_key_.yml +0 -45
  207. data/spec/vcr_cassettes/IdealPostcodes_Postcode_find_by_location_is_sensitive_to_limit_parameter.yml +0 -52
  208. data/spec/vcr_cassettes/IdealPostcodes_Postcode_find_by_location_is_sensitive_to_radius_parament.yml +0 -133
  209. data/spec/vcr_cassettes/IdealPostcodes_Postcode_find_by_location_returns_an_array_of_postcodes_and_locations.yml +0 -84
  210. data/spec/vcr_cassettes/IdealPostcodes_Postcode_find_by_location_returns_an_empty_array_if_no_results_are_found.yml +0 -43
  211. data/spec/vcr_cassettes/IdealPostcodes_Postcode_lookup_raises_an_exception_if_invalid_key.yml +0 -42
  212. data/spec/vcr_cassettes/IdealPostcodes_Postcode_lookup_raises_an_exception_if_key_has_run_out_of_balance.yml +0 -42
  213. data/spec/vcr_cassettes/IdealPostcodes_Postcode_lookup_raises_an_exception_if_limit_has_been_reached.yml +0 -42
  214. data/spec/vcr_cassettes/IdealPostcodes_Postcode_lookup_returns_a_list_of_addresses_for_a_postcode.yml +0 -268
  215. data/spec/vcr_cassettes/IdealPostcodes_Postcode_lookup_returns_an_empty_array_if_postcode_does_not_exist.yml +0 -42
  216. data/spec/vcr_cassettes/IdealPostcodes_key_available_returns_false_if_key_is_unavailable.yml +0 -45
  217. data/spec/vcr_cassettes/IdealPostcodes_key_available_returns_true_if_key_is_available.yml +0 -45
  218. data/spec/vcr_cassettes/IdealPostcodes_key_details_raises_an_exception_if_no_secret_is_provided.yml +0 -45
  219. data/spec/vcr_cassettes/IdealPostcodes_key_details_returns_key_information.yml +0 -62
  220. data/spec/vcr_cassettes/IdealPostcodes_request_generates_a_HTTP_request.yml +0 -268
  221. data/spec/vcr_cassettes/IdealPostcodes_request_raises_authentication_error_if_invalid_key_is_provided.yml +0 -42
  222. data/spec/vcr_cassettes/IdealPostcodes_request_raises_limit_reached_error_if_a_limit_has_been_breached.yml +0 -42
  223. data/spec/vcr_cassettes/IdealPostcodes_request_raises_token_exhausted_error_if_key_balance_is_depleted.yml +0 -42
@@ -0,0 +1,342 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated from the OpenAPI spec. Do not edit.
4
+
5
+ module IdealPostcodes
6
+ module Types
7
+ # Norway Kartverket Address
8
+ #
9
+ # An address from Matrikkelen, Norway's official cadastre and address register, published by
10
+ # Kartverket (the Norwegian Mapping Authority).
11
+ #
12
+ # Covers Norway (`NOR`) and Svalbard and Jan Mayen (`SJM`). Records come from the cadastre
13
+ # address, apartment level and road address files, so the fields available depend on which file
14
+ # the address came from. Any field which is not present is returned as an empty string `""`.
15
+ class KartverketAddress < Model
16
+ # Globally unique internally generated identifier for an address
17
+ #
18
+ # @return [String]
19
+ def id = @hash["id"]
20
+
21
+ # @return [String]
22
+ def dataset = @hash["dataset"]
23
+
24
+ # Full country names (ISO 3166)
25
+ #
26
+ # @return [String]
27
+ def country = @hash["country"]
28
+
29
+ # 3 letter country code (ISO 3166-1)
30
+ #
31
+ # @return [String]
32
+ def country_iso = @hash["country_iso"]
33
+
34
+ # 2 letter country code (ISO 3166-1)
35
+ #
36
+ # @return [String]
37
+ def country_iso_2 = @hash["country_iso_2"]
38
+
39
+ # First address line. `adressetilleggsnavn` where present, otherwise the official address text
40
+ # without it.
41
+ #
42
+ # @return [String]
43
+ def line_1 = @hash["line_1"]
44
+
45
+ # Second address line. The official address text without `adressetilleggsnavn`, where line 1
46
+ # carries that name.
47
+ #
48
+ # @return [String]
49
+ def line_2 = @hash["line_2"]
50
+
51
+ # Language represented by 2 letter ISO Code (639-1)
52
+ #
53
+ # @return [String]
54
+ def language = @hash["language"]
55
+
56
+ # Number uniquely identifying the address within its street or farm. `nummer` and `bokstav`
57
+ # for a vegadresse, otherwise the cadastral `gardsnummer`/`bruksnummer`. Any
58
+ # `bruksenhetsnummer_tekst` is appended after a hyphen.
59
+ #
60
+ # @return [String]
61
+ def address = @hash["address"]
62
+
63
+ # The latitude of the address or postcode (WGS84).
64
+ #
65
+ # @return [String, Float]
66
+ def latitude = @hash["latitude"]
67
+
68
+ # The longitude of the address or postcode (WGS84).
69
+ #
70
+ # @return [String, Float]
71
+ def longitude = @hash["longitude"]
72
+
73
+ # Local identifier assigned by the data supplier.
74
+ #
75
+ # @return [String]
76
+ def lokal_id = @hash["lokal_id"]
77
+
78
+ # Kommune (municipality) number.
79
+ #
80
+ # @return [String]
81
+ def kommunenummer = @hash["kommunenummer"]
82
+
83
+ # Kommune (municipality) name.
84
+ #
85
+ # @return [String]
86
+ def kommunenavn = @hash["kommunenavn"]
87
+
88
+ # `vegadresse` = street address, `matrikkeladresse` = land registry address
89
+ #
90
+ # @return [String]
91
+ def adressetype = @hash["adressetype"]
92
+
93
+ # A local place name used in a road address.
94
+ #
95
+ # @return [String]
96
+ def adressetilleggsnavn = @hash["adressetilleggsnavn"]
97
+
98
+ # Code for adressetilleggsnavn origin.
99
+ #
100
+ # @return [String]
101
+ def adressetilleggsnavn_kilde = @hash["adressetilleggsnavn_kilde"]
102
+
103
+ # @return [String, Integer]
104
+ def adressekode = @hash["adressekode"]
105
+
106
+ # Name of street, road, path, place or area entered in the land register.
107
+ #
108
+ # @return [String]
109
+ def adressenavn = @hash["adressenavn"]
110
+
111
+ # @return [String, Integer]
112
+ def nummer = @hash["nummer"]
113
+
114
+ # A subsequent letter that may be used in addition to a number.
115
+ #
116
+ # @return [String]
117
+ def bokstav = @hash["bokstav"]
118
+
119
+ # The number of a farm unit in the land register, unique within each municipality.
120
+ #
121
+ # @return [Integer]
122
+ def gardsnummer = @hash["gardsnummer"]
123
+
124
+ # A unique identification number automatically assigned to each individual unit within a farm.
125
+ #
126
+ # @return [Integer]
127
+ def bruksnummer = @hash["bruksnummer"]
128
+
129
+ # @return [String, Integer]
130
+ def festenummer = @hash["festenummer"]
131
+
132
+ # @return [String, Integer]
133
+ def seksjonsnummer = @hash["seksjonsnummer"]
134
+
135
+ # @return [String, Integer]
136
+ def undernummer = @hash["undernummer"]
137
+
138
+ # Official address text without bruksenhetsnummer, unique within a kommune.
139
+ #
140
+ # @return [String]
141
+ def adresse_tekst = @hash["adresse_tekst"]
142
+
143
+ # Official address text without bruksenhetsnummer and adressetilleggsnavn, unique within a
144
+ # kommune.
145
+ #
146
+ # @return [String]
147
+ def adresse_tekst_uten_adressetilleggsnavn = @hash["adresse_tekst_uten_adressetilleggsnavn"]
148
+
149
+ # Local identifier for a unit within a building.
150
+ #
151
+ # @return [String]
152
+ def bruksenhet_id = @hash["bruksenhet_id"]
153
+
154
+ # Unit number, e.g. an apartment in a multi-dwelling building.
155
+ #
156
+ # @return [String]
157
+ def bruksenhetsnummer_tekst = @hash["bruksenhetsnummer_tekst"]
158
+
159
+ # Official address text with bruksenhetsnummer, unique within a kommune.
160
+ #
161
+ # @return [String]
162
+ def offisiell_adresse_tekst = @hash["offisiell_adresse_tekst"]
163
+
164
+ # Official address text with bruksenhetsnummer and without adressetilleggsnavn, unique within
165
+ # a kommune.
166
+ #
167
+ # @return [String]
168
+ def offisiell_adresse_tekst_uten_adressetilleggsnavn
169
+ @hash["offisiell_adresse_tekst_uten_adressetilleggsnavn"]
170
+ end
171
+
172
+ # EPSG code of the coordinate reference system used by `nord` and `oest`. `25833` = EUREF89
173
+ # UTM zone 33.
174
+ #
175
+ # @return [Integer]
176
+ def epsg_kode = @hash["epsg_kode"]
177
+
178
+ # Northward (northing) coordinate of address, in the coordinate reference system given by
179
+ # `epsg_kode`.
180
+ #
181
+ # @return [String]
182
+ def nord = @hash["nord"]
183
+
184
+ # Eastward (easting) coordinate of address, in the coordinate reference system given by
185
+ # `epsg_kode`.
186
+ #
187
+ # @return [String]
188
+ def oest = @hash["oest"]
189
+
190
+ # Postal code.
191
+ #
192
+ # @return [String]
193
+ def postnummer = @hash["postnummer"]
194
+
195
+ # Name of postal town according to Posten.
196
+ #
197
+ # @return [String]
198
+ def poststed = @hash["poststed"]
199
+
200
+ # Identifier consisting of 8 digits, where the first four are the kommunenummer, the next two
201
+ # are the delområdenummer and the last two indicate the grunnkrets.
202
+ #
203
+ # @return [String]
204
+ def grunnkretsnummer = @hash["grunnkretsnummer"]
205
+
206
+ # Official grunnkrets name from Statistics Norway (SSB).
207
+ #
208
+ # @return [String]
209
+ def grunnkretsnavn = @hash["grunnkretsnavn"]
210
+
211
+ # Unique 8 digit identifier of a parish.
212
+ #
213
+ # @return [String]
214
+ def soknenummer = @hash["soknenummer"]
215
+
216
+ # Parish name.
217
+ #
218
+ # @return [String]
219
+ def soknenavn = @hash["soknenavn"]
220
+
221
+ # Unique identifier of organisation in the Brønnøysund Register.
222
+ #
223
+ # @return [String]
224
+ def organisasjonsnummer = @hash["organisasjonsnummer"]
225
+
226
+ # 4 digit code for tettsted (urban settlement).
227
+ #
228
+ # @return [String]
229
+ def tettstednummer = @hash["tettstednummer"]
230
+
231
+ # Name of tettsted (urban settlement).
232
+ #
233
+ # @return [String]
234
+ def tettstednavn = @hash["tettstednavn"]
235
+
236
+ # @return [String, Integer]
237
+ def valgkretsnummer = @hash["valgkretsnummer"]
238
+
239
+ # Name of constituency.
240
+ #
241
+ # @return [String]
242
+ def valgkretsnavn = @hash["valgkretsnavn"]
243
+
244
+ # Date of last change to the object data.
245
+ #
246
+ # @return [String]
247
+ def oppdateringsdato = @hash["oppdateringsdato"]
248
+
249
+ # Date of extraction from database.
250
+ #
251
+ # @return [String]
252
+ def datauttaksdato = @hash["datauttaksdato"]
253
+
254
+ # Address local identifier assigned by the data supplier.
255
+ #
256
+ # @return [String]
257
+ def adresse_id = @hash["adresse_id"]
258
+
259
+ # Address identifier realised as UUID managed by the cadastral system.
260
+ #
261
+ # @return [String]
262
+ def uuid_adresse = @hash["uuid_adresse"]
263
+
264
+ # Unit of usage identifier realised as UUID managed by the cadastral system.
265
+ #
266
+ # @return [String]
267
+ def uuid_bruksenhet = @hash["uuid_bruksenhet"]
268
+
269
+ # Local identifier for means of access to a property.
270
+ #
271
+ # @return [String]
272
+ def atkomst_id = @hash["atkomst_id"]
273
+
274
+ # Identifier of the means of access to a property realised as UUID in the cadastral system.
275
+ #
276
+ # @return [String]
277
+ def uuid_atkomst = @hash["uuid_atkomst"]
278
+
279
+ # Northward coordinate of the means of access to a property.
280
+ #
281
+ # @return [String]
282
+ def atkomst_nord = @hash["atkomst_nord"]
283
+
284
+ # Eastward coordinate of the means of access to a property.
285
+ #
286
+ # @return [String]
287
+ def atkomst_oest = @hash["atkomst_oest"]
288
+
289
+ # Local identifier for means of access to a property in summer.
290
+ #
291
+ # @return [String]
292
+ def sommeratkomst_id = @hash["sommeratkomst_id"]
293
+
294
+ # Identifier of the means of access to a property in summer realised as UUID in the cadastral
295
+ # system.
296
+ #
297
+ # @return [String]
298
+ def uuid_sommeratkomst = @hash["uuid_sommeratkomst"]
299
+
300
+ # Northward coordinate of the means of access to a property in summer.
301
+ #
302
+ # @return [String]
303
+ def sommeratkomst_nord = @hash["sommeratkomst_nord"]
304
+
305
+ # Eastward coordinate of the means of access to a property in summer.
306
+ #
307
+ # @return [String]
308
+ def sommeratkomst_oest = @hash["sommeratkomst_oest"]
309
+
310
+ # Local identifier for means of access to a property in winter.
311
+ #
312
+ # @return [String]
313
+ def vinteratkomst_id = @hash["vinteratkomst_id"]
314
+
315
+ # Identifier of the means of access to a property in winter realised as UUID in the cadastral
316
+ # system.
317
+ #
318
+ # @return [String]
319
+ def uuid_vinteratkomst = @hash["uuid_vinteratkomst"]
320
+
321
+ # Northward coordinate of the means of access to a property in winter.
322
+ #
323
+ # @return [String]
324
+ def vinteratkomst_nord = @hash["vinteratkomst_nord"]
325
+
326
+ # Eastward coordinate of the means of access to a property in winter.
327
+ #
328
+ # @return [String]
329
+ def vinteratkomst_oest = @hash["vinteratkomst_oest"]
330
+
331
+ # Name of county. Derived from `kommunenummer`.
332
+ #
333
+ # @return [String]
334
+ def fylke = @hash["fylke"]
335
+
336
+ # Name of region. Derived from `fylke`.
337
+ #
338
+ # @return [String]
339
+ def landsdel = @hash["landsdel"]
340
+ end
341
+ end
342
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated from the OpenAPI spec. Do not edit.
4
+
5
+ module IdealPostcodes
6
+ module Types
7
+ # KeyUsageResultDailyCountItem
8
+ class KeyUsageDay < Model
9
+ # @return [String]
10
+ def date = @hash["date"]
11
+
12
+ # @return [Integer]
13
+ def count = @hash["count"]
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated from the OpenAPI spec. Do not edit.
4
+
5
+ module IdealPostcodes
6
+ module Types
7
+ # Key Usage
8
+ class KeyUsageResult < Model
9
+ # Start date in ISO 8601 format.
10
+ #
11
+ # @return [String]
12
+ def start = @hash["start"]
13
+
14
+ # End date in ISO 8601 format.
15
+ #
16
+ # @return [String]
17
+ def end = @hash["end"]
18
+
19
+ # Total of paid lookups performed in specified period.
20
+ #
21
+ # @return [Integer]
22
+ def total = @hash["total"]
23
+
24
+ # An array of objects representing number of paid lookups made on specific days, ordered by
25
+ # date. Each object contains a `date` attribute, which represents the day and a `count`
26
+ # attribute, which represents the number of paid lookups made on that day.
27
+ #
28
+ # @return [Array<Types::KeyUsageDay>]
29
+ def dailyCount
30
+ read("dailyCount") { |v| v.map { |item| Types::KeyUsageDay.from_hash(item) } }
31
+ end
32
+
33
+ alias daily_count dailyCount
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated from the OpenAPI spec. Do not edit.
4
+
5
+ module IdealPostcodes
6
+ module Types
7
+ # Licensee
8
+ class Licensee < Model
9
+ # An immutable ID provided for every licensee. Primarily used for paginated list requests.
10
+ #
11
+ # @return [String]
12
+ def id = @hash["id"]
13
+
14
+ # Uniquely identifies a licensee for a key.
15
+ #
16
+ # @return [String]
17
+ def key = @hash["key"]
18
+
19
+ # Timestamp for when the licensee was created
20
+ #
21
+ # @return [String]
22
+ def createdAt = @hash["createdAt"]
23
+
24
+ alias created_at createdAt
25
+
26
+ # Licensee individual or organisation name
27
+ #
28
+ # @return [String]
29
+ def name = @hash["name"]
30
+
31
+ # Licensee's first, second and third line address as well as post town concatenated by commas
32
+ #
33
+ # @return [String]
34
+ def address = @hash["address"]
35
+
36
+ # Licensee's postcode
37
+ #
38
+ # @return [String]
39
+ def postcode = @hash["postcode"]
40
+
41
+ # A list of allowed URLs. An empty list disables the check.
42
+ #
43
+ # @return [Array<String>]
44
+ def whitelist = @hash["whitelist"]
45
+
46
+ # @return [Types::LicenseeDailyUsage]
47
+ def daily = read("daily") { |v| Types::LicenseeDailyUsage.from_hash(v) }
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated from the OpenAPI spec. Do not edit.
4
+
5
+ module IdealPostcodes
6
+ module Types
7
+ # LicenseeDaily
8
+ class LicenseeDailyUsage < Model
9
+ # The maximum number of lookups this licensee can perform in a day. `null` indicates the limit
10
+ # is not active
11
+ #
12
+ # @return [Integer, nil]
13
+ def limit = @hash["limit"]
14
+
15
+ # The number of lookups performed by the licensee on the day represented by
16
+ # `licensees.daily.updatedAt`
17
+ #
18
+ # @return [Integer]
19
+ def count = @hash["count"]
20
+
21
+ # The timestamp when the limit was last used.
22
+ #
23
+ # @return [String]
24
+ def updatedAt = @hash["updatedAt"]
25
+
26
+ alias updated_at updatedAt
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated from the OpenAPI spec. Do not edit.
4
+
5
+ module IdealPostcodes
6
+ module Types
7
+ # LicenseesResponseResult
8
+ #
9
+ # List of licensees
10
+ class LicenseesResult < Model
11
+ # @return [Array<Types::Licensee>]
12
+ def licensees = read("licensees") { |v| v.map { |item| Types::Licensee.from_hash(item) } }
13
+
14
+ # Returns true if there are more licensees listed after the maximum number of results as
15
+ # implied by `limit`
16
+ #
17
+ # @return [Boolean]
18
+ def hasMore = @hash["hasMore"]
19
+
20
+ alias has_more hasMore
21
+ end
22
+ end
23
+ end