access 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/lib/access/error.rb +2 -0
  3. data/lib/access/request.rb +4 -1
  4. data/lib/access/response.rb +2 -0
  5. data/lib/access/version.rb +1 -1
  6. data/test/fixtures/autocomplete_search.yml +19 -18
  7. data/test/fixtures/autocomplete_search_categories.yml +10 -10
  8. data/test/fixtures/autocomplete_search_locations.yml +4 -4
  9. data/test/fixtures/autocomplete_search_offers.yml +9 -9
  10. data/test/fixtures/autocomplete_search_stores.yml +11 -11
  11. data/test/fixtures/category_find.yml +4 -4
  12. data/test/fixtures/category_search.yml +8 -8
  13. data/test/fixtures/category_search_fail_member_key.yml +4 -4
  14. data/test/fixtures/filter_find.yml +67 -0
  15. data/test/fixtures/filter_search.yml +12 -12
  16. data/test/fixtures/location_find.yml +432 -388
  17. data/test/fixtures/location_search.yml +34 -34
  18. data/test/fixtures/location_search_fail_member_key.yml +4 -4
  19. data/test/fixtures/national_stores.yml +4 -4
  20. data/test/fixtures/oauth_application_find.yml +4 -4
  21. data/test/fixtures/oauth_application_search.yml +7 -7
  22. data/test/fixtures/oauth_application_token_find.yml +4 -4
  23. data/test/fixtures/oauth_application_token_search.yml +4 -4
  24. data/test/fixtures/offer_find.yml +125 -119
  25. data/test/fixtures/offer_search.yml +68 -66
  26. data/test/fixtures/offer_search_fail_member_key.yml +4 -4
  27. data/test/fixtures/redeem_offer_no_redeem_type.yml +18 -18
  28. data/test/fixtures/store_find.yml +166 -0
  29. data/test/fixtures/store_search.yml +19 -19
  30. data/test/fixtures/store_search_fail_member_key.yml +6 -6
  31. data/test/fixtures/subcategory_find.yml +4 -4
  32. data/test/fixtures/token_find.yml +90 -0
  33. data/test/fixtures/token_search.yml +29 -31
  34. data/test/fixtures/verify_filter.yml +15 -15
  35. data/test/fixtures/verify_token.yml +12 -12
  36. metadata +1 -1
@@ -161,9 +161,9 @@ http_interactions:
161
161
  Content-Type:
162
162
  - application/json
163
163
  Date:
164
- - Wed, 12 Aug 2015 17:46:33 GMT
164
+ - Thu, 27 Aug 2015 20:17:38 GMT
165
165
  Etag:
166
- - '"cb45374e28b6cd1ed4f8e2b7883afb44"'
166
+ - '"e4d04ff52c7c8cb3069b350e816c65f5"'
167
167
  Server:
168
168
  - nginx/1.6.2
169
169
  Strict-Transport-Security:
@@ -173,13 +173,13 @@ http_interactions:
173
173
  X-Frame-Options:
174
174
  - SAMEORIGIN
175
175
  X-Request-Id:
176
- - 756235ee-4b00-46f2-8046-ff4c371b6b66
176
+ - aaff2662-b9c8-45d8-b59a-26d801ab4315
177
177
  X-Runtime:
178
- - '0.018682'
178
+ - '0.020077'
179
179
  X-Xss-Protection:
180
180
  - 1; mode=block
181
181
  Content-Length:
182
- - '1473'
182
+ - '1360'
183
183
  Connection:
184
184
  - keep-alive
185
185
  body:
@@ -187,34 +187,34 @@ http_interactions:
187
187
  string: |-
