access 2.0.51 → 2.0.52
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/access/api.rb +7 -0
- data/lib/access/product_group.rb +30 -0
- data/lib/access/request.rb +3 -3
- data/lib/access/response.rb +6 -0
- data/lib/access/version.rb +1 -1
- data/lib/access.rb +1 -0
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 985f539efdded92d37fb747e8233caac196b509a
|
|
4
|
+
data.tar.gz: 67dd8dfb7a31f883b1e2bf90712762d48f06d3ed
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b70eee132ed67c7474fdab50484080010eb607e1b52dbf0132d1b85dae2f2ce669fb55fc703e96e946f3e8c6fc881c3cff3483b9d70598c4875a1d38e30f8813
|
|
7
|
+
data.tar.gz: 253d53f43214b376d8ec7a40164c24fcbfff5053977e386b076f32dc210f5e09a550f1b22937ef652ed7cd369fa276504e69ae190fbbaffa0beb8bfccddd591c
|
data/Gemfile.lock
CHANGED
data/lib/access/api.rb
CHANGED
|
@@ -33,6 +33,13 @@ module Access
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
#Product Groups
|
|
37
|
+
def search_product_groups(options = {})
|
|
38
|
+
request.get("/product_groups", "offer", options) do |response|
|
|
39
|
+
ProductGroupResponse.new(response)
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
36
43
|
# Locations
|
|
37
44
|
def search_locations(options = {})
|
|
38
45
|
request.get("/locations", "offer", options) do |response|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
module Access
|
|
2
|
+
class ProductGroup
|
|
3
|
+
include Access::MuchMeta
|
|
4
|
+
|
|
5
|
+
def initialize(values)
|
|
6
|
+
@used_fields = []
|
|
7
|
+
set_up_methods(values)
|
|
8
|
+
set_values(values)
|
|
9
|
+
# @categories = Access::Category.process_batch(@categories) if @categories
|
|
10
|
+
# @links = Access::Link.new(@links) if @links
|
|
11
|
+
# @offer_store = Access::Store.new(@offer_store) if @offer_store
|
|
12
|
+
# @offer_uses_remaining = Access::Redemption.new(@offer_uses_remaining) if @offer_uses_remaining
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def self.search(options = {})
|
|
17
|
+
Access::Api.new.search_product_groups options
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# def location
|
|
21
|
+
# @offer_store.physical_location
|
|
22
|
+
# end
|
|
23
|
+
|
|
24
|
+
# def store
|
|
25
|
+
# @offer_store
|
|
26
|
+
# end
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
end
|
|
30
|
+
end
|
data/lib/access/request.rb
CHANGED
|
@@ -8,9 +8,9 @@ module Access
|
|
|
8
8
|
@url = set_base(path, api_type, options.delete(:api_environment))
|
|
9
9
|
@headers = set_headers options.delete(:access_token)
|
|
10
10
|
@timeout = options.delete(:access_timeout) || Access.config.access_timeout
|
|
11
|
-
@return_json = should_return_json?(options.delete(:return_json))
|
|
12
|
-
@use_hashify = hashify_results?(options.delete(:hashify))
|
|
13
|
-
@debug_output = options.delete(:access_debug_output) || Access.config.access_debug_output
|
|
11
|
+
@return_json = should_return_json?(options.delete(:return_json).to_s)
|
|
12
|
+
@use_hashify = hashify_results?(options.delete(:hashify).to_s)
|
|
13
|
+
@debug_output = options.delete(:access_debug_output).to_s || Access.config.access_debug_output
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def get(path, api_type, options={}, &block)
|
data/lib/access/response.rb
CHANGED
data/lib/access/version.rb
CHANGED
data/lib/access.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: access
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.52
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ben Eggett
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2016-
|
|
13
|
+
date: 2016-09-19 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: bundler
|
|
@@ -254,6 +254,7 @@ files:
|
|
|
254
254
|
- lib/access/oauth_application.rb
|
|
255
255
|
- lib/access/offer.rb
|
|
256
256
|
- lib/access/organization.rb
|
|
257
|
+
- lib/access/product_group.rb
|
|
257
258
|
- lib/access/program.rb
|
|
258
259
|
- lib/access/redeem.rb
|
|
259
260
|
- lib/access/redemption.rb
|
|
@@ -402,7 +403,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
402
403
|
version: '0'
|
|
403
404
|
requirements: []
|
|
404
405
|
rubyforge_project:
|
|
405
|
-
rubygems_version: 2.4.
|
|
406
|
+
rubygems_version: 2.4.8
|
|
406
407
|
signing_key:
|
|
407
408
|
specification_version: 4
|
|
408
409
|
summary: Ruby wrapper for Access API
|