active_campaign_webhooks 0.2.13 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -2
- data/Gemfile.lock +1 -4
- data/README.md +9 -2
- data/active_campaign_webhooks.gemspec +0 -2
- data/lib/active_campaign/webhooks/request/account.rb +7 -7
- data/lib/active_campaign/webhooks/request/account_add_request.rb +0 -10
- data/lib/active_campaign/webhooks/request/account_contact.rb +7 -7
- data/lib/active_campaign/webhooks/request/account_contact_add_request.rb +0 -10
- data/lib/active_campaign/webhooks/request/account_contact_removed.rb +7 -7
- data/lib/active_campaign/webhooks/request/account_update_request.rb +0 -10
- data/lib/active_campaign/webhooks/request/base_record.rb +49 -0
- data/lib/active_campaign/webhooks/request/base_request.rb +9 -27
- data/lib/active_campaign/webhooks/request/campaign.rb +8 -8
- data/lib/active_campaign/webhooks/request/click_request.rb +3 -11
- data/lib/active_campaign/webhooks/request/contact.rb +5 -5
- data/lib/active_campaign/webhooks/request/contact_tag_added_request.rb +2 -10
- data/lib/active_campaign/webhooks/request/contact_task_add_request.rb +0 -8
- data/lib/active_campaign/webhooks/request/deal.rb +24 -22
- data/lib/active_campaign/webhooks/request/deal_add_request.rb +0 -8
- data/lib/active_campaign/webhooks/request/deal_pipeline_add_request.rb +0 -8
- data/lib/active_campaign/webhooks/request/deal_stage_add_request.rb +0 -8
- data/lib/active_campaign/webhooks/request/deal_task_add_request.rb +0 -8
- data/lib/active_campaign/webhooks/request/deal_task_complete_request.rb +0 -8
- data/lib/active_campaign/webhooks/request/deal_tasktype_add_request.rb +0 -8
- data/lib/active_campaign/webhooks/request/deal_update_request.rb +0 -8
- data/lib/active_campaign/webhooks/request/fields.rb +1 -1
- data/lib/active_campaign/webhooks/request/form.rb +3 -3
- data/lib/active_campaign/webhooks/request/forward.rb +3 -3
- data/lib/active_campaign/webhooks/request/forward_request.rb +2 -10
- data/lib/active_campaign/webhooks/request/link.rb +3 -3
- data/lib/active_campaign/webhooks/request/list.rb +1 -1
- data/lib/active_campaign/webhooks/request/list_add_request.rb +0 -8
- data/lib/active_campaign/webhooks/request/open_request.rb +2 -10
- data/lib/active_campaign/webhooks/request/pipeline.rb +3 -3
- data/lib/active_campaign/webhooks/request/reply_request.rb +2 -10
- data/lib/active_campaign/webhooks/request/sent_request.rb +2 -10
- data/lib/active_campaign/webhooks/request/share.rb +3 -3
- data/lib/active_campaign/webhooks/request/share_request.rb +2 -10
- data/lib/active_campaign/webhooks/request/stage.rb +3 -3
- data/lib/active_campaign/webhooks/request/subscribe_request.rb +2 -10
- data/lib/active_campaign/webhooks/request/task.rb +9 -9
- data/lib/active_campaign/webhooks/request/tasktype.rb +3 -3
- data/lib/active_campaign/webhooks/request/unsubscribe.rb +1 -1
- data/lib/active_campaign/webhooks/request/unsubscribe_request.rb +2 -10
- data/lib/active_campaign/webhooks/request/updated_fields.rb +1 -1
- data/lib/active_campaign/webhooks/version.rb +1 -1
- metadata +4 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06c9de491d4e052ac71ea20aee18512e039cf6b82f05653403eabaf97db85c99
|
4
|
+
data.tar.gz: 37afd8e4ba9a7a9434ab05d25ab207842178435b929e52ece613cfe5cf3f57e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29d5bd7e4f0b216176c663e77c97d2d400895bdbbe765a84276449ab59d96e5e9e13d7bc0f383bc7d969f3f321b55d1f1b8303457d63e0bc6030bf88ac5a206e
|
7
|
+
data.tar.gz: 93c7649201c93d8b7dbe468140f0492699bcde677f6dfa8a856e4506c79077044e2c53c6d28a8f5478a510d92a4bdbb6d25a2294344f0dce2501e0e79a108422
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,14 +1,12 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
active_campaign_webhooks (0.
|
5
|
-
yard
|
4
|
+
active_campaign_webhooks (0.3.3)
|
6
5
|
|
7
6
|
GEM
|
8
7
|
remote: https://rubygems.org/
|
9
8
|
specs:
|
10
9
|
rake (12.3.3)
|
11
|
-
yard (0.9.25)
|
12
10
|
|
13
11
|
PLATFORMS
|
14
12
|
ruby
|
@@ -16,7 +14,6 @@ PLATFORMS
|
|
16
14
|
DEPENDENCIES
|
17
15
|
active_campaign_webhooks!
|
18
16
|
rake (~> 12.0)
|
19
|
-
yard
|
20
17
|
|
21
18
|
BUNDLED WITH
|
22
19
|
2.1.4
|
data/README.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# ActiveCampaignWebhooks
|
2
|
-
|
2
|
+
### --- WIP --- ###
|
3
|
+
Structs and helpers for ActiveCampaign Webhooks
|
3
4
|
|
4
5
|
## Installation
|
5
6
|
|
@@ -19,7 +20,13 @@ Or install it yourself as:
|
|
19
20
|
|
20
21
|
## Usage
|
21
22
|
|
22
|
-
|
23
|
+
```ruby
|
24
|
+
# creates new request object with documented accessors
|
25
|
+
ActiveCampaign::Webhooks::Request::DealUpdateRequest.new {deal: {id: 1}}
|
26
|
+
|
27
|
+
# returns the relevant object based on the type field
|
28
|
+
ActiveCampaign::Webhooks::Request::Helpers.get_request {type: 'deal_update', deal: {id: 1}}
|
29
|
+
```
|
23
30
|
|
24
31
|
## Development
|
25
32
|
|
@@ -17,8 +17,6 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.metadata['source_code_uri'] = 'https://github.com/Hoppelite/active_campaign_webhooks'
|
18
18
|
spec.metadata['changelog_uri'] = 'https://github.com/Hoppelite/active_campaign_webhooks'
|
19
19
|
|
20
|
-
spec.add_dependency "yard"
|
21
|
-
|
22
20
|
# Specify which files should be added to the gem when it is released.
|
23
21
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
24
22
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
@@ -4,17 +4,17 @@ module ActiveCampaign
|
|
4
4
|
module Webhooks
|
5
5
|
module Request
|
6
6
|
# AC Request Struct Account
|
7
|
-
class Account <
|
8
|
-
# @return [
|
9
|
-
attribute :id
|
7
|
+
class Account < BaseRecord
|
8
|
+
# @return [Integer]
|
9
|
+
attribute :id, :Integer
|
10
10
|
# @return [String]
|
11
11
|
attribute :account_name
|
12
12
|
# @return [String]
|
13
13
|
attribute :account_url
|
14
|
-
# @return [
|
15
|
-
attribute :created_timestamp
|
16
|
-
# @return [
|
17
|
-
attribute :updated_timestamp
|
14
|
+
# @return [DateTime]
|
15
|
+
attribute :created_timestamp, :DateTime
|
16
|
+
# @return [DateTime]
|
17
|
+
attribute :updated_timestamp, :DateTime
|
18
18
|
# @return [Hash]
|
19
19
|
attribute :fields
|
20
20
|
end
|
@@ -5,16 +5,6 @@ module ActiveCampaign
|
|
5
5
|
module Request
|
6
6
|
# AC Request Struct AccountAddRequest
|
7
7
|
class AccountAddRequest < BaseRequest
|
8
|
-
# @return [String]
|
9
|
-
attribute :account_add_request_type
|
10
|
-
# @return [String]
|
11
|
-
attribute :date_time
|
12
|
-
# @return [String]
|
13
|
-
attribute :initiated_from
|
14
|
-
# @return [String]
|
15
|
-
attribute :initiated_by
|
16
|
-
# @return [String]
|
17
|
-
attribute :list
|
18
8
|
# @return [Account]
|
19
9
|
attribute :account, :Account
|
20
10
|
end
|
@@ -4,13 +4,13 @@ module ActiveCampaign
|
|
4
4
|
module Webhooks
|
5
5
|
module Request
|
6
6
|
# AC Request Struct AccountContact
|
7
|
-
class AccountContact <
|
8
|
-
# @return [
|
9
|
-
attribute :id
|
10
|
-
# @return [
|
11
|
-
attribute :account
|
12
|
-
# @return [
|
13
|
-
attribute :contact
|
7
|
+
class AccountContact < BaseRecord
|
8
|
+
# @return [Integer]
|
9
|
+
attribute :id, :Integer
|
10
|
+
# @return [Integer]
|
11
|
+
attribute :account, :Integer
|
12
|
+
# @return [Integer]
|
13
|
+
attribute :contact, :Integer
|
14
14
|
# @return [String]
|
15
15
|
attribute :job_title
|
16
16
|
end
|
@@ -5,16 +5,6 @@ module ActiveCampaign
|
|
5
5
|
module Request
|
6
6
|
# AC Request Struct AccountContactAddRequest
|
7
7
|
class AccountContactAddRequest < BaseRequest
|
8
|
-
# @return [String]
|
9
|
-
attribute :account_contact_add_request_type
|
10
|
-
# @return [String]
|
11
|
-
attribute :date_time
|
12
|
-
# @return [String]
|
13
|
-
attribute :initiated_from
|
14
|
-
# @return [String]
|
15
|
-
attribute :initiated_by
|
16
|
-
# @return [String]
|
17
|
-
attribute :list
|
18
8
|
# @return [Account]
|
19
9
|
attribute :account, :Account
|
20
10
|
# @return [AccountContact]
|
@@ -4,13 +4,13 @@ module ActiveCampaign
|
|
4
4
|
module Webhooks
|
5
5
|
module Request
|
6
6
|
# AC Request Struct AccountContactRemoved
|
7
|
-
class AccountContactRemoved <
|
8
|
-
# @return [
|
9
|
-
attribute :id
|
10
|
-
# @return [
|
11
|
-
attribute :account
|
12
|
-
# @return [
|
13
|
-
attribute :contact
|
7
|
+
class AccountContactRemoved < BaseRecord
|
8
|
+
# @return [Integer]
|
9
|
+
attribute :id, :Integer
|
10
|
+
# @return [Integer]
|
11
|
+
attribute :account, :Integer
|
12
|
+
# @return [Integer]
|
13
|
+
attribute :contact, :Integer
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
@@ -5,16 +5,6 @@ module ActiveCampaign
|
|
5
5
|
module Request
|
6
6
|
# AC Request Struct AccountUpdateRequest
|
7
7
|
class AccountUpdateRequest < BaseRequest
|
8
|
-
# @return [String]
|
9
|
-
attribute :account_update_type
|
10
|
-
# @return [String]
|
11
|
-
attribute :date_time
|
12
|
-
# @return [String]
|
13
|
-
attribute :initiated_from
|
14
|
-
# @return [String]
|
15
|
-
attribute :initiated_by
|
16
|
-
# @return [String]
|
17
|
-
attribute :list
|
18
8
|
# @return [Account]
|
19
9
|
attribute :account, :Account
|
20
10
|
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ActiveCampaign
|
4
|
+
module Webhooks
|
5
|
+
module Request
|
6
|
+
# Base Record
|
7
|
+
class BaseRecord
|
8
|
+
|
9
|
+
PARSE_MAP = {
|
10
|
+
Integer: -> (value) { value&.to_i },
|
11
|
+
Float: -> (value) { value&.to_f },
|
12
|
+
Date: -> (value) { value.nil? ? nil : Date.parse(value) },
|
13
|
+
DateTime: -> (value) { value.nil? ? nil : DateTime.parse(value) }
|
14
|
+
}
|
15
|
+
|
16
|
+
class << self
|
17
|
+
attr_accessor :attribute_map
|
18
|
+
|
19
|
+
def attribute name, classname = nil
|
20
|
+
attr_accessor name
|
21
|
+
self.attribute_map = {} if self.attribute_map.nil?
|
22
|
+
self.attribute_map[name] = classname unless classname.nil?
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
self.attribute_map = {}
|
27
|
+
|
28
|
+
def initialize(hash = {})
|
29
|
+
hash.each do |k, v|
|
30
|
+
unless self.class.attribute_map[k.to_sym].nil?
|
31
|
+
class_name = self.class.attribute_map[k.to_sym]
|
32
|
+
unless PARSE_MAP[class_name].nil?
|
33
|
+
v = PARSE_MAP[class_name][v]
|
34
|
+
else
|
35
|
+
class_obj = ActiveCampaign::Webhooks::Request.const_get(class_name)
|
36
|
+
v = class_obj.new(v.as_json)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
public_send("#{k}=", v) if respond_to? "#{k}="
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def slice attributes = []
|
44
|
+
as_json.slice(*attributes.map(&:to_s))
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -4,35 +4,17 @@ module ActiveCampaign
|
|
4
4
|
module Webhooks
|
5
5
|
module Request
|
6
6
|
# Base Request
|
7
|
-
class BaseRequest
|
8
|
-
class << self
|
9
|
-
attr_accessor :attribute_map
|
10
|
-
|
11
|
-
def attribute name, classname = nil
|
12
|
-
attr_accessor name
|
13
|
-
self.attribute_map = {} if self.attribute_map.nil?
|
14
|
-
self.attribute_map[name] = classname unless classname.nil?
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
self.attribute_map = {}
|
19
|
-
|
7
|
+
class BaseRequest < BaseRecord
|
20
8
|
# @return [String]
|
21
9
|
attribute :type
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
def slice attributes = []
|
34
|
-
as_json.slice(*attributes.map(&:to_s))
|
35
|
-
end
|
10
|
+
# @return [DateTime]
|
11
|
+
attribute :date_time, :DateTime
|
12
|
+
# @return [String]
|
13
|
+
attribute :initiated_from
|
14
|
+
# @return [String]
|
15
|
+
attribute :initiated_by
|
16
|
+
# @return [Integer]
|
17
|
+
attribute :list, :Integer
|
36
18
|
end
|
37
19
|
end
|
38
20
|
end
|
@@ -4,15 +4,15 @@ module ActiveCampaign
|
|
4
4
|
module Webhooks
|
5
5
|
module Request
|
6
6
|
# AC Request Struct Campaign
|
7
|
-
class Campaign <
|
7
|
+
class Campaign < BaseRecord
|
8
|
+
# @return [Integer]
|
9
|
+
attribute :id, :Integer
|
10
|
+
# @return [Integer]
|
11
|
+
attribute :status, :Integer
|
12
|
+
# @return [Integer]
|
13
|
+
attribute :recipients, :Integer
|
8
14
|
# @return [String]
|
9
|
-
attribute :
|
10
|
-
# @return [String]
|
11
|
-
attribute :status
|
12
|
-
# @return [String]
|
13
|
-
attribute :recipients
|
14
|
-
# @return [String]
|
15
|
-
attribute :campaign_type
|
15
|
+
attribute :webcopy_url
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
@@ -4,19 +4,11 @@ module ActiveCampaign
|
|
4
4
|
module Webhooks
|
5
5
|
module Request
|
6
6
|
# AC Request Struct ClickRequest
|
7
|
-
class ClickRequest <
|
7
|
+
class ClickRequest < BaseRecord
|
8
8
|
# @return [String]
|
9
9
|
attribute :url
|
10
|
-
# @return [
|
11
|
-
attribute :
|
12
|
-
# @return [String]
|
13
|
-
attribute :date_time
|
14
|
-
# @return [String]
|
15
|
-
attribute :initiated_by
|
16
|
-
# @return [String]
|
17
|
-
attribute :initiated_from
|
18
|
-
# @return [String]
|
19
|
-
attribute :list
|
10
|
+
# @return [Integer]
|
11
|
+
attribute :list, :Integer
|
20
12
|
# @return [Campaign]
|
21
13
|
attribute :campaign, :Campaign
|
22
14
|
# @return [Contact]
|
@@ -4,15 +4,15 @@ module ActiveCampaign
|
|
4
4
|
module Webhooks
|
5
5
|
module Request
|
6
6
|
# AC Request Struct Contact
|
7
|
-
class Contact <
|
7
|
+
class Contact < BaseRecord
|
8
8
|
# @return [String]
|
9
9
|
attribute :email
|
10
10
|
# @return [String]
|
11
11
|
attribute :first_name
|
12
12
|
# @return [String]
|
13
13
|
attribute :last_name
|
14
|
-
# @return [
|
15
|
-
attribute :id
|
14
|
+
# @return [Integer]
|
15
|
+
attribute :id, :Integer
|
16
16
|
# @return [String]
|
17
17
|
attribute :tags
|
18
18
|
# @return [String]
|
@@ -21,8 +21,8 @@ module ActiveCampaign
|
|
21
21
|
attribute :phone
|
22
22
|
# @return [String]
|
23
23
|
attribute :customer_acct_name
|
24
|
-
# @return [
|
25
|
-
attribute :customer_acct_id
|
24
|
+
# @return [Integer]
|
25
|
+
attribute :customer_acct_id, :Integer
|
26
26
|
# @return [Hash]
|
27
27
|
attribute :fields
|
28
28
|
end
|
@@ -7,16 +7,8 @@ module ActiveCampaign
|
|
7
7
|
class ContactTagAddedRequest < BaseRequest
|
8
8
|
# @return [String]
|
9
9
|
attribute :url
|
10
|
-
# @return [
|
11
|
-
attribute :
|
12
|
-
# @return [String]
|
13
|
-
attribute :date_time
|
14
|
-
# @return [String]
|
15
|
-
attribute :initiated_by
|
16
|
-
# @return [String]
|
17
|
-
attribute :initiated_from
|
18
|
-
# @return [String]
|
19
|
-
attribute :list
|
10
|
+
# @return [Integer]
|
11
|
+
attribute :list, :Integer
|
20
12
|
# @return [String]
|
21
13
|
attribute :tag
|
22
14
|
# @return [Contact]
|
@@ -5,14 +5,6 @@ module ActiveCampaign
|
|
5
5
|
module Request
|
6
6
|
# AC Request Struct ContactAddTaskRequest
|
7
7
|
class ContactAddTaskRequest < BaseRequest
|
8
|
-
# @return [String]
|
9
|
-
attribute :contact_add_task_request_type
|
10
|
-
# @return [String]
|
11
|
-
attribute :date_time
|
12
|
-
# @return [String]
|
13
|
-
attribute :initiated_by
|
14
|
-
# @return [String]
|
15
|
-
attribute :initiated_from
|
16
8
|
# @return [Contact]
|
17
9
|
attribute :contact, :Contact
|
18
10
|
# @return [Task]
|
@@ -4,51 +4,53 @@ module ActiveCampaign
|
|
4
4
|
module Webhooks
|
5
5
|
module Request
|
6
6
|
# AC Request Struct Deal
|
7
|
-
class Deal <
|
8
|
-
STATUS_OPEN =
|
9
|
-
STATUS_WON =
|
10
|
-
STATUS_LOST =
|
7
|
+
class Deal < BaseRecord
|
8
|
+
STATUS_OPEN = 0
|
9
|
+
STATUS_WON = 1
|
10
|
+
STATUS_LOST = 2
|
11
11
|
|
12
12
|
# @return [String]
|
13
13
|
attribute :currency_symbol
|
14
14
|
# @return [String]
|
15
15
|
attribute :currency
|
16
|
-
# @return [
|
17
|
-
attribute :customer_acct_id
|
18
|
-
# @return [
|
19
|
-
attribute :stageid
|
20
|
-
# @return [
|
21
|
-
attribute :owner
|
16
|
+
# @return [Integer]
|
17
|
+
attribute :customer_acct_id, :Integer
|
18
|
+
# @return [Integer]
|
19
|
+
attribute :stageid, :Integer
|
20
|
+
# @return [Integer]
|
21
|
+
attribute :owner, :Integer
|
22
22
|
# @return [String]
|
23
23
|
attribute :contact_lastname
|
24
|
-
# @return [
|
25
|
-
attribute :id
|
24
|
+
# @return [Integer]
|
25
|
+
attribute :id, :Integer
|
26
26
|
# @return [String]
|
27
27
|
attribute :pipeline_title
|
28
28
|
# @return [String]
|
29
29
|
attribute :title
|
30
|
+
# @return [DateTime]
|
31
|
+
attribute :create_date, :DateTime
|
30
32
|
# @return [String]
|
31
33
|
attribute :customer_acct_name
|
32
34
|
# @return [String]
|
33
35
|
attribute :stage_title
|
34
|
-
# @return [
|
35
|
-
attribute :pipelineid
|
36
|
+
# @return [Integer]
|
37
|
+
attribute :pipelineid, :Integer
|
36
38
|
# @return [String]
|
37
39
|
attribute :note
|
38
|
-
# @return [
|
39
|
-
attribute :contactid
|
40
|
-
# @return [
|
41
|
-
attribute :status
|
40
|
+
# @return [Integer]
|
41
|
+
attribute :contactid, :Integer
|
42
|
+
# @return [Integer]
|
43
|
+
attribute :status, :Integer
|
42
44
|
# @return [String]
|
43
45
|
attribute :contact_firstname
|
44
46
|
# @return [String]
|
45
47
|
attribute :contact_email
|
46
48
|
# @return [String]
|
47
49
|
attribute :contact_avatar
|
48
|
-
# @return [
|
49
|
-
attribute :age
|
50
|
-
# @return [
|
51
|
-
attribute :value
|
50
|
+
# @return [Float]
|
51
|
+
attribute :age, :Float
|
52
|
+
# @return [Float]
|
53
|
+
attribute :value, :Float
|
52
54
|
# @return [String]
|
53
55
|
attribute :owner_firstname
|
54
56
|
# @return [String]
|
@@ -5,14 +5,6 @@ module ActiveCampaign
|
|
5
5
|
module Request
|
6
6
|
# AC Request Struct DealAddRequest
|
7
7
|
class DealAddRequest < BaseRequest
|
8
|
-
# @return [String]
|
9
|
-
attribute :deal_add_request_type
|
10
|
-
# @return [String]
|
11
|
-
attribute :date_time
|
12
|
-
# @return [String]
|
13
|
-
attribute :initiated_by
|
14
|
-
# @return [String]
|
15
|
-
attribute :initiated_from
|
16
8
|
# @return [Deal]
|
17
9
|
attribute :deal, :Deal
|
18
10
|
end
|
@@ -5,14 +5,6 @@ module ActiveCampaign
|
|
5
5
|
module Request
|
6
6
|
# AC Request Struct DealPipelineAddRequest
|
7
7
|
class DealPipelineAddRequest < BaseRequest
|
8
|
-
# @return [String]
|
9
|
-
attribute :deal_pipeline_add_request_type
|
10
|
-
# @return [String]
|
11
|
-
attribute :date_time
|
12
|
-
# @return [String]
|
13
|
-
attribute :initiated_by
|
14
|
-
# @return [String]
|
15
|
-
attribute :initiated_from
|
16
8
|
# @return [Pipeline]
|
17
9
|
attribute :pipeline, :Pipeline
|
18
10
|
end
|
@@ -5,14 +5,6 @@ module ActiveCampaign
|
|
5
5
|
module Request
|
6
6
|
# AC Request Struct DealStageAddRequest
|
7
7
|
class DealStageAddRequest < BaseRequest
|
8
|
-
# @return [String]
|
9
|
-
attribute :deal_stage_add_request_type
|
10
|
-
# @return [String]
|
11
|
-
attribute :date_time
|
12
|
-
# @return [String]
|
13
|
-
attribute :initiated_by
|
14
|
-
# @return [String]
|
15
|
-
attribute :initiated_from
|
16
8
|
# @return [Stage]
|
17
9
|
attribute :stage, :Stage
|
18
10
|
end
|
@@ -5,14 +5,6 @@ module ActiveCampaign
|
|
5
5
|
module Request
|
6
6
|
# AC Request Struct DealTaskAddRequest
|
7
7
|
class DealTaskAddRequest < BaseRequest
|
8
|
-
# @return [String]
|
9
|
-
attribute :deal_task_add_request_type
|
10
|
-
# @return [String]
|
11
|
-
attribute :date_time
|
12
|
-
# @return [String]
|
13
|
-
attribute :initiated_by
|
14
|
-
# @return [String]
|
15
|
-
attribute :initiated_from
|
16
8
|
# @return [Deal]
|
17
9
|
attribute :deal, :Deal
|
18
10
|
# @return [Task]
|
@@ -5,14 +5,6 @@ module ActiveCampaign
|
|
5
5
|
module Request
|
6
6
|
# AC Request Struct DealTaskCompleteRequest
|
7
7
|
class DealTaskCompleteRequest < BaseRequest
|
8
|
-
# @return [String]
|
9
|
-
attribute :deal_task_complete_request_type
|
10
|
-
# @return [String]
|
11
|
-
attribute :date_time
|
12
|
-
# @return [String]
|
13
|
-
attribute :initiated_by
|
14
|
-
# @return [String]
|
15
|
-
attribute :initiated_from
|
16
8
|
# @return [Deal]
|
17
9
|
attribute :deal, :Deal
|
18
10
|
# @return [Task]
|
@@ -5,14 +5,6 @@ module ActiveCampaign
|
|
5
5
|
module Request
|
6
6
|
# AC Request Struct DealTasktypeAddRequest
|
7
7
|
class DealTasktypeAddRequest < BaseRequest
|
8
|
-
# @return [String]
|
9
|
-
attribute :deal_tasktype_add_request_type
|
10
|
-
# @return [String]
|
11
|
-
attribute :date_time
|
12
|
-
# @return [String]
|
13
|
-
attribute :initiated_by
|
14
|
-
# @return [String]
|
15
|
-
attribute :initiated_from
|
16
8
|
# @return [Tasktype]
|
17
9
|
attribute :tasktype, :Tasktype
|
18
10
|
end
|
@@ -5,14 +5,6 @@ module ActiveCampaign
|
|
5
5
|
module Request
|
6
6
|
# AC Request Struct DealUpdateRequest
|
7
7
|
class DealUpdateRequest < BaseRequest
|
8
|
-
# @return [String]
|
9
|
-
attribute :deal_update_request_type
|
10
|
-
# @return [String]
|
11
|
-
attribute :date_time
|
12
|
-
# @return [String]
|
13
|
-
attribute :initiated_by
|
14
|
-
# @return [String]
|
15
|
-
attribute :initiated_from
|
16
8
|
# @return [Deal]
|
17
9
|
attribute :deal, :Deal
|
18
10
|
# @return [Hash]
|
@@ -4,9 +4,9 @@ module ActiveCampaign
|
|
4
4
|
module Webhooks
|
5
5
|
module Request
|
6
6
|
# AC Request Struct Forward
|
7
|
-
class Forward <
|
8
|
-
# @return [
|
9
|
-
attribute :count
|
7
|
+
class Forward < BaseRecord
|
8
|
+
# @return [Integer]
|
9
|
+
attribute :count, :Integer
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -7,16 +7,8 @@ module ActiveCampaign
|
|
7
7
|
class ForwardRequest < BaseRequest
|
8
8
|
# @return [String]
|
9
9
|
attribute :url
|
10
|
-
# @return [
|
11
|
-
attribute :
|
12
|
-
# @return [String]
|
13
|
-
attribute :date_time
|
14
|
-
# @return [String]
|
15
|
-
attribute :initiated_by
|
16
|
-
# @return [String]
|
17
|
-
attribute :initiated_from
|
18
|
-
# @return [String]
|
19
|
-
attribute :list
|
10
|
+
# @return [Integer]
|
11
|
+
attribute :list, :Integer
|
20
12
|
# @return [Campaign]
|
21
13
|
attribute :campaign, :Campaign
|
22
14
|
# @return [Contact]
|
@@ -4,9 +4,9 @@ module ActiveCampaign
|
|
4
4
|
module Webhooks
|
5
5
|
module Request
|
6
6
|
# AC Request Struct Link
|
7
|
-
class Link <
|
8
|
-
# @return [
|
9
|
-
attribute :id
|
7
|
+
class Link < BaseRecord
|
8
|
+
# @return [Integer]
|
9
|
+
attribute :id, :Integer
|
10
10
|
# @return [String]
|
11
11
|
attribute :url
|
12
12
|
end
|
@@ -5,14 +5,6 @@ module ActiveCampaign
|
|
5
5
|
module Request
|
6
6
|
# AC Request Struct ListAddRequest
|
7
7
|
class ListAddRequest < BaseRequest
|
8
|
-
# @return [String]
|
9
|
-
attribute :list_add_request_type
|
10
|
-
# @return [String]
|
11
|
-
attribute :date_time
|
12
|
-
# @return [String]
|
13
|
-
attribute :initiated_by
|
14
|
-
# @return [String]
|
15
|
-
attribute :initiated_from
|
16
8
|
# @return [List]
|
17
9
|
attribute :list, :List
|
18
10
|
end
|
@@ -7,16 +7,8 @@ module ActiveCampaign
|
|
7
7
|
class OpenRequest < BaseRequest
|
8
8
|
# @return [String]
|
9
9
|
attribute :url
|
10
|
-
# @return [
|
11
|
-
attribute :
|
12
|
-
# @return [String]
|
13
|
-
attribute :date_time
|
14
|
-
# @return [String]
|
15
|
-
attribute :initiated_by
|
16
|
-
# @return [String]
|
17
|
-
attribute :initiated_from
|
18
|
-
# @return [String]
|
19
|
-
attribute :list
|
10
|
+
# @return [Integer]
|
11
|
+
attribute :list, :Integer
|
20
12
|
# @return [Campaign]
|
21
13
|
attribute :campaign, :Campaign
|
22
14
|
# @return [Contact]
|
@@ -4,9 +4,9 @@ module ActiveCampaign
|
|
4
4
|
module Webhooks
|
5
5
|
module Request
|
6
6
|
# AC Request Struct Pipeline
|
7
|
-
class Pipeline <
|
8
|
-
# @return [
|
9
|
-
attribute :id
|
7
|
+
class Pipeline < BaseRecord
|
8
|
+
# @return [Integer]
|
9
|
+
attribute :id, :Integer
|
10
10
|
# @return [String]
|
11
11
|
attribute :title
|
12
12
|
end
|
@@ -7,16 +7,8 @@ module ActiveCampaign
|
|
7
7
|
class ReplyRequest < BaseRequest
|
8
8
|
# @return [String]
|
9
9
|
attribute :url
|
10
|
-
# @return [
|
11
|
-
attribute :
|
12
|
-
# @return [String]
|
13
|
-
attribute :date_time
|
14
|
-
# @return [String]
|
15
|
-
attribute :initiated_by
|
16
|
-
# @return [String]
|
17
|
-
attribute :initiated_from
|
18
|
-
# @return [String]
|
19
|
-
attribute :list
|
10
|
+
# @return [Integer]
|
11
|
+
attribute :list, :Integer
|
20
12
|
# @return [Campaign]
|
21
13
|
attribute :campaign, :Campaign
|
22
14
|
# @return [Contact]
|
@@ -7,16 +7,8 @@ module ActiveCampaign
|
|
7
7
|
class SentRequest < BaseRequest
|
8
8
|
# @return [String]
|
9
9
|
attribute :url
|
10
|
-
# @return [
|
11
|
-
attribute :
|
12
|
-
# @return [String]
|
13
|
-
attribute :date_time
|
14
|
-
# @return [String]
|
15
|
-
attribute :initiated_by
|
16
|
-
# @return [String]
|
17
|
-
attribute :initiated_from
|
18
|
-
# @return [String]
|
19
|
-
attribute :list
|
10
|
+
# @return [Integer]
|
11
|
+
attribute :list, :Integer
|
20
12
|
# @return [Campaign]
|
21
13
|
attribute :campaign, :Campaign
|
22
14
|
end
|
@@ -4,11 +4,11 @@ module ActiveCampaign
|
|
4
4
|
module Webhooks
|
5
5
|
module Request
|
6
6
|
# AC Request Struct Share
|
7
|
-
class Share <
|
7
|
+
class Share < BaseRecord
|
8
8
|
# @return [String]
|
9
9
|
attribute :network
|
10
|
-
# @return [
|
11
|
-
attribute :network_id
|
10
|
+
# @return [Integer]
|
11
|
+
attribute :network_id, :Integer
|
12
12
|
# @return [String]
|
13
13
|
attribute :content
|
14
14
|
end
|
@@ -7,16 +7,8 @@ module ActiveCampaign
|
|
7
7
|
class ShareRequest < BaseRequest
|
8
8
|
# @return [String]
|
9
9
|
attribute :url
|
10
|
-
# @return [
|
11
|
-
attribute :
|
12
|
-
# @return [String]
|
13
|
-
attribute :date_time
|
14
|
-
# @return [String]
|
15
|
-
attribute :initiated_by
|
16
|
-
# @return [String]
|
17
|
-
attribute :initiated_from
|
18
|
-
# @return [String]
|
19
|
-
attribute :list
|
10
|
+
# @return [Integer]
|
11
|
+
attribute :list, :Integer
|
20
12
|
# @return [Campaign]
|
21
13
|
attribute :campaign, :Campaign
|
22
14
|
# @return [Contact]
|
@@ -4,9 +4,9 @@ module ActiveCampaign
|
|
4
4
|
module Webhooks
|
5
5
|
module Request
|
6
6
|
# AC Request Struct Share
|
7
|
-
class Stage <
|
8
|
-
# @return [
|
9
|
-
attribute :id
|
7
|
+
class Stage < BaseRecord
|
8
|
+
# @return [Integer]
|
9
|
+
attribute :id, :Integer
|
10
10
|
# @return [String]
|
11
11
|
attribute :title
|
12
12
|
# @return [String]
|
@@ -7,16 +7,8 @@ module ActiveCampaign
|
|
7
7
|
class SubscribeRequest < BaseRequest
|
8
8
|
# @return [String]
|
9
9
|
attribute :url
|
10
|
-
# @return [
|
11
|
-
attribute :
|
12
|
-
# @return [String]
|
13
|
-
attribute :date_time
|
14
|
-
# @return [String]
|
15
|
-
attribute :initiated_by
|
16
|
-
# @return [String]
|
17
|
-
attribute :initiated_from
|
18
|
-
# @return [String]
|
19
|
-
attribute :list
|
10
|
+
# @return [Integer]
|
11
|
+
attribute :list, :Integer
|
20
12
|
# @return [Form]
|
21
13
|
attribute :form, :Form
|
22
14
|
# @return [Contact]
|
@@ -4,21 +4,21 @@ module ActiveCampaign
|
|
4
4
|
module Webhooks
|
5
5
|
module Request
|
6
6
|
# AC Request Struct Task
|
7
|
-
class Task <
|
7
|
+
class Task < BaseRecord
|
8
8
|
# @return [String]
|
9
9
|
attribute :note
|
10
|
-
# @return [
|
11
|
-
attribute :id
|
12
|
-
# @return [
|
13
|
-
attribute :duedate
|
14
|
-
# @return [
|
15
|
-
attribute :donedate
|
10
|
+
# @return [Integer]
|
11
|
+
attribute :id, :Integer
|
12
|
+
# @return [DateTime]
|
13
|
+
attribute :duedate, :DateTime
|
14
|
+
# @return [DateTime]
|
15
|
+
attribute :donedate, :DateTime
|
16
16
|
# @return [String]
|
17
17
|
attribute :type_title
|
18
18
|
# @return [String]
|
19
19
|
attribute :title
|
20
|
-
# @return [
|
21
|
-
attribute :type_id
|
20
|
+
# @return [Integer]
|
21
|
+
attribute :type_id, :Integer
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
@@ -4,9 +4,9 @@ module ActiveCampaign
|
|
4
4
|
module Webhooks
|
5
5
|
module Request
|
6
6
|
# AC Request Struct Tasktype
|
7
|
-
class Tasktype <
|
8
|
-
# @return [
|
9
|
-
attribute :id
|
7
|
+
class Tasktype < BaseRecord
|
8
|
+
# @return [Integer]
|
9
|
+
attribute :id, :Integer
|
10
10
|
# @return [String]
|
11
11
|
attribute :title
|
12
12
|
end
|
@@ -7,16 +7,8 @@ module ActiveCampaign
|
|
7
7
|
class UnsubscribeRequest < BaseRequest
|
8
8
|
# @return [String]
|
9
9
|
attribute :url
|
10
|
-
# @return [
|
11
|
-
attribute :
|
12
|
-
# @return [String]
|
13
|
-
attribute :date_time
|
14
|
-
# @return [String]
|
15
|
-
attribute :initiated_by
|
16
|
-
# @return [String]
|
17
|
-
attribute :initiated_from
|
18
|
-
# @return [String]
|
19
|
-
attribute :list
|
10
|
+
# @return [Integer]
|
11
|
+
attribute :list, :Integer
|
20
12
|
# @return [Campaign]
|
21
13
|
attribute :form, :Campaign
|
22
14
|
# @return [Campaign]
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_campaign_webhooks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Boyne
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-10-
|
12
|
-
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: yard
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
11
|
+
date: 2020-10-11 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
27
13
|
description:
|
28
14
|
email:
|
29
15
|
- sam@banqer.co
|
@@ -46,6 +32,7 @@ files:
|
|
46
32
|
- lib/active_campaign/webhooks/request/account_contact_add_request.rb
|
47
33
|
- lib/active_campaign/webhooks/request/account_contact_removed.rb
|
48
34
|
- lib/active_campaign/webhooks/request/account_update_request.rb
|
35
|
+
- lib/active_campaign/webhooks/request/base_record.rb
|
49
36
|
- lib/active_campaign/webhooks/request/base_request.rb
|
50
37
|
- lib/active_campaign/webhooks/request/campaign.rb
|
51
38
|
- lib/active_campaign/webhooks/request/click_request.rb
|