188
188
  {
189
189
  "info": {
190
- "total_results": 25425,
190
+ "total_results": 25435,
191
191
  "current_page": 1,
192
- "total_pages": 25425,
192
+ "total_pages": 25435,
193
193
  "results_per_page": 1
194
194
  },
195
195
  "stores": [
196
196
  {
197
197
  "search_relevance": 1.0,
198
- "store_key": 19011540,
199
- "name": "Zuma Tex-Mex Grill",
200
- "description": "Deep in the Heart of Boston--Zuma Tex Mex brings the flavors of the southwest to Faneuil Hall. We are proud to serve the freshest ingredients and make almost everything from scratch-- from our hand cut fries,fresh daily pico de gallo, our home made chorizo sausage to our house smoked BBQ.",
201
- "logo_url": "https://static-demo.accessdevelopment.com/brand/bdd152cd64b2673b6f7f2c14d76d29ae05b8299d/original.png",
198
+ "store_key": 30368039,
199
+ "name": "Country Club Bowl",
200
+ "description": "Country Club Bowl is a great place to have fun times with family and friends. Our 40 lanes offer state-of-the-art bowling equipment for both league and recreational bowlers.",
201
+ "logo_url": "https://static-demo.accessdevelopment.com/brand/09643f63f1d3cdb2d7b83c4010c60ba14db84d17/original.png",
202
202
  "national": false,
203
203
  "active_location_count": 1,
204
204
  "active_offer_count": 1,
205
205
  "store_categories": [
206
206
  {
207
- "category_name": "Casual & Fine Dining",
208
- "category_key": 1009,
209
- "category_parent_key": 39,
210
- "category_parent_name": "Dining & Food",
207
+ "category_name": "Fun Centers",
208
+ "category_key": 1013,
209
+ "category_parent_key": 59,
210
+ "category_parent_name": "Entertainment & Recreation",
211
211
  "category_type": "subcategory"
212
212
  }
213
213
  ],
214
214
  "links": {
215
- "show_store": "https://offer-demo.adcrws.com/v1/stores/19011540",
216
- "find_offers_for_this_store": "https://offer-demo.adcrws.com/v1/offers?store_key=19011540",
217
- "find_locations_for_this_store": "https://offer-demo.adcrws.com/v1/locations?store_key=19011540"
215
+ "show_store": "https://offer-demo.adcrws.com/v1/stores/30368039",
216
+ "find_offers_for_this_store": "https://offer-demo.adcrws.com/v1/offers?store_key=30368039",
217
+ "find_locations_for_this_store": "https://offer-demo.adcrws.com/v1/locations?store_key=30368039"
218
218
  }
219
219
  }
220
220
  ],
@@ -223,5 +223,5 @@ http_interactions:
223
223
  }
224
224
  }
225
225
  http_version:
226
- recorded_at: Wed, 12 Aug 2015 17:46:33 GMT
226
+ recorded_at: Thu, 27 Aug 2015 20:17:39 GMT
227
227
  recorded_with: VCR 2.9.3
@@ -71,7 +71,7 @@ http_interactions:
71
71
  Content-Type:
72
72
  - application/json
73
73
  Date:
74
- - Wed, 12 Aug 2015 17:46:32 GMT
74
+ - Thu, 27 Aug 2015 20:17:38 GMT
75
75
  Server:
76
76
  - nginx/1.6.2
77
77
  Strict-Transport-Security:
@@ -81,13 +81,13 @@ http_interactions:
81
81
  X-Frame-Options:
82
82
  - SAMEORIGIN
83
83
  X-Request-Id:
84
- - 675a4f83-ecc7-4f02-ac7d-2fc28bd48451
84
+ - 4a0787fd-c380-4af0-814a-8b722ef0c231
85
85
  X-Runtime:
86
- - '0.008433'
86
+ - '0.007779'
87
87
  X-Xss-Protection:
88
88
  - 1; mode=block
89
- Transfer-Encoding:
90
- - chunked
89
+ Content-Length:
90
+ - '77'
91
91
  Connection:
92
92
  - keep-alive
93
93
  body:
@@ -98,5 +98,5 @@ http_interactions:
98
98
  "status": 401
99
99
  }
100
100
  http_version:
101
- recorded_at: Wed, 12 Aug 2015 17:46:32 GMT
101
+ recorded_at: Thu, 27 Aug 2015 20:17:38 GMT
102
102
  recorded_with: VCR 2.9.3
