access 2.0.9 → 2.0.10

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/api.rb +1 -1
  3. data/lib/access/version.rb +1 -1
  4. data/test/access/token_test.rb +1 -1
  5. data/test/fixtures/autocomplete_search.yml +25 -29
  6. data/test/fixtures/autocomplete_search_categories.yml +5 -9
  7. data/test/fixtures/autocomplete_search_locations.yml +5 -9
  8. data/test/fixtures/autocomplete_search_offers.yml +5 -9
  9. data/test/fixtures/autocomplete_search_stores.yml +12 -16
  10. data/test/fixtures/category_find.yml +5 -9
  11. data/test/fixtures/category_search.yml +10 -18
  12. data/test/fixtures/category_search_fail_member_key.yml +5 -9
  13. data/test/fixtures/filter_find.yml +7 -11
  14. data/test/fixtures/filter_search.yml +5 -9
  15. data/test/fixtures/location_find.yml +5 -9
  16. data/test/fixtures/location_search.yml +5 -9
  17. data/test/fixtures/location_search_fail_member_key.yml +5 -9
  18. data/test/fixtures/national_stores.yml +5 -9
  19. data/test/fixtures/oauth_application_find.yml +5 -9
  20. data/test/fixtures/oauth_application_search.yml +5 -9
  21. data/test/fixtures/oauth_application_token_find.yml +5 -9
  22. data/test/fixtures/oauth_application_token_search.yml +5 -9
  23. data/test/fixtures/offer_find.yml +5 -9
  24. data/test/fixtures/offer_search.yml +5 -9
  25. data/test/fixtures/offer_search_fail_member_key.yml +5 -9
  26. data/test/fixtures/redeem_offer_no_redeem_type.yml +8 -8
  27. data/test/fixtures/store_find.yml +5 -9
  28. data/test/fixtures/store_search.yml +5 -9
  29. data/test/fixtures/store_search_fail_member_key.yml +7 -11
  30. data/test/fixtures/subcategory_find.yml +5 -9
  31. data/test/fixtures/token_find.yml +14 -17
  32. data/test/fixtures/token_get_first_token.yml +106 -0
  33. data/test/fixtures/token_search.yml +16 -19
  34. data/test/fixtures/verify_filter.yml +5 -9
  35. data/test/fixtures/verify_token.yml +9 -13
  36. metadata +4 -2
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: ''
9
9
  headers:
10
10
  Access-Token:
11
- - token_without_filters
11
+ - token_without_limit
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
- - Wed, 16 Sep 2015 19:54:11 GMT
34
+ - Wed, 16 Sep 2015 20:14:04 GMT
35
35
  Etag:
36
36
  - '"ce03486f30b61bf0bc398fe3b1784f21"'
37
37
  Server:
@@ -40,14 +40,10 @@ http_interactions:
40
40
  - nosniff
41
41
  X-Frame-Options:
42
42
  - SAMEORIGIN
43
- X-Ratelimit-Limit:
44
- - '1000'
45
- X-Ratelimit-Remaining:
46
- - '955'
47
43
  X-Request-Id:
48
- - c530d95a-22a4-4a82-a00e-c3d1c031c496
44
+ - 701c2fd2-63e3-4e7e-b8b9-8c9e3663a517
49
45
  X-Runtime:
50
- - '0.037418'
46
+ - '0.038495'
51
47
  X-Xss-Protection:
52
48
  - 1; mode=block
53
49
  Content-Length:
@@ -148,5 +144,5 @@ http_interactions:
148
144
  by5hZGNyd3MuY29tL3YxL29mZmVycz9tZW1iZXJfa2V5PUFQSV9SVUJZX0dF
149
145
  TV9URVNUJnBhZ2U9MiZwZXJfcGFnZT0xJnF1ZXJ5PXBpenphIgogIH0KfQ==
150
146
  http_version:
151
- recorded_at: Wed, 16 Sep 2015 19:54:11 GMT
147
+ recorded_at: Wed, 16 Sep 2015 20:14:04 GMT
152
148
  recorded_with: VCR 2.9.3
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: ''
9
9
  headers:
10
10
  Access-Token:
11
- - token_without_filters
11
+ - token_without_limit
12
12
  Content-Type:
13
13
  - application/json
