access 2.0.7 → 2.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/lib/access.rb +1 -0
  3. data/lib/access/geolocation.rb +11 -0
  4. data/lib/access/location.rb +2 -0
  5. data/lib/access/version.rb +1 -1
  6. data/test/access/location_test.rb +2 -0
  7. data/test/access/offer_test.rb +1 -0
  8. data/test/fixtures/autocomplete_search.yml +30 -149
  9. data/test/fixtures/autocomplete_search_categories.yml +15 -120
  10. data/test/fixtures/autocomplete_search_locations.yml +9 -110
  11. data/test/fixtures/autocomplete_search_offers.yml +14 -119
  12. data/test/fixtures/autocomplete_search_stores.yml +16 -123
  13. data/test/fixtures/category_find.yml +9 -155
  14. data/test/fixtures/category_search.yml +18 -3588
  15. data/test/fixtures/category_search_fail_member_key.yml +9 -45
  16. data/test/fixtures/filter_find.yml +14 -77
  17. data/test/fixtures/filter_search.yml +16 -128
  18. data/test/fixtures/location_find.yml +414 -891
  19. data/test/fixtures/location_search.yml +69 -327
  20. data/test/fixtures/location_search_fail_member_key.yml +9 -310
  21. data/test/fixtures/national_stores.yml +1717 -3854
  22. data/test/fixtures/oauth_application_find.yml +9 -85
  23. data/test/fixtures/oauth_application_search.yml +12 -48
  24. data/test/fixtures/oauth_application_token_find.yml +9 -159
  25. data/test/fixtures/oauth_application_token_search.yml +9 -5
  26. data/test/fixtures/offer_find.yml +12 -555
  27. data/test/fixtures/offer_search.yml +12 -189
  28. data/test/fixtures/offer_search_fail_member_key.yml +9 -45
  29. data/test/fixtures/redeem_offer_no_redeem_type.yml +9 -359
  30. data/test/fixtures/store_find.yml +9 -501
  31. data/test/fixtures/store_search.yml +9 -135
  32. data/test/fixtures/store_search_fail_member_key.yml +9 -45
  33. data/test/fixtures/subcategory_find.yml +9 -145
  34. data/test/fixtures/token_find.yml +27 -356
  35. data/test/fixtures/token_search.yml +35 -224
  36. data/test/fixtures/verify_filter.yml +9 -5
  37. data/test/fixtures/verify_token.yml +13 -9
  38. metadata +2 -3
  39. data/test/fixtures/oauth_application_search_fail_member_key.yml +0 -268
@@ -1,110 +1,5 @@
1
1
  ---
2
2
  http_interactions:
