active_campaign_webhooks 0.2.14 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +9 -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 +19 -19
- 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 +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9780bd69114fc941e7dbec7a47350def2d330f927f2bfb2ab1abf43957b25b5a
|
4
|
+
data.tar.gz: 0325d378d3d74f57f34fe761f6f51212df985fd933e34ceaadec40032f6eff4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 177a1ba68dab623c4289626c3d63c75cd83c6e50ba648f040a8265542ef0901ade96d3f0606e5b964196713936508353ae7df08f6c1a0addbd56bb478f3e93cf
|
7
|
+
data.tar.gz: 6f965a026c03fb2b8da37bd3823ecd27b604284e7c00df7f909f20d641f88dfe2cc205c89f08017dd4c9a5bb21d3a447e0de763f44500932d027ded9df95e351
|
data/Gemfile.lock
CHANGED
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
|
|
@@ -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 [Number]
|
9
|
+
attribute :id, :Number
|
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 [Number]
|
9
|
+
attribute :id, :Number
|
10
|
+
# @return [Number]
|
11
|
+
attribute :account, :Number
|
12
|
+
# @return [Number]
|
13
|
+
attribute :contact, :Number
|
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 [Number]
|
9
|
+
attribute :id, :Number
|
10
|
+
# @return [Number]
|
11
|
+
attribute :account, :Number
|
12
|
+
# @return [Number]
|
13
|
+
attribute :contact, :Number
|
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 [Number]
|
17
|
+
attribute :list, :Number
|
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 [Number]
|
9
|
+
attribute :id, :Number
|
10
|
+
# @return [Number]
|
11
|
+
attribute :status, :Number
|
12
|
+
# @return [Number]
|
13
|
+
attribute :recipients, :Number
|
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 [Number]
|
11
|
+
attribute :list, :Number
|
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 [Number]
|
15
|
+
attribute :id, :Number
|
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 [Number]
|
25
|
+
attribute :customer_acct_id, :Number
|
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 [Number]
|
11
|
+
attribute :list, :Number
|
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,7 +4,7 @@ module ActiveCampaign
|
|
4
4
|
module Webhooks
|
5
5
|
module Request
|
6
6
|
# AC Request Struct Deal
|
7
|
-
class Deal <
|
7
|
+
class Deal < BaseRecord
|
8
8
|
STATUS_OPEN = '0'
|
9
9
|
STATUS_WON = '1'
|
10
10
|
STATUS_LOST = '2'
|
@@ -13,16 +13,16 @@ module ActiveCampaign
|
|
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 [Number]
|
17
|
+
attribute :customer_acct_id, :Number
|
18
|
+
# @return [Number]
|
19
|
+
attribute :stageid, :Number
|
20
|
+
# @return [Number]
|
21
|
+
attribute :owner, :Number
|
22
22
|
# @return [String]
|
23
23
|
attribute :contact_lastname
|
24
|
-
# @return [
|
25
|
-
attribute :id
|
24
|
+
# @return [Number]
|
25
|
+
attribute :id, :Number
|
26
26
|
# @return [String]
|
27
27
|
attribute :pipeline_title
|
28
28
|
# @return [String]
|
@@ -31,24 +31,24 @@ module ActiveCampaign
|
|
31
31
|
attribute :customer_acct_name
|
32
32
|
# @return [String]
|
33
33
|
attribute :stage_title
|
34
|
-
# @return [
|
35
|
-
attribute :pipelineid
|
34
|
+
# @return [Number]
|
35
|
+
attribute :pipelineid, :Number
|
36
36
|
# @return [String]
|
37
37
|
attribute :note
|
38
|
-
# @return [
|
39
|
-
attribute :contactid
|
40
|
-
# @return [
|
41
|
-
attribute :status
|
38
|
+
# @return [Number]
|
39
|
+
attribute :contactid, :Number
|
40
|
+
# @return [Number]
|
41
|
+
attribute :status, :Number
|
42
42
|
# @return [String]
|
43
43
|
attribute :contact_firstname
|
44
44
|
# @return [String]
|
45
45
|
attribute :contact_email
|
46
46
|
# @return [String]
|
47
47
|
attribute :contact_avatar
|
48
|
-
# @return [
|
49
|
-
attribute :age
|
50
|
-
# @return [
|
51
|
-
attribute :value
|
48
|
+
# @return [Float]
|
49
|
+
attribute :age, :Float
|
50
|
+
# @return [Float]
|
51
|
+
attribute :value, :Float
|
52
52
|
# @return [String]
|
53
53
|
attribute :owner_firstname
|
54
54
|
# @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]
|
@@ -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 [Number]
|
11
|
+
attribute :list, :Number
|
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 [Number]
|
9
|
+
attribute :id, :Number
|
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 [Number]
|
11
|
+
attribute :list, :Number
|
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 [Number]
|
9
|
+
attribute :id, :Number
|
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 [Number]
|
11
|
+
attribute :list, :Number
|
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 [Number]
|
11
|
+
attribute :list, :Number
|
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 [Number]
|
11
|
+
attribute :network_id, :Number
|
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 [Number]
|
11
|
+
attribute :list, :Number
|
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 [Number]
|
9
|
+
attribute :id, :Number
|
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 [Number]
|
11
|
+
attribute :list, :Number
|
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 [Number]
|
11
|
+
attribute :id, :Number
|
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 [Number]
|
21
|
+
attribute :type_id, :Number
|
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 [Number]
|
9
|
+
attribute :id, :Number
|
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 [Number]
|
11
|
+
attribute :list, :Number
|
20
12
|
# @return [Campaign]
|
21
13
|
attribute :form, :Campaign
|
22
14
|
# @return [Campaign]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.0
|
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-
|
11
|
+
date: 2020-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -32,6 +32,7 @@ files:
|
|
32
32
|
- lib/active_campaign/webhooks/request/account_contact_add_request.rb
|
33
33
|
- lib/active_campaign/webhooks/request/account_contact_removed.rb
|
34
34
|
- lib/active_campaign/webhooks/request/account_update_request.rb
|
35
|
+
- lib/active_campaign/webhooks/request/base_record.rb
|
35
36
|
- lib/active_campaign/webhooks/request/base_request.rb
|
36
37
|
- lib/active_campaign/webhooks/request/campaign.rb
|
37
38
|
- lib/active_campaign/webhooks/request/click_request.rb
|