ideal_postcodes 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/ci.yml +22 -0
  3. data/lib/ideal_postcodes.rb +1 -1
  4. data/lib/idealpostcodes/address.rb +28 -28
  5. data/lib/idealpostcodes/errors.rb +31 -26
  6. data/lib/idealpostcodes/key.rb +12 -11
  7. data/lib/idealpostcodes/postcode.rb +21 -20
  8. data/lib/idealpostcodes/util.rb +38 -25
  9. data/lib/idealpostcodes/version.rb +2 -2
  10. data/lib/idealpostcodes.rb +104 -92
  11. data/spec/addresses_spec.rb +63 -63
  12. data/spec/idealpostcodes_spec.rb +51 -51
  13. data/spec/keys_spec.rb +21 -21
  14. data/spec/postcodes_spec.rb +74 -63
  15. data/spec/spec_helper.rb +50 -29
  16. data/spec/vcr_cassettes/IdealPostcodes_Address_lookup_raises_an_exception_if_invalid_key.yml +39 -39
  17. data/spec/vcr_cassettes/IdealPostcodes_Address_lookup_raises_an_exception_if_limit_breached.yml +39 -39
  18. data/spec/vcr_cassettes/IdealPostcodes_Address_lookup_raises_an_exception_if_no_lookups_remaining.yml +39 -39
  19. data/spec/vcr_cassettes/IdealPostcodes_Address_lookup_returns_an_address_for_a_valid_UDPRN.yml +71 -71
  20. data/spec/vcr_cassettes/IdealPostcodes_Address_lookup_returns_nil_for_an_invalid_UDPRN.yml +39 -39
  21. data/spec/vcr_cassettes/IdealPostcodes_Address_search_is_sensitive_to_limit.yml +78 -78
  22. data/spec/vcr_cassettes/IdealPostcodes_Address_search_is_sensitive_to_page.yml +366 -366
  23. data/spec/vcr_cassettes/IdealPostcodes_Address_search_raises_an_exception_if_invalid_key.yml +39 -39
  24. data/spec/vcr_cassettes/IdealPostcodes_Address_search_raises_an_exception_if_limit_breached.yml +39 -39
  25. data/spec/vcr_cassettes/IdealPostcodes_Address_search_raises_an_exception_if_no_lookups_remaining.yml +39 -39
  26. data/spec/vcr_cassettes/IdealPostcodes_Address_search_returns_results_in_a_SearchResult_object.yml +270 -270
  27. data/spec/vcr_cassettes/IdealPostcodes_Key_lookup_details_returns_key_details.yml +58 -58
  28. data/spec/vcr_cassettes/IdealPostcodes_Key_lookup_returns_the_availability_status_of_a_key_false_key_.yml +42 -42
  29. data/spec/vcr_cassettes/IdealPostcodes_Key_lookup_returns_the_availability_status_of_a_key_true_key_.yml +42 -42
  30. data/spec/vcr_cassettes/IdealPostcodes_Postcode_find_by_location_is_sensitive_to_limit_parameter.yml +49 -49
  31. data/spec/vcr_cassettes/IdealPostcodes_Postcode_find_by_location_is_sensitive_to_radius_parament.yml +130 -130
  32. data/spec/vcr_cassettes/IdealPostcodes_Postcode_find_by_location_returns_an_array_of_postcodes_and_locations.yml +81 -81
  33. data/spec/vcr_cassettes/IdealPostcodes_Postcode_find_by_location_returns_an_empty_array_if_no_results_are_found.yml +40 -40
  34. data/spec/vcr_cassettes/IdealPostcodes_Postcode_lookup_raises_an_exception_if_invalid_key.yml +39 -39
  35. data/spec/vcr_cassettes/IdealPostcodes_Postcode_lookup_raises_an_exception_if_key_has_run_out_of_balance.yml +39 -39
  36. data/spec/vcr_cassettes/IdealPostcodes_Postcode_lookup_raises_an_exception_if_limit_has_been_reached.yml +39 -39
  37. data/spec/vcr_cassettes/IdealPostcodes_Postcode_lookup_returns_a_list_of_addresses_for_a_postcode.yml +265 -265
  38. data/spec/vcr_cassettes/IdealPostcodes_Postcode_lookup_returns_an_empty_array_if_postcode_does_not_exist.yml +39 -39
  39. data/spec/vcr_cassettes/IdealPostcodes_key_available_returns_false_if_key_is_unavailable.yml +42 -42
  40. data/spec/vcr_cassettes/IdealPostcodes_key_available_returns_true_if_key_is_available.yml +42 -42
  41. data/spec/vcr_cassettes/IdealPostcodes_key_details_raises_an_exception_if_no_secret_is_provided.yml +42 -42
  42. data/spec/vcr_cassettes/IdealPostcodes_key_details_returns_key_information.yml +58 -58
  43. data/spec/vcr_cassettes/IdealPostcodes_request_generates_a_HTTP_request.yml +265 -265
  44. data/spec/vcr_cassettes/IdealPostcodes_request_raises_authentication_error_if_invalid_key_is_provided.yml +39 -39
  45. data/spec/vcr_cassettes/IdealPostcodes_request_raises_limit_reached_error_if_a_limit_has_been_breached.yml +39 -39
  46. data/spec/vcr_cassettes/IdealPostcodes_request_raises_token_exhausted_error_if_key_balance_is_depleted.yml +39 -39
  47. metadata +4 -5
  48. data/.travis.yml +0 -9
