access 2.0.7 → 2.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/access.rb +1 -0
- data/lib/access/geolocation.rb +11 -0
- data/lib/access/location.rb +2 -0
- data/lib/access/version.rb +1 -1
- data/test/access/location_test.rb +2 -0
- data/test/access/offer_test.rb +1 -0
- data/test/fixtures/autocomplete_search.yml +30 -149
- data/test/fixtures/autocomplete_search_categories.yml +15 -120
- data/test/fixtures/autocomplete_search_locations.yml +9 -110
- data/test/fixtures/autocomplete_search_offers.yml +14 -119
- data/test/fixtures/autocomplete_search_stores.yml +16 -123
- data/test/fixtures/category_find.yml +9 -155
- data/test/fixtures/category_search.yml +18 -3588
- data/test/fixtures/category_search_fail_member_key.yml +9 -45
- data/test/fixtures/filter_find.yml +14 -77
- data/test/fixtures/filter_search.yml +16 -128
- data/test/fixtures/location_find.yml +414 -891
- data/test/fixtures/location_search.yml +69 -327
- data/test/fixtures/location_search_fail_member_key.yml +9 -310
- data/test/fixtures/national_stores.yml +1717 -3854
- data/test/fixtures/oauth_application_find.yml +9 -85
- data/test/fixtures/oauth_application_search.yml +12 -48
- data/test/fixtures/oauth_application_token_find.yml +9 -159
- data/test/fixtures/oauth_application_token_search.yml +9 -5
- data/test/fixtures/offer_find.yml +12 -555
- data/test/fixtures/offer_search.yml +12 -189
- data/test/fixtures/offer_search_fail_member_key.yml +9 -45
- data/test/fixtures/redeem_offer_no_redeem_type.yml +9 -359
- data/test/fixtures/store_find.yml +9 -501
- data/test/fixtures/store_search.yml +9 -135
- data/test/fixtures/store_search_fail_member_key.yml +9 -45
- data/test/fixtures/subcategory_find.yml +9 -145
- data/test/fixtures/token_find.yml +27 -356
- data/test/fixtures/token_search.yml +35 -224
- data/test/fixtures/verify_filter.yml +9 -5
- data/test/fixtures/verify_token.yml +13 -9
- metadata +2 -3
- data/test/fixtures/oauth_application_search_fail_member_key.yml +0 -268
@@ -1,85 +1,5 @@
|
|
1
1
|
---
|
2
2
|
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://token-demo.adcrws.com/v1/oauth_applications/22?member_key=guest
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
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: 200
|
19
|
-
message: OK
|
20
|
-
headers:
|
21
|
-
Access-Control-Allow-Headers:
|
22
|
-
- Origin, X-Requested-With, Content-Type, Accept, Authorization, Access-Token
|
23
|
-
Access-Control-Allow-Methods:
|
24
|
-
- POST, GET, PUT, DELETE, OPTIONS
|
25
|
-
Access-Control-Max-Age:
|
26
|
-
- '1728000'
|
27
|
-
Access-Control-Request-Method:
|
28
|
-
- GET
|
29
|
-
Cache-Control:
|
30
|
-
- max-age=0, private, must-revalidate
|
31
|
-
Content-Type:
|
32
|
-
- application/json
|
33
|
-
Date:
|
34
|
-
- Tue, 04 Aug 2015 21:47:34 GMT
|
35
|
-
Etag:
|
36
|
-
- '"a6b45fc13ff04948fb90164dd38b7ee4"'
|
37
|
-
Server:
|
38
|
-
- nginx/1.6.2
|
39
|
-
Strict-Transport-Security:
|
40
|
-
- max-age=31536000
|
41
|
-
X-Content-Type-Options:
|
42
|
-
- nosniff
|
43
|
-
X-Frame-Options:
|
44
|
-
- SAMEORIGIN
|
45
|
-
X-Request-Id:
|
46
|
-
- 36271a38-0fb3-489e-8dda-a6e837eb4701
|
47
|
-
X-Runtime:
|
48
|
-
- '0.044363'
|
49
|
-
X-Xss-Protection:
|
50
|
-
- 1; mode=block
|
51
|
-
Content-Length:
|
52
|
-
- '475'
|
53
|
-
Connection:
|
54
|
-
- keep-alive
|
55
|
-
body:
|
56
|
-
encoding: UTF-8
|
57
|
-
string: |-
|
58
|
-
{
|
59
|
-
"oauth_applications": [
|
60
|
-
{
|
61
|
-
"id": 22,
|
62
|
-
"name": "American Grandparents Association",
|
63
|
-
"owner_id": 235308134,
|
64
|
-
"owner_type": "Program",
|
65
|
-
"domain_urls": null,
|
66
|
-
"scopes": [
|
67
|
-
"api",
|
68
|
-
"docs"
|
69
|
-
],
|
70
|
-
"active_tokens": [
|
71
|
-
"e4db3fb9a054e78807c431e837c49a59553c73204de91d404fe43d12c247f805"
|
72
|
-
],
|
73
|
-
"filter": {
|
74
|
-
"filter_id": 18,
|
75
|
-
"filter_name": "Grandparents"
|
76
|
-
},
|
77
|
-
"links": null
|
78
|
-
}
|
79
|
-
]
|
80
|
-
}
|
81
|
-
http_version:
|
82
|
-
recorded_at: Tue, 04 Aug 2015 21:47:34 GMT
|
83
3
|
- request:
|
84
4
|
method: get
|
85
5
|
uri: https://token-demo.adcrws.com/v1/oauth_applications/22
|
@@ -88,7 +8,7 @@ http_interactions:
|
|
88
8
|
string: ''
|
89
9
|
headers:
|
90
10
|
Access-Token:
|
91
|
-
-
|
11
|
+
- token_without_filters
|
92
12
|
Content-Type:
|
93
13
|
- application/json
|
94
14
|
Accept:
|
@@ -111,7 +31,7 @@ http_interactions:
|
|
111
31
|
Content-Type:
|
112
32
|
- application/json
|
113
33
|
Date:
|
114
|
-
-
|
34
|
+
- Wed, 16 Sep 2015 19:53:56 GMT
|
115
35
|
Etag:
|
116
36
|
- '"a6b45fc13ff04948fb90164dd38b7ee4"'
|
117
37
|
Server:
|
@@ -120,10 +40,14 @@ http_interactions:
|
|
120
40
|
- nosniff
|
121
41
|
X-Frame-Options:
|
122
42
|
- SAMEORIGIN
|
43
|
+
X-Ratelimit-Limit:
|
44
|
+
- '1000'
|
45
|
+
X-Ratelimit-Remaining:
|
46
|
+
- '990'
|
123
47
|
X-Request-Id:
|
124
|
-
-
|
48
|
+
- 7eb14344-ee16-4fad-bdb3-38a6eb0d17c5
|
125
49
|
X-Runtime:
|
126
|
-
- '0.
|
50
|
+
- '0.039285'
|
127
51
|
X-Xss-Protection:
|
128
52
|
- 1; mode=block
|
129
53
|
Content-Length:
|
@@ -157,5 +81,5 @@ http_interactions:
|
|
157
81
|
]
|
158
82
|
}
|
159
83
|
http_version:
|
160
|
-
recorded_at:
|
84
|
+
recorded_at: Wed, 16 Sep 2015 19:53:56 GMT
|
161
85
|
recorded_with: VCR 2.9.3
|
@@ -1,45 +1,5 @@
|
|
1
1
|
---
|
2
2
|
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://token-demo.adcrws.com/v1/oauth_applications
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: per_page=1
|
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:00 GMT
|
25
|
-
Server:
|
26
|
-
- nginx/1.6.2
|
27
|
-
Strict-Transport-Security:
|
28
|
-
- max-age=31536000
|
29
|
-
X-Request-Id:
|
30
|
-
- eae4639f-45a0-4fd4-9da6-414112ffd2d9
|
31
|
-
X-Runtime:
|
32
|
-
- '0.000797'
|
33
|
-
Content-Length:
|
34
|
-
- '111'
|
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 ''per_page=1''"}'
|
41
|
-
http_version:
|
42
|
-
recorded_at: Thu, 06 Aug 2015 17:30:00 GMT
|
43
3
|
- request:
|
44
4
|
method: get
|
45
5
|
uri: https://token-demo.adcrws.com/v1/oauth_applications?per_page=1
|
@@ -48,7 +8,7 @@ http_interactions:
|
|
48
8
|
string: ''
|
49
9
|
headers:
|
50
10
|
Access-Token:
|
51
|
-
-
|
11
|
+
- token_without_filters
|
52
12
|
Content-Type:
|
53
13
|
- application/json
|
54
14
|
Accept:
|
@@ -71,19 +31,23 @@ http_interactions:
|
|
71
31
|
Content-Type:
|
72
32
|
- application/json
|
73
33
|
Date:
|
74
|
-
-
|
34
|
+
- Wed, 16 Sep 2015 19:53:58 GMT
|
75
35
|
Etag:
|
76
|
-
- '"
|
36
|
+
- '"49e22394112ea925e81da26dd2ec0def"'
|
77
37
|
Server:
|
78
38
|
- nginx/1.6.2
|
79
39
|
X-Content-Type-Options:
|
80
40
|
- nosniff
|
81
41
|
X-Frame-Options:
|
82
42
|
- SAMEORIGIN
|
43
|
+
X-Ratelimit-Limit:
|
44
|
+
- '1000'
|
45
|
+
X-Ratelimit-Remaining:
|
46
|
+
- '986'
|
83
47
|
X-Request-Id:
|
84
|
-
-
|
48
|
+
- d4df9c1c-5614-4fd2-ac10-c747a604228e
|
85
49
|
X-Runtime:
|
86
|
-
- '0.
|
50
|
+
- '0.042679'
|
87
51
|
X-Xss-Protection:
|
88
52
|
- 1; mode=block
|
89
53
|
Content-Length:
|
@@ -95,10 +59,10 @@ http_interactions:
|
|
95
59
|
string: |-
|
96
60
|
{
|
97
61
|
"info": {
|
98
|
-
"total_results":
|
62
|
+
"total_results": 715,
|
99
63
|
"results_per_page": 1,
|
100
64
|
"current_page": 1,
|
101
|
-
"total_pages":
|
65
|
+
"total_pages": 715
|
102
66
|
},
|
103
67
|
"oauth_applications": [
|
104
68
|
{
|
@@ -128,5 +92,5 @@ http_interactions:
|
|
128
92
|
}
|
129
93
|
}
|
130
94
|
http_version:
|
131
|
-
recorded_at:
|
95
|
+
recorded_at: Wed, 16 Sep 2015 19:53:58 GMT
|
132
96
|
recorded_with: VCR 2.9.3
|
@@ -1,159 +1,5 @@
|
|
1
1
|
---
|
2
2
|
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://token-demo.adcrws.com/v1/oauth_applications/22/access_tokens?per_page=1
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
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: 200
|
19
|
-
message: OK
|
20
|
-
headers:
|
21
|
-
Access-Control-Allow-Headers:
|
22
|
-
- Origin, X-Requested-With, Content-Type, Accept, Authorization, Access-Token
|
23
|
-
Access-Control-Allow-Methods:
|
24
|
-
- POST, GET, PUT, DELETE, OPTIONS
|
25
|
-
Access-Control-Max-Age:
|
26
|
-
- '1728000'
|
27
|
-
Access-Control-Request-Method:
|
28
|
-
- GET
|
29
|
-
Cache-Control:
|
30
|
-
- max-age=0, private, must-revalidate
|
31
|
-
Content-Type:
|
32
|
-
- application/json
|
33
|
-
Date:
|
34
|
-
- Thu, 06 Aug 2015 21:04:49 GMT
|
35
|
-
Etag:
|
36
|
-
- '"0fb387c8aa3518c772103baf04d09005"'
|
37
|
-
Server:
|
38
|
-
- nginx/1.6.2
|
39
|
-
Strict-Transport-Security:
|
40
|
-
- max-age=31536000
|
41
|
-
X-Content-Type-Options:
|
42
|
-
- nosniff
|
43
|
-
X-Frame-Options:
|
44
|
-
- SAMEORIGIN
|
45
|
-
X-Request-Id:
|
46
|
-
- b98fe543-f3d7-4c96-a6fa-894064cf58cc
|
47
|
-
X-Runtime:
|
48
|
-
- '0.050157'
|
49
|
-
X-Xss-Protection:
|
50
|
-
- 1; mode=block
|
51
|
-
Content-Length:
|
52
|
-
- '1691'
|
53
|
-
Connection:
|
54
|
-
- keep-alive
|
55
|
-
body:
|
56
|
-
encoding: UTF-8
|
57
|
-
string: |-
|
58
|
-
{
|
59
|
-
"access_tokens": [
|
60
|
-
{
|
61
|
-
"application_id": 22,
|
62
|
-
"token": "e4db3fb9a054e78807c431e837c49a59553c73204de91d404fe43d12c247f805",
|
63
|
-
"expires_in": null,
|
64
|
-
"revoked_at": null,
|
65
|
-
"created_at": "2015-01-21T22:43:31.006Z",
|
66
|
-
"oauth_access_token_id": 43,
|
67
|
-
"application_name": "American Grandparents Association",
|
68
|
-
"application_owner_id": 22,
|
69
|
-
"application_owner_type": "Program",
|
70
|
-
"program_id": 235308134,
|
71
|
-
"program_name": "American Grandparents Association",
|
72
|
-
"program_customer_identifier": "102149",
|
73
|
-
"program_start_dts": "2015-01-21T15:12:55.570Z",
|
74
|
-
"program_end_dts": "2018-01-21T15:12:56.000Z",
|
75
|
-
"organization_id": 2001959,
|
76
|
-
"organization_name": "American Grandparents Association",
|
77
|
-
"organization_customer_identifier": "2001923",
|
78
|
-
"filter_id": 18,
|
79
|
-
"filter_name": "Grandparents",
|
80
|
-
"filter": "{\"offers\":[{\"or\":[{\"terms\":{\"categories.category_key\":[39,44,48,59,1039,54,45,50]}},{\"terms\":{\"categories.category_parent_key\":[39,44,48,59,1039,54,45,50]}}]}],\"categories\":[{\"or\":[{\"terms\":{\"category_key\":[39,44,48,59,1039,54,45,50]}},{\"terms\":{\"category_parent_key\":[39,44,48,59,1039,54,45,50]}}]}],\"stores\":[{\"or\":[{\"terms\":{\"store_categories.category_key\":[39,44,48,59,1039,54,45,50]}},{\"terms\":{\"store_categories.category_parent_key\":[39,44,48,59,1039,54,45,50]}}]}]}",
|
81
|
-
"program_filter_id": 95,
|
82
|
-
"domains": [
|
83
|
-
|
84
|
-
],
|
85
|
-
"application_scopes": [
|
86
|
-
"api",
|
87
|
-
"docs"
|
88
|
-
],
|
89
|
-
"token_status": "valid",
|
90
|
-
"links": {
|
91
|
-
"show_token": "https://token-demo.adcrws.com/v1/oauth_applications/22/access_tokens/43"
|
92
|
-
}
|
93
|
-
}
|
94
|
-
]
|
95
|
-
}
|
96
|
-
http_version:
|
97
|
-
recorded_at: Thu, 06 Aug 2015 21:04:49 GMT
|
98
|
-
- request:
|
99
|
-
method: get
|
100
|
-
uri: https://token-demo.adcrws.com/v1/oauth_applications/22/access_tokens/e4db3fb9a054e78807c431e837c49a59553c73204de91d404fe43d12c247f805
|
101
|
-
body:
|
102
|
-
encoding: US-ASCII
|
103
|
-
string: ''
|
104
|
-
headers:
|
105
|
-
Access-Token:
|
106
|
-
- token_without_limit
|
107
|
-
Content-Type:
|
108
|
-
- application/json
|
109
|
-
Accept:
|
110
|
-
- application/json
|
111
|
-
response:
|
112
|
-
status:
|
113
|
-
code: 422
|
114
|
-
message: Unprocessable Entity
|
115
|
-
headers:
|
116
|
-
Access-Control-Allow-Headers:
|
117
|
-
- Origin, X-Requested-With, Content-Type, Accept, Authorization, Access-Token
|
118
|
-
Access-Control-Allow-Methods:
|
119
|
-
- POST, GET, PUT, DELETE, OPTIONS
|
120
|
-
Access-Control-Max-Age:
|
121
|
-
- '1728000'
|
122
|
-
Access-Control-Request-Method:
|
123
|
-
- GET
|
124
|
-
Cache-Control:
|
125
|
-
- no-cache
|
126
|
-
Content-Type:
|
127
|
-
- application/json
|
128
|
-
Date:
|
129
|
-
- Thu, 06 Aug 2015 21:16:10 GMT
|
130
|
-
Server:
|
131
|
-
- nginx/1.6.2
|
132
|
-
Strict-Transport-Security:
|
133
|
-
- max-age=31536000
|
134
|
-
X-Content-Type-Options:
|
135
|
-
- nosniff
|
136
|
-
X-Frame-Options:
|
137
|
-
- SAMEORIGIN
|
138
|
-
X-Request-Id:
|
139
|
-
- b1e8eb4c-4662-4cae-8a3b-7e55504155e9
|
140
|
-
X-Runtime:
|
141
|
-
- '0.037094'
|
142
|
-
X-Xss-Protection:
|
143
|
-
- 1; mode=block
|
144
|
-
Content-Length:
|
145
|
-
- '63'
|
146
|
-
Connection:
|
147
|
-
- keep-alive
|
148
|
-
body:
|
149
|
-
encoding: UTF-8
|
150
|
-
string: |-
|
151
|
-
{
|
152
|
-
"message": "Access Token was not found.",
|
153
|
-
"status": 422
|
154
|
-
}
|
155
|
-
http_version:
|
156
|
-
recorded_at: Thu, 06 Aug 2015 21:16:10 GMT
|
157
3
|
- request:
|
158
4
|
method: get
|
159
5
|
uri: https://token-demo.adcrws.com/v1/oauth_applications/22/access_tokens/43
|
@@ -162,7 +8,7 @@ http_interactions:
|
|
162
8
|
string: ''
|
163
9
|
headers:
|
164
10
|
Access-Token:
|
165
|
-
-
|
11
|
+
- token_without_filters
|
166
12
|
Content-Type:
|
167
13
|
- application/json
|
168
14
|
Accept:
|
@@ -185,7 +31,7 @@ http_interactions:
|
|
185
31
|
Content-Type:
|
186
32
|
- application/json
|
187
33
|
Date:
|
188
|
-
-
|
34
|
+
- Wed, 16 Sep 2015 19:53:58 GMT
|
189
35
|
Etag:
|
190
36
|
- '"ec970e995d044f34d7f17f46f152706e"'
|
191
37
|
Server:
|
@@ -194,10 +40,14 @@ http_interactions:
|
|
194
40
|
- nosniff
|
195
41
|
X-Frame-Options:
|
196
42
|
- SAMEORIGIN
|
43
|
+
X-Ratelimit-Limit:
|
44
|
+
- '1000'
|
45
|
+
X-Ratelimit-Remaining:
|
46
|
+
- '984'
|
197
47
|
X-Request-Id:
|
198
|
-
-
|
48
|
+
- e2bdd78a-3863-4f29-a09f-4190976b3bd0
|
199
49
|
X-Runtime:
|
200
|
-
- '0.
|
50
|
+
- '0.047566'
|
201
51
|
X-Xss-Protection:
|
202
52
|
- 1; mode=block
|
203
53
|
Content-Length:
|
@@ -243,5 +93,5 @@ http_interactions:
|
|
243
93
|
]
|
244
94
|
}
|
245
95
|
http_version:
|
246
|
-
recorded_at:
|
96
|
+
recorded_at: Wed, 16 Sep 2015 19:53:58 GMT
|
247
97
|
recorded_with: VCR 2.9.3
|
@@ -8,7 +8,7 @@ http_interactions:
|
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
Access-Token:
|
11
|
-
-
|
11
|
+
- token_without_filters
|
12
12
|
Content-Type:
|
13
13
|
- application/json
|
14
14
|
Accept:
|
@@ -31,7 +31,7 @@ http_interactions:
|
|
31
31
|
Content-Type:
|
32
32
|
- application/json
|
33
33
|
Date:
|
34
|
-
-
|
34
|
+
- Wed, 16 Sep 2015 19:53:58 GMT
|
35
35
|
Etag:
|
36
36
|
- '"0fb387c8aa3518c772103baf04d09005"'
|
37
37
|
Server:
|
@@ -40,10 +40,14 @@ http_interactions:
|
|
40
40
|
- nosniff
|
41
41
|
X-Frame-Options:
|
42
42
|
- SAMEORIGIN
|
43
|
+
X-Ratelimit-Limit:
|
44
|
+
- '1000'
|
45
|
+
X-Ratelimit-Remaining:
|
46
|
+
- '985'
|
43
47
|
X-Request-Id:
|
44
|
-
-
|
48
|
+
- cae6b4fb-b408-4fda-8149-2d5d6dd3cbc4
|
45
49
|
X-Runtime:
|
46
|
-
- '0.
|
50
|
+
- '0.047262'
|
47
51
|
X-Xss-Protection:
|
48
52
|
- 1; mode=block
|
49
53
|
Content-Length:
|
@@ -92,5 +96,5 @@ http_interactions:
|
|
92
96
|
]
|
93
97
|
}
|
94
98
|
http_version:
|
95
|
-
recorded_at:
|
99
|
+
recorded_at: Wed, 16 Sep 2015 19:53:58 GMT
|
96
100
|
recorded_with: VCR 2.9.3
|