constantcontact-ruby 2.2.0 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 74ceb09ee19f5f7af57343c79fc8ef94416a1ae1
4
- data.tar.gz: 1ca40a24f720b500e490b8bcccdb3f54da184075
3
+ metadata.gz: cc7932183a3341a61e1933707bcde8b34115d8d0
4
+ data.tar.gz: 7f3eb06bd4f20d2c766e62f89e9c3a80ca86d82f
5
5
  SHA512:
6
- metadata.gz: 1f9e336a081468da87bfe1ba9cef99434083421030da104098f4cc67d13b5d65e89bb35067123b0ce518c046a56a841d4e6c113c0d61762d965db412b1fa7668
7
- data.tar.gz: c1d534fe869dc559ec6f6751ef7e7e17f3ba1b4b24b53cbd9a7d986ddc7a2ded8ec8478155760e25c07e3e53c88f904552826a76ed795bba80688843764df653
6
+ metadata.gz: ded3046bab4e82addb20cd44e765909064165b76b79ecdbc91e0b5ed452c86310349eb8ca07179040bf05b165c67c98fb5ff4e14afc371c47dc0ef2439569a19
7
+ data.tar.gz: 2042fa3a66068b0fb22ac8b587dbf807846262ae75e168b74cbe908b4cd21e4a547bb49208ed2c192a0a954723b94f672ba0c1fd6fa3675b664aa3f30eb92894
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "constantcontact-ruby"
8
- s.version = '2.2.0'
8
+ s.version = '2.2.1'
9
9
  s.platform = Gem::Platform::RUBY
10
10
  s.authors = ["ConstantContact", "ConferenceCloud"]
11
11
  s.homepage = "http://www.constantcontact.com"
@@ -13,11 +13,14 @@ module ConstantContact
13
13
  # Constructor to create a ResultSet from the results/meta response when performing a get on a collection
14
14
  # @param [Array<Hash>] results - results array from request
15
15
  # @param [Hash] meta - meta hash from request
16
- def initialize(results, meta, component = nil)
16
+ def initialize(results, meta, component = nil, method = :create_summary)
17
17
  @results = results
18
18
  if component.present?
19
19
  @component = component
20
20
  end
21
+ if method.present?
22
+ @method = method
23
+ end
21
24
 
22
25
  if meta.has_key?('pagination') and meta['pagination'].has_key?('next_link')
23
26
  @next_link = meta['pagination']['next_link']
@@ -36,7 +39,7 @@ module ConstantContact
36
39
  body = JSON.parse(response.body)
37
40
 
38
41
  events = body['results'].collect do |event|
39
- @component.create_summary(event)
42
+ @component.send(@method, event)
40
43
  end
41
44
 
42
45
  return Components::ResultSet.new(events, body['meta'], @component)
@@ -202,7 +202,7 @@ module ConstantContact
202
202
  Components::Registrant.create(registrant)
203
203
  end
204
204
 
205
- Components::ResultSet.new(registrants, body['meta'])
205
+ Components::ResultSet.new(registrants, body['meta'], Components::Registrant, :create)
206
206
  end
207
207
 
208
208
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: constantcontact-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ConstantContact
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-03-28 00:00:00.000000000 Z
12
+ date: 2016-04-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client