14
14
  Accept:
@@ -31,21 +31,17 @@ http_interactions:
31
31
  Content-Type:
32
32
  - application/json
33
33
  Date:
34
- - Wed, 16 Sep 2015 19:53:59 GMT
34
+ - Wed, 16 Sep 2015 20:14:03 GMT
35
35
  Server:
36
36
  - nginx/1.6.2
37
37
  X-Content-Type-Options:
38
38
  - nosniff
39
39
  X-Frame-Options:
40
40
  - SAMEORIGIN
41
- X-Ratelimit-Limit:
42
- - '1000'
43
- X-Ratelimit-Remaining:
44
- - '982'
45
41
  X-Request-Id:
46
- - b7d87196-1deb-42df-888c-df1de7ecf2e3
42
+ - 6131ec11-6bcd-4ecd-9f56-aace9adf7121
47
43
  X-Runtime:
48
- - '0.009222'
44
+ - '0.008647'
49
45
  X-Xss-Protection:
50
46
  - 1; mode=block
51
47
  Content-Length:
@@ -60,5 +56,5 @@ http_interactions:
60
56
  "status": 401
61
57
  }
62
58
  http_version:
63
- recorded_at: Wed, 16 Sep 2015 19:53:59 GMT
59
+ recorded_at: Wed, 16 Sep 2015 20:14:03 GMT
64
60
  recorded_with: VCR 2.9.3
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: ''
9
9
  headers:
10
10
  Access-Token:
11
- - token_without_filters
11
+ - token_without_limit
12
12
  Content-Type:
13
13
  - application/json
14
14
  Accept:
@@ -21,9 +21,9 @@ http_interactions:
21
21
  Content-Type:
22
22
  - application/json;charset=UTF-8
23
23
  Date:
24
- - Wed, 16 Sep 2015 19:54:11 GMT
24
+ - Wed, 16 Sep 2015 20:14:00 GMT
25
25
  Etag:
26
- - '"0f22995137cafd1ea14a80063a8509d4a"'
26
+ - '"077b1d5df0e5215bf378d3b4fb4fc7027"'
27
27
  Server:
28
28
  - nginx/1.6.2
29
29
  Content-Length:
@@ -32,9 +32,9 @@ http_interactions:
32
32
  - keep-alive
33
33
  body:
34
34
  encoding: UTF-8
35
- string: '{"redemption_method":"instore_print","content_type":"text/html","details":{"link":"http://static-demo.accessdevelopment.com/temp/coupon/b88e6adb451a2d67ea6a9b7c7c0613ca0d047300/original.html"},"links":[]}'
35
+ string: '{"redemption_method":"instore_print","content_type":"text/html","details":{"link":"http://static-demo.accessdevelopment.com/temp/coupon/34983fb3921fc7561b310804c87677f7c7dcb569/original.html"},"links":[]}'
36
36
  http_version:
37
- recorded_at: Wed, 16 Sep 2015 19:54:11 GMT
37
+ recorded_at: Wed, 16 Sep 2015 20:14:00 GMT
38
38
  - request:
39
39
  method: get
40
40
  uri: https://redeem-demo.adcrws.com/v1/redeem/7365285/?member_key=API_RUBY_GEM_TEST
@@ -43,7 +43,7 @@ http_interactions:
43
43
  string: ''
44
44
  headers:
45
45
  Access-Token:
46
- - token_without_filters
46
+ - token_without_limit
47
47
  Content-Type:
48
48
  - application/json
49
49
  Accept:
@@ -56,7 +56,7 @@ http_interactions:
56
56
  Content-Type:
57
57
  - application/json;charset=UTF-8
58
58
  Date:
59
- - Wed, 16 Sep 2015 19:54:12 GMT
59
+ - Wed, 16 Sep 2015 20:14:01 GMT
60
60
  Etag:
61
61
  - '"0ff5ab06abc27ae6bc33adccffb86e1ff"'
62
62
  Server:
@@ -69,5 +69,5 @@ http_interactions:
69
69
  encoding: UTF-8
70
70
  string: '{"links":[{"rel":"instore_print","href":"https://redeem-demo.adcrws.com/v1/redeem/7365285/instore_print?member_key=API_RUBY_GEM_TEST"}]}'
71
71
  http_version:
72
- recorded_at: Wed, 16 Sep 2015 19:54:12 GMT
72
+ recorded_at: Wed, 16 Sep 2015 20:14:01 GMT
73
73
  recorded_with: VCR 2.9.3
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: ''
9
9
  headers:
10
10
  Access-Token:
11
- - token_without_filters
11
+ - token_without_limit
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
- - Wed, 16 Sep 2015 19:54:00 GMT
34
+ - Wed, 16 Sep 2015 20:14:03 GMT
35
35
  Etag:
36
36
  - '"111a49e6ac3ee7f9c1b0ce782cd4a814"'
37
37
  Server:
@@ -40,14 +40,10 @@ http_interactions:
40
40
  - nosniff
41
41
  X-Frame-Options:
42
42
  - SAMEORIGIN
43
- X-Ratelimit-Limit:
44
- - '1000'
45
- X-Ratelimit-Remaining:
46
- - '977'
47
43
  X-Request-Id:
48
- - 989b5b3c-4004-4026-a4fb-bc50f4273ec2
44
+ - edbeb651-7091-4f7d-93ed-774453a6e399
49
45
  X-Runtime:
50
- - '0.017239'
46
+ - '0.019484'
51
47
  X-Xss-Protection:
52
48
  - 1; mode=block
53
49
  Content-Length:
@@ -84,5 +80,5 @@ http_interactions:
84
80
  ]
85
81
  }
86
82
  http_version:
87
- recorded_at: Wed, 16 Sep 2015 19:54:00 GMT
83
+ recorded_at: Wed, 16 Sep 2015 20:14:03 GMT
88
84
  recorded_with: VCR 2.9.3
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: ''
9
9
  headers:
10
10
  Access-Token:
11
- - token_without_filters
11
+ - token_without_limit
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
- - Wed, 16 Sep 2015 19:54:01 GMT
34
+ - Wed, 16 Sep 2015 20:14:02 GMT
35
35
  Etag:
36
36
  - '"35ba8d15d7773b5a5f28410567cc8ae8"'
37
37
  Server:
@@ -40,14 +40,10 @@ http_interactions:
40
40
  - nosniff
41
41
  X-Frame-Options:
42
42
  - SAMEORIGIN
43
- X-Ratelimit-Limit:
44
- - '1000'
45
- X-Ratelimit-Remaining:
46
- - '976'
47
43
  X-Request-Id:
48
- - 6c916ebb-c552-41c6-96be-e906e1b7df16
44
+ - fd31b244-bd1d-4bc8-b6c2-5a70e7636708
49
45
  X-Runtime:
50
- - '0.021473'
46
+ - '0.019872'
51
47
  X-Xss-Protection:
52
48
  - 1; mode=block
53
49
  Content-Length:
@@ -95,5 +91,5 @@ http_interactions:
95
91
  }
96
92
  }
97
93
  http_version:
98
- recorded_at: Wed, 16 Sep 2015 19:54:01 GMT
94
+ recorded_at: Wed, 16 Sep 2015 20:14:02 GMT
99
95
  recorded_with: VCR 2.9.3
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: ''
9
9
  headers:
10
10
  Access-Token:
11
- - token_without_filters
11
+ - token_without_limit
12
12
  Content-Type:
13
13
  - application/json
14
14
  Accept:
@@ -31,25 +31,21 @@ http_interactions:
31
31
  Content-Type:
32
32
  - application/json
33
33
  Date:
34
- - Wed, 16 Sep 2015 19:54:01 GMT
34
+ - Wed, 16 Sep 2015 20:14:02 GMT
35
35
  Server:
36
36
  - nginx/1.6.2
37
37
  X-Content-Type-Options:
38
38
  - nosniff
39
39
  X-Frame-Options:
40
40
  - SAMEORIGIN
41
- X-Ratelimit-Limit:
42
- - '1000'
43
- X-Ratelimit-Remaining:
44
- - '975'
45
41
  X-Request-Id:
46
- - e5f15617-cefb-4c01-81bf-e2398be06569
42
+ - 4c1f112e-80ee-496e-8023-562761d7d873
47
43
  X-Runtime:
48
- - '0.011506'
44
+ - '0.010880'
49
45
  X-Xss-Protection:
50
46
  - 1; mode=block
