access 2.0.3 → 2.0.4

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 (36) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +0 -2
  3. data/lib/access/request.rb +2 -0
  4. data/lib/access/version.rb +1 -1
  5. data/test/access/category_test.rb +3 -4
  6. data/test/fixtures/autocomplete_search.yml +29 -32
  7. data/test/fixtures/autocomplete_search_categories.yml +8 -10
  8. data/test/fixtures/autocomplete_search_locations.yml +4 -6
  9. data/test/fixtures/autocomplete_search_offers.yml +9 -11
  10. data/test/fixtures/autocomplete_search_stores.yml +11 -13
  11. data/test/fixtures/category_find.yml +24 -19
  12. data/test/fixtures/category_search.yml +6254 -138
  13. data/test/fixtures/category_search_fail_member_key.yml +4 -6
  14. data/test/fixtures/filter_find.yml +6 -8
  15. data/test/fixtures/filter_search.yml +7 -9
  16. data/test/fixtures/location_find.yml +4 -6
  17. data/test/fixtures/location_search.yml +4 -6
  18. data/test/fixtures/location_search_fail_member_key.yml +4 -6
  19. data/test/fixtures/national_stores.yml +6 -8
  20. data/test/fixtures/oauth_application_find.yml +4 -6
  21. data/test/fixtures/oauth_application_search.yml +7 -9
  22. data/test/fixtures/oauth_application_token_find.yml +4 -6
  23. data/test/fixtures/oauth_application_token_search.yml +4 -6
  24. data/test/fixtures/offer_find.yml +137 -139
  25. data/test/fixtures/offer_search.yml +82 -84
  26. data/test/fixtures/offer_search_fail_member_key.yml +4 -6
  27. data/test/fixtures/redeem_offer_no_redeem_type.yml +19 -19
  28. data/test/fixtures/store_find.yml +81 -0
  29. data/test/fixtures/store_search.yml +17 -19
  30. data/test/fixtures/store_search_fail_member_key.yml +4 -6
  31. data/test/fixtures/subcategory_find.yml +24 -19
  32. data/test/fixtures/token_find.yml +89 -0
  33. data/test/fixtures/token_search.yml +31 -32
  34. data/test/fixtures/verify_filter.yml +14 -16
  35. data/test/fixtures/verify_token.yml +4 -6
  36. metadata +1 -1
@@ -71,19 +71,17 @@ http_interactions:
71
71
  Content-Type:
72
72
  - application/json
73
73
  Date:
74
- - Thu, 27 Aug 2015 20:17:38 GMT
74
+ - Fri, 11 Sep 2015 20:33:21 GMT
75
75
  Server:
76
76
  - nginx/1.6.2
77
- Strict-Transport-Security:
78
- - max-age=31536000
79
77
  X-Content-Type-Options:
80
78
  - nosniff
81
79
  X-Frame-Options:
82
80
  - SAMEORIGIN
83
81
  X-Request-Id:
84
- - 4a0787fd-c380-4af0-814a-8b722ef0c231
82
+ - 279a5614-58ab-4dce-b52a-879b47fd2d76
85
83
  X-Runtime:
86
- - '0.007779'
84
+ - '0.008999'
87
85
  X-Xss-Protection:
88
86
  - 1; mode=block
89
87
  Content-Length:
@@ -98,5 +96,5 @@ http_interactions:
98
96
  "status": 401
99
97
  }
100
98
  http_version:
101
- recorded_at: Thu, 27 Aug 2015 20:17:38 GMT
99
+ recorded_at: Fri, 11 Sep 2015 20:33:21 GMT
102
100
  recorded_with: VCR 2.9.3
@@ -171,25 +171,23 @@ http_interactions:
171
171
  Content-Type:
172
172
  - application/json
173
173
  Date:
174
- - Thu, 27 Aug 2015 20:17:40 GMT
174
+ - Fri, 11 Sep 2015 20:33:18 GMT
175
175
  Etag:
176
- - '"2ded6201c8066957f09645cfbac4b1a6"'
176
+ - '"3b24a9589e2b3a60e10a64353bf6118c"'
177
177
  Server:
178
178
  - nginx/1.6.2