@@ -1,268 +1,268 @@
1
1
  ---
2
2
  http_interactions:
3
- - request:
4
- method: get
5
- uri: https://localhost:1337/v1/postcodes/ID1%201QD?api_key=gandhi
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept:
11
- - '*/*; q=0.5, application/xml'
12
- Accept-Encoding:
13
- - gzip, deflate
14
- User-Agent:
15
- - Ruby
16
- response:
17
- status:
18
- code: 200
19
- message: OK
20
- headers:
21
- Access-Control-Allow-Origin:
22
- - '*'
23
- Content-Type:
24
- - application/json; charset=utf-8
25
- Content-Length:
26
- - '6683'
27
- Etag:
28
- - '"1136868456"'
29
- Date:
30
- - Fri, 12 Dec 2014 17:40:27 GMT
31
- Connection:
32
- - keep-alive
33
- body:
34
- encoding: UTF-8
35
- string: |-
36
- {
37
- "result": [
38
- {
39
- "postcode": "ID1 1QD",
40
- "postcode_inward": "1QD",
41
- "postcode_outward": "ID1",
42
- "post_town": "LONDON",
43
- "dependant_locality": "",
44
- "double_dependant_locality": "",
45
- "thoroughfare": "Barons Court Road",
46
- "dependant_thoroughfare": "",
47
- "building_number": "2",
48
- "building_name": "",
49
- "sub_building_name": "",
50
- "po_box": "",
51
- "department_name": "",
52
- "organisation_name": "",
53
- "udprn": 25962203,
54
- "postcode_type": "S",
55
- "su_organisation_indicator": "",
56
- "delivery_point_suffix": "1G",
57
- "line_1": "2 Barons Court Road",
58
- "line_2": "",
59
- "line_3": "",
60
- "premise": "2",
61
- "country": "England",
62
- "county": "",
63
- "district": "Hammersmith and Fulham",
64
- "ward": "North End",
65
- "longitude": -0.208644362766368,
66
- "latitude": 51.4899488390558,
67
- "eastings": 524466,
68
- "northings": 178299
69
- },
70
- {
71
- "postcode": "ID1 1QD",
72
- "postcode_inward": "1QD",
73
- "postcode_outward": "ID1",
74
- "post_town": "LONDON",
75
- "dependant_locality": "",
76
- "double_dependant_locality": "",
77
- "thoroughfare": "Barons Court Road",
78
- "dependant_thoroughfare": "",
79
- "building_number": "2",
80
- "building_name": "Basement Flat",
81
- "sub_building_name": "",
82
- "po_box": "",
83
- "department_name": "",
84
- "organisation_name": "",
85
- "udprn": 52618355,
86
- "postcode_type": "S",
87
- "su_organisation_indicator": "",
88
- "delivery_point_suffix": "3A",
89
- "line_1": "Basement Flat",
90
- "line_2": "2 Barons Court Road",
91
- "line_3": "",
92
- "premise": "Basement Flat, 2",
93
- "country": "England",
94
- "county": "",
95
- "district": "Hammersmith and Fulham",
96
- "ward": "North End",
97
- "longitude": -0.208644362766368,
98
- "latitude": 51.4899488390558,
99
- "eastings": 524466,
100
- "northings": 178299
101
- },
102
- {
103
- "postcode": "ID1 1QD",
104
- "postcode_inward": "1QD",
105
- "postcode_outward": "ID1",
106
- "post_town": "LONDON",
107
- "dependant_locality": "",
108
- "double_dependant_locality": "",
109
- "thoroughfare": "Barons Court Road",
110
- "dependant_thoroughfare": "",
111
- "building_number": "4",
112
- "building_name": "",
113
- "sub_building_name": "",
114
- "po_box": "",
115
- "department_name": "",
116
- "organisation_name": "",
117
- "udprn": 25962215,
118
- "postcode_type": "S",
119
- "su_organisation_indicator": "",
120
- "delivery_point_suffix": "1W",
121
- "line_1": "4 Barons Court Road",
122
- "line_2": "",
123
- "line_3": "",
124
- "premise": "4",
125
- "country": "England",
126
- "county": "",
127
- "district": "Hammersmith and Fulham",
128
- "ward": "North End",
129
- "longitude": -0.208644362766368,
130
- "latitude": 51.4899488390558,
131
- "eastings": 524466,
132
- "northings": 178299
133
- },
134
- {
135
- "postcode": "ID1 1QD",
136
- "postcode_inward": "1QD",
137
- "postcode_outward": "ID1",
138
- "post_town": "LONDON",
139
- "dependant_locality": "",
140
- "double_dependant_locality": "",
141
- "thoroughfare": "Barons Court Road",
142
- "dependant_thoroughfare": "",
143
- "building_number": "4",
144
- "building_name": "",
145
- "sub_building_name": "Basement",
146
- "po_box": "",
147
- "department_name": "",
148
- "organisation_name": "",
149
- "udprn": 25962189,
150
- "postcode_type": "S",
151
- "su_organisation_indicator": "",
152
- "delivery_point_suffix": "2P",
153
- "line_1": "Basement",
154
- "line_2": "4 Barons Court Road",
155
- "line_3": "",
156
- "premise": "Basement, 4",
157
- "country": "England",
158
- "county": "",
159
- "district": "Hammersmith and Fulham",
160
- "ward": "North End",
161
- "longitude": -0.208644362766368,
162
- "latitude": 51.4899488390558,
163
- "eastings": 524466,
164
- "northings": 178299
165
- },
166
- {
167
- "postcode": "ID1 1QD",
168
- "postcode_inward": "1QD",
169
- "postcode_outward": "ID1",
170
- "post_town": "LONDON",
171
- "dependant_locality": "",
172
- "double_dependant_locality": "",
173
- "thoroughfare": "Barons Court Road",
174
- "dependant_thoroughfare": "",
175
- "building_number": "6",
176
- "building_name": "",
177
- "sub_building_name": "",
178
- "po_box": "",
179
- "department_name": "",
180
- "organisation_name": "",
181
- "udprn": 25962218,
182
- "postcode_type": "S",
183
- "su_organisation_indicator": "",
184
- "delivery_point_suffix": "1Y",
185
- "line_1": "6 Barons Court Road",
186
- "line_2": "",
187
- "line_3": "",
188
- "premise": "6",
189
- "country": "England",
190
- "county": "",
191
- "district": "Hammersmith and Fulham",
192
- "ward": "North End",
193
- "longitude": -0.208644362766368,
194
- "latitude": 51.4899488390558,
195
- "eastings": 524466,
196
- "northings": 178299
197
- },
198
- {
199
- "postcode": "ID1 1QD",
200
- "postcode_inward": "1QD",
201
- "postcode_outward": "ID1",
202
- "post_town": "LONDON",
203
- "dependant_locality": "",
204
- "double_dependant_locality": "",
205
- "thoroughfare": "Barons Court Road",
206
- "dependant_thoroughfare": "",
207
- "building_number": "8",
208
- "building_name": "",
209
- "sub_building_name": "",
210
- "po_box": "",
211
- "department_name": "",
212
- "organisation_name": "",
213
- "udprn": 25962219,
214
- "postcode_type": "S",
215
- "su_organisation_indicator": "",
216
- "delivery_point_suffix": "1Z",
217
- "line_1": "8 Barons Court Road",
218
- "line_2": "",
219
- "line_3": "",
220
- "premise": "8",
221
- "country": "England",
222
- "county": "",
223
- "district": "Hammersmith and Fulham",
224
- "ward": "North End",
225
- "longitude": -0.208644362766368,
226
- "latitude": 51.4899488390558,
227
- "eastings": 524466,
228
- "northings": 178299
229
- },
230
- {
231
- "postcode": "ID1 1QD",
232
- "postcode_inward": "1QD",
233
- "postcode_outward": "ID1",
234
- "post_town": "LONDON",
235
- "dependant_locality": "",
236
- "double_dependant_locality": "",
237
- "thoroughfare": "Barons Court Road",
238
- "dependant_thoroughfare": "",
239
- "building_number": "59",
240
- "building_name": "",
241
- "sub_building_name": "",
242
- "po_box": "",
243
- "department_name": "",
244
- "organisation_name": "ID Consulting Limited",
245
- "udprn": 25946509,
246
- "postcode_type": "S",
247
- "su_organisation_indicator": "Y",
248
- "delivery_point_suffix": "1N",
249
- "line_1": "ID Consulting Limited",
250
- "line_2": "59 Barons Court Road",
251
- "line_3": "",
252
- "premise": "59",
253
- "country": "England",
254
- "county": "",
255
- "district": "Hammersmith and Fulham",
256
- "ward": "North End",
257
- "longitude": -0.208644362766368,
258
- "latitude": 51.4899488390558,
259
- "eastings": 524466,
260
- "northings": 178299
261
- }
262
- ],
263
- "code": 2000,
264
- "message": "Success"
265
- }
266
- http_version:
267
- recorded_at: Fri, 12 Dec 2014 17:40:27 GMT
3
+ - request:
4
+ method: get
5
+ uri: https://localhost:1337/v1/postcodes/ID1%201QD?api_key=gandhi
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ""
9
+ headers:
10
+ Accept:
11
+ - "*/*; q=0.5, application/xml"
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Access-Control-Allow-Origin:
22
+ - "*"
23
+ Content-Type:
24
+ - application/json; charset=utf-8
25
+ Content-Length:
26
+ - "6683"
27
+ Etag:
28
+ - '"1136868456"'
29
+ Date:
30
+ - Fri, 12 Dec 2014 17:40:27 GMT
31
+ Connection:
32
+ - keep-alive
33
+ body:
34
+ encoding: UTF-8
35
+ string: |-
36
+ {
37
+ "result": [
38
+ {
39
+ "postcode": "ID1 1QD",
40
+ "postcode_inward": "1QD",
41
+ "postcode_outward": "ID1",
42
+ "post_town": "LONDON",
43
+ "dependant_locality": "",
44
+ "double_dependant_locality": "",
45
+ "thoroughfare": "Barons Court Road",
46
+ "dependant_thoroughfare": "",
47
+ "building_number": "2",
48
+ "building_name": "",
49
+ "sub_building_name": "",
50
+ "po_box": "",
51
+ "department_name": "",
52
+ "organisation_name": "",
53
+ "udprn": 25962203,
54
+ "postcode_type": "S",
55
+ "su_organisation_indicator": "",
56
+ "delivery_point_suffix": "1G",
57
+ "line_1": "2 Barons Court Road",
58
+ "line_2": "",
59
+ "line_3": "",
60
+ "premise": "2",
61
+ "country": "England",
62
+ "county": "",
63
+ "district": "Hammersmith and Fulham",
64
+ "ward": "North End",
65
+ "longitude": -0.208644362766368,
66
+ "latitude": 51.4899488390558,
67
+ "eastings": 524466,
68
+ "northings": 178299
69
+ },
70
+ {
71
+ "postcode": "ID1 1QD",
72
+ "postcode_inward": "1QD",
73
+ "postcode_outward": "ID1",
74
+ "post_town": "LONDON",
75
+ "dependant_locality": "",
76
+ "double_dependant_locality": "",
77
+ "thoroughfare": "Barons Court Road",
78
+ "dependant_thoroughfare": "",
79
+ "building_number": "2",
80
+ "building_name": "Basement Flat",
81
+ "sub_building_name": "",
82
+ "po_box": "",
83
+ "department_name": "",
84
+ "organisation_name": "",
85
+ "udprn": 52618355,
86
+ "postcode_type": "S",
87
+ "su_organisation_indicator": "",
88
+ "delivery_point_suffix": "3A",
89
+ "line_1": "Basement Flat",
90
+ "line_2": "2 Barons Court Road",
91
+ "line_3": "",
92
+ "premise": "Basement Flat, 2",
93
+ "country": "England",
94
+ "county": "",
95
+ "district": "Hammersmith and Fulham",
96
+ "ward": "North End",
97
+ "longitude": -0.208644362766368,
98
+ "latitude": 51.4899488390558,
99
+ "eastings": 524466,
100
+ "northings": 178299
101
+ },
102
+ {
103
+ "postcode": "ID1 1QD",
104
+ "postcode_inward": "1QD",
105
+ "postcode_outward": "ID1",
106
+ "post_town": "LONDON",
107
+ "dependant_locality": "",
108
+ "double_dependant_locality": "",
109
+ "thoroughfare": "Barons Court Road",
110
+ "dependant_thoroughfare": "",
111
+ "building_number": "4",
112
+ "building_name": "",
113
+ "sub_building_name": "",
114
+ "po_box": "",
115
+ "department_name": "",
116
+ "organisation_name": "",
117
+ "udprn": 25962215,
118
+ "postcode_type": "S",
119
+ "su_organisation_indicator": "",
120
+ "delivery_point_suffix": "1W",
121
+ "line_1": "4 Barons Court Road",
122
+ "line_2": "",
123
+ "line_3": "",
124
+ "premise": "4",
125
+ "country": "England",
126
+ "county": "",
127
+ "district": "Hammersmith and Fulham",
128
+ "ward": "North End",
129
+ "longitude": -0.208644362766368,
130
+ "latitude": 51.4899488390558,
131
+ "eastings": 524466,
132
+ "northings": 178299
133
+ },
134
+ {
135
+ "postcode": "ID1 1QD",
136
+ "postcode_inward": "1QD",
137
+ "postcode_outward": "ID1",
138
+ "post_town": "LONDON",
139
+ "dependant_locality": "",
140
+ "double_dependant_locality": "",
141
+ "thoroughfare": "Barons Court Road",
142
+ "dependant_thoroughfare": "",
143
+ "building_number": "4",
144
+ "building_name": "",
145
+ "sub_building_name": "Basement",
146
+ "po_box": "",
147
+ "department_name": "",
148
+ "organisation_name": "",
149
+ "udprn": 25962189,
150
+ "postcode_type": "S",
151
+ "su_organisation_indicator": "",
152
+ "delivery_point_suffix": "2P",
153
+ "line_1": "Basement",
154
+ "line_2": "4 Barons Court Road",
155
+ "line_3": "",
156
+ "premise": "Basement, 4",
157
+ "country": "England",
158
+ "county": "",
159
+ "district": "Hammersmith and Fulham",
160
+ "ward": "North End",
161
+ "longitude": -0.208644362766368,
162
+ "latitude": 51.4899488390558,
163
+ "eastings": 524466,
164
+ "northings": 178299
165
+ },
166
+ {
167
+ "postcode": "ID1 1QD",
168
+ "postcode_inward": "1QD",
169
+ "postcode_outward": "ID1",
170
+ "post_town": "LONDON",
171
+ "dependant_locality": "",
172
+ "double_dependant_locality": "",
173
+ "thoroughfare": "Barons Court Road",
174
+ "dependant_thoroughfare": "",
175
+ "building_number": "6",
176
+ "building_name": "",
177
+ "sub_building_name": "",
178
+ "po_box": "",
179
+ "department_name": "",
180
+ "organisation_name": "",
181
+ "udprn": 25962218,
182
+ "postcode_type": "S",
183
+ "su_organisation_indicator": "",
184
+ "delivery_point_suffix": "1Y",
185
+ "line_1": "6 Barons Court Road",
186
+ "line_2": "",
187
+ "line_3": "",
188
+ "premise": "6",
189
+ "country": "England",
190
+ "county": "",
191
+ "district": "Hammersmith and Fulham",
192
+ "ward": "North End",
193
+ "longitude": -0.208644362766368,
194
+ "latitude": 51.4899488390558,
195
+ "eastings": 524466,
196
+ "northings": 178299
197
+ },
198
+ {
199
+ "postcode": "ID1 1QD",
200
+ "postcode_inward": "1QD",
201
+ "postcode_outward": "ID1",
202
+ "post_town": "LONDON",
203
+ "dependant_locality": "",
204
+ "double_dependant_locality": "",
205
+ "thoroughfare": "Barons Court Road",
206
+ "dependant_thoroughfare": "",
207
+ "building_number": "8",
208
+ "building_name": "",
209
+ "sub_building_name": "",
210
+ "po_box": "",
211
+ "department_name": "",
212
+ "organisation_name": "",
213
+ "udprn": 25962219,
214
+ "postcode_type": "S",
215
+ "su_organisation_indicator": "",
216
+ "delivery_point_suffix": "1Z",
217
+ "line_1": "8 Barons Court Road",
218
+ "line_2": "",
219
+ "line_3": "",
220
+ "premise": "8",
221
+ "country": "England",
222
+ "county": "",
223
+ "district": "Hammersmith and Fulham",
224
+ "ward": "North End",
225
+ "longitude": -0.208644362766368,
226
+ "latitude": 51.4899488390558,
227
+ "eastings": 524466,
228
+ "northings": 178299
229
+ },
230
+ {
231
+ "postcode": "ID1 1QD",
232
+ "postcode_inward": "1QD",
233
+ "postcode_outward": "ID1",
234
+ "post_town": "LONDON",
235
+ "dependant_locality": "",
236
+ "double_dependant_locality": "",
237
+ "thoroughfare": "Barons Court Road",
238
+ "dependant_thoroughfare": "",
239
+ "building_number": "59",
240
+ "building_name": "",
241
+ "sub_building_name": "",
242
+ "po_box": "",
243
+ "department_name": "",
244
+ "organisation_name": "ID Consulting Limited",
245
+ "udprn": 25946509,
246
+ "postcode_type": "S",
247
+ "su_organisation_indicator": "Y",
248
+ "delivery_point_suffix": "1N",
249
+ "line_1": "ID Consulting Limited",
250
+ "line_2": "59 Barons Court Road",
251
+ "line_3": "",
252
+ "premise": "59",
253
+ "country": "England",
254
+ "county": "",
255
+ "district": "Hammersmith and Fulham",
256
+ "ward": "North End",
257
+ "longitude": -0.208644362766368,
258
+ "latitude": 51.4899488390558,
259
+ "eastings": 524466,
260
+ "northings": 178299
261
+ }
262
+ ],
263
+ "code": 2000,
264
+ "message": "Success"
265
+ }
266
+ http_version:
267
+ recorded_at: Fri, 12 Dec 2014 17:40:27 GMT
268
268
  recorded_with: VCR 2.9.3