51
- Content-Length:
52
- - '77'
47
+ Transfer-Encoding:
48
+ - chunked
53
49
  Connection:
54
50
  - keep-alive
55
51
  body:
@@ -60,5 +56,5 @@ http_interactions:
60
56
  "status": 401
61
57
  }
62
58
  http_version:
63
- recorded_at: Wed, 16 Sep 2015 19:54:01 GMT
59
+ recorded_at: Wed, 16 Sep 2015 20:14:02 GMT
64
60
  recorded_with: VCR 2.9.3
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: ''
9
9
  headers:
10
10
  Access-Token:
11
- - token_without_filters
11
+ - token_without_limit
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
- - Wed, 16 Sep 2015 19:54:08 GMT
34
+ - Wed, 16 Sep 2015 20:14:09 GMT
35
35
  Etag:
36
36
  - '"3b24a9589e2b3a60e10a64353bf6118c"'
37
37
  Server:
@@ -40,14 +40,10 @@ http_interactions:
40
40
  - nosniff
41
41
  X-Frame-Options:
42
42
  - SAMEORIGIN
43
- X-Ratelimit-Limit:
44
- - '1000'
45
- X-Ratelimit-Remaining:
46
- - '964'
47
43
  X-Request-Id:
48
- - 31700876-1873-41da-a2ac-9c89d7493557
44
+ - 5bdf54b5-7654-4db0-8c8d-db21c5841409
49
45
  X-Runtime:
50
- - '0.030884'
46
+ - '0.029616'
51
47
  X-Xss-Protection:
52
48
  - 1; mode=block
53
49
  Content-Length:
@@ -148,5 +144,5 @@ http_interactions:
148
144
  ]
149
145
  }
150
146
  http_version:
151
- recorded_at: Wed, 16 Sep 2015 19:54:08 GMT
147
+ recorded_at: Wed, 16 Sep 2015 20:14:09 GMT
152
148
  recorded_with: VCR 2.9.3
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: ''
9
9
  headers:
10
10
  Access-Token:
11
- - token_without_filters
11
+ - token_without_limit
12
12
  Content-Type:
13
13
  - application/json
14
14
  Accept:
@@ -31,27 +31,23 @@ http_interactions:
31
31
  Content-Type:
32
32
  - application/json
33
33
  Date:
34
- - Wed, 16 Sep 2015 19:54:09 GMT
34
+ - Wed, 16 Sep 2015 20:13:59 GMT
35
35
  Etag:
36
- - '"394386753817095196c45e221b2139ff"'
36
+ - '"e3836bc59d9265551e703f4ddb9e396d"'
37
37
  Server:
38
38
  - nginx/1.6.2
39
39
  X-Content-Type-Options:
40
40
  - nosniff
41
41
  X-Frame-Options:
42
42
  - SAMEORIGIN
43
- X-Ratelimit-Limit:
44
- - '1000'
45
- X-Ratelimit-Remaining:
46
- - '960'
47
43
  X-Request-Id:
48
- - 80f2cba9-6172-451c-9e8c-7f2b548dcd02
44
+ - 185f4df1-c9d4-4272-abdc-9436e51931e3
49
45
  X-Runtime:
50
- - '0.015326'
46
+ - '0.015631'
51
47
  X-Xss-Protection:
52
48
  - 1; mode=block
53
49
  Content-Length:
54
- - '979'
50
+ - '1739'
55
51
  Connection:
56
52
  - keep-alive
57
53
  body:
@@ -76,20 +72,21 @@ http_interactions:
76
72
  "organization_id": 2000153,
77
73
  "organization_name": "BreakawaLoyalty",
78
74
  "organization_customer_identifier": "WEivv",
79
- "filter_id": null,
80
- "filter_name": null,
81
- "filter": null,
82
- "program_filter_id": null,
75
+ "filter_id": 35,
76
+ "filter_name": "Dining, Entertainment, Health/Beauty, Hotel, Services, Shopping",
77
+ "filter": "{\"offers\":[{\"terms\":{\"offer_set\":[\"DISCOUNT\"]}},{\"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]}}]}],\"locations\":[{\"or\":[{\"terms\":{\"location_categories.category_key\":[39,59,53,44,50,45]}},{\"terms\":{\"location_categories.category_parent_key\":[39,59,53,44,50,45]}}]}]}",
78
+ "program_filter_id": 169,
83
79
  "domains": [
84
80
 
85
81
  ],