179
- Strict-Transport-Security:
180
- - max-age=31536000
181
179
  X-Content-Type-Options:
182
180
  - nosniff
183
181
  X-Frame-Options:
184
182
  - SAMEORIGIN
185
183
  X-Request-Id:
186
- - d0425bcf-efaf-4649-8bf6-f0a459412eb0
184
+ - bd632205-475e-457c-ad4d-6e049c077827
187
185
  X-Runtime:
188
- - '0.015657'
186
+ - '0.026710'
189
187
  X-Xss-Protection:
190
188
  - 1; mode=block
191
189
  Content-Length:
192
- - '3360'
190
+ - '3725'
193
191
  Connection:
194
192
  - keep-alive
195
193
  body:
@@ -204,6 +202,7 @@ http_interactions:
204
202
  "category_parent_name": "Automotive",
205
203
  "category_parent_key": 51,
206
204
  "links": {
205
+ "show_category": "https://offer-demo.adcrws.com/v1/categories/1000",
207
206
  "show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
208
207
  "find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1000"
209
208
  },
@@ -212,6 +211,7 @@ http_interactions:
212
211
  "category_name": "Auto Parts",
213
212
  "category_key": 1001,
214
213
  "category_type": "subcategory",
214
+ "category_parent_name": "Automotive",
215
215
  "category_parent_key": 51,
216
216
  "links": {
217
217
  "show_category": "https://offer-demo.adcrws.com/v1/categories/1001",
@@ -219,10 +219,23 @@ http_interactions:
219
219
  "find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1001"
220
220
  }
221
221
  },
222
+ {
223
+ "category_name": "Auto Sales & Warranties",
224
+ "category_key": 1006,
225
+ "category_type": "subcategory",
226
+ "category_parent_name": "Automotive",
227
+ "category_parent_key": 51,
228
+ "links": {
229
+ "show_category": "https://offer-demo.adcrws.com/v1/categories/1006",
230
+ "show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
231
+ "find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1006"
232
+ }
233
+ },
222
234
  {
223
235
  "category_name": "Auto Service & Repair",
224
236
  "category_key": 1002,
225
237
  "category_type": "subcategory",
238
+ "category_parent_name": "Automotive",
226
239
  "category_parent_key": 51,
227
240
  "links": {
228
241
  "show_category": "https://offer-demo.adcrws.com/v1/categories/1002",
@@ -234,6 +247,7 @@ http_interactions:
234
247
  "category_name": "Car Wash & Detail",
235
248
  "category_key": 1003,
236
249
  "category_type": "subcategory",
250
+ "category_parent_name": "Automotive",
237
251
  "category_parent_key": 51,
238
252
  "links": {
239
253
  "show_category": "https://offer-demo.adcrws.com/v1/categories/1003",
@@ -245,6 +259,7 @@ http_interactions:
245
259
  "category_name": "Gas Station",
246
260
  "category_key": 1004,
247
261
  "category_type": "subcategory",
262
+ "category_parent_name": "Automotive",
248
263
  "category_parent_key": 51,
249
264
  "links": {
250
265
  "show_category": "https://offer-demo.adcrws.com/v1/categories/1004",
@@ -256,28 +271,18 @@ http_interactions:
256
271
  "category_name": "Tires",
257
272
  "category_key": 1005,
258
273
  "category_type": "subcategory",
274
+ "category_parent_name": "Automotive",
259
275
  "category_parent_key": 51,
260
276
  "links": {
261
277
  "show_category": "https://offer-demo.adcrws.com/v1/categories/1005",
262
278
  "show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
263
279
  "find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1005"
264
280
  }
265
- },
266
- {
267
- "category_name": "Auto Sales & Warranties",
268
- "category_key": 1006,
269
- "category_type": "subcategory",
270
- "category_parent_key": 51,
271
- "links": {
272
- "show_category": "https://offer-demo.adcrws.com/v1/categories/1006",
273
- "show_parent_category": "https://offer-demo.adcrws.com/v1/categories/51",
274
- "find_offers_in_this_category": "https://offer-demo.adcrws.com/v1/offers?category_key=1006"
275
- }
276
281
  }
277
282
  ]
278
283
  }
279
284
  ]