@@ -171,7 +171,7 @@ http_interactions:
171
171
  Content-Type:
172
172
  - application/json
173
173
  Date:
174
- - Wed, 12 Aug 2015 17:46:35 GMT
174
+ - Thu, 27 Aug 2015 20:17:40 GMT
175
175
  Etag:
176
176
  - '"2ded6201c8066957f09645cfbac4b1a6"'
177
177
  Server:
@@ -183,9 +183,9 @@ http_interactions:
183
183
  X-Frame-Options:
184
184
  - SAMEORIGIN
185
185
  X-Request-Id:
186
- - 4b58d3d6-d56c-4e1e-beb1-72905287b128
186
+ - d0425bcf-efaf-4649-8bf6-f0a459412eb0
187
187
  X-Runtime:
188
- - '0.015590'
188
+ - '0.015657'
189
189
  X-Xss-Protection:
190
190
  - 1; mode=block
191
191
  Content-Length:
@@ -279,5 +279,5 @@ http_interactions:
279
279
  ]
280
280
  }
281
281
  http_version:
282
- recorded_at: Wed, 12 Aug 2015 17:46:35 GMT
282
+ recorded_at: Thu, 27 Aug 2015 20:17:40 GMT
283
283
  recorded_with: VCR 2.9.3
@@ -242,4 +242,94 @@ http_interactions:
242
242
  }
243
243
  http_version:
244
244
  recorded_at: Wed, 12 Aug 2015 17:46:36 GMT
245
+ - request:
246
+ method: get
247
+ uri: https://token-demo.adcrws.com/v1/tokens/aa6f03c7f3a497fea502bf97fe72817b8e20d7dd30919c237e14ed4fdf38cb4d
248
+ body:
249
+ encoding: US-ASCII
250
+ string: ''
251
+ headers:
252
+ Access-Token:
253
+ - token_without_limit
254
+ Content-Type:
255
+ - application/json
256
+ Accept:
257
+ - application/json
258
+ response:
259
+ status:
260
+ code: 200
261
+ message: OK
262
+ headers:
263
+ Access-Control-Allow-Headers:
264
+ - Origin, X-Requested-With, Content-Type, Accept, Authorization, Access-Token
265
+ Access-Control-Allow-Methods:
266
+ - POST, GET, PUT, DELETE, OPTIONS
267
+ Access-Control-Max-Age:
268
+ - '1728000'
269
+ Access-Control-Request-Method:
270
+ - GET
271
+ Cache-Control:
272
+ - max-age=0, private, must-revalidate
273
+ Content-Type:
274
+ - application/json
275
+ Date:
276
+ - Thu, 27 Aug 2015 20:17:43 GMT
277
+ Etag:
278
+ - '"0b331a895a257d29aff66f2fd7971963"'
279
+ Server:
280
+ - nginx/1.6.2
281
+ Strict-Transport-Security:
282
+ - max-age=31536000
283
+ X-Content-Type-Options:
284
+ - nosniff
285
+ X-Frame-Options:
286
+ - SAMEORIGIN
287
+ X-Request-Id:
288
+ - 0d9d878b-dc0c-4db5-93c8-a37fa60fc7d7
289
+ X-Runtime:
290
+ - '0.013664'
291
+ X-Xss-Protection:
292
+ - 1; mode=block
293
+ Content-Length:
294
+ - '1015'
295
+ Connection:
296
+ - keep-alive
297
+ body:
298
+ encoding: UTF-8
299
+ string: |-
300
+ {
301
+ "oauth_token": {
302
+ "application_id": 831,
303
+ "token": "aa6f03c7f3a497fea502bf97fe72817b8e20d7dd30919c237e14ed4fdf38cb4d",
304
+ "expires_in": null,
305
+ "revoked_at": null,
306
+ "created_at": "2015-08-25T14:06:53.316-06:00",
307
+ "oauth_access_token_id": 954,
308
+ "application_name": "RWS API - No Filters No Limit (pcid:200156)",
309
+ "application_owner_id": 235589813,
310
+ "application_owner_type": "Program",
311
+ "program_id": 235589813,
312
+ "program_name": "RWS API - No Filters No Limit",
313
+ "program_customer_identifier": "200156",
314
+ "program_start_dts": "2015-08-25T13:21:27.622-06:00",
315
+ "program_end_dts": "2018-08-25T13:21:27.622-06:00",
316
+ "organization_id": 160,
317
+ "organization_name": "Access Development",
318
+ "organization_customer_identifier": "160",
319
+ "filter_id": null,
320
+ "filter_name": null,
321
+ "filter": null,
322
+ "program_filter_id": null,
323
+ "domains": [
324
+
325
+ ],
326
+ "application_scopes": [
327
+
328
+ ],
329
+ "indexed_at": "2015-08-25T20:09:31.012Z",
330
+ "token_status": "valid"
331
+ }
332
+ }
333
+ http_version:
334
+ recorded_at: Thu, 27 Aug 2015 20:17:44 GMT
245
335
  recorded_with: VCR 2.9.3