86
82
  "application_scopes": [
87
-
83
+ "api",
84
+ "docs"
88
85
  ],
89
- "indexed_at": "2015-09-16T17:50:06.034Z",
86
+ "indexed_at": "2015-09-16T20:12:03.020Z",
90
87
  "token_status": "valid"
91
88
  }
92
89
  }
93
90
  http_version:
94
- recorded_at: Wed, 16 Sep 2015 19:54:09 GMT
91
+ recorded_at: Wed, 16 Sep 2015 20:13:59 GMT
95
92
  recorded_with: VCR 2.9.3
@@ -0,0 +1,106 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://token-demo.adcrws.com/v1/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
+ - Wed, 16 Sep 2015 20:13:59 GMT
35
+ Etag:
36
+ - '"5992f26524404981212c22eaf981a568"'
37
+ Server:
38
+ - nginx/1.6.2
39
+ X-Content-Type-Options:
40
+ - nosniff
41
+ X-Frame-Options:
42
+ - SAMEORIGIN
43
+ X-Request-Id:
44
+ - f8457057-1ced-46d5-948c-d5e45fbf530c
45
+ X-Runtime:
46
+ - '0.018561'
47
+ X-Xss-Protection:
48
+ - 1; mode=block
49
+ Content-Length:
50
+ - '2181'
51
+ Connection:
52
+ - keep-alive
53
+ body:
54
+ encoding: UTF-8
55
+ string: |-
56
+ {
57
+ "info": {
58
+ "total_results": 546,
59
+ "results_per_page": 1,
60
+ "current_page": 1,
61
+ "total_pages": 546
62
+ },
63
+ "oauth_tokens": [
64
+ {
65
+ "application_id": 837,
66
+ "token": "6a83e8e361cdd3eba145ccbabf05e65e8f3fa15544f808caa44aaf7f43e13e1f",
67
+ "expires_in": null,
68
+ "revoked_at": null,
69
+ "created_at": "2015-09-16T11:50:27.755-06:00",
70
+ "oauth_access_token_id": 959,
71
+ "application_name": "Breakaway Loyalty (pcid: 8983)",
72
+ "application_owner_id": 487,
73
+ "application_owner_type": "Program",
74
+ "program_id": 487,
75
+ "program_name": "Breakaway Loyalty",
76
+ "program_customer_identifier": "8983",
77
+ "program_start_dts": "2012-04-12T15:10:31.634-06:00",
78
+ "program_end_dts": "2018-12-30T17:00:00.000-07:00",
79
+ "organization_id": 2000153,
80
+ "organization_name": "BreakawaLoyalty",
81
+ "organization_customer_identifier": "WEivv",
82
+ "filter_id": 35,
83
+ "filter_name": "Dining, Entertainment, Health/Beauty, Hotel, Services, Shopping",
84
+ "filter": "{\"offers\":[{\"terms\":{\"offer_set\":[\"DISCOUNT\"]}},{\"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]}}]}],\"locations\":[{\"or\":[{\"terms\":{\"location_categories.category_key\":[39,59,53,44,50,45]}},{\"terms\":{\"location_categories.category_parent_key\":[39,59,53,44,50,45]}}]}]}",
85
+ "program_filter_id": 169,
86
+ "domains": [
87
+
88
+ ],
89
+ "application_scopes": [
90
+ "api",
91
+ "docs"
92
+ ],
93
+ "indexed_at": "2015-09-16T20:12:03.020Z",
94
+ "token_status": "valid",
95
+ "links": {
96
+ "show_oauth_token": "http://token-demo.adcrws.com/v1/tokens/6a83e8e361cdd3eba145ccbabf05e65e8f3fa15544f808caa44aaf7f43e13e1f"
97
+ }
98
+ }
99
+ ],
100
+ "links": {
101
+ "next_page": "https://token-demo.adcrws.com/v1/tokens?page=2&per_page=1"
102
+ }
103
+ }
104
+ http_version:
105
+ recorded_at: Wed, 16 Sep 2015 20:13:59 GMT
106
+ recorded_with: VCR 2.9.3