280
285
  }
281
286
  http_version:
282
- recorded_at: Thu, 27 Aug 2015 20:17:40 GMT
287
+ recorded_at: Fri, 11 Sep 2015 20:33:18 GMT
283
288
  recorded_with: VCR 2.9.3
@@ -332,4 +332,93 @@ http_interactions:
332
332
  }
333
333
  http_version:
334
334
  recorded_at: Thu, 27 Aug 2015 20:17:44 GMT
335
+ - request:
336
+ method: get
337
+ uri: https://token-demo.adcrws.com/v1/tokens/fb6e8034ec9970144e4e68eb3c8c7e84041695626eb3bbeac53a8335bf4cba68
338
+ body:
339
+ encoding: US-ASCII
340
+ string: ''
341
+ headers:
342
+ Access-Token:
343
+ - token_without_limit
344
+ Content-Type:
345
+ - application/json
346
+ Accept:
347
+ - application/json
348
+ response:
349
+ status:
350
+ code: 200
351
+ message: OK
352
+ headers:
353
+ Access-Control-Allow-Headers:
354
+ - Origin, X-Requested-With, Content-Type, Accept, Authorization, Access-Token
355
+ Access-Control-Allow-Methods:
356
+ - POST, GET, PUT, DELETE, OPTIONS
357
+ Access-Control-Max-Age:
358
+ - '1728000'
359
+ Access-Control-Request-Method:
360
+ - GET
361
+ Cache-Control:
362
+ - max-age=0, private, must-revalidate
363
+ Content-Type:
364
+ - application/json
365
+ Date:
366
+ - Fri, 11 Sep 2015 20:33:08 GMT
367
+ Etag:
368
+ - '"93cb5c6783a6c532d926e52e793451af"'
369
+ Server:
370
+ - nginx/1.6.2
371
+ X-Content-Type-Options:
372
+ - nosniff
373
+ X-Frame-Options:
374
+ - SAMEORIGIN
375
+ X-Request-Id:
376
+ - 9eb7291d-261f-41db-a4a3-777a44a5809e
377
+ X-Runtime:
378
+ - '0.016039'
379
+ X-Xss-Protection:
380
+ - 1; mode=block
381
+ Transfer-Encoding:
382
+ - chunked
383
+ Connection:
384
+ - keep-alive
385
+ body:
386
+ encoding: UTF-8
387
+ string: |-
388
+ {
389
+ "oauth_token": {
390
+ "application_id": 836,
391
+ "token": "fb6e8034ec9970144e4e68eb3c8c7e84041695626eb3bbeac53a8335bf4cba68",
392
+ "expires_in": null,
393
+ "revoked_at": null,
394
+ "created_at": "2015-09-08T11:02:21.256-06:00",
395
+ "oauth_access_token_id": 958,
396
+ "application_name": "Essenza Software (pcid:200110)",
397
+ "application_owner_id": 235589831,
398
+ "application_owner_type": "Program",
399
+ "program_id": 235589831,
400
+ "program_name": "Essenza Software",
401
+ "program_customer_identifier": "200110",
402
+ "program_start_dts": "2015-09-08T11:02:45.215-06:00",
403
+ "program_end_dts": "2018-09-08T11:02:45.215-06:00",
404
+ "organization_id": 2002090,
405
+ "organization_name": "Essenza Software",
406
+ "organization_customer_identifier": "147852",
407
+ "filter_id": 82,
408
+ "filter_name": "Auto, Dining, Entertainment, Golf, Health/Beauty, Home/Garden, Hotel, Movies, Services, Shopping, Travel",
409
+ "filter": "{\"offers\":[{\"terms\":{\"offer_set\":[\"DISCOUNT\"]}},{\"or\":[{\"terms\":{\"categories.category_key\":[51,39,59,48,53,1039,44,56,50,45,38]}},{\"terms\":{\"categories.category_parent_key\":[51,39,59,48,53,1039,44,56,50,45,38]}}]}],\"categories\":[{\"or\":[{\"terms\":{\"category_key\":[51,39,59,48,53,1039,44,56,50,45,38]}},{\"terms\":{\"category_parent_key\":[51,39,59,48,53,1039,44,56,50,45,38]}}]}],\"stores\":[{\"or\":[{\"terms\":{\"store_categories.category_key\":[51,39,59,48,53,1039,44,56,50,45,38]}},{\"terms\":{\"store_categories.category_parent_key\":[51,39,59,48,53,1039,44,56,50,45,38]}}]}],\"locations\":[{\"or\":[{\"terms\":{\"location_categories.category_key\":[51,39,59,48,53,1039,44,56,50,45,38]}},{\"terms\":{\"location_categories.category_parent_key\":[51,39,59,48,53,1039,44,56,50,45,38]}}]}]}",
410
+ "program_filter_id": 168,
411
+ "domains": [
412
+
413
+ ],
414
+ "application_scopes": [
415
+ "api",
416
+ "docs"
417
+ ],
418
+ "indexed_at": "2015-09-08T17:06:31.036Z",
419
+ "token_status": "valid"
420
+ }
421
+ }
422
+ http_version:
423
+ recorded_at: Fri, 11 Sep 2015 20:33:08 GMT
335
424
  recorded_with: VCR 2.9.3