@@ -223,9 +223,9 @@ http_interactions:
223
223
  Content-Type:
224
224
  - application/json
225
225
  Date:
226
- - Wed, 12 Aug 2015 17:46:36 GMT
226
+ - Thu, 27 Aug 2015 20:17:44 GMT
227
227
  Etag:
228
- - '"bf1afd7f0dde6cceb86c0e054f295a6b"'
228
+ - '"4a33f2b5943bfd3438970cae83dd51c8"'
229
229
  Server:
230
230
  - nginx/1.6.2
231
231
  Strict-Transport-Security:
@@ -235,13 +235,13 @@ http_interactions:
235
235
  X-Frame-Options:
236
236
  - SAMEORIGIN
237
237
  X-Request-Id:
238
- - 1fee0c9f-a520-49f4-a48e-eb88a2a640ad
238
+ - e5816558-d8ed-432e-8f68-b1f46bb560b8
239
239
  X-Runtime:
240
- - '0.014374'
240
+ - '0.016229'
241
241
  X-Xss-Protection:
242
242
  - 1; mode=block
243
243
  Content-Length:
244
- - '1976'
244
+ - '1453'
245
245
  Connection:
246
246
  - keep-alive
247
247
  body:
@@ -249,46 +249,44 @@ http_interactions:
249
249
  string: |-
250
250
  {
251
251
  "info": {
252
- "total_results": 1067,
252
+ "total_results": 559,
253
253
  "results_per_page": 1,
254
254
  "current_page": 1,
255
- "total_pages": 1067
255
+ "total_pages": 559
256
256
  },
257
257
  "oauth_tokens": [
258
258
  {
259
- "application_id": 825,
260
- "token": "fcf4e7ee693a61155d1a40a0ca7577cc95ec785742a0ca295503185e290711e4",
259
+ "application_id": 831,
260
+ "token": "aa6f03c7f3a497fea502bf97fe72817b8e20d7dd30919c237e14ed4fdf38cb4d",
261
261
  "expires_in": null,
262
262
  "revoked_at": null,
263
- "created_at": "2015-08-11T15:54:04.086-06:00",
264
- "oauth_access_token_id": 942,
265
- "application_name": "Loylogic (pcid:200090)",
266
- "application_owner_id": 235589794,
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,
267
267
  "application_owner_type": "Program",
268
- "program_id": 235589794,
269
- "program_name": "Loylogic",
270
- "program_customer_identifier": "200090",
271
- "program_start_dts": "2015-08-11T15:54:45.783-06:00",
272
- "program_end_dts": "2018-08-11T15:54:45.783-06:00",
273
- "organization_id": 2001157,
274
- "organization_name": "Loylogic",
275
- "organization_customer_identifier": "2001157",
276
- "filter_id": 35,
277
- "filter_name": "Dining, Entertainment, Health/Beauty, Hotel, Services, Shopping",
278
- "filter": "{\"offers\":[{\"or\":[{\"terms\":{\"categories.category_key\":[39,59,53,44,50,45]}},{\"terms\":{\"categories.category_parent_key\":[39,59,53,44,50,45]}}]}],\"categories\":[{\"or\":[{\"terms\":{\"category_key\":[39,59,53,44,50,45]}},{\"terms\":{\"category_parent_key\":[39,59,53,44,50,45]}}]}],\"stores\":[{\"or\":[{\"terms\":{\"store_categories.category_key\":[39,59,53,44,50,45]}},{\"terms\":{\"store_categories.category_parent_key\":[39,59,53,44,50,45]}}]}]}",
279
- "program_filter_id": 158,
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,
280
280
  "domains": [
281
281
 
282
282
  ],
283
283
  "application_scopes": [
284
- "api",
285
- "docs",
286
- "internal"
284
+
287
285
  ],
288
- "indexed_at": "2015-08-12T14:08:41.744Z",
286
+ "indexed_at": "2015-08-25T20:09:31.012Z",
289
287
  "token_status": "valid",
290
288
  "links": {
291
- "show_oauth_token": "http://token-demo.adcrws.com/v1/tokens/fcf4e7ee693a61155d1a40a0ca7577cc95ec785742a0ca295503185e290711e4"
289
+ "show_oauth_token": "http://token-demo.adcrws.com/v1/tokens/aa6f03c7f3a497fea502bf97fe72817b8e20d7dd30919c237e14ed4fdf38cb4d"
292
290
  }
293
291
  }
294
292
  ],
@@ -297,5 +295,5 @@ http_interactions:
297
295
  }
