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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 67b5003d741bbb6c4bbfa2c7484924eb7f6a5382
4
- data.tar.gz: f7784759686b82bf53ea02367c51b9fa061e9049
3
+ metadata.gz: 985f539efdded92d37fb747e8233caac196b509a
4
+ data.tar.gz: 67dd8dfb7a31f883b1e2bf90712762d48f06d3ed
5
5
  SHA512:
6
- metadata.gz: edbb2dc373edac0044c8b3fe00d8ddd45187893fa92439e281a89e182d48345406ffd11f3a4070b8f535e83053ec1a0defc89490d3f04a4ba62c0b050128b546
7
- data.tar.gz: c1360eba241844392e5b0a1aa2682bcc3da635102746e7d05091b571e812f7b44e299aa9edf1418768ee92ae5d2b4ea1dfe226b00fa6345cfc192961bc5c2591
6
+ metadata.gz: b70eee132ed67c7474fdab50484080010eb607e1b52dbf0132d1b85dae2f2ce669fb55fc703e96e946f3e8c6fc881c3cff3483b9d70598c4875a1d38e30f8813
7
+ data.tar.gz: 253d53f43214b376d8ec7a40164c24fcbfff5053977e386b076f32dc210f5e09a550f1b22937ef652ed7cd369fa276504e69ae190fbbaffa0beb8bfccddd591c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- access (2.0.51)
4
+ access (2.0.52)
5
5
  hashie (~> 3.3.1)
6
6
  httparty (~> 0.13.3)
7
7
 
@@ -113,4 +113,4 @@ DEPENDENCIES
113
113
  webmock
114
114
 
115
115
  BUNDLED WITH
116
- 1.10.6
116
+ 1.13.1
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
@@ -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)
@@ -58,6 +58,12 @@ module Access
58
58
  end
59
59
  end
60
60
 
61
+ class ProductGroupResponse < Response
62
+ def process_data
63
+
64
+ end
65
+ end
66
+
61
67
  class StoreResponse < Response
62
68
  def process_data
63
69
  (@stores = []; create_error) if @message
@@ -1,4 +1,4 @@
1
1
  module Access
2
- VERSION = "2.0.51"
2
+ VERSION = "2.0.52"
3
3
  end
4
4
 
data/lib/access.rb CHANGED
@@ -23,6 +23,7 @@ require "access/member"
23
23
  require "access/oauth_application"
24
24
  require "access/offer"
25
25
  require "access/organization"
26
+ require "access/product_group"
26
27
  require "access/program"
27
28
  require "access/redeem"
28
29
  require "access/redemption"
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.51
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-04-20 00:00:00.000000000 Z
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.6
406
+ rubygems_version: 2.4.8
406
407
  signing_key:
407
408
  specification_version: 4
408
409
  summary: Ruby wrapper for Access API