@@ -223,25 +223,23 @@ http_interactions:
223
223
  Content-Type:
224
224
  - application/json
225
225
  Date:
226
- - Thu, 27 Aug 2015 20:17:44 GMT
226
+ - Fri, 11 Sep 2015 20:33:09 GMT
227
227
  Etag:
228
- - '"4a33f2b5943bfd3438970cae83dd51c8"'
228
+ - '"6535d7ab2445df90a3046154b445f258"'
229
229
  Server:
230
230
  - nginx/1.6.2
231
- Strict-Transport-Security:
232
- - max-age=31536000
233
231
  X-Content-Type-Options:
234
232
  - nosniff
235
233
  X-Frame-Options:
236
234
  - SAMEORIGIN
237
235
  X-Request-Id:
238
- - e5816558-d8ed-432e-8f68-b1f46bb560b8
236
+ - 1247d75c-a1c1-4267-8c26-b806db2a0c10
239
237
  X-Runtime:
240
- - '0.016229'
238
+ - '0.018412'
241
239
  X-Xss-Protection:
242
240
  - 1; mode=block
243
- Content-Length:
244
- - '1453'
241
+ Transfer-Encoding:
242
+ - chunked
245
243
  Connection:
246
244
  - keep-alive
247
245
  body:
@@ -249,44 +247,45 @@ http_interactions:
249
247
  string: |-