298
296
  }
299
297
  http_version:
300
- recorded_at: Wed, 12 Aug 2015 17:46:36 GMT
298
+ recorded_at: Thu, 27 Aug 2015 20:17:44 GMT
301
299
  recorded_with: VCR 2.9.3
@@ -35,9 +35,9 @@ http_interactions:
35
35
  Content-Type:
36
36
  - application/json
37
37
  Date:
38
- - Wed, 12 Aug 2015 17:46:35 GMT
38
+ - Thu, 27 Aug 2015 20:17:31 GMT
39
39
  Etag:
40
- - '"5a395c4bf2ad27ac472ecaf3cb0fbe82"'
40
+ - '"e5b1fb899af78969f98e25dff27fd370"'
41
41
  Server:
42
42
  - nginx/1.6.2
43
43
  Strict-Transport-Security:
@@ -47,9 +47,9 @@ http_interactions:
47
47
  X-Frame-Options:
48
48
  - SAMEORIGIN
49
49
  X-Request-Id:
50
- - e3dded6b-f0f1-41fa-ab29-ac7e8167c34b
50
+ - c394bfac-9141-4e03-ba5d-eeb22841fd0a
51
51
  X-Runtime:
52
- - '0.087726'
52
+ - '0.084010'
53
53
  X-Xss-Protection:
54
54
  - 1; mode=block
55
55
  Content-Length:
@@ -61,34 +61,34 @@ http_interactions:
61
61
  string: |-
