addresszen 0.1.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 (166) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +8 -0
  3. data/LICENSE +1 -0
  4. data/README.md +34 -0
  5. data/lib/addresszen/base_client.rb +88 -0
  6. data/lib/addresszen/client.rb +12 -0
  7. data/lib/addresszen/errors.rb +59 -0
  8. data/lib/addresszen/generated.rb +78 -0
  9. data/lib/addresszen/model.rb +73 -0
  10. data/lib/addresszen/operations.rb +668 -0
  11. data/lib/addresszen/responses/api_key_details_response.rb +21 -0
  12. data/lib/addresszen/responses/api_key_response.rb +21 -0
  13. data/lib/addresszen/responses/api_key_usage_response.rb +21 -0
  14. data/lib/addresszen/responses/autocomplete_response.rb +19 -0
  15. data/lib/addresszen/responses/config_response.rb +21 -0
  16. data/lib/addresszen/responses/configs_response.rb +21 -0
  17. data/lib/addresszen/responses/delete_config_response.rb +19 -0
  18. data/lib/addresszen/responses/delete_licensee_response.rb +19 -0
  19. data/lib/addresszen/responses/email_response.rb +31 -0
  20. data/lib/addresszen/responses/licensee_response.rb +21 -0
  21. data/lib/addresszen/responses/licensees_response.rb +21 -0
  22. data/lib/addresszen/responses/phone_number_response.rb +31 -0
  23. data/lib/addresszen/responses/place_response.rb +19 -0
  24. data/lib/addresszen/responses/resolve_place_response.rb +24 -0
  25. data/lib/addresszen/responses/usa_resolve_address_response.rb +21 -0
  26. data/lib/addresszen/responses/verify_response.rb +31 -0
  27. data/lib/addresszen/transport.rb +61 -0
  28. data/lib/addresszen/types/ab_address.rb +283 -0
  29. data/lib/addresszen/types/abp_address.rb +674 -0
  30. data/lib/addresszen/types/address.rb +265 -0
  31. data/lib/addresszen/types/address_suggestion.rb +27 -0
  32. data/lib/addresszen/types/api_key.rb +27 -0
  33. data/lib/addresszen/types/api_key_automated_topup.rb +17 -0
  34. data/lib/addresszen/types/api_key_current_purchase.rb +27 -0
  35. data/lib/addresszen/types/api_key_daily_limit.rb +21 -0
  36. data/lib/addresszen/types/api_key_datasets.rb +202 -0
  37. data/lib/addresszen/types/api_key_details.rb +90 -0
  38. data/lib/addresszen/types/api_key_individual_limit.rb +16 -0
  39. data/lib/addresszen/types/api_key_monthly_limit.rb +21 -0
  40. data/lib/addresszen/types/api_key_notifications.rb +35 -0
  41. data/lib/addresszen/types/autocomplete_result.rb +13 -0
  42. data/lib/addresszen/types/available_context.rb +35 -0
  43. data/lib/addresszen/types/ban_address.rb +179 -0
  44. data/lib/addresszen/types/bev_address.rb +288 -0
  45. data/lib/addresszen/types/cannar_address.rb +297 -0
  46. data/lib/addresszen/types/carrier.rb +31 -0
  47. data/lib/addresszen/types/config.rb +34 -0
  48. data/lib/addresszen/types/configs_result.rb +15 -0
  49. data/lib/addresszen/types/deleted_config.rb +13 -0
  50. data/lib/addresszen/types/deleted_licensee.rb +13 -0
  51. data/lib/addresszen/types/ecad_address.rb +393 -0
  52. data/lib/addresszen/types/ecaf_address.rb +204 -0
  53. data/lib/addresszen/types/email.rb +45 -0
  54. data/lib/addresszen/types/fodbosa_address.rb +201 -0
  55. data/lib/addresszen/types/geonames_place.rb +153 -0
  56. data/lib/addresszen/types/gnaf_address.rb +463 -0
  57. data/lib/addresszen/types/here_address.rb +174 -0
  58. data/lib/addresszen/types/invalid_phone_number.rb +50 -0
  59. data/lib/addresszen/types/kadaster_address.rb +480 -0
  60. data/lib/addresszen/types/kartverket_address.rb +342 -0
  61. data/lib/addresszen/types/key_usage_day.rb +16 -0
  62. data/lib/addresszen/types/key_usage_result.rb +36 -0
  63. data/lib/addresszen/types/licensee.rb +50 -0
  64. data/lib/addresszen/types/licensee_daily_usage.rb +29 -0
  65. data/lib/addresszen/types/licensees_result.rb +23 -0
  66. data/lib/addresszen/types/mois_address.rb +440 -0
  67. data/lib/addresszen/types/mr_address.rb +99 -0
  68. data/lib/addresszen/types/native_record.rb +368 -0
  69. data/lib/addresszen/types/nyb_address.rb +99 -0
  70. data/lib/addresszen/types/paf_address.rb +96 -0
  71. data/lib/addresszen/types/pafa_address.rb +104 -0
  72. data/lib/addresszen/types/pafw_address.rb +99 -0
  73. data/lib/addresszen/types/phone_number.rb +50 -0
  74. data/lib/addresszen/types/place.rb +79 -0
  75. data/lib/addresszen/types/place_result.rb +21 -0
  76. data/lib/addresszen/types/place_suggestion.rb +32 -0
  77. data/lib/addresszen/types/sdfi_address.rb +520 -0
  78. data/lib/addresszen/types/swt_address.rb +247 -0
  79. data/lib/addresszen/types/unknown_email.rb +43 -0
  80. data/lib/addresszen/types/upujp_address.rb +763 -0
  81. data/lib/addresszen/types/usa_cass_verified_address.rb +254 -0
  82. data/lib/addresszen/types/usa_verify_match.rb +116 -0
  83. data/lib/addresszen/types/usa_verify_no_match.rb +81 -0
  84. data/lib/addresszen/types/usps_address.rb +294 -0
  85. data/lib/addresszen/version.rb +5 -0
  86. data/lib/addresszen.rb +14 -0
  87. data/sig/addresszen/base_client.rbs +40 -0
  88. data/sig/addresszen/client.rbs +5 -0
  89. data/sig/addresszen/errors.rbs +27 -0
  90. data/sig/addresszen/model.rbs +37 -0
  91. data/sig/addresszen/operations.rbs +153 -0
  92. data/sig/addresszen/responses/api_key_details_response.rbs +13 -0
  93. data/sig/addresszen/responses/api_key_response.rbs +13 -0
  94. data/sig/addresszen/responses/api_key_usage_response.rbs +13 -0
  95. data/sig/addresszen/responses/autocomplete_response.rbs +13 -0
  96. data/sig/addresszen/responses/config_response.rbs +13 -0
  97. data/sig/addresszen/responses/configs_response.rbs +13 -0
  98. data/sig/addresszen/responses/delete_config_response.rbs +13 -0
  99. data/sig/addresszen/responses/delete_licensee_response.rbs +13 -0
  100. data/sig/addresszen/responses/email_response.rbs +19 -0
  101. data/sig/addresszen/responses/licensee_response.rbs +13 -0
  102. data/sig/addresszen/responses/licensees_response.rbs +13 -0
  103. data/sig/addresszen/responses/phone_number_response.rbs +19 -0
  104. data/sig/addresszen/responses/place_response.rbs +13 -0
  105. data/sig/addresszen/responses/resolve_place_response.rbs +13 -0
  106. data/sig/addresszen/responses/usa_resolve_address_response.rbs +13 -0
  107. data/sig/addresszen/responses/verify_response.rbs +19 -0
  108. data/sig/addresszen/transport.rbs +39 -0
  109. data/sig/addresszen/types/ab_address.rbs +57 -0
  110. data/sig/addresszen/types/abp_address.rbs +126 -0
  111. data/sig/addresszen/types/address.rbs +142 -0
  112. data/sig/addresszen/types/address_suggestion.rbs +11 -0
  113. data/sig/addresszen/types/api_key.rbs +11 -0
  114. data/sig/addresszen/types/api_key_automated_topup.rbs +9 -0
  115. data/sig/addresszen/types/api_key_current_purchase.rbs +11 -0
  116. data/sig/addresszen/types/api_key_daily_limit.rbs +10 -0
  117. data/sig/addresszen/types/api_key_datasets.rbs +46 -0
  118. data/sig/addresszen/types/api_key_details.rbs +22 -0
  119. data/sig/addresszen/types/api_key_individual_limit.rbs +9 -0
  120. data/sig/addresszen/types/api_key_monthly_limit.rbs +10 -0
  121. data/sig/addresszen/types/api_key_notifications.rbs +13 -0
  122. data/sig/addresszen/types/autocomplete_result.rbs +9 -0
  123. data/sig/addresszen/types/available_context.rbs +13 -0
  124. data/sig/addresszen/types/ban_address.rbs +46 -0
  125. data/sig/addresszen/types/bev_address.rbs +67 -0
  126. data/sig/addresszen/types/cannar_address.rbs +62 -0
  127. data/sig/addresszen/types/carrier.rbs +14 -0
  128. data/sig/addresszen/types/config.rbs +14 -0
  129. data/sig/addresszen/types/configs_result.rbs +9 -0
  130. data/sig/addresszen/types/deleted_config.rbs +9 -0
  131. data/sig/addresszen/types/deleted_licensee.rbs +9 -0
  132. data/sig/addresszen/types/ecad_address.rbs +84 -0
  133. data/sig/addresszen/types/ecaf_address.rbs +45 -0
  134. data/sig/addresszen/types/email.rbs +16 -0
  135. data/sig/addresszen/types/fodbosa_address.rbs +43 -0
  136. data/sig/addresszen/types/geonames_place.rbs +42 -0
  137. data/sig/addresszen/types/gnaf_address.rbs +104 -0
  138. data/sig/addresszen/types/here_address.rbs +37 -0
  139. data/sig/addresszen/types/invalid_phone_number.rbs +17 -0
  140. data/sig/addresszen/types/kadaster_address.rbs +98 -0
  141. data/sig/addresszen/types/kartverket_address.rbs +78 -0
  142. data/sig/addresszen/types/key_usage_day.rbs +10 -0
  143. data/sig/addresszen/types/key_usage_result.rbs +13 -0
  144. data/sig/addresszen/types/licensee.rbs +17 -0
  145. data/sig/addresszen/types/licensee_daily_usage.rbs +12 -0
  146. data/sig/addresszen/types/licensees_result.rbs +11 -0
  147. data/sig/addresszen/types/mois_address.rbs +97 -0
  148. data/sig/addresszen/types/mr_address.rbs +27 -0
  149. data/sig/addresszen/types/native_record.rbs +34 -0
  150. data/sig/addresszen/types/nyb_address.rbs +27 -0
  151. data/sig/addresszen/types/paf_address.rbs +27 -0
  152. data/sig/addresszen/types/pafa_address.rbs +27 -0
  153. data/sig/addresszen/types/pafw_address.rbs +27 -0
  154. data/sig/addresszen/types/phone_number.rbs +17 -0
  155. data/sig/addresszen/types/place.rbs +29 -0
  156. data/sig/addresszen/types/place_result.rbs +15 -0
  157. data/sig/addresszen/types/place_suggestion.rbs +12 -0
  158. data/sig/addresszen/types/sdfi_address.rbs +108 -0
  159. data/sig/addresszen/types/swt_address.rbs +57 -0
  160. data/sig/addresszen/types/unknown_email.rbs +16 -0
  161. data/sig/addresszen/types/upujp_address.rbs +156 -0
  162. data/sig/addresszen/types/usa_cass_verified_address.rbs +62 -0
  163. data/sig/addresszen/types/usa_verify_match.rbs +29 -0
  164. data/sig/addresszen/types/usa_verify_no_match.rbs +32 -0
  165. data/sig/addresszen/types/usps_address.rbs +63 -0
  166. metadata +209 -0