@@ -1,42 +1,42 @@
1
1
  ---
2
2
  http_interactions:
3
- - request:
4
- method: get
5
- uri: https://localhost:1337/v1/postcodes/ID1%201QD?api_key=foo
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept:
11
- - '*/*; q=0.5, application/xml'
12
- Accept-Encoding:
13
- - gzip, deflate
14
- User-Agent:
15
- - Ruby
16
- response:
17
- status:
18
- code: 401
19
- message: Unauthorized
20
- headers:
21
- Access-Control-Allow-Origin:
22
- - '*'
23
- Content-Type:
24
- - application/json; charset=utf-8
25
- Content-Length:
26
- - '135'
27
- Etag:
28
- - '"-632160061"'
29
- Date:
30
- - Fri, 12 Dec 2014 17:40:27 GMT
31
- Connection:
32
- - keep-alive
33
- body:
34
- encoding: UTF-8
35
- string: |-
36
- {
37
- "code": 4010,
38
- "message": "Invalid Key. For more information see http://ideal-postcodes.co.uk/documentation/response-codes#4010"
39
- }
40
- http_version:
41
- recorded_at: Fri, 12 Dec 2014 17:40:27 GMT
3
+ - request:
4
+ method: get
5
+ uri: https://localhost:1337/v1/postcodes/ID1%201QD?api_key=foo
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ""
9
+ headers:
10
+ Accept:
11
+ - "*/*; q=0.5, application/xml"
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 401
19
+ message: Unauthorized
20
+ headers:
21
+ Access-Control-Allow-Origin:
22
+ - "*"
23
+ Content-Type:
24
+ - application/json; charset=utf-8
25
+ Content-Length:
26
+ - "135"
27
+ Etag:
28
+ - '"-632160061"'
29
+ Date:
30
+ - Fri, 12 Dec 2014 17:40:27 GMT
31
+ Connection:
32
+ - keep-alive
33
+ body:
34
+ encoding: UTF-8
35
+ string: |-
36
+ {
37
+ "code": 4010,
38
+ "message": "Invalid Key. For more information see http://ideal-postcodes.co.uk/documentation/response-codes#4010"
39
+ }
40
+ http_version:
41
+ recorded_at: Fri, 12 Dec 2014 17:40:27 GMT
42
42
  recorded_with: VCR 2.9.3