250
248
  {
251
249
  "info": {
252
- "total_results": 559,
250
+ "total_results": 556,
253
251
  "results_per_page": 1,
254
252
  "current_page": 1,
255
- "total_pages": 559
253
+ "total_pages": 556
256
254
  },
257
255
  "oauth_tokens": [
258
256
  {
259
- "application_id": 831,
260
- "token": "aa6f03c7f3a497fea502bf97fe72817b8e20d7dd30919c237e14ed4fdf38cb4d",
257
+ "application_id": 836,
258
+ "token": "fb6e8034ec9970144e4e68eb3c8c7e84041695626eb3bbeac53a8335bf4cba68",
261
259
  "expires_in": null,
262
260
  "revoked_at": null,
263
- "created_at": "2015-08-25T14:06:53.316-06:00",
264
- "oauth_access_token_id": 954,
265
- "application_name": "RWS API - No Filters No Limit (pcid:200156)",
266
- "application_owner_id": 235589813,
261
+ "created_at": "2015-09-08T11:02:21.256-06:00",
262
+ "oauth_access_token_id": 958,
263
+ "application_name": "Essenza Software (pcid:200110)",
264
+ "application_owner_id": 235589831,
267
265
  "application_owner_type": "Program",
268
- "program_id": 235589813,
269
- "program_name": "RWS API - No Filters No Limit",
270
- "program_customer_identifier": "200156",
271
- "program_start_dts": "2015-08-25T13:21:27.622-06:00",
272
- "program_end_dts": "2018-08-25T13:21:27.622-06:00",
273
- "organization_id": 160,
274
- "organization_name": "Access Development",
275
- "organization_customer_identifier": "160",
276
- "filter_id": null,
277
- "filter_name": null,
278
- "filter": null,
279
- "program_filter_id": null,
266
+ "program_id": 235589831,
267
+ "program_name": "Essenza Software",
268
+ "program_customer_identifier": "200110",
269
+ "program_start_dts": "2015-09-08T11:02:45.215-06:00",
270
+ "program_end_dts": "2018-09-08T11:02:45.215-06:00",
271
+ "organization_id": 2002090,
272
+ "organization_name": "Essenza Software",
273
+ "organization_customer_identifier": "147852",
274
+ "filter_id": 82,
275
+ "filter_name": "Auto, Dining, Entertainment, Golf, Health/Beauty, Home/Garden, Hotel, Movies, Services, Shopping, Travel",
276
+ "filter": "{\"offers\":[{\"terms\":{\"offer_set\":[\"DISCOUNT\"]}},{\"or\":[{\"terms\":{\"categories.category_key\":[51,39,59,48,53,1039,44,56,50,45,38]}},{\"terms\":{\"categories.category_parent_key\":[51,39,59,48,53,1039,44,56,50,45,38]}}]}],\"categories\":[{\"or\":[{\"terms\":{\"category_key\":[51,39,59,48,53,1039,44,56,50,45,38]}},{\"terms\":{\"category_parent_key\":[51,39,59,48,53,1039,44,56,50,45,38]}}]}],\"stores\":[{\"or\":[{\"terms\":{\"store_categories.category_key\":[51,39,59,48,53,1039,44,56,50,45,38]}},{\"terms\":{\"store_categories.category_parent_key\":[51,39,59,48,53,1039,44,56,50,45,38]}}]}],\"locations\":[{\"or\":[{\"terms\":{\"location_categories.category_key\":[51,39,59,48,53,1039,44,56,50,45,38]}},{\"terms\":{\"location_categories.category_parent_key\":[51,39,59,48,53,1039,44,56,50,45,38]}}]}]}",
277
+ "program_filter_id": 168,
280
278
  "domains": [
281
279
 
282
280
  ],
283
281
  "application_scopes": [
284
-
282
+ "api",
283
+ "docs"
285
284
  ],
286
- "indexed_at": "2015-08-25T20:09:31.012Z",
285
+ "indexed_at": "2015-09-08T17:06:31.036Z",
287
286
  "token_status": "valid",
288
287
  "links": {
289
- "show_oauth_token": "http://token-demo.adcrws.com/v1/tokens/aa6f03c7f3a497fea502bf97fe72817b8e20d7dd30919c237e14ed4fdf38cb4d"
288
+ "show_oauth_token": "http://token-demo.adcrws.com/v1/tokens/fb6e8034ec9970144e4e68eb3c8c7e84041695626eb3bbeac53a8335bf4cba68"
290
289
  }
291
290
  }
292
291
  ],
@@ -295,5 +294,5 @@ http_interactions:
295
294
  }
296
295
  }
297
296
  http_version:
298
- recorded_at: Thu, 27 Aug 2015 20:17:44 GMT
297
+ recorded_at: Fri, 11 Sep 2015 20:33:09 GMT
299
298
  recorded_with: VCR 2.9.3
@@ -35,21 +35,19 @@ http_interactions:
35
35
  Content-Type:
36
36
  - application/json
37
37
  Date:
38
- - Thu, 27 Aug 2015 20:17:31 GMT
38
+ - Fri, 11 Sep 2015 20:33:20 GMT
39
39
  Etag:
40
- - '"e5b1fb899af78969f98e25dff27fd370"'
40
+ - '"50ad65b96243debff98324e9ecb617e1"'
41
41
  Server:
42
42
  - nginx/1.6.2
43
- Strict-Transport-Security:
44
- - max-age=31536000
45
43
  X-Content-Type-Options:
46
44
  - nosniff
47
45
  X-Frame-Options:
48
46
  - SAMEORIGIN
49
47
  X-Request-Id:
50
- - c394bfac-9141-4e03-ba5d-eeb22841fd0a
48
+ - e076d442-7204-4caa-a333-4a332456e4ee
51
49
  X-Runtime:
52
- - '0.084010'
50
+ - '0.085977'
53
51
  X-Xss-Protection:
54
52
  - 1; mode=block
55
53
  Content-Length:
@@ -61,34 +59,34 @@ http_interactions:
61
59
  string: |-
62
60
  {
63
61
  "offers": {
64
- "offer_count": 74132,
62
+ "offer_count": 74275,
65
63
  "categories": [
66
64
  {
67
65
  "category_name": "Dining & Food",
68
66
  "category_key": 39,
69
67
  "category_type": "category",
70
- "offer_count": 74132,
68
+ "offer_count": 74275,
71
69
  "subcategories": [
72
70
  {
73
71
  "category_name": "Fast Food",
74
72
  "category_key": 1008,
75
73
  "category_type": "subcategory",
76
74
  "category_parent_key": 39,
77
- "offer_count": 38984
75
+ "offer_count": 39088
78
76
  },
79
77
  {
80
78
  "category_name": "Casual & Fine Dining",
81
79
  "category_key": 1009,
82
80
  "category_type": "subcategory",
83
81
  "category_parent_key": 39,
84
- "offer_count": 33152
82
+ "offer_count": 33187
85
83
  },
86
84
  {
87
85
  "category_name": "Convenience Stores",
88
86
  "category_key": 1012,
89
87
  "category_type": "subcategory",
90
88
  "category_parent_key": 39,
91
- "offer_count": 1951
89
+ "offer_count": 1956
92
90
  },
93
91
  {
94
92
  "category_name": "Specialty Foods & Gifts",
@@ -259,15 +257,15 @@ http_interactions:
259
257
  "redemption_methods": [
260
258
  {
261
259
  "redemption_method": "instore_print",
262
- "offer_count": 53528
260
+ "offer_count": 53662
263
261
  },
264
262
  {
265
263
  "redemption_method": "instore",
266
- "offer_count": 28620
264
+ "offer_count": 28674
267
265
  },
268
266
  {
269
267
  "redemption_method": "link",
270
- "offer_count": 20711
268
+ "offer_count": 20720
271
269
  },
272
270
  {
273
271
  "redemption_method": "call",
@@ -279,12 +277,12 @@ http_interactions:
279
277
  "category_count": 127
280
278
  },
281
279
  "stores": {
282
- "store_count": 25435
280
+ "store_count": 25922
283
281
  },
284
282
  "locations": {
285
283
  "location_count": 204820
286
284
  }
287
285
  }
288
286
  http_version:
289
- recorded_at: Thu, 27 Aug 2015 20:17:32 GMT
287
+ recorded_at: Fri, 11 Sep 2015 20:33:20 GMT
290
288
  recorded_with: VCR 2.9.3
@@ -31,21 +31,19 @@ http_interactions:
31
31
  Content-Type:
32
32
  - application/json
33
33
  Date:
34
- - Thu, 27 Aug 2015 20:17:31 GMT
34
+ - Fri, 11 Sep 2015 20:33:20 GMT
35
35
  Etag:
36
36
  - '"2fc05acea937ac2f91f371775a92a64f"'
37
37
  Server:
38
38
  - nginx/1.6.2
39
- Strict-Transport-Security:
40
- - max-age=31536000
41
39
  X-Content-Type-Options:
42
40
  - nosniff
43
41
  X-Frame-Options:
44
42
  - SAMEORIGIN
45
43
  X-Request-Id:
46
- - 3c8a4533-c78c-480b-91c1-bb3ebf17f3f8
44
+ - aa64c603-03e5-4a7c-8346-640d6895bcbd
47
45
  X-Runtime:
48
- - '0.008315'
46
+ - '0.008776'
49
47
  X-Xss-Protection:
50
48
  - 1; mode=block
51
49
  Content-Length:
@@ -74,5 +72,5 @@ http_interactions:
74
72
  }
75
73
  }
76
74
  http_version:
77
- recorded_at: Thu, 27 Aug 2015 20:17:32 GMT
75
+ recorded_at: Fri, 11 Sep 2015 20:33:20 GMT
78
76
  recorded_with: VCR 2.9.3