late-sdk 0.0.686 → 0.0.688
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 +3 -0
- data/docs/CommentAutomationTemplate.md +20 -0
- data/docs/CommentAutomationTemplateElement.md +24 -0
- data/docs/CommentAutomationTemplateElementButtonsInner.md +24 -0
- data/docs/CreateCommentAutomation200ResponseAutomation.md +2 -0
- data/docs/CreateCommentAutomationRequest.md +2 -0
- data/docs/GetCommentAutomation200ResponseAutomation.md +2 -0
- data/docs/ListCommentAutomations200ResponseAutomationsInner.md +2 -0
- data/docs/MessagesApi.md +2 -2
- data/docs/SendInboxMessageRequest.md +1 -1
- data/docs/UpdateCommentAutomation200ResponseAutomation.md +2 -0
- data/docs/UpdateCommentAutomationRequest.md +2 -0
- data/docs/WebhookEventsApi.md +1 -1
- data/lib/zernio-sdk/api/messages_api.rb +4 -4
- data/lib/zernio-sdk/api/webhook_events_api.rb +2 -2
- data/lib/zernio-sdk/models/comment_automation_template.rb +235 -0
- data/lib/zernio-sdk/models/comment_automation_template_element.rb +244 -0
- data/lib/zernio-sdk/models/comment_automation_template_element_buttons_inner.rb +243 -0
- data/lib/zernio-sdk/models/create_comment_automation200_response_automation.rb +11 -1
- data/lib/zernio-sdk/models/create_comment_automation_request.rb +12 -1
- data/lib/zernio-sdk/models/get_comment_automation200_response_automation.rb +11 -1
- data/lib/zernio-sdk/models/list_comment_automations200_response_automations_inner.rb +10 -1
- data/lib/zernio-sdk/models/send_inbox_message_request.rb +1 -1
- data/lib/zernio-sdk/models/send_inbox_message_request_template.rb +1 -1
- data/lib/zernio-sdk/models/update_comment_automation200_response_automation.rb +11 -1
- data/lib/zernio-sdk/models/update_comment_automation_request.rb +11 -1
- data/lib/zernio-sdk/models/webhook_payload_reaction.rb +1 -1
- data/lib/zernio-sdk/models/webhook_payload_reaction_reaction_sender.rb +1 -1
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +3 -0
- data/openapi.yaml +77 -9
- data/spec/api/messages_api_spec.rb +2 -2
- data/spec/models/comment_automation_template_element_buttons_inner_spec.rb +58 -0
- data/spec/models/comment_automation_template_element_spec.rb +54 -0
- data/spec/models/comment_automation_template_spec.rb +46 -0
- data/spec/models/create_comment_automation200_response_automation_spec.rb +6 -0
- data/spec/models/create_comment_automation_request_spec.rb +6 -0
- data/spec/models/get_comment_automation200_response_automation_spec.rb +6 -0
- data/spec/models/list_comment_automations200_response_automations_inner_spec.rb +6 -0
- data/spec/models/update_comment_automation200_response_automation_spec.rb +6 -0
- data/spec/models/update_comment_automation_request_spec.rb +6 -0
- data/zernio-sdk-0.0.688.gem +0 -0
- metadata +1584 -1572
- data/zernio-sdk-0.0.686.gem +0 -0
|
@@ -0,0 +1,244 @@
|
|
|
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
|
+
class CommentAutomationTemplateElement < ApiModelBase
|
|
18
|
+
# Card headline (80 chars max). Also used as the Inbox preview for the sent DM.
|
|
19
|
+
attr_accessor :title
|
|
20
|
+
|
|
21
|
+
# Card description, e.g. the price or a short pitch (80 chars max).
|
|
22
|
+
attr_accessor :subtitle
|
|
23
|
+
|
|
24
|
+
# Publicly reachable http(s) image rendered large above the card.
|
|
25
|
+
attr_accessor :image_url
|
|
26
|
+
|
|
27
|
+
# Up to 3 card buttons. A generic template has NO phone button, on either platform. `url` buttons are click-tracked when linkTracking is on.
|
|
28
|
+
attr_accessor :buttons
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'title' => :'title',
|
|
34
|
+
:'subtitle' => :'subtitle',
|
|
35
|
+
:'image_url' => :'imageUrl',
|
|
36
|
+
:'buttons' => :'buttons'
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Returns attribute mapping this model knows about
|
|
41
|
+
def self.acceptable_attribute_map
|
|
42
|
+
attribute_map
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Returns all the JSON keys this model knows about
|
|
46
|
+
def self.acceptable_attributes
|
|
47
|
+
acceptable_attribute_map.values
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Attribute type mapping.
|
|
51
|
+
def self.openapi_types
|
|
52
|
+
{
|
|
53
|
+
:'title' => :'String',
|
|
54
|
+
:'subtitle' => :'String',
|
|
55
|
+
:'image_url' => :'String',
|
|
56
|
+
:'buttons' => :'Array<CommentAutomationTemplateElementButtonsInner>'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# List of attributes with nullable: true
|
|
61
|
+
def self.openapi_nullable
|
|
62
|
+
Set.new([
|
|
63
|
+
])
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Initializes the object
|
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
68
|
+
def initialize(attributes = {})
|
|
69
|
+
if (!attributes.is_a?(Hash))
|
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CommentAutomationTemplateElement` initialize method"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
75
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
76
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CommentAutomationTemplateElement`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
78
|
+
end
|
|
79
|
+
h[k.to_sym] = v
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'title')
|
|
83
|
+
self.title = attributes[:'title']
|
|
84
|
+
else
|
|
85
|
+
self.title = nil
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'subtitle')
|
|
89
|
+
self.subtitle = attributes[:'subtitle']
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'image_url')
|
|
93
|
+
self.image_url = attributes[:'image_url']
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'buttons')
|
|
97
|
+
if (value = attributes[:'buttons']).is_a?(Array)
|
|
98
|
+
self.buttons = value
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
104
|
+
# @return Array for valid properties with the reasons
|
|
105
|
+
def list_invalid_properties
|
|
106
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
107
|
+
invalid_properties = Array.new
|
|
108
|
+
if @title.nil?
|
|
109
|
+
invalid_properties.push('invalid value for "title", title cannot be nil.')
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if @title.to_s.length > 80
|
|
113
|
+
invalid_properties.push('invalid value for "title", the character length must be smaller than or equal to 80.')
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if !@subtitle.nil? && @subtitle.to_s.length > 80
|
|
117
|
+
invalid_properties.push('invalid value for "subtitle", the character length must be smaller than or equal to 80.')
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if !@buttons.nil? && @buttons.length > 3
|
|
121
|
+
invalid_properties.push('invalid value for "buttons", number of items must be less than or equal to 3.')
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
invalid_properties
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Check to see if the all the properties in the model are valid
|
|
128
|
+
# @return true if the model is valid
|
|
129
|
+
def valid?
|
|
130
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
131
|
+
return false if @title.nil?
|
|
132
|
+
return false if @title.to_s.length > 80
|
|
133
|
+
return false if !@subtitle.nil? && @subtitle.to_s.length > 80
|
|
134
|
+
return false if !@buttons.nil? && @buttons.length > 3
|
|
135
|
+
true
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Custom attribute writer method with validation
|
|
139
|
+
# @param [Object] title Value to be assigned
|
|
140
|
+
def title=(title)
|
|
141
|
+
if title.nil?
|
|
142
|
+
fail ArgumentError, 'title cannot be nil'
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if title.to_s.length > 80
|
|
146
|
+
fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 80.'
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
@title = title
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Custom attribute writer method with validation
|
|
153
|
+
# @param [Object] subtitle Value to be assigned
|
|
154
|
+
def subtitle=(subtitle)
|
|
155
|
+
if subtitle.nil?
|
|
156
|
+
fail ArgumentError, 'subtitle cannot be nil'
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if subtitle.to_s.length > 80
|
|
160
|
+
fail ArgumentError, 'invalid value for "subtitle", the character length must be smaller than or equal to 80.'
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
@subtitle = subtitle
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Custom attribute writer method with validation
|
|
167
|
+
# @param [Object] buttons Value to be assigned
|
|
168
|
+
def buttons=(buttons)
|
|
169
|
+
if buttons.nil?
|
|
170
|
+
fail ArgumentError, 'buttons cannot be nil'
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
if buttons.length > 3
|
|
174
|
+
fail ArgumentError, 'invalid value for "buttons", number of items must be less than or equal to 3.'
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
@buttons = buttons
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Checks equality by comparing each attribute.
|
|
181
|
+
# @param [Object] Object to be compared
|
|
182
|
+
def ==(o)
|
|
183
|
+
return true if self.equal?(o)
|
|
184
|
+
self.class == o.class &&
|
|
185
|
+
title == o.title &&
|
|
186
|
+
subtitle == o.subtitle &&
|
|
187
|
+
image_url == o.image_url &&
|
|
188
|
+
buttons == o.buttons
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# @see the `==` method
|
|
192
|
+
# @param [Object] Object to be compared
|
|
193
|
+
def eql?(o)
|
|
194
|
+
self == o
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# Calculates hash code according to all attributes.
|
|
198
|
+
# @return [Integer] Hash code
|
|
199
|
+
def hash
|
|
200
|
+
[title, subtitle, image_url, buttons].hash
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Builds the object from hash
|
|
204
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
205
|
+
# @return [Object] Returns the model itself
|
|
206
|
+
def self.build_from_hash(attributes)
|
|
207
|
+
return nil unless attributes.is_a?(Hash)
|
|
208
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
209
|
+
transformed_hash = {}
|
|
210
|
+
openapi_types.each_pair do |key, type|
|
|
211
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
212
|
+
transformed_hash["#{key}"] = nil
|
|
213
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
214
|
+
# check to ensure the input is an array given that the attribute
|
|
215
|
+
# is documented as an array but the input is not
|
|
216
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
217
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
218
|
+
end
|
|
219
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
220
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
221
|
+
end
|
|
222
|
+
end
|
|
223
|
+
new(transformed_hash)
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Returns the object in the form of hash
|
|
227
|
+
# @return [Hash] Returns the object in the form of hash
|
|
228
|
+
def to_hash
|
|
229
|
+
hash = {}
|
|
230
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
231
|
+
value = self.send(attr)
|
|
232
|
+
if value.nil?
|
|
233
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
234
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
hash[param] = _to_hash(value)
|
|
238
|
+
end
|
|
239
|
+
hash
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
end
|
|
@@ -0,0 +1,243 @@
|
|
|
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
|
+
class CommentAutomationTemplateElementButtonsInner < ApiModelBase
|
|
18
|
+
attr_accessor :type
|
|
19
|
+
|
|
20
|
+
attr_accessor :title
|
|
21
|
+
|
|
22
|
+
# Target URL (required when type is url)
|
|
23
|
+
attr_accessor :url
|
|
24
|
+
|
|
25
|
+
# Postback payload delivered via the messaging_postbacks webhook (required when type is postback)
|
|
26
|
+
attr_accessor :payload
|
|
27
|
+
|
|
28
|
+
class EnumAttributeValidator
|
|
29
|
+
attr_reader :datatype
|
|
30
|
+
attr_reader :allowable_values
|
|
31
|
+
|
|
32
|
+
def initialize(datatype, allowable_values)
|
|
33
|
+
@allowable_values = allowable_values.map do |value|
|
|
34
|
+
case datatype.to_s
|
|
35
|
+
when /Integer/i
|
|
36
|
+
value.to_i
|
|
37
|
+
when /Float/i
|
|
38
|
+
value.to_f
|
|
39
|
+
else
|
|
40
|
+
value
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def valid?(value)
|
|
46
|
+
!value || allowable_values.include?(value)
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
51
|
+
def self.attribute_map
|
|
52
|
+
{
|
|
53
|
+
:'type' => :'type',
|
|
54
|
+
:'title' => :'title',
|
|
55
|
+
:'url' => :'url',
|
|
56
|
+
:'payload' => :'payload'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Returns attribute mapping this model knows about
|
|
61
|
+
def self.acceptable_attribute_map
|
|
62
|
+
attribute_map
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Returns all the JSON keys this model knows about
|
|
66
|
+
def self.acceptable_attributes
|
|
67
|
+
acceptable_attribute_map.values
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Attribute type mapping.
|
|
71
|
+
def self.openapi_types
|
|
72
|
+
{
|
|
73
|
+
:'type' => :'String',
|
|
74
|
+
:'title' => :'String',
|
|
75
|
+
:'url' => :'String',
|
|
76
|
+
:'payload' => :'String'
|
|
77
|
+
}
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# List of attributes with nullable: true
|
|
81
|
+
def self.openapi_nullable
|
|
82
|
+
Set.new([
|
|
83
|
+
])
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Initializes the object
|
|
87
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
88
|
+
def initialize(attributes = {})
|
|
89
|
+
if (!attributes.is_a?(Hash))
|
|
90
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CommentAutomationTemplateElementButtonsInner` initialize method"
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
94
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
95
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
96
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
97
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CommentAutomationTemplateElementButtonsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
98
|
+
end
|
|
99
|
+
h[k.to_sym] = v
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'type')
|
|
103
|
+
self.type = attributes[:'type']
|
|
104
|
+
else
|
|
105
|
+
self.type = nil
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'title')
|
|
109
|
+
self.title = attributes[:'title']
|
|
110
|
+
else
|
|
111
|
+
self.title = nil
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'url')
|
|
115
|
+
self.url = attributes[:'url']
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if attributes.key?(:'payload')
|
|
119
|
+
self.payload = attributes[:'payload']
|
|
120
|
+
end
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
124
|
+
# @return Array for valid properties with the reasons
|
|
125
|
+
def list_invalid_properties
|
|
126
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
127
|
+
invalid_properties = Array.new
|
|
128
|
+
if @type.nil?
|
|
129
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if @title.nil?
|
|
133
|
+
invalid_properties.push('invalid value for "title", title cannot be nil.')
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if @title.to_s.length > 20
|
|
137
|
+
invalid_properties.push('invalid value for "title", the character length must be smaller than or equal to 20.')
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
invalid_properties
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Check to see if the all the properties in the model are valid
|
|
144
|
+
# @return true if the model is valid
|
|
145
|
+
def valid?
|
|
146
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
147
|
+
return false if @type.nil?
|
|
148
|
+
type_validator = EnumAttributeValidator.new('String', ["url", "postback"])
|
|
149
|
+
return false unless type_validator.valid?(@type)
|
|
150
|
+
return false if @title.nil?
|
|
151
|
+
return false if @title.to_s.length > 20
|
|
152
|
+
true
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
156
|
+
# @param [Object] type Object to be assigned
|
|
157
|
+
def type=(type)
|
|
158
|
+
validator = EnumAttributeValidator.new('String', ["url", "postback"])
|
|
159
|
+
unless validator.valid?(type)
|
|
160
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
|
161
|
+
end
|
|
162
|
+
@type = type
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Custom attribute writer method with validation
|
|
166
|
+
# @param [Object] title Value to be assigned
|
|
167
|
+
def title=(title)
|
|
168
|
+
if title.nil?
|
|
169
|
+
fail ArgumentError, 'title cannot be nil'
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
if title.to_s.length > 20
|
|
173
|
+
fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 20.'
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
@title = title
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Checks equality by comparing each attribute.
|
|
180
|
+
# @param [Object] Object to be compared
|
|
181
|
+
def ==(o)
|
|
182
|
+
return true if self.equal?(o)
|
|
183
|
+
self.class == o.class &&
|
|
184
|
+
type == o.type &&
|
|
185
|
+
title == o.title &&
|
|
186
|
+
url == o.url &&
|
|
187
|
+
payload == o.payload
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# @see the `==` method
|
|
191
|
+
# @param [Object] Object to be compared
|
|
192
|
+
def eql?(o)
|
|
193
|
+
self == o
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Calculates hash code according to all attributes.
|
|
197
|
+
# @return [Integer] Hash code
|
|
198
|
+
def hash
|
|
199
|
+
[type, title, url, payload].hash
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Builds the object from hash
|
|
203
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
204
|
+
# @return [Object] Returns the model itself
|
|
205
|
+
def self.build_from_hash(attributes)
|
|
206
|
+
return nil unless attributes.is_a?(Hash)
|
|
207
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
208
|
+
transformed_hash = {}
|
|
209
|
+
openapi_types.each_pair do |key, type|
|
|
210
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
211
|
+
transformed_hash["#{key}"] = nil
|
|
212
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
213
|
+
# check to ensure the input is an array given that the attribute
|
|
214
|
+
# is documented as an array but the input is not
|
|
215
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
216
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
217
|
+
end
|
|
218
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
219
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
new(transformed_hash)
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Returns the object in the form of hash
|
|
226
|
+
# @return [Hash] Returns the object in the form of hash
|
|
227
|
+
def to_hash
|
|
228
|
+
hash = {}
|
|
229
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
230
|
+
value = self.send(attr)
|
|
231
|
+
if value.nil?
|
|
232
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
233
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
hash[param] = _to_hash(value)
|
|
237
|
+
end
|
|
238
|
+
hash
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
end
|
|
@@ -41,6 +41,8 @@ module Zernio
|
|
|
41
41
|
# Inline DM buttons (up to 3). Omitted when none are set.
|
|
42
42
|
attr_accessor :buttons
|
|
43
43
|
|
|
44
|
+
attr_accessor :template
|
|
45
|
+
|
|
44
46
|
attr_accessor :comment_reply
|
|
45
47
|
|
|
46
48
|
# Alternate DM texts rotated at random with dmMessage. Omitted when none.
|
|
@@ -105,6 +107,7 @@ module Zernio
|
|
|
105
107
|
:'typo_tolerance' => :'typoTolerance',
|
|
106
108
|
:'dm_message' => :'dmMessage',
|
|
107
109
|
:'buttons' => :'buttons',
|
|
110
|
+
:'template' => :'template',
|
|
108
111
|
:'comment_reply' => :'commentReply',
|
|
109
112
|
:'dm_message_variations' => :'dmMessageVariations',
|
|
110
113
|
:'comment_reply_variations' => :'commentReplyVariations',
|
|
@@ -144,6 +147,7 @@ module Zernio
|
|
|
144
147
|
:'typo_tolerance' => :'Boolean',
|
|
145
148
|
:'dm_message' => :'String',
|
|
146
149
|
:'buttons' => :'Array<DmButton>',
|
|
150
|
+
:'template' => :'CommentAutomationTemplate',
|
|
147
151
|
:'comment_reply' => :'String',
|
|
148
152
|
:'dm_message_variations' => :'Array<String>',
|
|
149
153
|
:'comment_reply_variations' => :'Array<String>',
|
|
@@ -162,6 +166,7 @@ module Zernio
|
|
|
162
166
|
# List of attributes with nullable: true
|
|
163
167
|
def self.openapi_nullable
|
|
164
168
|
Set.new([
|
|
169
|
+
:'template',
|
|
165
170
|
])
|
|
166
171
|
end
|
|
167
172
|
|
|
@@ -231,6 +236,10 @@ module Zernio
|
|
|
231
236
|
end
|
|
232
237
|
end
|
|
233
238
|
|
|
239
|
+
if attributes.key?(:'template')
|
|
240
|
+
self.template = attributes[:'template']
|
|
241
|
+
end
|
|
242
|
+
|
|
234
243
|
if attributes.key?(:'comment_reply')
|
|
235
244
|
self.comment_reply = attributes[:'comment_reply']
|
|
236
245
|
end
|
|
@@ -339,6 +348,7 @@ module Zernio
|
|
|
339
348
|
typo_tolerance == o.typo_tolerance &&
|
|
340
349
|
dm_message == o.dm_message &&
|
|
341
350
|
buttons == o.buttons &&
|
|
351
|
+
template == o.template &&
|
|
342
352
|
comment_reply == o.comment_reply &&
|
|
343
353
|
dm_message_variations == o.dm_message_variations &&
|
|
344
354
|
comment_reply_variations == o.comment_reply_variations &&
|
|
@@ -362,7 +372,7 @@ module Zernio
|
|
|
362
372
|
# Calculates hash code according to all attributes.
|
|
363
373
|
# @return [Integer] Hash code
|
|
364
374
|
def 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
|
|
375
|
+
[id, name, platform, trigger, platform_post_id, keywords, match_mode, exclude_keywords, typo_tolerance, dm_message, buttons, template, 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
|
|
366
376
|
end
|
|
367
377
|
|
|
368
378
|
# Builds the object from hash
|
|
@@ -53,6 +53,9 @@ module Zernio
|
|
|
53
53
|
# Optional inline DM buttons (1-3). Phone buttons are Facebook-only. Omit or pass [] for a plain-text DM.
|
|
54
54
|
attr_accessor :buttons
|
|
55
55
|
|
|
56
|
+
# Optional product card sent INSTEAD of the plain dmMessage bubble. Mutually exclusive with buttons. dmMessage stays required: it is what gets sent the moment the card is cleared.
|
|
57
|
+
attr_accessor :template
|
|
58
|
+
|
|
56
59
|
# Optional public reply to the comment
|
|
57
60
|
attr_accessor :comment_reply
|
|
58
61
|
|
|
@@ -116,6 +119,7 @@ module Zernio
|
|
|
116
119
|
:'typo_tolerance' => :'typoTolerance',
|
|
117
120
|
:'dm_message' => :'dmMessage',
|
|
118
121
|
:'buttons' => :'buttons',
|
|
122
|
+
:'template' => :'template',
|
|
119
123
|
:'comment_reply' => :'commentReply',
|
|
120
124
|
:'dm_message_variations' => :'dmMessageVariations',
|
|
121
125
|
:'comment_reply_variations' => :'commentReplyVariations',
|
|
@@ -154,6 +158,7 @@ module Zernio
|
|
|
154
158
|
:'typo_tolerance' => :'Boolean',
|
|
155
159
|
:'dm_message' => :'String',
|
|
156
160
|
:'buttons' => :'Array<DmButton>',
|
|
161
|
+
:'template' => :'CommentAutomationTemplate',
|
|
157
162
|
:'comment_reply' => :'String',
|
|
158
163
|
:'dm_message_variations' => :'Array<String>',
|
|
159
164
|
:'comment_reply_variations' => :'Array<String>',
|
|
@@ -169,6 +174,7 @@ module Zernio
|
|
|
169
174
|
# List of attributes with nullable: true
|
|
170
175
|
def self.openapi_nullable
|
|
171
176
|
Set.new([
|
|
177
|
+
:'template',
|
|
172
178
|
])
|
|
173
179
|
end
|
|
174
180
|
|
|
@@ -258,6 +264,10 @@ module Zernio
|
|
|
258
264
|
end
|
|
259
265
|
end
|
|
260
266
|
|
|
267
|
+
if attributes.key?(:'template')
|
|
268
|
+
self.template = attributes[:'template']
|
|
269
|
+
end
|
|
270
|
+
|
|
261
271
|
if attributes.key?(:'comment_reply')
|
|
262
272
|
self.comment_reply = attributes[:'comment_reply']
|
|
263
273
|
end
|
|
@@ -531,6 +541,7 @@ module Zernio
|
|
|
531
541
|
typo_tolerance == o.typo_tolerance &&
|
|
532
542
|
dm_message == o.dm_message &&
|
|
533
543
|
buttons == o.buttons &&
|
|
544
|
+
template == o.template &&
|
|
534
545
|
comment_reply == o.comment_reply &&
|
|
535
546
|
dm_message_variations == o.dm_message_variations &&
|
|
536
547
|
comment_reply_variations == o.comment_reply_variations &&
|
|
@@ -551,7 +562,7 @@ module Zernio
|
|
|
551
562
|
# Calculates hash code according to all attributes.
|
|
552
563
|
# @return [Integer] Hash code
|
|
553
564
|
def hash
|
|
554
|
-
[profile_id, account_id, trigger, platform_post_id, post_id, post_title, name, 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].hash
|
|
565
|
+
[profile_id, account_id, trigger, platform_post_id, post_id, post_title, name, keywords, match_mode, exclude_keywords, typo_tolerance, dm_message, buttons, template, comment_reply, dm_message_variations, comment_reply_variations, link_tracking, click_tag, dm_delay_seconds, comment_reply_delay_seconds, audience, follow_gate].hash
|
|
555
566
|
end
|
|
556
567
|
|
|
557
568
|
# Builds the object from hash
|
|
@@ -47,6 +47,8 @@ module Zernio
|
|
|
47
47
|
# Inline DM buttons (up to 3). Omitted when none are set.
|
|
48
48
|
attr_accessor :buttons
|
|
49
49
|
|
|
50
|
+
attr_accessor :template
|
|
51
|
+
|
|
50
52
|
attr_accessor :comment_reply
|
|
51
53
|
|
|
52
54
|
# Alternate DM texts rotated at random with dmMessage. Omitted when none.
|
|
@@ -116,6 +118,7 @@ module Zernio
|
|
|
116
118
|
:'typo_tolerance' => :'typoTolerance',
|
|
117
119
|
:'dm_message' => :'dmMessage',
|
|
118
120
|
:'buttons' => :'buttons',
|
|
121
|
+
:'template' => :'template',
|
|
119
122
|
:'comment_reply' => :'commentReply',
|
|
120
123
|
:'dm_message_variations' => :'dmMessageVariations',
|
|
121
124
|
:'comment_reply_variations' => :'commentReplyVariations',
|
|
@@ -159,6 +162,7 @@ module Zernio
|
|
|
159
162
|
:'typo_tolerance' => :'Boolean',
|
|
160
163
|
:'dm_message' => :'String',
|
|
161
164
|
:'buttons' => :'Array<DmButton>',
|
|
165
|
+
:'template' => :'CommentAutomationTemplate',
|
|
162
166
|
:'comment_reply' => :'String',
|
|
163
167
|
:'dm_message_variations' => :'Array<String>',
|
|
164
168
|
:'comment_reply_variations' => :'Array<String>',
|
|
@@ -178,6 +182,7 @@ module Zernio
|
|
|
178
182
|
# List of attributes with nullable: true
|
|
179
183
|
def self.openapi_nullable
|
|
180
184
|
Set.new([
|
|
185
|
+
:'template',
|
|
181
186
|
])
|
|
182
187
|
end
|
|
183
188
|
|
|
@@ -259,6 +264,10 @@ module Zernio
|
|
|
259
264
|
end
|
|
260
265
|
end
|
|
261
266
|
|
|
267
|
+
if attributes.key?(:'template')
|
|
268
|
+
self.template = attributes[:'template']
|
|
269
|
+
end
|
|
270
|
+
|
|
262
271
|
if attributes.key?(:'comment_reply')
|
|
263
272
|
self.comment_reply = attributes[:'comment_reply']
|
|
264
273
|
end
|
|
@@ -374,6 +383,7 @@ module Zernio
|
|
|
374
383
|
typo_tolerance == o.typo_tolerance &&
|
|
375
384
|
dm_message == o.dm_message &&
|
|
376
385
|
buttons == o.buttons &&
|
|
386
|
+
template == o.template &&
|
|
377
387
|
comment_reply == o.comment_reply &&
|
|
378
388
|
dm_message_variations == o.dm_message_variations &&
|
|
379
389
|
comment_reply_variations == o.comment_reply_variations &&
|
|
@@ -398,7 +408,7 @@ module Zernio
|
|
|
398
408
|
# Calculates hash code according to all attributes.
|
|
399
409
|
# @return [Integer] Hash code
|
|
400
410
|
def hash
|
|
401
|
-
[id, name, platform, trigger, account_id, platform_post_id, post_id, post_title, 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, updated_at].hash
|
|
411
|
+
[id, name, platform, trigger, account_id, platform_post_id, post_id, post_title, keywords, match_mode, exclude_keywords, typo_tolerance, dm_message, buttons, template, 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, updated_at].hash
|
|
402
412
|
end
|
|
403
413
|
|
|
404
414
|
# Builds the object from hash
|