62
62
  {
63
63
  "offers": {
64
- "offer_count": 74275,
64
+ "offer_count": 74132,
65
65
  "categories": [
66
66
  {
67
67
  "category_name": "Dining & Food",
68
68
  "category_key": 39,
69
69
  "category_type": "category",
70
- "offer_count": 74275,
70
+ "offer_count": 74132,
71
71
  "subcategories": [
72
72
  {
73
73
  "category_name": "Fast Food",
74
74
  "category_key": 1008,
75
75
  "category_type": "subcategory",
76
76
  "category_parent_key": 39,
77
- "offer_count": 39088
77
+ "offer_count": 38984
78
78
  },
79
79
  {
80
80
  "category_name": "Casual & Fine Dining",
81
81
  "category_key": 1009,
82
82
  "category_type": "subcategory",
83
83
  "category_parent_key": 39,
84
- "offer_count": 33187
84
+ "offer_count": 33152
85
85
  },
86
86
  {
87
87
  "category_name": "Convenience Stores",
88
88
  "category_key": 1012,
89
89
  "category_type": "subcategory",
90
90
  "category_parent_key": 39,
91
- "offer_count": 1956
91
+ "offer_count": 1951
92
92
  },
93
93
  {
94
94
  "category_name": "Specialty Foods & Gifts",
@@ -259,15 +259,15 @@ http_interactions:
259
259
  "redemption_methods": [
260
260
  {
261
261
  "redemption_method": "instore_print",
262
- "offer_count": 53662
262
+ "offer_count": 53528
263
263
  },
264
264
  {
265
265
  "redemption_method": "instore",
266
- "offer_count": 28674
266
+ "offer_count": 28620
267
267
  },
268
268
  {
269
269
  "redemption_method": "link",
270
- "offer_count": 20720
270
+ "offer_count": 20711
271
271
  },
272
272
  {
273
273
  "redemption_method": "call",
@@ -279,12 +279,12 @@ http_interactions:
279
279
  "category_count": 127
280
280
  },
281
281
  "stores": {
282
- "store_count": 25425
282
+ "store_count": 25435
283
283
  },
284
284
  "locations": {
285
- "location_count": 204899
285
+ "location_count": 204820
286
286
  }
287
287
  }
288
288
  http_version:
289
- recorded_at: Wed, 12 Aug 2015 17:46:35 GMT
289
+ recorded_at: Thu, 27 Aug 2015 20:17:32 GMT
290
290
  recorded_with: VCR 2.9.3
@@ -31,9 +31,9 @@ http_interactions:
31
31
  Content-Type:
32
32
  - application/json
33
33
  Date:
34
- - Wed, 12 Aug 2015 17:46:35 GMT
34
+ - Thu, 27 Aug 2015 20:17:31 GMT
35
35
  Etag:
36
- - '"2beb47a75a9f1995452e6b07484c545c"'
36
+ - '"2fc05acea937ac2f91f371775a92a64f"'
37
37
  Server:
38
38
  - nginx/1.6.2
39
39
  Strict-Transport-Security:
@@ -43,13 +43,13 @@ http_interactions:
43
43
  X-Frame-Options:
44
44
  - SAMEORIGIN
45
45
  X-Request-Id:
46
- - fef04a99-15ff-47c7-a8b0-0a03a163a3d4
46
+ - 3c8a4533-c78c-480b-91c1-bb3ebf17f3f8
47
47
  X-Runtime:
48
- - '0.007711'
48
+ - '0.008315'
49
49
  X-Xss-Protection:
50
50
  - 1; mode=block
51
51
  Content-Length:
52
- - '479'
52
+ - '569'
53
53
  Connection:
54
54
  - keep-alive
55
55
  body:
@@ -61,18 +61,18 @@ http_interactions:
61
61
  "domains": [
62
62
 
63
63
  ],
64
- "created_at": "2015-07-13T15:43:35.134Z",
64
+ "created_at": "2015-08-25T14:05:24.591-06:00",
65
65
  "revoked_at": null,
66
66
  "expires_in": null,
67
- "application_name": "token_without_limit",
67
+ "application_name": "RWS API - No Filters No Limit (pcid:200156)",
68
68
  "organization_name": "Access Development",
69
69
  "organization_customer_identifier": "160",
70
- "program_name": "Garden Club",
71
- "program_customer_identifier": "2",
72
- "program_end_dts": "2029-06-09",
73
- "program_start_dts": "2012-04-12"
70
+ "program_name": "RWS API - No Filters No Limit",
71
+ "program_customer_identifier": "200156",
72
+ "program_end_dts": "2018-08-25T13:21:27.622-06:00",
73
+ "program_start_dts": "2015-08-25T13:21:27.622-06:00"
74
74
  }
75
75
  }
76
76
  http_version:
77
- recorded_at: Wed, 12 Aug 2015 17:46:35 GMT
77
+ recorded_at: Thu, 27 Aug 2015 20:17:32 GMT
78
78
  recorded_with: VCR 2.9.3