late-sdk 0.0.684 → 0.0.686
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 +4 -4
- data/README.md +5 -0
- data/docs/AccountsApi.md +76 -0
- data/docs/CommentAutomationAudience.md +22 -0
- data/docs/CommentAutomationFollowGate.md +22 -0
- data/docs/CommentAutomationsApi.md +2 -2
- data/docs/ConversionEvent.md +1 -1
- data/docs/ConversionEventUser.md +2 -0
- data/docs/CreateCommentAutomation200ResponseAutomation.md +8 -0
- data/docs/CreateCommentAutomationRequest.md +9 -1
- data/docs/GetCommentAutomation200ResponseAutomation.md +8 -0
- data/docs/GetCommentAutomation200ResponseLogsInner.md +9 -1
- data/docs/GetInstagramFollowStatus200Response.md +34 -0
- data/docs/ListCommentAutomations200ResponseAutomationsInner.md +4 -0
- data/docs/UpdateCommentAutomation200ResponseAutomation.md +4 -0
- data/docs/UpdateCommentAutomationRequest.md +8 -0
- data/docs/WebhookPayloadCommentCommentAuthor.md +3 -1
- data/docs/WebhookPayloadCommentCommentAuthorInstagramProfile.md +24 -0
- data/lib/zernio-sdk/api/accounts_api.rb +72 -0
- data/lib/zernio-sdk/api/comment_automations_api.rb +3 -3
- data/lib/zernio-sdk/models/comment_automation_audience.rb +237 -0
- data/lib/zernio-sdk/models/comment_automation_follow_gate.rb +226 -0
- data/lib/zernio-sdk/models/conversion_event.rb +1 -1
- data/lib/zernio-sdk/models/conversion_event_user.rb +11 -1
- data/lib/zernio-sdk/models/create_comment_automation200_response_automation.rb +39 -1
- data/lib/zernio-sdk/models/create_comment_automation_request.rb +98 -4
- data/lib/zernio-sdk/models/get_comment_automation200_response_automation.rb +39 -1
- data/lib/zernio-sdk/models/get_comment_automation200_response_logs_inner.rb +55 -4
- data/lib/zernio-sdk/models/get_instagram_follow_status200_response.rb +299 -0
- data/lib/zernio-sdk/models/list_comment_automations200_response_automations_inner.rb +21 -1
- data/lib/zernio-sdk/models/update_comment_automation200_response_automation.rb +19 -1
- data/lib/zernio-sdk/models/update_comment_automation_request.rb +95 -1
- data/lib/zernio-sdk/models/webhook_payload_comment_comment_author.rb +14 -5
- data/lib/zernio-sdk/models/webhook_payload_comment_comment_author_instagram_profile.rb +181 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +4 -0
- data/openapi.yaml +189 -4
- data/spec/api/accounts_api_spec.rb +14 -0
- data/spec/api/comment_automations_api_spec.rb +1 -1
- data/spec/models/comment_automation_audience_spec.rb +56 -0
- data/spec/models/comment_automation_follow_gate_spec.rb +48 -0
- data/spec/models/conversion_event_user_spec.rb +6 -0
- data/spec/models/create_comment_automation200_response_automation_spec.rb +24 -0
- data/spec/models/create_comment_automation_request_spec.rb +24 -0
- data/spec/models/get_comment_automation200_response_automation_spec.rb +24 -0
- data/spec/models/get_comment_automation200_response_logs_inner_spec.rb +29 -1
- data/spec/models/get_instagram_follow_status200_response_spec.rb +88 -0
- data/spec/models/list_comment_automations200_response_automations_inner_spec.rb +12 -0
- data/spec/models/update_comment_automation200_response_automation_spec.rb +12 -0
- data/spec/models/update_comment_automation_request_spec.rb +24 -0
- data/spec/models/webhook_payload_comment_comment_author_instagram_profile_spec.rb +54 -0
- data/spec/models/webhook_payload_comment_comment_author_spec.rb +6 -0
- data/zernio-sdk-0.0.686.gem +0 -0
- metadata +1579 -1563
- data/zernio-sdk-0.0.684.gem +0 -0
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zernio
|
|
17
|
+
# Who a comment automation answers. Instagram only - Meta exposes the follow relationship on no other platform, and only for people who have MESSAGED the account (a comment grants no consent). `whenUnknown` is therefore the important setting: it decides what happens for a first-time commenter.
|
|
18
|
+
class CommentAutomationAudience < ApiModelBase
|
|
19
|
+
attr_accessor :follower_status
|
|
20
|
+
|
|
21
|
+
# Skip commenters with fewer followers than this. Omit for no size rule.
|
|
22
|
+
attr_accessor :min_follower_count
|
|
23
|
+
|
|
24
|
+
# What to do when Instagram will not reveal the follow relationship. * `send` (default) - deliver the DM anyway (fails open). * `skip` - stay silent. * `verify` - send `followGate.message` with a confirm button. Tapping it is a message, which grants consent, so the re-check on the tap resolves and the real DM (or `followGate.notFollowingMessage`) follows automatically.
|
|
25
|
+
attr_accessor :when_unknown
|
|
26
|
+
|
|
27
|
+
class EnumAttributeValidator
|
|
28
|
+
attr_reader :datatype
|
|
29
|
+
attr_reader :allowable_values
|
|
30
|
+
|
|
31
|
+
def initialize(datatype, allowable_values)
|
|
32
|
+
@allowable_values = allowable_values.map do |value|
|
|
33
|
+
case datatype.to_s
|
|
34
|
+
when /Integer/i
|
|
35
|
+
value.to_i
|
|
36
|
+
when /Float/i
|
|
37
|
+
value.to_f
|
|
38
|
+
else
|
|
39
|
+
value
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def valid?(value)
|
|
45
|
+
!value || allowable_values.include?(value)
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
50
|
+
def self.attribute_map
|
|
51
|
+
{
|
|
52
|
+
:'follower_status' => :'followerStatus',
|
|
53
|
+
:'min_follower_count' => :'minFollowerCount',
|
|
54
|
+
:'when_unknown' => :'whenUnknown'
|
|
55
|
+
}
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Returns attribute mapping this model knows about
|
|
59
|
+
def self.acceptable_attribute_map
|
|
60
|
+
attribute_map
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Returns all the JSON keys this model knows about
|
|
64
|
+
def self.acceptable_attributes
|
|
65
|
+
acceptable_attribute_map.values
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Attribute type mapping.
|
|
69
|
+
def self.openapi_types
|
|
70
|
+
{
|
|
71
|
+
:'follower_status' => :'String',
|
|
72
|
+
:'min_follower_count' => :'Integer',
|
|
73
|
+
:'when_unknown' => :'String'
|
|
74
|
+
}
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# List of attributes with nullable: true
|
|
78
|
+
def self.openapi_nullable
|
|
79
|
+
Set.new([
|
|
80
|
+
])
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Initializes the object
|
|
84
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
85
|
+
def initialize(attributes = {})
|
|
86
|
+
if (!attributes.is_a?(Hash))
|
|
87
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CommentAutomationAudience` initialize method"
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
91
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
92
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
93
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
94
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CommentAutomationAudience`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
95
|
+
end
|
|
96
|
+
h[k.to_sym] = v
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'follower_status')
|
|
100
|
+
self.follower_status = attributes[:'follower_status']
|
|
101
|
+
else
|
|
102
|
+
self.follower_status = 'any'
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
if attributes.key?(:'min_follower_count')
|
|
106
|
+
self.min_follower_count = attributes[:'min_follower_count']
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
if attributes.key?(:'when_unknown')
|
|
110
|
+
self.when_unknown = attributes[:'when_unknown']
|
|
111
|
+
else
|
|
112
|
+
self.when_unknown = 'send'
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
117
|
+
# @return Array for valid properties with the reasons
|
|
118
|
+
def list_invalid_properties
|
|
119
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
120
|
+
invalid_properties = Array.new
|
|
121
|
+
if !@min_follower_count.nil? && @min_follower_count < 0
|
|
122
|
+
invalid_properties.push('invalid value for "min_follower_count", must be greater than or equal to 0.')
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
invalid_properties
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Check to see if the all the properties in the model are valid
|
|
129
|
+
# @return true if the model is valid
|
|
130
|
+
def valid?
|
|
131
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
132
|
+
follower_status_validator = EnumAttributeValidator.new('String', ["any", "follower", "non_follower"])
|
|
133
|
+
return false unless follower_status_validator.valid?(@follower_status)
|
|
134
|
+
return false if !@min_follower_count.nil? && @min_follower_count < 0
|
|
135
|
+
when_unknown_validator = EnumAttributeValidator.new('String', ["send", "skip", "verify"])
|
|
136
|
+
return false unless when_unknown_validator.valid?(@when_unknown)
|
|
137
|
+
true
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
141
|
+
# @param [Object] follower_status Object to be assigned
|
|
142
|
+
def follower_status=(follower_status)
|
|
143
|
+
validator = EnumAttributeValidator.new('String', ["any", "follower", "non_follower"])
|
|
144
|
+
unless validator.valid?(follower_status)
|
|
145
|
+
fail ArgumentError, "invalid value for \"follower_status\", must be one of #{validator.allowable_values}."
|
|
146
|
+
end
|
|
147
|
+
@follower_status = follower_status
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Custom attribute writer method with validation
|
|
151
|
+
# @param [Object] min_follower_count Value to be assigned
|
|
152
|
+
def min_follower_count=(min_follower_count)
|
|
153
|
+
if min_follower_count.nil?
|
|
154
|
+
fail ArgumentError, 'min_follower_count cannot be nil'
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if min_follower_count < 0
|
|
158
|
+
fail ArgumentError, 'invalid value for "min_follower_count", must be greater than or equal to 0.'
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
@min_follower_count = min_follower_count
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
165
|
+
# @param [Object] when_unknown Object to be assigned
|
|
166
|
+
def when_unknown=(when_unknown)
|
|
167
|
+
validator = EnumAttributeValidator.new('String', ["send", "skip", "verify"])
|
|
168
|
+
unless validator.valid?(when_unknown)
|
|
169
|
+
fail ArgumentError, "invalid value for \"when_unknown\", must be one of #{validator.allowable_values}."
|
|
170
|
+
end
|
|
171
|
+
@when_unknown = when_unknown
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Checks equality by comparing each attribute.
|
|
175
|
+
# @param [Object] Object to be compared
|
|
176
|
+
def ==(o)
|
|
177
|
+
return true if self.equal?(o)
|
|
178
|
+
self.class == o.class &&
|
|
179
|
+
follower_status == o.follower_status &&
|
|
180
|
+
min_follower_count == o.min_follower_count &&
|
|
181
|
+
when_unknown == o.when_unknown
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# @see the `==` method
|
|
185
|
+
# @param [Object] Object to be compared
|
|
186
|
+
def eql?(o)
|
|
187
|
+
self == o
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Calculates hash code according to all attributes.
|
|
191
|
+
# @return [Integer] Hash code
|
|
192
|
+
def hash
|
|
193
|
+
[follower_status, min_follower_count, when_unknown].hash
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Builds the object from hash
|
|
197
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
198
|
+
# @return [Object] Returns the model itself
|
|
199
|
+
def self.build_from_hash(attributes)
|
|
200
|
+
return nil unless attributes.is_a?(Hash)
|
|
201
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
202
|
+
transformed_hash = {}
|
|
203
|
+
openapi_types.each_pair do |key, type|
|
|
204
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
205
|
+
transformed_hash["#{key}"] = nil
|
|
206
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
207
|
+
# check to ensure the input is an array given that the attribute
|
|
208
|
+
# is documented as an array but the input is not
|
|
209
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
210
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
211
|
+
end
|
|
212
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
213
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
new(transformed_hash)
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Returns the object in the form of hash
|
|
220
|
+
# @return [Hash] Returns the object in the form of hash
|
|
221
|
+
def to_hash
|
|
222
|
+
hash = {}
|
|
223
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
224
|
+
value = self.send(attr)
|
|
225
|
+
if value.nil?
|
|
226
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
227
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
hash[param] = _to_hash(value)
|
|
231
|
+
end
|
|
232
|
+
hash
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
end
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zernio
|
|
17
|
+
# Copy for the follow gate. Sensible defaults are used for any field left empty.
|
|
18
|
+
class CommentAutomationFollowGate < ApiModelBase
|
|
19
|
+
# Confirmation DM sent when whenUnknown=verify.
|
|
20
|
+
attr_accessor :message
|
|
21
|
+
|
|
22
|
+
# Confirm button label. Defaults to \"I'm following\".
|
|
23
|
+
attr_accessor :button_label
|
|
24
|
+
|
|
25
|
+
# Sent to a commenter we know does not follow (followerStatus=follower). Omit to stay silent on a keyword comment; a confirm tap always gets an answer.
|
|
26
|
+
attr_accessor :not_following_message
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'message' => :'message',
|
|
32
|
+
:'button_label' => :'buttonLabel',
|
|
33
|
+
:'not_following_message' => :'notFollowingMessage'
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns attribute mapping this model knows about
|
|
38
|
+
def self.acceptable_attribute_map
|
|
39
|
+
attribute_map
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Returns all the JSON keys this model knows about
|
|
43
|
+
def self.acceptable_attributes
|
|
44
|
+
acceptable_attribute_map.values
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Attribute type mapping.
|
|
48
|
+
def self.openapi_types
|
|
49
|
+
{
|
|
50
|
+
:'message' => :'String',
|
|
51
|
+
:'button_label' => :'String',
|
|
52
|
+
:'not_following_message' => :'String'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# List of attributes with nullable: true
|
|
57
|
+
def self.openapi_nullable
|
|
58
|
+
Set.new([
|
|
59
|
+
])
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Initializes the object
|
|
63
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
64
|
+
def initialize(attributes = {})
|
|
65
|
+
if (!attributes.is_a?(Hash))
|
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CommentAutomationFollowGate` initialize method"
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
70
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
72
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
73
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CommentAutomationFollowGate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
74
|
+
end
|
|
75
|
+
h[k.to_sym] = v
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'message')
|
|
79
|
+
self.message = attributes[:'message']
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'button_label')
|
|
83
|
+
self.button_label = attributes[:'button_label']
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'not_following_message')
|
|
87
|
+
self.not_following_message = attributes[:'not_following_message']
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
92
|
+
# @return Array for valid properties with the reasons
|
|
93
|
+
def list_invalid_properties
|
|
94
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
95
|
+
invalid_properties = Array.new
|
|
96
|
+
if !@message.nil? && @message.to_s.length > 640
|
|
97
|
+
invalid_properties.push('invalid value for "message", the character length must be smaller than or equal to 640.')
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if !@button_label.nil? && @button_label.to_s.length > 20
|
|
101
|
+
invalid_properties.push('invalid value for "button_label", the character length must be smaller than or equal to 20.')
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if !@not_following_message.nil? && @not_following_message.to_s.length > 1000
|
|
105
|
+
invalid_properties.push('invalid value for "not_following_message", the character length must be smaller than or equal to 1000.')
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
invalid_properties
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Check to see if the all the properties in the model are valid
|
|
112
|
+
# @return true if the model is valid
|
|
113
|
+
def valid?
|
|
114
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
115
|
+
return false if !@message.nil? && @message.to_s.length > 640
|
|
116
|
+
return false if !@button_label.nil? && @button_label.to_s.length > 20
|
|
117
|
+
return false if !@not_following_message.nil? && @not_following_message.to_s.length > 1000
|
|
118
|
+
true
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Custom attribute writer method with validation
|
|
122
|
+
# @param [Object] message Value to be assigned
|
|
123
|
+
def message=(message)
|
|
124
|
+
if message.nil?
|
|
125
|
+
fail ArgumentError, 'message cannot be nil'
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if message.to_s.length > 640
|
|
129
|
+
fail ArgumentError, 'invalid value for "message", the character length must be smaller than or equal to 640.'
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
@message = message
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Custom attribute writer method with validation
|
|
136
|
+
# @param [Object] button_label Value to be assigned
|
|
137
|
+
def button_label=(button_label)
|
|
138
|
+
if button_label.nil?
|
|
139
|
+
fail ArgumentError, 'button_label cannot be nil'
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
if button_label.to_s.length > 20
|
|
143
|
+
fail ArgumentError, 'invalid value for "button_label", the character length must be smaller than or equal to 20.'
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
@button_label = button_label
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Custom attribute writer method with validation
|
|
150
|
+
# @param [Object] not_following_message Value to be assigned
|
|
151
|
+
def not_following_message=(not_following_message)
|
|
152
|
+
if not_following_message.nil?
|
|
153
|
+
fail ArgumentError, 'not_following_message cannot be nil'
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
if not_following_message.to_s.length > 1000
|
|
157
|
+
fail ArgumentError, 'invalid value for "not_following_message", the character length must be smaller than or equal to 1000.'
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
@not_following_message = not_following_message
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Checks equality by comparing each attribute.
|
|
164
|
+
# @param [Object] Object to be compared
|
|
165
|
+
def ==(o)
|
|
166
|
+
return true if self.equal?(o)
|
|
167
|
+
self.class == o.class &&
|
|
168
|
+
message == o.message &&
|
|
169
|
+
button_label == o.button_label &&
|
|
170
|
+
not_following_message == o.not_following_message
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# @see the `==` method
|
|
174
|
+
# @param [Object] Object to be compared
|
|
175
|
+
def eql?(o)
|
|
176
|
+
self == o
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Calculates hash code according to all attributes.
|
|
180
|
+
# @return [Integer] Hash code
|
|
181
|
+
def hash
|
|
182
|
+
[message, button_label, not_following_message].hash
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Builds the object from hash
|
|
186
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
187
|
+
# @return [Object] Returns the model itself
|
|
188
|
+
def self.build_from_hash(attributes)
|
|
189
|
+
return nil unless attributes.is_a?(Hash)
|
|
190
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
191
|
+
transformed_hash = {}
|
|
192
|
+
openapi_types.each_pair do |key, type|
|
|
193
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
194
|
+
transformed_hash["#{key}"] = nil
|
|
195
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
196
|
+
# check to ensure the input is an array given that the attribute
|
|
197
|
+
# is documented as an array but the input is not
|
|
198
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
199
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
200
|
+
end
|
|
201
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
202
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
203
|
+
end
|
|
204
|
+
end
|
|
205
|
+
new(transformed_hash)
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Returns the object in the form of hash
|
|
209
|
+
# @return [Hash] Returns the object in the form of hash
|
|
210
|
+
def to_hash
|
|
211
|
+
hash = {}
|
|
212
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
213
|
+
value = self.send(attr)
|
|
214
|
+
if value.nil?
|
|
215
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
216
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
hash[param] = _to_hash(value)
|
|
220
|
+
end
|
|
221
|
+
hash
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
end
|
|
@@ -42,7 +42,7 @@ module Zernio
|
|
|
42
42
|
# Where the conversion happened. Used by Meta. Google also requires an event source internally; omitting this field sends OTHER to Google. Send an explicit value for accurate origin reporting.
|
|
43
43
|
attr_accessor :action_source
|
|
44
44
|
|
|
45
|
-
# Escape hatch for platform-specific fields we haven't normalized.
|
|
45
|
+
# Escape hatch for platform-specific fields we haven't normalized. On Meta, keys are shallow-merged into `custom_data` only: fields Zernio already builds (`value`, `currency`, `contents`, `num_items`) always win on collision, and `user_data` (hashed match keys) is never touched. Use first-class fields (e.g. `user.leadId`) for anything that must reach `user_data`.
|
|
46
46
|
attr_accessor :platform_data
|
|
47
47
|
|
|
48
48
|
class EnumAttributeValidator
|
|
@@ -55,6 +55,9 @@ module Zernio
|
|
|
55
55
|
# Meta advanced matching (ge). 'f' or 'm'; hashed server-side. Meta only.
|
|
56
56
|
attr_accessor :gender
|
|
57
57
|
|
|
58
|
+
# Meta lead ID from a Lead Ad submission, as a string. Required for Conversion Leads CRM events: send it with `actionSource: 'crm'` and `platformData: { event_source: 'crm', lead_event_source: '<CRM name>' }`. Forwarded unhashed to Meta's `user_data.lead_id`. Meta only.
|
|
59
|
+
attr_accessor :lead_id
|
|
60
|
+
|
|
58
61
|
attr_accessor :click_ids
|
|
59
62
|
|
|
60
63
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -73,6 +76,7 @@ module Zernio
|
|
|
73
76
|
:'zip' => :'zip',
|
|
74
77
|
:'dob' => :'dob',
|
|
75
78
|
:'gender' => :'gender',
|
|
79
|
+
:'lead_id' => :'leadId',
|
|
76
80
|
:'click_ids' => :'clickIds'
|
|
77
81
|
}
|
|
78
82
|
end
|
|
@@ -103,6 +107,7 @@ module Zernio
|
|
|
103
107
|
:'zip' => :'String',
|
|
104
108
|
:'dob' => :'String',
|
|
105
109
|
:'gender' => :'String',
|
|
110
|
+
:'lead_id' => :'String',
|
|
106
111
|
:'click_ids' => :'ConversionEventUserClickIds'
|
|
107
112
|
}
|
|
108
113
|
end
|
|
@@ -181,6 +186,10 @@ module Zernio
|
|
|
181
186
|
self.gender = attributes[:'gender']
|
|
182
187
|
end
|
|
183
188
|
|
|
189
|
+
if attributes.key?(:'lead_id')
|
|
190
|
+
self.lead_id = attributes[:'lead_id']
|
|
191
|
+
end
|
|
192
|
+
|
|
184
193
|
if attributes.key?(:'click_ids')
|
|
185
194
|
self.click_ids = attributes[:'click_ids']
|
|
186
195
|
end
|
|
@@ -219,6 +228,7 @@ module Zernio
|
|
|
219
228
|
zip == o.zip &&
|
|
220
229
|
dob == o.dob &&
|
|
221
230
|
gender == o.gender &&
|
|
231
|
+
lead_id == o.lead_id &&
|
|
222
232
|
click_ids == o.click_ids
|
|
223
233
|
end
|
|
224
234
|
|
|
@@ -231,7 +241,7 @@ module Zernio
|
|
|
231
241
|
# Calculates hash code according to all attributes.
|
|
232
242
|
# @return [Integer] Hash code
|
|
233
243
|
def hash
|
|
234
|
-
[email, phone, first_name, last_name, external_id, ip_address, user_agent, country, city, state, zip, dob, gender, click_ids].hash
|
|
244
|
+
[email, phone, first_name, last_name, external_id, ip_address, user_agent, country, city, state, zip, dob, gender, lead_id, click_ids].hash
|
|
235
245
|
end
|
|
236
246
|
|
|
237
247
|
# Builds the object from hash
|
|
@@ -53,6 +53,16 @@ module Zernio
|
|
|
53
53
|
|
|
54
54
|
attr_accessor :click_tag
|
|
55
55
|
|
|
56
|
+
# Seconds waited after the trigger before the DM is sent. Absent when the DM goes out immediately.
|
|
57
|
+
attr_accessor :dm_delay_seconds
|
|
58
|
+
|
|
59
|
+
# Seconds waited before the public reply is posted. Absent when it follows the DM immediately.
|
|
60
|
+
attr_accessor :comment_reply_delay_seconds
|
|
61
|
+
|
|
62
|
+
attr_accessor :audience
|
|
63
|
+
|
|
64
|
+
attr_accessor :follow_gate
|
|
65
|
+
|
|
56
66
|
attr_accessor :is_active
|
|
57
67
|
|
|
58
68
|
attr_accessor :stats
|
|
@@ -100,6 +110,10 @@ module Zernio
|
|
|
100
110
|
:'comment_reply_variations' => :'commentReplyVariations',
|
|
101
111
|
:'link_tracking' => :'linkTracking',
|
|
102
112
|
:'click_tag' => :'clickTag',
|
|
113
|
+
:'dm_delay_seconds' => :'dmDelaySeconds',
|
|
114
|
+
:'comment_reply_delay_seconds' => :'commentReplyDelaySeconds',
|
|
115
|
+
:'audience' => :'audience',
|
|
116
|
+
:'follow_gate' => :'followGate',
|
|
103
117
|
:'is_active' => :'isActive',
|
|
104
118
|
:'stats' => :'stats',
|
|
105
119
|
:'created_at' => :'createdAt'
|
|
@@ -135,6 +149,10 @@ module Zernio
|
|
|
135
149
|
:'comment_reply_variations' => :'Array<String>',
|
|
136
150
|
:'link_tracking' => :'Boolean',
|
|
137
151
|
:'click_tag' => :'String',
|
|
152
|
+
:'dm_delay_seconds' => :'Integer',
|
|
153
|
+
:'comment_reply_delay_seconds' => :'Integer',
|
|
154
|
+
:'audience' => :'CommentAutomationAudience',
|
|
155
|
+
:'follow_gate' => :'CommentAutomationFollowGate',
|
|
138
156
|
:'is_active' => :'Boolean',
|
|
139
157
|
:'stats' => :'CreateCommentAutomation200ResponseAutomationStats',
|
|
140
158
|
:'created_at' => :'Time'
|
|
@@ -237,6 +255,22 @@ module Zernio
|
|
|
237
255
|
self.click_tag = attributes[:'click_tag']
|
|
238
256
|
end
|
|
239
257
|
|
|
258
|
+
if attributes.key?(:'dm_delay_seconds')
|
|
259
|
+
self.dm_delay_seconds = attributes[:'dm_delay_seconds']
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
if attributes.key?(:'comment_reply_delay_seconds')
|
|
263
|
+
self.comment_reply_delay_seconds = attributes[:'comment_reply_delay_seconds']
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
if attributes.key?(:'audience')
|
|
267
|
+
self.audience = attributes[:'audience']
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
if attributes.key?(:'follow_gate')
|
|
271
|
+
self.follow_gate = attributes[:'follow_gate']
|
|
272
|
+
end
|
|
273
|
+
|
|
240
274
|
if attributes.key?(:'is_active')
|
|
241
275
|
self.is_active = attributes[:'is_active']
|
|
242
276
|
end
|
|
@@ -310,6 +344,10 @@ module Zernio
|
|
|
310
344
|
comment_reply_variations == o.comment_reply_variations &&
|
|
311
345
|
link_tracking == o.link_tracking &&
|
|
312
346
|
click_tag == o.click_tag &&
|
|
347
|
+
dm_delay_seconds == o.dm_delay_seconds &&
|
|
348
|
+
comment_reply_delay_seconds == o.comment_reply_delay_seconds &&
|
|
349
|
+
audience == o.audience &&
|
|
350
|
+
follow_gate == o.follow_gate &&
|
|
313
351
|
is_active == o.is_active &&
|
|
314
352
|
stats == o.stats &&
|
|
315
353
|
created_at == o.created_at
|
|
@@ -324,7 +362,7 @@ module Zernio
|
|
|
324
362
|
# Calculates hash code according to all attributes.
|
|
325
363
|
# @return [Integer] Hash code
|
|
326
364
|
def hash
|
|
327
|
-
[id, name, platform, trigger, platform_post_id, keywords, match_mode, exclude_keywords, typo_tolerance, dm_message, buttons, comment_reply, dm_message_variations, comment_reply_variations, link_tracking, click_tag, is_active, stats, created_at].hash
|
|
365
|
+
[id, name, platform, trigger, platform_post_id, keywords, match_mode, exclude_keywords, typo_tolerance, dm_message, buttons, comment_reply, dm_message_variations, comment_reply_variations, link_tracking, click_tag, dm_delay_seconds, comment_reply_delay_seconds, audience, follow_gate, is_active, stats, created_at].hash
|
|
328
366
|
end
|
|
329
367
|
|
|
330
368
|
# Builds the object from hash
|