3
- - request:
4
- method: get
5
- uri: https://offer-demo.adcrws.com/v1/autocomplete
6
- body:
7
- encoding: UTF-8
8
- string: member_key=guest&per_page=1&resources=locations
9
- headers:
10
- Access-Token:
11
- - token_without_limit
12
- Content-Type:
13
- - application/json
14
- Accept:
15
- - application/json
16
- response:
17
- status:
18
- code: 400
19
- message: Bad Request
20
- headers:
21
- Content-Type:
22
- - application/json
23
- Date:
24
- - Thu, 06 Aug 2015 17:30:02 GMT
25
- Server:
26
- - nginx/1.6.2
27
- Strict-Transport-Security:
28
- - max-age=31536000
29
- X-Request-Id:
30
- - cb808a39-e0b7-4e34-a3d2-b978aeba6238
31
- X-Runtime:
32
- - '0.000239'
33
- Content-Length:
34
- - '158'
35
- Connection:
36
- - keep-alive
37
- body:
38
- encoding: UTF-8
39
- string: '{"status":400,"message":"There was a problem in the JSON you submitted:
40
- 795: unexpected token at ''member_key=guest\u0026per_page=1\u0026resources=locations''"}'
41
- http_version:
42
- recorded_at: Thu, 06 Aug 2015 17:30:02 GMT
43
- - request:
44
- method: get
45
- uri: https://offer-demo.adcrws.com/v1/autocomplete?member_key=guest&per_page=1&resources=locations
46
- body:
47
- encoding: US-ASCII
48
- string: ''
49
- headers:
50
- Access-Token:
51
- - token_without_limit
52
- Content-Type:
53
- - application/json
54
- Accept:
55
- - application/json
56
- response:
57
- status:
58
- code: 200
59
- message: OK
60
- headers:
61
- Access-Control-Allow-Headers:
62
- - Origin, X-Requested-With, Content-Type, Accept, Authorization, Access-Token
63
- Access-Control-Allow-Methods:
64
- - POST, GET, PUT, DELETE, OPTIONS
65
- Access-Control-Max-Age:
66
- - '1728000'
67
- Access-Control-Request-Method:
68
- - GET
69
- Cache-Control:
70
- - max-age=0, private, must-revalidate
71
- Content-Type:
72
- - application/json
73
- Date:
74
- - Thu, 06 Aug 2015 17:51:03 GMT
75
- Etag:
76
- - '"31ddb1bb29169320aef8492c5d01fc3b"'
77
- Server:
78
- - nginx/1.6.2
79
- Strict-Transport-Security:
80
- - max-age=31536000
81
- X-Content-Type-Options:
82
- - nosniff
83
- X-Frame-Options:
84
- - SAMEORIGIN
85
- X-Request-Id:
86
- - 46cf5f1a-7e13-4aea-b91d-5559340d59f2
87
- X-Runtime:
88
- - '0.021329'
89
- X-Xss-Protection:
90
- - 1; mode=block
91
- Content-Length:
92
- - '332'
93
- Connection:
94
- - keep-alive
95
- body:
96
- encoding: ASCII-8BIT
97
- string: !binary |-
98
- ewogICJzdWdnZXN0aW9ucyI6IHsKICAgICJxdWVyeSI6ICIqIiwKICAgICJs
99
- b2NhdGlvbnMiOiBbCiAgICAgIHsKICAgICAgICAibG9jYXRpb25fbmFtZSI6
100
- ICJXYWx0IERpc25leSBXb3JsZMKuIFRpY2tldHMiLAogICAgICAgICJsb2Nh
101
- dGlvbl9rZXkiOiA1MjE3NjE1LAogICAgICAgICJhY3RpdmVfb2ZmZXJfY291
102
- bnQiOiA4NSwKICAgICAgICAibG9nb191cmwiOiAiaHR0cHM6Ly9zdGF0aWMt
103
- ZGVtby5hY2Nlc3NkZXZlbG9wbWVudC5jb20vYnJhbmQvNDI5ZWM2ZDE3OTk1
104
- YzMxYzExNzNiZjQ0OTNkNThmMzQ1MDA1N2Q4Yi9vcmlnaW5hbC5wbmciCiAg
105
- ICAgIH0KICAgIF0KICB9Cn0=
106
- http_version:
107
- recorded_at: Thu, 06 Aug 2015 17:51:03 GMT
108
3
  - request:
109
4
  method: get
110
5
  uri: https://offer-demo.adcrws.com/v1/autocomplete?member_key=API_RUBY_GEM_TEST&per_page=1&resources=locations
@@ -113,7 +8,7 @@ http_interactions:
113
8
  string: ''
114
9
  headers:
115
10
  Access-Token:
116
- - token_without_limit
11
+ - token_without_filters
117
12
  Content-Type:
118
13
  - application/json
119
14
  Accept:
@@ -136,7 +31,7 @@ http_interactions:
136
31
  Content-Type:
137
32
  - application/json
138
33
  Date:
139
- - Fri, 11 Sep 2015 20:33:10 GMT
34
+ - Wed, 16 Sep 2015 19:53:54 GMT
140
35
  Etag:
141
36
  - '"31ddb1bb29169320aef8492c5d01fc3b"'
142
37
  Server:
@@ -145,10 +40,14 @@ http_interactions:
145
40
  - nosniff
146
41
  X-Frame-Options:
147
42
  - SAMEORIGIN
43
+ X-Ratelimit-Limit:
44
+ - '1000'
45
+ X-Ratelimit-Remaining:
46
+ - '996'
148
47
  X-Request-Id:
149
- - 05472e78-9fbf-4335-a269-34c6507bb08d
48
+ - e1aca17e-3461-4354-a8ad-25db57dc0537
150
49
  X-Runtime:
151
- - '0.024906'
50
+ - '0.025414'
152
51
  X-Xss-Protection:
153
52
  - 1; mode=block
154
53
  Content-Length:
@@ -167,5 +66,5 @@ http_interactions:
167
66
  YzMxYzExNzNiZjQ0OTNkNThmMzQ1MDA1N2Q4Yi9vcmlnaW5hbC5wbmciCiAg
168
67
  ICAgIH0KICAgIF0KICB9Cn0=
169
68
  http_version:
170
- recorded_at: Fri, 11 Sep 2015 20:33:10 GMT
69
+ recorded_at: Wed, 16 Sep 2015 19:53:54 GMT
171
70
  recorded_with: VCR 2.9.3
@@ -1,114 +1,5 @@
1
1
  ---
2
2
  http_interactions:
3
- - request:
4
- method: get
5
- uri: https://offer-demo.adcrws.com/v1/autocomplete
6
- body:
7
- encoding: UTF-8
8
- string: member_key=guest&per_page=1&resources=offers
9
- headers:
10
- Access-Token:
11
- - token_without_limit
12
- Content-Type:
13
- - application/json
14
- Accept:
15
- - application/json
16
- response:
17
- status:
18
- code: 400
19
- message: Bad Request
20
- headers:
21
- Content-Type:
22
- - application/json
23
- Date:
24
- - Thu, 06 Aug 2015 17:30:02 GMT
25
- Server:
26
- - nginx/1.6.2
27
- Strict-Transport-Security:
28
- - max-age=31536000
29
- X-Request-Id:
30
- - aaa0b7de-1e18-49d7-8b18-16aac7b7964b
31
- X-Runtime:
32
- - '0.000492'
33
- Content-Length:
34
- - '155'
35
- Connection:
36
- - keep-alive
37
- body:
38
- encoding: UTF-8
39
- string: '{"status":400,"message":"There was a problem in the JSON you submitted:
40
- 795: unexpected token at ''member_key=guest\u0026per_page=1\u0026resources=offers''"}'
41
- http_version:
42
- recorded_at: Thu, 06 Aug 2015 17:30:02 GMT
43
- - request:
44
- method: get
45
- uri: https://offer-demo.adcrws.com/v1/autocomplete?member_key=guest&per_page=1&resources=offers
46
- body:
47
- encoding: US-ASCII
48
- string: ''
49
- headers:
50
- Access-Token:
51
- - token_without_limit
52
- Content-Type:
53
- - application/json
54
- Accept:
55
- - application/json
56
- response:
57
- status:
58
- code: 200
59
- message: OK
60
- headers:
61
- Access-Control-Allow-Headers:
62
- - Origin, X-Requested-With, Content-Type, Accept, Authorization, Access-Token
63
- Access-Control-Allow-Methods:
64
- - POST, GET, PUT, DELETE, OPTIONS
65
- Access-Control-Max-Age:
66
- - '1728000'
67
- Access-Control-Request-Method:
68
- - GET
69
- Cache-Control:
70
- - max-age=0, private, must-revalidate
71
- Content-Type:
72
- - application/json
73
- Date:
74
- - Thu, 06 Aug 2015 17:51:03 GMT
75
- Etag:
76
- - '"737fe2953dc52776edffd3b82e90d9c7"'
77
- Server:
78
- - nginx/1.6.2
79
- Strict-Transport-Security:
80
- - max-age=31536000
81
- X-Content-Type-Options:
82
- - nosniff
83
- X-Frame-Options:
84
- - SAMEORIGIN
85
- X-Request-Id:
86
- - 91b08a02-74aa-4680-b2f3-e27715929d92
87
- X-Runtime:
88
- - '0.021640'
89
- X-Xss-Protection:
90
- - 1; mode=block
91
- Content-Length:
92
- - '324'
93
- Connection:
94
- - keep-alive
95
- body:
96
- encoding: UTF-8
97
- string: |-
98
- {
99
- "suggestions": {
100
- "query": "*",
101
- "offers": [
102
- {
103
- "offer_name": "$10 off orders of $100 or more on Hockey Jerseys and apparel.",
104
- "offer_key": 13270045,
105
- "logo_url": "https://static-demo.accessdevelopment.com/brand/7f9fa6edc2308ae695aa8f43be8c4afa37812dfc/original.png"
106
- }
107
- ]
108
- }
109
- }
110
- http_version:
111
- recorded_at: Thu, 06 Aug 2015 17:51:03 GMT
112
3
  - request:
113
4
  method: get
114
5
  uri: https://offer-demo.adcrws.com/v1/autocomplete?member_key=API_RUBY_GEM_TEST&per_page=1&resources=offers
@@ -117,7 +8,7 @@ http_interactions:
117
8
  string: ''
118
9
  headers:
119
10
  Access-Token:
120
- - token_without_limit
11
+ - token_without_filters
121
12
  Content-Type:
122
13
  - application/json
123
14
  Accept:
@@ -140,23 +31,27 @@ http_interactions:
140
31
  Content-Type:
141
32
  - application/json
142
33
  Date:
143
- - Fri, 11 Sep 2015 20:33:10 GMT
34
+ - Wed, 16 Sep 2015 19:53:52 GMT
144
35
  Etag:
145
- - '"ced50892f93ae8511504eaaa018ff226"'
36
+ - '"90803bf345ccb08cd42940b88fb61c84"'
146
37
  Server:
147
38
  - nginx/1.6.2
148
39
  X-Content-Type-Options:
149
40
  - nosniff
150
41
  X-Frame-Options:
151
42
  - SAMEORIGIN
43
+ X-Ratelimit-Limit:
44
+ - '1000'
45
+ X-Ratelimit-Remaining:
46
+ - '999'
152
47
  X-Request-Id:
153
- - 15de36f3-a5aa-439f-95d3-fb399f4f16d6
48
+ - e882feab-a6d8-4e22-af03-5c18a6bd9c67
154
49
  X-Runtime:
155
- - '0.026311'
50
+ - '0.049246'
156
51
  X-Xss-Protection:
157
52
  - 1; mode=block
158
53
  Content-Length:
159
- - '274'
54
+ - '281'
160
55
  Connection:
161
56
  - keep-alive
162
57
  body:
@@ -167,13 +62,13 @@ http_interactions:
167
62
  "query": "*",
168
63
  "offers": [
169
64
  {
170
- "offer_name": "14.5% Reward",
171
- "offer_key": 8011936,
172
- "logo_url": "https://static-demo.accessdevelopment.com/brand/009b520d456af76b4f9f23bed2751ddef8847d84/original.png"
65
+ "offer_name": "$25 off your move.",
66
+ "offer_key": 10377601,
67
+ "logo_url": "https://static-demo.accessdevelopment.com/brand/ce5e8c481ee58af3412a7c05115f655211496593/original.png"
173
68
  }
174
69
  ]
175
70
  }
176
71
  }
177
72
  http_version:
178
- recorded_at: Fri, 11 Sep 2015 20:33:10 GMT
73
+ recorded_at: Wed, 16 Sep 2015 19:53:52 GMT
179
74
  recorded_with: VCR 2.9.3
@@ -1,116 +1,5 @@
1
1
  ---
2
2
  http_interactions:
3
- - request:
4
- method: get
5
- uri: https://offer-demo.adcrws.com/v1/autocomplete
6
- body:
7
- encoding: UTF-8
8
- string: member_key=guest&per_page=1&resources=stores
9
- headers:
10
- Access-Token:
11
- - token_without_limit
12
- Content-Type:
13
- - application/json
14
- Accept:
15
- - application/json
16
- response:
17
- status:
18
- code: 400
19
- message: Bad Request
20
- headers:
21
- Content-Type:
22
- - application/json
23
- Date:
24
- - Thu, 06 Aug 2015 17:30:01 GMT
25
- Server:
26
- - nginx/1.6.2
27
- Strict-Transport-Security:
28
- - max-age=31536000
29
- X-Request-Id:
30
- - c65aa250-6547-4f34-8afc-e361dd2b3345
31
- X-Runtime:
32
- - '0.000252'
33
- Content-Length:
34
- - '155'
35
- Connection:
36
- - keep-alive
37
- body:
38
- encoding: UTF-8
39
- string: '{"status":400,"message":"There was a problem in the JSON you submitted:
40
- 795: unexpected token at ''member_key=guest\u0026per_page=1\u0026resources=stores''"}'
41
- http_version:
42
- recorded_at: Thu, 06 Aug 2015 17:30:01 GMT
43
- - request:
44
- method: get
45
- uri: https://offer-demo.adcrws.com/v1/autocomplete?member_key=guest&per_page=1&resources=stores
46
- body:
47
- encoding: US-ASCII
48
- string: ''
49
- headers:
50
- Access-Token:
51
- - token_without_limit
52
- Content-Type:
53
- - application/json
54
- Accept:
55
- - application/json
56
- response:
57
- status:
58
- code: 200
59
- message: OK
60
- headers:
61
- Access-Control-Allow-Headers:
62
- - Origin, X-Requested-With, Content-Type, Accept, Authorization, Access-Token
63
- Access-Control-Allow-Methods:
64
- - POST, GET, PUT, DELETE, OPTIONS
65
- Access-Control-Max-Age:
66
- - '1728000'
67
- Access-Control-Request-Method:
68
- - GET
69
- Cache-Control:
70
- - max-age=0, private, must-revalidate
71
- Content-Type:
72
- - application/json
73
- Date:
74
- - Thu, 06 Aug 2015 17:51:03 GMT
75
- Etag:
76
- - '"670e144143266937250ca03cf44a90f1"'
77
- Server:
78
- - nginx/1.6.2
79
- Strict-Transport-Security:
80
- - max-age=31536000
81
- X-Content-Type-Options:
82
- - nosniff
83
- X-Frame-Options:
84
- - SAMEORIGIN
85
- X-Request-Id:
86
- - 57c87c91-2caf-4864-b875-21f0f642f986
87
- X-Runtime:
88
- - '0.017682'
89
- X-Xss-Protection:
90
- - 1; mode=block
91
- Content-Length:
92
- - '357'
93
- Connection:
94
- - keep-alive
95
- body:
96
- encoding: UTF-8
97
- string: |-
98
- {
99
- "suggestions": {
100
- "query": "*",
101
- "stores": [
102
- {
103
- "store_name": "Holiday Inn Express",
104
- "store_key": 18987225,
105
- "active_offer_count": 4143,
106
- "active_location_count": 2125,
107
- "logo_url": "https://static-demo.accessdevelopment.com/brand/ec6ba1ada0a010a8349931ec90e1c4620566ea8c/original.png"
108
- }
109
- ]
110
- }
111
- }
112
- http_version:
113
- recorded_at: Thu, 06 Aug 2015 17:51:03 GMT
114
3
  - request:
115
4
  method: get
116
5
  uri: https://offer-demo.adcrws.com/v1/autocomplete?member_key=API_RUBY_GEM_TEST&per_page=1&resources=stores
@@ -119,7 +8,7 @@ http_interactions:
119
8
  string: ''
120
9
  headers:
121
10
  Access-Token:
122
- - token_without_limit
11
+ - token_without_filters
123
12
  Content-Type:
124
13
  - application/json
125
14
  Accept:
@@ -142,23 +31,27 @@ http_interactions:
142
31
  Content-Type:
143
32
  - application/json
144
33
  Date:
145
- - Fri, 11 Sep 2015 20:33:10 GMT
34
+ - Wed, 16 Sep 2015 19:53:54 GMT
146
35
  Etag:
147
- - '"94be48e1efdb35ed4c479bc98c8ee235"'
36
+ - '"08956181a96a9f3bc89d47f5a54ddc94"'
148
37
  Server:
149
38
  - nginx/1.6.2
150
39
  X-Content-Type-Options:
151
40
  - nosniff
152
41
  X-Frame-Options:
153
42
  - SAMEORIGIN
43
+ X-Ratelimit-Limit:
44
+ - '1000'
45
+ X-Ratelimit-Remaining:
46
+ - '995'
154
47
  X-Request-Id:
155
- - 7bfee8f3-64fc-419e-a48a-7fe7ca70db40
48
+ - 953ded05-8d5a-4553-ac88-61f15e8b104e
156
49
  X-Runtime:
157
- - '0.025952'
50
+ - '0.019105'
158
51
  X-Xss-Protection:
159
52
  - 1; mode=block
160
53
  Content-Length:
161
- - '350'
54
+ - '362'
162
55
  Connection:
163
56
  - keep-alive
164
57
  body:
@@ -169,15 +62,15 @@ http_interactions:
169
62
  "query": "*",
170
63
  "stores": [
171
64
  {
172
- "store_name": "Best Western",
173
- "store_key": 18938146,
174
- "active_offer_count": 4166,
175
- "active_location_count": 4143,
176
- "logo_url": "https://static-demo.accessdevelopment.com/brand/4b7ea57028e8687857b509d711bd6b6c096a7b19/original.png"
65
+ "store_name": "Spafinder Wellness 365",
66
+ "store_key": 18939302,
67
+ "active_offer_count": 17165,
68
+ "active_location_count": 17165,
69
+ "logo_url": "https://static-demo.accessdevelopment.com/brand/6bbaa1000c933a5e91fa8f3113609e6c8ff19fdd/original.png"
177
70
  }
178
71
  ]
179
72
  }
180
73
  }
181
74
  http_version:
182
- recorded_at: Fri, 11 Sep 2015 20:33:10 GMT
75
+ recorded_at: Wed, 16 Sep 2015 19:53:54 GMT
183
76
  recorded_with: VCR 2.9.3