constantcontact 1.2.0 → 1.3.2
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 +7 -0
- data/README.md +1 -1
- data/constantcontact.gemspec +1 -1
- data/lib/constantcontact.rb +16 -1
- data/lib/constantcontact/api.rb +5 -0
- data/lib/constantcontact/components/account/account_info.rb +31 -0
- data/lib/constantcontact/exceptions/webhooks_exception.rb +11 -0
- data/lib/constantcontact/services/account_service.rb +13 -2
- data/lib/constantcontact/services/base_service.rb +8 -3
- data/lib/constantcontact/util/config.rb +8 -5
- data/lib/constantcontact/version.rb +1 -1
- data/lib/constantcontact/webhooks/helpers/validator.rb +30 -0
- data/lib/constantcontact/webhooks/models/billing_change_notification.rb +27 -0
- data/lib/constantcontact/webhooks/webhooks_util.rb +45 -0
- data/spec/constantcontact/services/account_service_spec.rb +26 -0
- data/spec/constantcontact/services/base_service_spec.rb +29 -7
- data/spec/constantcontact/webhooks/webhooks_spec.rb +26 -0
- metadata +42 -45
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 7ec7eddab3cbc734afcf72f8bcf34529a7dee134
|
|
4
|
+
data.tar.gz: 2bea0ebb2a606bd96845351699ca6b06495b1d1e
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: ffbf85e9c9809dd910f214a98816ec8e8e3f94f79a5a21e0f6e82b086ca9d7b2d0802ca1d462dfed3cfe78ebc7d7ea1eda6c7b1b03acce1641eea9345da6ce1f
|
|
7
|
+
data.tar.gz: 01a11bbb4d02fca3d7d86fe7991d35de87f5f468b9fc28ff983053734670b0562b4048618bc903e57040a429cb8e2ef8b1cd5c54555c3f0e74e71310634a3c47
|
data/README.md
CHANGED
data/constantcontact.gemspec
CHANGED
|
@@ -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"
|
|
8
|
-
s.version = '1.2
|
|
8
|
+
s.version = '1.3.2'
|
|
9
9
|
s.platform = Gem::Platform::RUBY
|
|
10
10
|
s.authors = ["ConstantContact"]
|
|
11
11
|
s.homepage = "http://www.constantcontact.com"
|
data/lib/constantcontact.rb
CHANGED
|
@@ -10,9 +10,12 @@ require 'json'
|
|
|
10
10
|
require 'cgi'
|
|
11
11
|
require 'cgi/session'
|
|
12
12
|
require 'cgi/session/pstore'
|
|
13
|
+
require 'openssl'
|
|
14
|
+
require 'base64'
|
|
13
15
|
|
|
14
16
|
module ConstantContact
|
|
15
17
|
autoload :Api, 'constantcontact/api'
|
|
18
|
+
autoload :WebhooksUtil, 'constantcontact/webhooks/webhooks_util'
|
|
16
19
|
autoload :SDK, 'constantcontact/version'
|
|
17
20
|
|
|
18
21
|
module Auth
|
|
@@ -48,6 +51,7 @@ module ConstantContact
|
|
|
48
51
|
autoload :TrackingActivity, 'constantcontact/components/tracking/tracking_activity'
|
|
49
52
|
autoload :TrackingSummary, 'constantcontact/components/tracking/tracking_summary'
|
|
50
53
|
autoload :VerifiedEmailAddress, 'constantcontact/components/account/verified_email_address'
|
|
54
|
+
autoload :AccountInfo, 'constantcontact/components/account/account_info'
|
|
51
55
|
autoload :Event, 'constantcontact/components/event_spot/event'
|
|
52
56
|
autoload :EventFee, 'constantcontact/components/event_spot/event_fee'
|
|
53
57
|
autoload :Registrant, 'constantcontact/components/event_spot/registrant'
|
|
@@ -84,6 +88,7 @@ module ConstantContact
|
|
|
84
88
|
autoload :CtctException, 'constantcontact/exceptions/ctct_exception'
|
|
85
89
|
autoload :IllegalArgumentException, 'constantcontact/exceptions/illegal_argument_exception'
|
|
86
90
|
autoload :OAuth2Exception, 'constantcontact/exceptions/oauth2_exception'
|
|
91
|
+
autoload :WebhooksException, 'constantcontact/exceptions/webhooks_exception'
|
|
87
92
|
end
|
|
88
93
|
|
|
89
94
|
module Services
|
|
@@ -104,4 +109,14 @@ module ConstantContact
|
|
|
104
109
|
autoload :Config, 'constantcontact/util/config'
|
|
105
110
|
autoload :Helpers, 'constantcontact/util/helpers'
|
|
106
111
|
end
|
|
107
|
-
|
|
112
|
+
|
|
113
|
+
module Webhooks
|
|
114
|
+
module Helpers
|
|
115
|
+
autoload :Validator, 'constantcontact/webhooks/helpers/validator'
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
module Models
|
|
119
|
+
autoload :BillingChangeNotification, 'constantcontact/webhooks/models/billing_change_notification'
|
|
120
|
+
end
|
|
121
|
+
end
|
|
122
|
+
end
|
data/lib/constantcontact/api.rb
CHANGED
|
@@ -17,6 +17,11 @@ module ConstantContact
|
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
|
|
20
|
+
def get_account_info(access_token)
|
|
21
|
+
Services::AccountService.get_account_info(access_token)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
|
|
20
25
|
# Get verified addresses for the account
|
|
21
26
|
# @param [String] access_token - Valid access token
|
|
22
27
|
# @param [String] status - status to filter query results by
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#
|
|
2
|
+
# account_info.rb
|
|
3
|
+
# ConstantContact
|
|
4
|
+
#
|
|
5
|
+
# Copyright (c) 2013 Constant Contact. All rights reserved.
|
|
6
|
+
|
|
7
|
+
module ConstantContact
|
|
8
|
+
module Components
|
|
9
|
+
class AccountInfo < Component
|
|
10
|
+
attr_accessor :website, :organization_name, :first_name, :last_name, :email, :phone, :country_code, :state_code
|
|
11
|
+
|
|
12
|
+
# Class constructor
|
|
13
|
+
# @return [AccountInfo]
|
|
14
|
+
def initialize
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Factory method to create an AccountInfo object from a json string
|
|
18
|
+
# @param [Hash] props - properties to create object from
|
|
19
|
+
# @return [AccountInfo]
|
|
20
|
+
def self.create(props)
|
|
21
|
+
obj = AccountInfo.new
|
|
22
|
+
if props
|
|
23
|
+
props.each do |key, value|
|
|
24
|
+
obj.send("#{key}=", value) if obj.respond_to? key
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
obj
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
#
|
|
2
|
+
# account_service.rb
|
|
3
3
|
# ConstantContact
|
|
4
4
|
#
|
|
5
5
|
# Copyright (c) 2013 Constant Contact. All rights reserved.
|
|
@@ -9,6 +9,17 @@ module ConstantContact
|
|
|
9
9
|
class AccountService < BaseService
|
|
10
10
|
class << self
|
|
11
11
|
|
|
12
|
+
# Get a summary of account information
|
|
13
|
+
# @param [String] access_token
|
|
14
|
+
# @return
|
|
15
|
+
def get_account_info(access_token)
|
|
16
|
+
url = Util::Config.get('endpoints.base_url') + Util::Config.get('endpoints.account_info')
|
|
17
|
+
url = build_url(url)
|
|
18
|
+
response = RestClient.get(url, get_headers(access_token))
|
|
19
|
+
Components::AccountInfo.create(JSON.parse(response.body))
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
|
|
12
23
|
# Get all verified email addresses associated with an account
|
|
13
24
|
# @param [String] access_token - Constant Contact OAuth2 access token
|
|
14
25
|
# @param [Hash] params - hash of query parameters/values to append to the request
|
|
@@ -27,4 +38,4 @@ module ConstantContact
|
|
|
27
38
|
end
|
|
28
39
|
end
|
|
29
40
|
end
|
|
30
|
-
end
|
|
41
|
+
end
|
|
@@ -12,7 +12,7 @@ module ConstantContact
|
|
|
12
12
|
|
|
13
13
|
protected
|
|
14
14
|
|
|
15
|
-
# Return required headers for making an http request with
|
|
15
|
+
# Return required headers for making an http request with Constant Contact
|
|
16
16
|
# @param [String] access_token - OAuth2 access token to be placed into the Authorization header
|
|
17
17
|
# @param [String] content_type - The MIME type of the body of the request, default is 'application/json'
|
|
18
18
|
# @return [Hash] - authorization headers
|
|
@@ -21,7 +21,8 @@ module ConstantContact
|
|
|
21
21
|
:content_type => content_type,
|
|
22
22
|
:accept => 'application/json',
|
|
23
23
|
:authorization => "Bearer #{access_token}",
|
|
24
|
-
:user_agent => "AppConnect Ruby SDK v#{ConstantContact::SDK::VERSION} (#{RUBY_DESCRIPTION})"
|
|
24
|
+
:user_agent => "AppConnect Ruby SDK v#{ConstantContact::SDK::VERSION} (#{RUBY_DESCRIPTION})",
|
|
25
|
+
:x_ctct_request_source => "sdk.ruby.#{ConstantContact::SDK::VERSION}"
|
|
25
26
|
}
|
|
26
27
|
end
|
|
27
28
|
|
|
@@ -50,6 +51,10 @@ module ConstantContact
|
|
|
50
51
|
if value.respond_to? :iso8601
|
|
51
52
|
params[key] = value.iso8601
|
|
52
53
|
end
|
|
54
|
+
|
|
55
|
+
if key.to_s == 'next' && value.match(/^.*?next=(.*)$/)
|
|
56
|
+
params[key] = $1
|
|
57
|
+
end
|
|
53
58
|
end
|
|
54
59
|
else
|
|
55
60
|
params ||= {}
|
|
@@ -62,4 +67,4 @@ module ConstantContact
|
|
|
62
67
|
end
|
|
63
68
|
end
|
|
64
69
|
end
|
|
65
|
-
end
|
|
70
|
+
end
|
|
@@ -23,6 +23,7 @@ module ConstantContact
|
|
|
23
23
|
:add_contacts_activity => 'activities/addcontacts',
|
|
24
24
|
|
|
25
25
|
:account_verified_addresses => 'account/verifiedemailaddresses',
|
|
26
|
+
:account_info => 'account/info',
|
|
26
27
|
|
|
27
28
|
:contact => 'contacts/%s',
|
|
28
29
|
:contacts => 'contacts',
|
|
@@ -131,17 +132,19 @@ module ConstantContact
|
|
|
131
132
|
|
|
132
133
|
# Errors to be returned for various exceptions
|
|
133
134
|
:errors => {
|
|
134
|
-
:id_or_object => 'Only an id or %s object are allowed for this method.'
|
|
135
|
+
:id_or_object => 'Only an id or %s object are allowed for this method.',
|
|
136
|
+
:invalid_webhook => 'Invalid Webhook. The x-ctct-hmac-sha256 does not correspond to message encryption.',
|
|
137
|
+
:api_secret_missing => 'The api_secret is missing in explicit call or configuration.'
|
|
135
138
|
}
|
|
136
139
|
}
|
|
137
|
-
|
|
140
|
+
|
|
138
141
|
class << self
|
|
139
142
|
attr_accessor :props
|
|
140
|
-
|
|
143
|
+
|
|
141
144
|
def configure
|
|
142
145
|
yield props if block_given?
|
|
143
146
|
end
|
|
144
|
-
|
|
147
|
+
|
|
145
148
|
# Get a configuration property given a specified location, example usage: Config::get('auth.token_endpoint')
|
|
146
149
|
# @param [String] index - location of the property to obtain
|
|
147
150
|
# @return [String]
|
|
@@ -167,4 +170,4 @@ module ConstantContact
|
|
|
167
170
|
|
|
168
171
|
end
|
|
169
172
|
end
|
|
170
|
-
end
|
|
173
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#
|
|
2
|
+
# validator.rb
|
|
3
|
+
# ConstantContact
|
|
4
|
+
#
|
|
5
|
+
# Copyright (c) 2013 Constant Contact. All rights reserved.
|
|
6
|
+
|
|
7
|
+
module ConstantContact
|
|
8
|
+
module Webhooks
|
|
9
|
+
module Helpers
|
|
10
|
+
class Validator
|
|
11
|
+
class << self
|
|
12
|
+
|
|
13
|
+
# Validate the request received from Constant Contact.
|
|
14
|
+
# Compute the HMAC digest and compare it to the value in the x-ctct-hmac-sha256 header.
|
|
15
|
+
# If they match, you can be sure that the webhook was sent by Constant Contact and the message has not been compromised.
|
|
16
|
+
# @param [String] secret The Constant Contact secret key
|
|
17
|
+
# @param [String] hmac The value received in the x-ctct-hmac-sha256 header.
|
|
18
|
+
# @param [String] data The body message from the POST received from ConstantContact in Webhook callback.
|
|
19
|
+
# @return true if the computed vs. received values match; false otherwise.
|
|
20
|
+
def validate(secret, hmac, data)
|
|
21
|
+
digest = OpenSSL::Digest.new('sha256')
|
|
22
|
+
calculated_hmac = Base64.encode64(OpenSSL::HMAC.digest(digest, secret, data)).strip
|
|
23
|
+
calculated_hmac == hmac
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#
|
|
2
|
+
# billing_change_notification.rb
|
|
3
|
+
# ConstantContact
|
|
4
|
+
#
|
|
5
|
+
# Copyright (c) 2013 Constant Contact. All rights reserved.
|
|
6
|
+
|
|
7
|
+
module ConstantContact
|
|
8
|
+
module Webhooks
|
|
9
|
+
module Models
|
|
10
|
+
class BillingChangeNotification
|
|
11
|
+
attr_accessor :event_type, :url
|
|
12
|
+
|
|
13
|
+
# Factory method to create a BillingChangeNotification model object from a hash
|
|
14
|
+
# @param [Hash] props - hash of properties to create object from
|
|
15
|
+
# @return [BillingChangeNotification]
|
|
16
|
+
def self.create(props)
|
|
17
|
+
obj = BillingChangeNotification.new
|
|
18
|
+
props.each do |key, value|
|
|
19
|
+
key = key.to_s
|
|
20
|
+
obj.send("#{key}=", value) if obj.respond_to? key
|
|
21
|
+
end if props
|
|
22
|
+
obj
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#
|
|
2
|
+
# webhooks_util.rb
|
|
3
|
+
# ConstantContact
|
|
4
|
+
#
|
|
5
|
+
# Copyright (c) 2013 Constant Contact. All rights reserved.
|
|
6
|
+
|
|
7
|
+
module ConstantContact
|
|
8
|
+
class WebhooksUtil
|
|
9
|
+
attr_accessor :client_secret
|
|
10
|
+
|
|
11
|
+
# Class constructor
|
|
12
|
+
# @param [String] api_secret - the Constant Contact secret key
|
|
13
|
+
# @return
|
|
14
|
+
def initialize(api_secret = nil)
|
|
15
|
+
@client_secret = api_secret || Util::Config.get('auth.api_secret')
|
|
16
|
+
if @client_secret.nil? || @client_secret == ''
|
|
17
|
+
raise ArgumentError.new(Util::Config.get('errors.api_secret_missing'))
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# Get the BillingChangeNotification model object (has url and event_type as properties)
|
|
23
|
+
# Validates and parses the received data into a BillingChangeNotification model
|
|
24
|
+
# @param [String] hmac The value in the x-ctct-hmac-sha256 header.
|
|
25
|
+
# @param [String] data The body message from the POST received from ConstantContact in Webhook callback.
|
|
26
|
+
# @return [BillingChangeNotification] object corresponding to data in case of success
|
|
27
|
+
def get_billing_change_notification(hmac, data)
|
|
28
|
+
if is_valid_webhook(hmac, data)
|
|
29
|
+
Webhooks::Models::BillingChangeNotification.create(JSON.parse(data))
|
|
30
|
+
else
|
|
31
|
+
raise Exceptions::WebhooksException, Util::Config.get('errors.invalid_webhook')
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# Validates a Webhook encrypted message
|
|
37
|
+
# @param [String] hmac The value in the x-ctct-hmac-sha256 header.
|
|
38
|
+
# @param [String] data The body message from the POST received from ConstantContact in Webhook callback.
|
|
39
|
+
# @return true in case of success; false if the Webhook is invalid.
|
|
40
|
+
def is_valid_webhook(hmac, data)
|
|
41
|
+
Webhooks::Helpers::Validator.validate(@client_secret, hmac, data)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#
|
|
2
|
+
# account_service_spec.rb
|
|
3
|
+
# ConstantContact
|
|
4
|
+
#
|
|
5
|
+
# Copyright (c) 2013 Constant Contact. All rights reserved.
|
|
6
|
+
|
|
7
|
+
require 'spec_helper'
|
|
8
|
+
|
|
9
|
+
describe ConstantContact::Services::AccountService do
|
|
10
|
+
describe "#get_verified_email_addresses" do
|
|
11
|
+
it "gets all verified email addresses associated with an account" do
|
|
12
|
+
json_response = load_file('verified_email_addresses_response.json')
|
|
13
|
+
net_http_resp = Net::HTTPResponse.new(1.0, 200, 'OK')
|
|
14
|
+
|
|
15
|
+
response = RestClient::Response.create(json_response, net_http_resp, {})
|
|
16
|
+
RestClient.stub(:get).and_return(response)
|
|
17
|
+
|
|
18
|
+
params = {}
|
|
19
|
+
email_addresses = ConstantContact::Services::AccountService.get_verified_email_addresses('token', params)
|
|
20
|
+
|
|
21
|
+
email_addresses.should be_kind_of(Array)
|
|
22
|
+
email_addresses.first.should be_kind_of(ConstantContact::Components::VerifiedEmailAddress)
|
|
23
|
+
email_addresses.first.email_address.should eq('abc@def.com')
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -11,7 +11,7 @@ describe ConstantContact::Services::BaseService do
|
|
|
11
11
|
it "gets a hash of headers" do
|
|
12
12
|
token = 'foo'
|
|
13
13
|
headers = ConstantContact::Services::BaseService.send(:get_headers, token)
|
|
14
|
-
|
|
14
|
+
|
|
15
15
|
expect(headers).to be_a Hash
|
|
16
16
|
expect(headers[:content_type]).to be_a String
|
|
17
17
|
expect(headers[:content_type]).to eq('application/json')
|
|
@@ -19,9 +19,31 @@ describe ConstantContact::Services::BaseService do
|
|
|
19
19
|
expect(headers[:accept]).to eq('application/json')
|
|
20
20
|
expect(headers[:authorization]).to be_a String
|
|
21
21
|
expect(headers[:authorization]).to eq("Bearer #{token}")
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
end
|
|
22
|
+
expect(headers[:user_agent]).to be_a String
|
|
23
|
+
expect(headers[:user_agent].include?("Ruby SDK v#{ConstantContact::SDK::VERSION}")).to be_true
|
|
24
|
+
expect(headers[:user_agent].include?(RUBY_DESCRIPTION)).to be_true
|
|
25
|
+
expect(headers[:x_ctct_request_source]).to be_a String
|
|
26
|
+
expect(headers[:x_ctct_request_source].include?(ConstantContact::SDK::VERSION)).to be_true
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe "#build_url" do
|
|
31
|
+
it "combines all the given parameters into the url" do
|
|
32
|
+
components = ConstantContact::Services::BaseService.send(:build_url, "http://testing.com", :arg1 => 'abc', :arg2 => 123).split('&')
|
|
33
|
+
expect(components[0]).to eq('http://testing.com?api_key=api+key')
|
|
34
|
+
expect(components.length).to eq(3)
|
|
35
|
+
expect(components.include?('arg1=abc')).to be_true
|
|
36
|
+
expect(components.include?('arg2=123')).to be_true
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
it "does not parse the next param when not in next_link format" do
|
|
40
|
+
url = ConstantContact::Services::BaseService.send(:build_url, "http://testing.com", :next => "abcdef")
|
|
41
|
+
expect(url).to eq('http://testing.com?api_key=api+key&next=abcdef')
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
it "parses next id from next param given in next_link format" do
|
|
45
|
+
url = ConstantContact::Services::BaseService.send(:build_url, "http://testing.com", :next => "/some/path?next=abcdefg")
|
|
46
|
+
expect(url).to eq('http://testing.com?api_key=api+key&next=abcdefg')
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#
|
|
2
|
+
# webhooks_spec.rb
|
|
3
|
+
# ConstantContact
|
|
4
|
+
#
|
|
5
|
+
# Copyright (c) 2013 Constant Contact. All rights reserved.
|
|
6
|
+
|
|
7
|
+
require 'spec_helper'
|
|
8
|
+
|
|
9
|
+
describe ConstantContact::Webhooks do
|
|
10
|
+
describe "test methods" do
|
|
11
|
+
before(:each) do
|
|
12
|
+
@webhooks = ConstantContact::WebhooksUtil.new('api-secret-key')
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
describe "#billing_change_notification" do
|
|
16
|
+
it "gets the BillingChangeNotification model object" do
|
|
17
|
+
hmac_header = 'VNfTwVDbHBoPqEYqDdM61OqxJdVznRzT4h21+BuwgTg='
|
|
18
|
+
json_body = load_file('billing_change_notification_request.json')
|
|
19
|
+
|
|
20
|
+
model = @webhooks.get_billing_change_notification(hmac_header, json_body)
|
|
21
|
+
model.should be_kind_of(ConstantContact::Webhooks::Models::BillingChangeNotification)
|
|
22
|
+
model.event_type.should eq('tier.increase')
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
metadata
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: constantcontact
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
|
|
5
|
-
version: 1.2.0
|
|
4
|
+
version: 1.3.2
|
|
6
5
|
platform: ruby
|
|
7
6
|
authors:
|
|
8
7
|
- ConstantContact
|
|
9
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date: 2014-
|
|
11
|
+
date: 2014-12-02 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: rest-client
|
|
16
|
-
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
17
16
|
requirements:
|
|
18
17
|
- - "~>"
|
|
19
18
|
- !ruby/object:Gem::Version
|
|
@@ -21,8 +20,9 @@ dependencies:
|
|
|
21
20
|
- - ">="
|
|
22
21
|
- !ruby/object:Gem::Version
|
|
23
22
|
version: 1.6.7
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
type: :runtime
|
|
24
|
+
prerelease: false
|
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
26
26
|
requirements:
|
|
27
27
|
- - "~>"
|
|
28
28
|
- !ruby/object:Gem::Version
|
|
@@ -30,12 +30,9 @@ dependencies:
|
|
|
30
30
|
- - ">="
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
32
|
version: 1.6.7
|
|
33
|
-
none: false
|
|
34
|
-
prerelease: false
|
|
35
|
-
type: :runtime
|
|
36
33
|
- !ruby/object:Gem::Dependency
|
|
37
34
|
name: json
|
|
38
|
-
|
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
|
39
36
|
requirements:
|
|
40
37
|
- - "~>"
|
|
41
38
|
- !ruby/object:Gem::Version
|
|
@@ -43,8 +40,9 @@ dependencies:
|
|
|
43
40
|
- - ">="
|
|
44
41
|
- !ruby/object:Gem::Version
|
|
45
42
|
version: 1.8.1
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
type: :runtime
|
|
44
|
+
prerelease: false
|
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
48
46
|
requirements:
|
|
49
47
|
- - "~>"
|
|
50
48
|
- !ruby/object:Gem::Version
|
|
@@ -52,12 +50,9 @@ dependencies:
|
|
|
52
50
|
- - ">="
|
|
53
51
|
- !ruby/object:Gem::Version
|
|
54
52
|
version: 1.8.1
|
|
55
|
-
none: false
|
|
56
|
-
prerelease: false
|
|
57
|
-
type: :runtime
|
|
58
53
|
- !ruby/object:Gem::Dependency
|
|
59
54
|
name: mime-types
|
|
60
|
-
|
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
|
61
56
|
requirements:
|
|
62
57
|
- - "~>"
|
|
63
58
|
- !ruby/object:Gem::Version
|
|
@@ -65,8 +60,9 @@ dependencies:
|
|
|
65
60
|
- - ">="
|
|
66
61
|
- !ruby/object:Gem::Version
|
|
67
62
|
version: 1.25.1
|
|
68
|
-
|
|
69
|
-
|
|
63
|
+
type: :runtime
|
|
64
|
+
prerelease: false
|
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
70
66
|
requirements:
|
|
71
67
|
- - "~>"
|
|
72
68
|
- !ruby/object:Gem::Version
|
|
@@ -74,25 +70,20 @@ dependencies:
|
|
|
74
70
|
- - ">="
|
|
75
71
|
- !ruby/object:Gem::Version
|
|
76
72
|
version: 1.25.1
|
|
77
|
-
none: false
|
|
78
|
-
prerelease: false
|
|
79
|
-
type: :runtime
|
|
80
73
|
- !ruby/object:Gem::Dependency
|
|
81
74
|
name: rspec
|
|
82
|
-
|
|
75
|
+
requirement: !ruby/object:Gem::Requirement
|
|
83
76
|
requirements:
|
|
84
77
|
- - "~>"
|
|
85
78
|
- !ruby/object:Gem::Version
|
|
86
79
|
version: '2.14'
|
|
87
|
-
|
|
88
|
-
|
|
80
|
+
type: :development
|
|
81
|
+
prerelease: false
|
|
82
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
89
83
|
requirements:
|
|
90
84
|
- - "~>"
|
|
91
85
|
- !ruby/object:Gem::Version
|
|
92
86
|
version: '2.14'
|
|
93
|
-
none: false
|
|
94
|
-
prerelease: false
|
|
95
|
-
type: :development
|
|
96
87
|
description: Ruby library for interactions with Constant Contact v2 API
|
|
97
88
|
email: apisupport@constantcontact.com
|
|
98
89
|
executables: []
|
|
@@ -100,21 +91,20 @@ extensions: []
|
|
|
100
91
|
extra_rdoc_files: []
|
|
101
92
|
files:
|
|
102
93
|
- ".rspec"
|
|
103
|
-
- constantcontact.gemspec
|
|
104
94
|
- README.md
|
|
95
|
+
- constantcontact.gemspec
|
|
105
96
|
- lib/constantcontact.rb
|
|
106
97
|
- lib/constantcontact/api.rb
|
|
107
|
-
- lib/constantcontact/version.rb
|
|
108
98
|
- lib/constantcontact/auth/oauth2.rb
|
|
109
99
|
- lib/constantcontact/auth/session_data_store.rb
|
|
110
|
-
- lib/constantcontact/components/
|
|
111
|
-
- lib/constantcontact/components/result_set.rb
|
|
100
|
+
- lib/constantcontact/components/account/account_info.rb
|
|
112
101
|
- lib/constantcontact/components/account/verified_email_address.rb
|
|
113
102
|
- lib/constantcontact/components/activities/activity.rb
|
|
114
103
|
- lib/constantcontact/components/activities/activity_error.rb
|
|
115
104
|
- lib/constantcontact/components/activities/add_contacts.rb
|
|
116
105
|
- lib/constantcontact/components/activities/add_contacts_import_data.rb
|
|
117
106
|
- lib/constantcontact/components/activities/export_contacts.rb
|
|
107
|
+
- lib/constantcontact/components/component.rb
|
|
118
108
|
- lib/constantcontact/components/contacts/address.rb
|
|
119
109
|
- lib/constantcontact/components/contacts/contact.rb
|
|
120
110
|
- lib/constantcontact/components/contacts/contact_list.rb
|
|
@@ -153,6 +143,7 @@ files:
|
|
|
153
143
|
- lib/constantcontact/components/library/info/library_summary.rb
|
|
154
144
|
- lib/constantcontact/components/library/info/move_results.rb
|
|
155
145
|
- lib/constantcontact/components/library/info/upload_status.rb
|
|
146
|
+
- lib/constantcontact/components/result_set.rb
|
|
156
147
|
- lib/constantcontact/components/tracking/bounce_activity.rb
|
|
157
148
|
- lib/constantcontact/components/tracking/click_activity.rb
|
|
158
149
|
- lib/constantcontact/components/tracking/forward_activity.rb
|
|
@@ -164,6 +155,7 @@ files:
|
|
|
164
155
|
- lib/constantcontact/exceptions/ctct_exception.rb
|
|
165
156
|
- lib/constantcontact/exceptions/illegal_argument_exception.rb
|
|
166
157
|
- lib/constantcontact/exceptions/oauth2_exception.rb
|
|
158
|
+
- lib/constantcontact/exceptions/webhooks_exception.rb
|
|
167
159
|
- lib/constantcontact/services/account_service.rb
|
|
168
160
|
- lib/constantcontact/services/activity_service.rb
|
|
169
161
|
- lib/constantcontact/services/base_service.rb
|
|
@@ -177,14 +169,19 @@ files:
|
|
|
177
169
|
- lib/constantcontact/services/list_service.rb
|
|
178
170
|
- lib/constantcontact/util/config.rb
|
|
179
171
|
- lib/constantcontact/util/helpers.rb
|
|
172
|
+
- lib/constantcontact/version.rb
|
|
173
|
+
- lib/constantcontact/webhooks/helpers/validator.rb
|
|
174
|
+
- lib/constantcontact/webhooks/models/billing_change_notification.rb
|
|
175
|
+
- lib/constantcontact/webhooks/webhooks_util.rb
|
|
180
176
|
- spec/constantcontact/api_spec.rb
|
|
181
|
-
- spec/constantcontact/sdk_spec.rb
|
|
182
177
|
- spec/constantcontact/auth/oauth2_spec.rb
|
|
183
178
|
- spec/constantcontact/components/contacts/address_spec.rb
|
|
184
179
|
- spec/constantcontact/components/contacts/contact_list_spec.rb
|
|
185
180
|
- spec/constantcontact/components/contacts/contact_spec.rb
|
|
186
181
|
- spec/constantcontact/components/contacts/custom_field_spec.rb
|
|
187
182
|
- spec/constantcontact/components/contacts/email_address_spec.rb
|
|
183
|
+
- spec/constantcontact/sdk_spec.rb
|
|
184
|
+
- spec/constantcontact/services/account_service_spec.rb
|
|
188
185
|
- spec/constantcontact/services/activity_service_spec.rb
|
|
189
186
|
- spec/constantcontact/services/base_service_spec.rb
|
|
190
187
|
- spec/constantcontact/services/campaign_schedule_service_spec.rb
|
|
@@ -195,10 +192,12 @@ files:
|
|
|
195
192
|
- spec/constantcontact/services/event_spot_spec.rb
|
|
196
193
|
- spec/constantcontact/services/library_service_spec.rb
|
|
197
194
|
- spec/constantcontact/services/list_service_spec.rb
|
|
195
|
+
- spec/constantcontact/webhooks/webhooks_spec.rb
|
|
198
196
|
homepage: http://www.constantcontact.com
|
|
199
197
|
licenses:
|
|
200
198
|
- MIT
|
|
201
|
-
|
|
199
|
+
metadata: {}
|
|
200
|
+
post_install_message:
|
|
202
201
|
rdoc_options: []
|
|
203
202
|
require_paths:
|
|
204
203
|
- lib
|
|
@@ -206,31 +205,28 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
206
205
|
requirements:
|
|
207
206
|
- - ">="
|
|
208
207
|
- !ruby/object:Gem::Version
|
|
209
|
-
version:
|
|
210
|
-
MA==
|
|
211
|
-
none: false
|
|
208
|
+
version: '0'
|
|
212
209
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
213
210
|
requirements:
|
|
214
211
|
- - ">="
|
|
215
212
|
- !ruby/object:Gem::Version
|
|
216
|
-
version:
|
|
217
|
-
MA==
|
|
218
|
-
none: false
|
|
213
|
+
version: '0'
|
|
219
214
|
requirements: []
|
|
220
|
-
rubyforge_project:
|
|
221
|
-
rubygems_version:
|
|
222
|
-
signing_key:
|
|
223
|
-
specification_version:
|
|
215
|
+
rubyforge_project:
|
|
216
|
+
rubygems_version: 2.2.2
|
|
217
|
+
signing_key:
|
|
218
|
+
specification_version: 4
|
|
224
219
|
summary: Constant Contact SDK for Ruby
|
|
225
220
|
test_files:
|
|
226
221
|
- spec/constantcontact/api_spec.rb
|
|
227
|
-
- spec/constantcontact/sdk_spec.rb
|
|
228
222
|
- spec/constantcontact/auth/oauth2_spec.rb
|
|
229
223
|
- spec/constantcontact/components/contacts/address_spec.rb
|
|
230
224
|
- spec/constantcontact/components/contacts/contact_list_spec.rb
|
|
231
225
|
- spec/constantcontact/components/contacts/contact_spec.rb
|
|
232
226
|
- spec/constantcontact/components/contacts/custom_field_spec.rb
|
|
233
227
|
- spec/constantcontact/components/contacts/email_address_spec.rb
|
|
228
|
+
- spec/constantcontact/sdk_spec.rb
|
|
229
|
+
- spec/constantcontact/services/account_service_spec.rb
|
|
234
230
|
- spec/constantcontact/services/activity_service_spec.rb
|
|
235
231
|
- spec/constantcontact/services/base_service_spec.rb
|
|
236
232
|
- spec/constantcontact/services/campaign_schedule_service_spec.rb
|
|
@@ -241,3 +237,4 @@ test_files:
|
|
|
241
237
|
- spec/constantcontact/services/event_spot_spec.rb
|
|
242
238
|
- spec/constantcontact/services/library_service_spec.rb
|
|
243
239
|
- spec/constantcontact/services/list_service_spec.rb
|
|
240
|
+
- spec/constantcontact/webhooks/webhooks_spec.rb
|