@@ -0,0 +1,265 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated from the OpenAPI spec. Do not edit.
4
+
5
+ module AddressZen
6
+ module Types
7
+ # Address
8
+ #
9
+ # A single address.
10
+ #
11
+ # Every address is returned in this shape, whatever dataset it came from. US and non-US
12
+ # addresses share the same fields, so an integration reads one format only.
13
+ #
14
+ # - `dataset` identifies where the address came from. Fields a dataset does not carry are
15
+ # returned as an empty string (`""`)
16
+ # - `native` carries the raw dataset record, exactly as the dataset supplies it. Retrieve
17
+ # Address returns it for every dataset except `usps`, whose address already is the USPS record
18
+ class Address < Model
19
+ # Globally unique internally generated identifier for an address
20
+ #
21
+ # @return [String]
22
+ def id = @hash["id"]
23
+
24
+ # Indicates the provenance of an address.
25
+ #
26
+ # @return [String]
27
+ def dataset = @hash["dataset"]
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
+ # Full country names (ISO 3166)
40
+ #
41
+ # @return [String]
42
+ def country = @hash["country"]
43
+
44
+ # Language represented by 2 letter ISO Code (639-1)
45
+ #
46
+ # @return [String]
47
+ def language = @hash["language"]
48
+
49
+ # Building, house, rural route, contract box or PO Box number. The numeric or alphanumeric
50
+ # component of an address preceding the street name.
51
+ #
52
+ # @return [String]
53
+ def primary_number = @hash["primary_number"]
54
+
55
+ # Number of the subunit, apartment, suite etc.
56
+ #
57
+ # @return [String]
58
+ def secondary_number = @hash["secondary_number"]
59
+
60
+ # 4-digit ZIP add-on code. USPS addresses only.
61
+ #
62
+ # @return [String]
63
+ def plus_4_code = @hash["plus_4_code"]
64
+
65
+ # The primary delivery line (usually the street address) of the address.
66
+ #
67
+ # @return [String]
68
+ def line_1 = @hash["line_1"]
69
+
70
+ # Secondary delivery line of the address. Typically populated if the first line is the firm or
71
+ # building name.
72
+ #
73
+ # @return [String]
74
+ def line_2 = @hash["line_2"]
75
+
76
+ # Final line of the address, comprising city, state or region and postal code.
77
+ #
78
+ # @return [String]
79
+ def last_line = @hash["last_line"]
80
+
81
+ # Postal code identifying the delivery area. For US addresses this is the 5-digit ZIP Code.
82
+ #
83
+ # @return [String]
84
+ def zip_code = @hash["zip_code"]
85
+
86
+ # Nine-digit code that identifies a small geographic delivery area serviceable by a single
87
+ # carrier; appears in the last line of the address on a mail piece. USPS addresses only.
88
+ #
89
+ # @return [String]
90
+ def zip_plus_4_code = @hash["zip_plus_4_code"]
91
+
92
+ # Key that uniquely identifies the source dataset record. For USPS this is the Update Key
93
+ # Number: a database segment code (V1, V2, W1, W2, X1, X2, Y1, Y2, Z1 or Z2) followed by eight
94
+ # alphanumeric characters. It is fixed for the life of the record and is not used in address
95
+ # matching.
96
+ #
97
+ # @return [String]
98
+ def update_key_number = @hash["update_key_number"]
99
+
100
+ # An alphabetic value identifying the type of USPS record backing the address.
101
+ #
102
+ # @return [String]
103
+ def record_type_code = @hash["record_type_code"]
104
+
105
+ # A 4-character ID identifying the USPS postal route for the address. The first character
106
+ # indicates the route type:
107
+ #
108
+ # @return [String]
109
+ def carrier_route_id = @hash["carrier_route_id"]
110
+
111
+ # A geographic direction that precedes the street name.
112
+ #
113
+ # @return [String]
114
+ def street_pre_directional_abbreviation = @hash["street_pre_directional_abbreviation"]
115
+
116
+ # The official name of the street as assigned by the local governing authority. Contains the
117
+ # street name only, without directionals (EAST, WEST, etc.) or suffixes (ST, DR, BLVD, etc.).
118
+ # May also contain literals such as PO BOX, GENERAL DELIVERY, USS, PSC or UNIT.
119
+ #
120
+ # @return [String]
121
+ def street_name = @hash["street_name"]
122
+
123
+ # Standard abbreviation for the trailing designator in a street address.
124
+ #
125
+ # @return [String]
126
+ def street_suffix_abbreviation = @hash["street_suffix_abbreviation"]
127
+
128
+ # A geographic direction that follows the street name.
129
+ #
130
+ # @return [String]
131
+ def street_post_directional_abbreviation = @hash["street_post_directional_abbreviation"]
132
+
133
+ # The name of a company, building, apartment complex, shopping center or other distinguishing
134
+ # secondary address information.
135
+ #
136
+ # @return [String]
137
+ def building_or_firm_name = @hash["building_or_firm_name"]
138
+
139
+ # A descriptive code identifying the type of secondary range held in the secondary number
140
+ # field, e.g. apartment, suite or trailer.
141
+ #
142
+ # @return [String]
143
+ def address_secondary_abbreviation = @hash["address_secondary_abbreviation"]
144
+
145
+ # Code specifying whether the backing USPS record is a base (preferred) or alternate record.
146
+ #
147
+ # @return [String]
148
+ def base_alternate_code = @hash["base_alternate_code"]
149
+
150
+ # The Locatable Address Conversion Service (LACS) indicator marks USPS records converted to
151
+ # the LACS system, which lets mailers convert a rural route address to a city-style address so
152
+ # emergency services can locate it.
153
+ #
154
+ # @return [String]
155
+ def lacs_status_indicator = @hash["lacs_status_indicator"]
156
+
157
+ # An alphabetic value identifying the type of government agency at the delivery point and/or
158
+ # whether a firm is the only delivery at an address.
159
+ #
160
+ # @return [String]
161
+ def government_building_indicator = @hash["government_building_indicator"]
162
+
163
+ # Abbreviated name of the state, province or region. For US addresses this is the 2-character
164
+ # state, territory or armed forces designation ("AA", "AE" or "AP" for APO/FPO/DPO).
165
+ #
166
+ # @return [String]
167
+ def state_abbreviation = @hash["state_abbreviation"]
168
+
169
+ # Full name of the state, province or region.
170
+ #
171
+ # @return [String]
172
+ def state = @hash["state"]
173
+
174
+ # Municipality City State Key. Currently blank.
175
+ #
176
+ # @return [String]
177
+ def municipality_city_state_key = @hash["municipality_city_state_key"]
178
+
179
+ # An index to the USPS City State file that provides the urbanization name for this delivery
180
+ # range.
181
+ #
182
+ # @return [String]
183
+ def urbanization_city_state_key = @hash["urbanization_city_state_key"]
184
+
185
+ # An index to the USPS City State product record that provides the preferred last-line name
186
+ # for this address range.
187
+ #
188
+ # @return [String]
189
+ def preferred_last_line_city_state_key = @hash["preferred_last_line_city_state_key"]
190
+
191
+ # Name of the county, parish or equivalent administrative area. Blank for APO/FPO/DPO
192
+ # addresses.
193
+ #
194
+ # @return [String]
195
+ def county = @hash["county"]
196
+
197
+ # City or town name used for mailing; appears in the last line of the address.
198
+ #
199
+ # @return [String]
200
+ def city = @hash["city"]
201
+
202
+ # A standard 13-character abbreviation for a city/state name. Only used for names longer than
203
+ # 13 characters with a city state mailing name indicator of "Y"; blank otherwise.
204
+ #
205
+ # @return [String]
206
+ def city_abbreviation = @hash["city_abbreviation"]
207
+
208
+ # The default preferred or alternate preferred last-line name for a ZIP Code.
209
+ #
210
+ # @return [String]
211
+ def preferred_city = @hash["preferred_city"]
212
+
213
+ # The type of locale identified in the city/state name. The facility may be a USPS facility,
214
+ # such as a post office, station or branch, or a non-postal place name.
215
+ #
216
+ # @return [String]
217
+ def city_state_name_facility_code = @hash["city_state_name_facility_code"]
218
+
219
+ # Describes the type of ZIP area a 5-digit ZIP Code serves, e.g. a single educational
220
+ # institution, post office boxes only or a single address with unusually high mail volume.
221
+ #
222
+ # @return [String]
223
+ def zip_classification_code = @hash["zip_classification_code"]
224
+
225
+ # Specifies whether the city state name can be used as the last line of an address on a mail
226
+ # piece.
227
+ #
228
+ # @return [String]
229
+ def city_state_mailing_name_indicator = @hash["city_state_mailing_name_indicator"]
230
+
231
+ # Identifies where automation Carrier Route rates are available and where the commingling of
232
+ # automation and non-automation mail, including Enhanced Carrier Routes and 5-digit presort,
233
+ # on the same pallet or in the same container is allowed.
234
+ #
235
+ # @return [String]
236
+ def carrier_route_rate_sortation = @hash["carrier_route_rate_sortation"]
237
+
238
+ # A code assigned to USPS facilities (primarily Post Offices) to collect cost and statistical
239
+ # data and compile revenue and expense data.
240
+ #
241
+ # @return [String, Float]
242
+ def finance_number = @hash["finance_number"]
243
+
244
+ # A standard value identifying a geographic area within the United States served by a member
245
+ # of the U.S. House of Representatives. Blank for APO/FPO/DPO addresses. If there is only one
246
+ # member of Congress within a state, the code will be "AL" (at large).
247
+ #
248
+ # @return [String, Float]
249
+ def congressional_district_number = @hash["congressional_district_number"]
250
+
251
+ # The Federal Information Processing Standard (FIPS) code assigned to a given county or parish
252
+ # within a state. In Alaska it identifies a region within the state. Blank for APO/FPO/DPO
253
+ # addresses whose record type is "S", "H" or "F".
254
+ #
255
+ # @return [String, Float]
256
+ def county_number = @hash["county_number"]
257
+
258
+ # The raw dataset record backing an address, exactly as the dataset supplies it. One schema
259
+ # per dataset; `dataset` on the record says which.
260
+ #
261
+ # @return [Model, Hash{String => Object}, nil] A {Types::NativeRecord} variant.
262
+ def native = read("native") { |v| Types::NativeRecord.from_hash(v) }
263
+ end
264
+ end
265
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated from the OpenAPI spec. Do not edit.
4
+
5
+ module AddressZen
6
+ module Types
7
+ # Address Suggestion
8
+ #
9
+ # Represents an address suggestion for any address in the world
10
+ class AddressSuggestion < Model
11
+ # Globally unique internally generated identifier for an address
12
+ #
13
+ # @return [String]
14
+ def id = @hash["id"]
15
+
16
+ # Address Suggestion to be displayed to the user
17
+ #
18
+ # @return [String]
19
+ def suggestion = @hash["suggestion"]
20
+
21
+ # Always an empty object (`{}`). Retrieve the full address with `id`
22
+ #
23
+ # @return [Hash{String => Object}]
24
+ def urls = @hash["urls"]
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated from the OpenAPI spec. Do not edit.
4
+
5
+ module AddressZen
6
+ module Types
7
+ # Key
8
+ class ApiKey < Model
9
+ # A list of available contexts for a key
10
+ #
11
+ # @return [Array<Types::AvailableContext>]
12
+ def contexts
13
+ read("contexts") { |v| v.map { |item| Types::AvailableContext.from_hash(item) } }
14
+ end
15
+
16
+ # Returns current context if it is in the list of available contexts for this key.
17
+ #
18
+ # @return [String]
19
+ def context = @hash["context"]
20
+
21
+ # Determines whether the key can be used by the requesting agent.
22
+ #
23
+ # @return [Boolean]
24
+ def available = @hash["available"]
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated from the OpenAPI spec. Do not edit.
4
+
5
+ module AddressZen
6
+ module Types
7
+ # API Key Automated Topup
8
+ #
9
+ # Automated topup status
10
+ class ApiKeyAutomatedTopup < Model
11
+ # Indicates whether automated top-ups are enabled
12
+ #
13
+ # @return [Boolean]
14
+ def enabled = @hash["enabled"]
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated from the OpenAPI spec. Do not edit.
4
+
5
+ module AddressZen
6
+ module Types
7
+ # API Key Batch Purchase
8
+ class ApiKeyCurrentPurchase < Model
9
+ # `string` or `null` The date when this purchase will expire in simplified extended ISO format
10
+ # (ISO 8601). This is typically 365 days from the time of first use. This field will be `null`
11
+ # if the purchase has not yet been used.
12
+ #
13
+ # @return [String, nil]
14
+ def expires = @hash["expires"]
15
+
16
+ # Number of procured lookups from this purchase.
17
+ #
18
+ # @return [Integer]
19
+ def purchased = @hash["purchased"]
20
+
21
+ # Number of consumed lookups off this purchase.
22
+ #
23
+ # @return [Integer]
24
+ def consumed = @hash["consumed"]
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated from the OpenAPI spec. Do not edit.
4
+
5
+ module AddressZen
6
+ module Types
7
+ # API Key Daily Limit
8
+ class ApiKeyDailyLimit < Model
9
+ # `number` or `null`. The daily lookup limit currently set on your key. `null` means the limit
10
+ # is currently disabled.
11
+ #
12
+ # @return [Integer, nil]
13
+ def limit = @hash["limit"]
14
+
15
+ # Number of lookups performed today which count towards your daily limit.
16
+ #
17
+ # @return [Integer]
18
+ def consumed = @hash["consumed"]
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,202 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated from the OpenAPI spec. Do not edit.
4
+
5
+ module AddressZen
6
+ module Types
7
+ # API Key Dataset Availability
8
+ #
9
+ # Indicates which datasets are available and added by default to the address responses
10
+ class ApiKeyDatasets < Model
11
+ # UK Main Address File (Postcode Address File)
12
+ #
13
+ # @return [Boolean]
14
+ def paf = @hash["paf"]
15
+
16
+ # UK Property Alias dataset
17
+ #
18
+ # @return [Boolean]
19
+ def pafa = @hash["pafa"]
20
+
21
+ # UK Welsh Language Dataset
22
+ #
23
+ # @return [Boolean]
24
+ def pafw = @hash["pafw"]
25
+
26
+ # UK Multiple Residence Dataset
27
+ #
28
+ # @return [Boolean]
29
+ def mr = @hash["mr"]
30
+
31
+ # UK Not Yet Built Dataset
32
+ #
33
+ # @return [Boolean]
34
+ def nyb = @hash["nyb"]
35
+
36
+ # UK AddressBase dataset
37
+ #
38
+ # @return [Boolean]
39
+ def ab = @hash["ab"]
40
+
41
+ # UK AddressBase Premium dataset
42
+ #
43
+ # @return [Boolean, nil]
44
+ def abp = @hash["abp"]
45
+
46
+ # Northern Ireland Pointer Dataset
47
+ #
48
+ # @return [Boolean]
49
+ def nip = @hash["nip"]
50
+
51
+ # US Address Dataset
52
+ #
53
+ # @return [Boolean]
54
+ def usps = @hash["usps"]
55
+
56
+ # Republic of Ireland: Eircode Address Database
57
+ #
58
+ # @return [Boolean]
59
+ def ecad = @hash["ecad"]
60
+
61
+ # Republic of Ireland: Eircode Address File
62
+ #
63
+ # @return [Boolean]
64
+ def ecaf = @hash["ecaf"]
65
+
66
+ # Australia: Geocoded National Address File
67
+ #
68
+ # @return [Boolean]
69
+ def gnaf = @hash["gnaf"]
70
+
71
+ # Asia Pacific Address File
72
+ #
73
+ # @return [Boolean]
74
+ def hereap = @hash["hereap"]
75
+
76
+ # Hong Kong Address File
77
+ #
78
+ # @return [Boolean]
79
+ def herehk = @hash["herehk"]
80
+
81
+ # India Address File
82
+ #
83
+ # @return [Boolean]
84
+ def herei = @hash["herei"]
85
+
86
+ # Macau Address File
87
+ #
88
+ # @return [Boolean]
89
+ def herem = @hash["herem"]
90
+
91
+ # Middle East and Africa Address File
92
+ #
93
+ # @return [Boolean]
94
+ def heremea = @hash["heremea"]
95
+
96
+ # Middle East and Africa Standalone Intermediate Maps Address File
97
+ #
98
+ # @return [Boolean]
99
+ def heremeas = @hash["heremeas"]
100
+
101
+ # North America Address File
102
+ #
103
+ # @return [Boolean]
104
+ def herena = @hash["herena"]
105
+
106
+ # Oceania Address File
107
+ #
108
+ # @return [Boolean]
109
+ def hereo = @hash["hereo"]
110
+
111
+ # South America Address File
112
+ #
113
+ # @return [Boolean]
114
+ def heresa = @hash["heresa"]
115
+
116
+ # Taiwan Address File
117
+ #
118
+ # @return [Boolean]
119
+ def heret = @hash["heret"]
120
+
121
+ # Eastern Europe Address File
122
+ #
123
+ # @return [Boolean]
124
+ def hereee = @hash["hereee"]
125
+
126
+ # Western Europe Address File
127
+ #
128
+ # @return [Boolean]
129
+ def herewe = @hash["herewe"]
130
+
131
+ # Phone validation is enabled
132
+ #
133
+ # @return [Boolean]
134
+ def phone = @hash["phone"]
135
+
136
+ # Email validation is enabled
137
+ #
138
+ # @return [Boolean]
139
+ def email = @hash["email"]
140
+
141
+ # Netherlands: Kadaster BAG 2.0 Address File
142
+ #
143
+ # @return [Boolean]
144
+ def kadaster = @hash["kadaster"]
145
+
146
+ # Norway: Kartverket Address File
147
+ #
148
+ # @return [Boolean]
149
+ def kartverket = @hash["kartverket"]
150
+
151
+ # South Korea: MOIS Address File
152
+ #
153
+ # @return [Boolean]
154
+ def mois = @hash["mois"]
155
+
156
+ # Denmark: Danmarks Adresseregister (DAR)
157
+ #
158
+ # @return [Boolean]
159
+ def sdfi = @hash["sdfi"]
160
+
161
+ # Canada: Statistics Canada National Address Register
162
+ #
163
+ # @return [Boolean]
164
+ def cannar = @hash["cannar"]
165
+
166
+ # Belgium: FOD BOSA Address File
167
+ #
168
+ # @return [Boolean]
169
+ def fodbosa = @hash["fodbosa"]
170
+
171
+ # Japan: UPU Address File
172
+ #
173
+ # @return [Boolean]
174
+ def upujp = @hash["upujp"]
175
+
176
+ # Austria: BEV Address File
177
+ #
178
+ # @return [Boolean]
179
+ def bev = @hash["bev"]
180
+
181
+ # France: BAN (Base Adresse Nationale)
182
+ #
183
+ # @return [Boolean]
184
+ def ban = @hash["ban"]
185
+
186
+ # Switzerland and Liechtenstein: Swisstopo Address File
187
+ #
188
+ # @return [Boolean]
189
+ def swt = @hash["swt"]
190
+
191
+ # UK GBR Cleanse
192
+ #
193
+ # @return [Boolean]
194
+ def gbrcleanse = @hash["gbrcleanse"]
195
+
196
+ # US CASS Cleanse
197
+ #
198
+ # @return [Boolean]
199
+ def uspscleanse = @hash["uspscleanse"]
200
+ end
201
+ end
202
+ end
@@ -0,0 +1,90 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated from the OpenAPI spec. Do not edit.
4
+
5
+ module AddressZen
6
+ module Types
7
+ # API Key Details
8
+ class ApiKeyDetails < Model
9
+ # A name for the key
10
+ #
11
+ # @return [String]
12
+ def name = @hash["name"]
13
+
14
+ # A list of available contexts for a key
15
+ #
16
+ # @return [Array<Types::AvailableContext>]
17
+ def contexts
18
+ read("contexts") { |v| v.map { |item| Types::AvailableContext.from_hash(item) } }
19
+ end
20
+
21
+ # @return [Integer]
22
+ def lookups_remaining = @hash["lookups_remaining"]
23
+
24
+ # API Key Daily Limit
25
+ #
26
+ # @return [Types::ApiKeyDailyLimit]
27
+ def daily_limit = read("daily_limit") { |v| Types::ApiKeyDailyLimit.from_hash(v) }
28
+
29
+ # API Key Monthly Limit
30
+ #
31
+ # @return [Types::ApiKeyMonthlyLimit]
32
+ def monthly_limit = read("monthly_limit") { |v| Types::ApiKeyMonthlyLimit.from_hash(v) }
33
+
34
+ # API Key Individual Limit
35
+ #
36
+ # @return [Types::ApiKeyIndividualLimit]
37
+ def individual_limit
38
+ read("individual_limit") { |v| Types::ApiKeyIndividualLimit.from_hash(v) }
39
+ end
40
+
41
+ # A list of allowed URLs. An empty list disables the check.
42
+ #
43
+ # @return [Array<String>]
44
+ def allowed_urls = @hash["allowed_urls"]
45
+
46
+ # Number of days to preserve personal data stored in your key usage history. Set to 0 to
47
+ # prevent personal data storage
48
+ #
49
+ # @return [Integer]
50
+ def redact_days = @hash["redact_days"]
51
+
52
+ # API Key Notifications
53
+ #
54
+ # @return [Types::ApiKeyNotifications]
55
+ def notifications = read("notifications") { |v| Types::ApiKeyNotifications.from_hash(v) }
56
+
57
+ # Indicates which datasets are available and added by default to the address responses
58
+ #
59
+ # @return [Types::ApiKeyDatasets]
60
+ def datasets = read("datasets") { |v| Types::ApiKeyDatasets.from_hash(v) }
61
+
62
+ # Automated topup status
63
+ #
64
+ # @return [Types::ApiKeyAutomatedTopup]
65
+ def automated_topups
66
+ read("automated_topups") { |v| Types::ApiKeyAutomatedTopup.from_hash(v) }
67
+ end
68
+
69
+ # Current balance purchases attached to key.
70
+ #
71
+ # @return [Array<Types::ApiKeyCurrentPurchase>]
72
+ def current_purchases
73
+ read("current_purchases") do |v|
74
+ v.map { |item| Types::ApiKeyCurrentPurchase.from_hash(item) }
75
+ end
76
+ end
77
+
78
+ # Accept IP addresses forwarded in the `AZ-Source-IP` header
79
+ #
80
+ # @return [Boolean]
81
+ def ip_forwarding = @hash["ip_forwarding"]
82
+
83
+ # Whether the key is enrolled in the premier support program and monitored closely by our
84
+ # devops team. Read-only; managed by our team.
85
+ #
86
+ # @return [Boolean]
87
+ def premier_support = @hash["premier_support"]
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated from the OpenAPI spec. Do not edit.
4
+
5
+ module AddressZen
6
+ module Types
7
+ # API Key Individual Limit
8
+ class ApiKeyIndividualLimit < Model
9
+ # `number` or `null` Limit set on the number of lookups that can be performed from a single IP
10
+ # address. `null` means the limit is currently disabled.
11
+ #
12
+ # @return [Integer, nil]
13
+ def limit = @hash["limit"]
14
+ end
15
+ end
16
+ end