late-sdk 0.0.74 → 0.0.76
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/BroadcastsApi.md +14 -12
- data/docs/GetWhatsAppBroadcasts200ResponseBroadcastsInner.md +2 -0
- data/docs/ListBroadcasts200Response.md +22 -0
- data/docs/ListBroadcasts200ResponseBroadcastsInner.md +50 -0
- data/docs/ListSequences200Response.md +22 -0
- data/docs/ListSequences200ResponseSequencesInner.md +46 -0
- data/docs/SendBroadcast200Response.md +26 -0
- data/docs/SequencesApi.md +7 -6
- data/lib/late-sdk/api/broadcasts_api.rb +10 -10
- data/lib/late-sdk/api/sequences_api.rb +5 -5
- data/lib/late-sdk/models/get_whats_app_broadcasts200_response_broadcasts_inner.rb +11 -1
- data/lib/late-sdk/models/list_broadcasts200_response.rb +167 -0
- data/lib/late-sdk/models/list_broadcasts200_response_broadcasts_inner.rb +327 -0
- data/lib/late-sdk/models/list_sequences200_response.rb +167 -0
- data/lib/late-sdk/models/list_sequences200_response_sequences_inner.rb +309 -0
- data/lib/late-sdk/models/send_broadcast200_response.rb +221 -0
- data/lib/late-sdk/version.rb +1 -1
- data/lib/late-sdk.rb +5 -0
- data/openapi.yaml +85 -3
- data/spec/api/broadcasts_api_spec.rb +2 -2
- data/spec/api/sequences_api_spec.rb +1 -1
- data/spec/models/get_whats_app_broadcasts200_response_broadcasts_inner_spec.rb +6 -0
- data/spec/models/list_broadcasts200_response_broadcasts_inner_spec.rb +136 -0
- data/spec/models/list_broadcasts200_response_spec.rb +48 -0
- data/spec/models/list_sequences200_response_sequences_inner_spec.rb +124 -0
- data/spec/models/list_sequences200_response_spec.rb +48 -0
- data/spec/models/send_broadcast200_response_spec.rb +64 -0
- data/zernio-sdk-0.0.76.gem +0 -0
- metadata +22 -2
- data/zernio-sdk-0.0.74.gem +0 -0
|
@@ -0,0 +1,309 @@
|
|
|
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.1
|
|
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 Late
|
|
17
|
+
class ListSequences200ResponseSequencesInner < ApiModelBase
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
attr_accessor :name
|
|
21
|
+
|
|
22
|
+
attr_accessor :description
|
|
23
|
+
|
|
24
|
+
attr_accessor :platform
|
|
25
|
+
|
|
26
|
+
attr_accessor :account_id
|
|
27
|
+
|
|
28
|
+
# Display name of the sending account
|
|
29
|
+
attr_accessor :account_name
|
|
30
|
+
|
|
31
|
+
# First step template name or message text snippet
|
|
32
|
+
attr_accessor :message_preview
|
|
33
|
+
|
|
34
|
+
attr_accessor :status
|
|
35
|
+
|
|
36
|
+
attr_accessor :steps_count
|
|
37
|
+
|
|
38
|
+
attr_accessor :exit_on_reply
|
|
39
|
+
|
|
40
|
+
attr_accessor :exit_on_unsubscribe
|
|
41
|
+
|
|
42
|
+
attr_accessor :total_enrolled
|
|
43
|
+
|
|
44
|
+
attr_accessor :total_completed
|
|
45
|
+
|
|
46
|
+
attr_accessor :total_exited
|
|
47
|
+
|
|
48
|
+
attr_accessor :created_at
|
|
49
|
+
|
|
50
|
+
class EnumAttributeValidator
|
|
51
|
+
attr_reader :datatype
|
|
52
|
+
attr_reader :allowable_values
|
|
53
|
+
|
|
54
|
+
def initialize(datatype, allowable_values)
|
|
55
|
+
@allowable_values = allowable_values.map do |value|
|
|
56
|
+
case datatype.to_s
|
|
57
|
+
when /Integer/i
|
|
58
|
+
value.to_i
|
|
59
|
+
when /Float/i
|
|
60
|
+
value.to_f
|
|
61
|
+
else
|
|
62
|
+
value
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def valid?(value)
|
|
68
|
+
!value || allowable_values.include?(value)
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
73
|
+
def self.attribute_map
|
|
74
|
+
{
|
|
75
|
+
:'id' => :'id',
|
|
76
|
+
:'name' => :'name',
|
|
77
|
+
:'description' => :'description',
|
|
78
|
+
:'platform' => :'platform',
|
|
79
|
+
:'account_id' => :'accountId',
|
|
80
|
+
:'account_name' => :'accountName',
|
|
81
|
+
:'message_preview' => :'messagePreview',
|
|
82
|
+
:'status' => :'status',
|
|
83
|
+
:'steps_count' => :'stepsCount',
|
|
84
|
+
:'exit_on_reply' => :'exitOnReply',
|
|
85
|
+
:'exit_on_unsubscribe' => :'exitOnUnsubscribe',
|
|
86
|
+
:'total_enrolled' => :'totalEnrolled',
|
|
87
|
+
:'total_completed' => :'totalCompleted',
|
|
88
|
+
:'total_exited' => :'totalExited',
|
|
89
|
+
:'created_at' => :'createdAt'
|
|
90
|
+
}
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Returns attribute mapping this model knows about
|
|
94
|
+
def self.acceptable_attribute_map
|
|
95
|
+
attribute_map
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Returns all the JSON keys this model knows about
|
|
99
|
+
def self.acceptable_attributes
|
|
100
|
+
acceptable_attribute_map.values
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Attribute type mapping.
|
|
104
|
+
def self.openapi_types
|
|
105
|
+
{
|
|
106
|
+
:'id' => :'String',
|
|
107
|
+
:'name' => :'String',
|
|
108
|
+
:'description' => :'String',
|
|
109
|
+
:'platform' => :'String',
|
|
110
|
+
:'account_id' => :'String',
|
|
111
|
+
:'account_name' => :'String',
|
|
112
|
+
:'message_preview' => :'String',
|
|
113
|
+
:'status' => :'String',
|
|
114
|
+
:'steps_count' => :'Integer',
|
|
115
|
+
:'exit_on_reply' => :'Boolean',
|
|
116
|
+
:'exit_on_unsubscribe' => :'Boolean',
|
|
117
|
+
:'total_enrolled' => :'Integer',
|
|
118
|
+
:'total_completed' => :'Integer',
|
|
119
|
+
:'total_exited' => :'Integer',
|
|
120
|
+
:'created_at' => :'Time'
|
|
121
|
+
}
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# List of attributes with nullable: true
|
|
125
|
+
def self.openapi_nullable
|
|
126
|
+
Set.new([
|
|
127
|
+
])
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Initializes the object
|
|
131
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
132
|
+
def initialize(attributes = {})
|
|
133
|
+
if (!attributes.is_a?(Hash))
|
|
134
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Late::ListSequences200ResponseSequencesInner` initialize method"
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
138
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
139
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
140
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
141
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Late::ListSequences200ResponseSequencesInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
142
|
+
end
|
|
143
|
+
h[k.to_sym] = v
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
if attributes.key?(:'id')
|
|
147
|
+
self.id = attributes[:'id']
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
if attributes.key?(:'name')
|
|
151
|
+
self.name = attributes[:'name']
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
if attributes.key?(:'description')
|
|
155
|
+
self.description = attributes[:'description']
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
if attributes.key?(:'platform')
|
|
159
|
+
self.platform = attributes[:'platform']
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
if attributes.key?(:'account_id')
|
|
163
|
+
self.account_id = attributes[:'account_id']
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
if attributes.key?(:'account_name')
|
|
167
|
+
self.account_name = attributes[:'account_name']
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
if attributes.key?(:'message_preview')
|
|
171
|
+
self.message_preview = attributes[:'message_preview']
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
if attributes.key?(:'status')
|
|
175
|
+
self.status = attributes[:'status']
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
if attributes.key?(:'steps_count')
|
|
179
|
+
self.steps_count = attributes[:'steps_count']
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
if attributes.key?(:'exit_on_reply')
|
|
183
|
+
self.exit_on_reply = attributes[:'exit_on_reply']
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
if attributes.key?(:'exit_on_unsubscribe')
|
|
187
|
+
self.exit_on_unsubscribe = attributes[:'exit_on_unsubscribe']
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
if attributes.key?(:'total_enrolled')
|
|
191
|
+
self.total_enrolled = attributes[:'total_enrolled']
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
if attributes.key?(:'total_completed')
|
|
195
|
+
self.total_completed = attributes[:'total_completed']
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
if attributes.key?(:'total_exited')
|
|
199
|
+
self.total_exited = attributes[:'total_exited']
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
if attributes.key?(:'created_at')
|
|
203
|
+
self.created_at = attributes[:'created_at']
|
|
204
|
+
end
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
208
|
+
# @return Array for valid properties with the reasons
|
|
209
|
+
def list_invalid_properties
|
|
210
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
211
|
+
invalid_properties = Array.new
|
|
212
|
+
invalid_properties
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# Check to see if the all the properties in the model are valid
|
|
216
|
+
# @return true if the model is valid
|
|
217
|
+
def valid?
|
|
218
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
219
|
+
status_validator = EnumAttributeValidator.new('String', ["draft", "active", "paused"])
|
|
220
|
+
return false unless status_validator.valid?(@status)
|
|
221
|
+
true
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
225
|
+
# @param [Object] status Object to be assigned
|
|
226
|
+
def status=(status)
|
|
227
|
+
validator = EnumAttributeValidator.new('String', ["draft", "active", "paused"])
|
|
228
|
+
unless validator.valid?(status)
|
|
229
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
230
|
+
end
|
|
231
|
+
@status = status
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Checks equality by comparing each attribute.
|
|
235
|
+
# @param [Object] Object to be compared
|
|
236
|
+
def ==(o)
|
|
237
|
+
return true if self.equal?(o)
|
|
238
|
+
self.class == o.class &&
|
|
239
|
+
id == o.id &&
|
|
240
|
+
name == o.name &&
|
|
241
|
+
description == o.description &&
|
|
242
|
+
platform == o.platform &&
|
|
243
|
+
account_id == o.account_id &&
|
|
244
|
+
account_name == o.account_name &&
|
|
245
|
+
message_preview == o.message_preview &&
|
|
246
|
+
status == o.status &&
|
|
247
|
+
steps_count == o.steps_count &&
|
|
248
|
+
exit_on_reply == o.exit_on_reply &&
|
|
249
|
+
exit_on_unsubscribe == o.exit_on_unsubscribe &&
|
|
250
|
+
total_enrolled == o.total_enrolled &&
|
|
251
|
+
total_completed == o.total_completed &&
|
|
252
|
+
total_exited == o.total_exited &&
|
|
253
|
+
created_at == o.created_at
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# @see the `==` method
|
|
257
|
+
# @param [Object] Object to be compared
|
|
258
|
+
def eql?(o)
|
|
259
|
+
self == o
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
# Calculates hash code according to all attributes.
|
|
263
|
+
# @return [Integer] Hash code
|
|
264
|
+
def hash
|
|
265
|
+
[id, name, description, platform, account_id, account_name, message_preview, status, steps_count, exit_on_reply, exit_on_unsubscribe, total_enrolled, total_completed, total_exited, created_at].hash
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
# Builds the object from hash
|
|
269
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
270
|
+
# @return [Object] Returns the model itself
|
|
271
|
+
def self.build_from_hash(attributes)
|
|
272
|
+
return nil unless attributes.is_a?(Hash)
|
|
273
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
274
|
+
transformed_hash = {}
|
|
275
|
+
openapi_types.each_pair do |key, type|
|
|
276
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
277
|
+
transformed_hash["#{key}"] = nil
|
|
278
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
279
|
+
# check to ensure the input is an array given that the attribute
|
|
280
|
+
# is documented as an array but the input is not
|
|
281
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
282
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
283
|
+
end
|
|
284
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
285
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
286
|
+
end
|
|
287
|
+
end
|
|
288
|
+
new(transformed_hash)
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
# Returns the object in the form of hash
|
|
292
|
+
# @return [Hash] Returns the object in the form of hash
|
|
293
|
+
def to_hash
|
|
294
|
+
hash = {}
|
|
295
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
296
|
+
value = self.send(attr)
|
|
297
|
+
if value.nil?
|
|
298
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
299
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
hash[param] = _to_hash(value)
|
|
303
|
+
end
|
|
304
|
+
hash
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
end
|
|
@@ -0,0 +1,221 @@
|
|
|
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.1
|
|
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 Late
|
|
17
|
+
class SendBroadcast200Response < ApiModelBase
|
|
18
|
+
attr_accessor :success
|
|
19
|
+
|
|
20
|
+
# Current broadcast status after processing first batch
|
|
21
|
+
attr_accessor :status
|
|
22
|
+
|
|
23
|
+
# Recipients sent in this batch
|
|
24
|
+
attr_accessor :sent
|
|
25
|
+
|
|
26
|
+
# Recipients failed in this batch
|
|
27
|
+
attr_accessor :failed
|
|
28
|
+
|
|
29
|
+
# Total recipient count
|
|
30
|
+
attr_accessor :recipient_count
|
|
31
|
+
|
|
32
|
+
class EnumAttributeValidator
|
|
33
|
+
attr_reader :datatype
|
|
34
|
+
attr_reader :allowable_values
|
|
35
|
+
|
|
36
|
+
def initialize(datatype, allowable_values)
|
|
37
|
+
@allowable_values = allowable_values.map do |value|
|
|
38
|
+
case datatype.to_s
|
|
39
|
+
when /Integer/i
|
|
40
|
+
value.to_i
|
|
41
|
+
when /Float/i
|
|
42
|
+
value.to_f
|
|
43
|
+
else
|
|
44
|
+
value
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def valid?(value)
|
|
50
|
+
!value || allowable_values.include?(value)
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
55
|
+
def self.attribute_map
|
|
56
|
+
{
|
|
57
|
+
:'success' => :'success',
|
|
58
|
+
:'status' => :'status',
|
|
59
|
+
:'sent' => :'sent',
|
|
60
|
+
:'failed' => :'failed',
|
|
61
|
+
:'recipient_count' => :'recipientCount'
|
|
62
|
+
}
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Returns attribute mapping this model knows about
|
|
66
|
+
def self.acceptable_attribute_map
|
|
67
|
+
attribute_map
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Returns all the JSON keys this model knows about
|
|
71
|
+
def self.acceptable_attributes
|
|
72
|
+
acceptable_attribute_map.values
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Attribute type mapping.
|
|
76
|
+
def self.openapi_types
|
|
77
|
+
{
|
|
78
|
+
:'success' => :'Boolean',
|
|
79
|
+
:'status' => :'String',
|
|
80
|
+
:'sent' => :'Integer',
|
|
81
|
+
:'failed' => :'Integer',
|
|
82
|
+
:'recipient_count' => :'Integer'
|
|
83
|
+
}
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# List of attributes with nullable: true
|
|
87
|
+
def self.openapi_nullable
|
|
88
|
+
Set.new([
|
|
89
|
+
])
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Initializes the object
|
|
93
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
94
|
+
def initialize(attributes = {})
|
|
95
|
+
if (!attributes.is_a?(Hash))
|
|
96
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Late::SendBroadcast200Response` initialize method"
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
100
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
101
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
102
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
103
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Late::SendBroadcast200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
104
|
+
end
|
|
105
|
+
h[k.to_sym] = v
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'success')
|
|
109
|
+
self.success = attributes[:'success']
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if attributes.key?(:'status')
|
|
113
|
+
self.status = attributes[:'status']
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if attributes.key?(:'sent')
|
|
117
|
+
self.sent = attributes[:'sent']
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if attributes.key?(:'failed')
|
|
121
|
+
self.failed = attributes[:'failed']
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if attributes.key?(:'recipient_count')
|
|
125
|
+
self.recipient_count = attributes[:'recipient_count']
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
130
|
+
# @return Array for valid properties with the reasons
|
|
131
|
+
def list_invalid_properties
|
|
132
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
133
|
+
invalid_properties = Array.new
|
|
134
|
+
invalid_properties
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Check to see if the all the properties in the model are valid
|
|
138
|
+
# @return true if the model is valid
|
|
139
|
+
def valid?
|
|
140
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
141
|
+
status_validator = EnumAttributeValidator.new('String', ["sending", "completed", "failed"])
|
|
142
|
+
return false unless status_validator.valid?(@status)
|
|
143
|
+
true
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
147
|
+
# @param [Object] status Object to be assigned
|
|
148
|
+
def status=(status)
|
|
149
|
+
validator = EnumAttributeValidator.new('String', ["sending", "completed", "failed"])
|
|
150
|
+
unless validator.valid?(status)
|
|
151
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
152
|
+
end
|
|
153
|
+
@status = status
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Checks equality by comparing each attribute.
|
|
157
|
+
# @param [Object] Object to be compared
|
|
158
|
+
def ==(o)
|
|
159
|
+
return true if self.equal?(o)
|
|
160
|
+
self.class == o.class &&
|
|
161
|
+
success == o.success &&
|
|
162
|
+
status == o.status &&
|
|
163
|
+
sent == o.sent &&
|
|
164
|
+
failed == o.failed &&
|
|
165
|
+
recipient_count == o.recipient_count
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# @see the `==` method
|
|
169
|
+
# @param [Object] Object to be compared
|
|
170
|
+
def eql?(o)
|
|
171
|
+
self == o
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Calculates hash code according to all attributes.
|
|
175
|
+
# @return [Integer] Hash code
|
|
176
|
+
def hash
|
|
177
|
+
[success, status, sent, failed, recipient_count].hash
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Builds the object from hash
|
|
181
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
182
|
+
# @return [Object] Returns the model itself
|
|
183
|
+
def self.build_from_hash(attributes)
|
|
184
|
+
return nil unless attributes.is_a?(Hash)
|
|
185
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
186
|
+
transformed_hash = {}
|
|
187
|
+
openapi_types.each_pair do |key, type|
|
|
188
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
189
|
+
transformed_hash["#{key}"] = nil
|
|
190
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
191
|
+
# check to ensure the input is an array given that the attribute
|
|
192
|
+
# is documented as an array but the input is not
|
|
193
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
194
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
195
|
+
end
|
|
196
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
197
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
new(transformed_hash)
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Returns the object in the form of hash
|
|
204
|
+
# @return [Hash] Returns the object in the form of hash
|
|
205
|
+
def to_hash
|
|
206
|
+
hash = {}
|
|
207
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
208
|
+
value = self.send(attr)
|
|
209
|
+
if value.nil?
|
|
210
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
211
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
hash[param] = _to_hash(value)
|
|
215
|
+
end
|
|
216
|
+
hash
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
end
|
data/lib/late-sdk/version.rb
CHANGED
data/lib/late-sdk.rb
CHANGED
|
@@ -334,6 +334,8 @@ require 'late-sdk/models/list_account_groups200_response'
|
|
|
334
334
|
require 'late-sdk/models/list_account_groups200_response_groups_inner'
|
|
335
335
|
require 'late-sdk/models/list_accounts200_response'
|
|
336
336
|
require 'late-sdk/models/list_api_keys200_response'
|
|
337
|
+
require 'late-sdk/models/list_broadcasts200_response'
|
|
338
|
+
require 'late-sdk/models/list_broadcasts200_response_broadcasts_inner'
|
|
337
339
|
require 'late-sdk/models/list_comment_automations200_response'
|
|
338
340
|
require 'late-sdk/models/list_comment_automations200_response_automations_inner'
|
|
339
341
|
require 'late-sdk/models/list_comment_automations200_response_automations_inner_stats'
|
|
@@ -369,6 +371,8 @@ require 'late-sdk/models/list_posts_logs200_response_pagination'
|
|
|
369
371
|
require 'late-sdk/models/list_queue_slots200_response'
|
|
370
372
|
require 'late-sdk/models/list_queue_slots200_response_one_of'
|
|
371
373
|
require 'late-sdk/models/list_queue_slots200_response_one_of1'
|
|
374
|
+
require 'late-sdk/models/list_sequences200_response'
|
|
375
|
+
require 'late-sdk/models/list_sequences200_response_sequences_inner'
|
|
372
376
|
require 'late-sdk/models/list_snapchat_profiles200_response'
|
|
373
377
|
require 'late-sdk/models/list_snapchat_profiles200_response_public_profiles_inner'
|
|
374
378
|
require 'late-sdk/models/list_users200_response'
|
|
@@ -459,6 +463,7 @@ require 'late-sdk/models/select_snapchat_profile200_response'
|
|
|
459
463
|
require 'late-sdk/models/select_snapchat_profile200_response_account'
|
|
460
464
|
require 'late-sdk/models/select_snapchat_profile_request'
|
|
461
465
|
require 'late-sdk/models/select_snapchat_profile_request_selected_public_profile'
|
|
466
|
+
require 'late-sdk/models/send_broadcast200_response'
|
|
462
467
|
require 'late-sdk/models/send_inbox_message200_response'
|
|
463
468
|
require 'late-sdk/models/send_inbox_message200_response_data'
|
|
464
469
|
require 'late-sdk/models/send_inbox_message400_response'
|
data/openapi.yaml
CHANGED
|
@@ -13618,6 +13618,7 @@ paths:
|
|
|
13618
13618
|
name: { type: string }
|
|
13619
13619
|
language: { type: string }
|
|
13620
13620
|
status: { type: string, enum: [draft, scheduled, sending, completed, failed, cancelled] }
|
|
13621
|
+
messagePreview: { type: string, description: Template name or message text snippet }
|
|
13621
13622
|
recipientCount: { type: integer }
|
|
13622
13623
|
scheduledAt: { type: string, format: date-time }
|
|
13623
13624
|
startedAt: { type: string, format: date-time }
|
|
@@ -14825,7 +14826,43 @@ paths:
|
|
|
14825
14826
|
- { name: limit, in: query, schema: { type: integer, default: 50 } }
|
|
14826
14827
|
- { name: skip, in: query, schema: { type: integer, default: 0 } }
|
|
14827
14828
|
responses:
|
|
14828
|
-
'200':
|
|
14829
|
+
'200':
|
|
14830
|
+
description: Broadcasts list
|
|
14831
|
+
content:
|
|
14832
|
+
application/json:
|
|
14833
|
+
schema:
|
|
14834
|
+
type: object
|
|
14835
|
+
properties:
|
|
14836
|
+
success: { type: boolean }
|
|
14837
|
+
broadcasts:
|
|
14838
|
+
type: array
|
|
14839
|
+
items:
|
|
14840
|
+
type: object
|
|
14841
|
+
properties:
|
|
14842
|
+
id: { type: string }
|
|
14843
|
+
name: { type: string }
|
|
14844
|
+
description: { type: string }
|
|
14845
|
+
platform: { type: string }
|
|
14846
|
+
accountId: { type: string }
|
|
14847
|
+
accountName: { type: string, description: Display name of the sending account }
|
|
14848
|
+
status: { type: string, enum: [draft, scheduled, sending, completed, failed, cancelled] }
|
|
14849
|
+
messagePreview: { type: string, description: Template name or message text snippet }
|
|
14850
|
+
scheduledAt: { type: string, format: date-time }
|
|
14851
|
+
startedAt: { type: string, format: date-time }
|
|
14852
|
+
completedAt: { type: string, format: date-time }
|
|
14853
|
+
recipientCount: { type: integer }
|
|
14854
|
+
sentCount: { type: integer }
|
|
14855
|
+
deliveredCount: { type: integer }
|
|
14856
|
+
readCount: { type: integer }
|
|
14857
|
+
failedCount: { type: integer }
|
|
14858
|
+
createdAt: { type: string, format: date-time }
|
|
14859
|
+
pagination:
|
|
14860
|
+
type: object
|
|
14861
|
+
properties:
|
|
14862
|
+
total: { type: integer }
|
|
14863
|
+
limit: { type: integer }
|
|
14864
|
+
skip: { type: integer }
|
|
14865
|
+
hasMore: { type: boolean }
|
|
14829
14866
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
14830
14867
|
post:
|
|
14831
14868
|
operationId: createBroadcast
|
|
@@ -14905,7 +14942,18 @@ paths:
|
|
|
14905
14942
|
parameters:
|
|
14906
14943
|
- { name: broadcastId, in: path, required: true, schema: { type: string } }
|
|
14907
14944
|
responses:
|
|
14908
|
-
'200':
|
|
14945
|
+
'200':
|
|
14946
|
+
description: Broadcast sending started
|
|
14947
|
+
content:
|
|
14948
|
+
application/json:
|
|
14949
|
+
schema:
|
|
14950
|
+
type: object
|
|
14951
|
+
properties:
|
|
14952
|
+
success: { type: boolean }
|
|
14953
|
+
status: { type: string, enum: [sending, completed, failed], description: Current broadcast status after processing first batch }
|
|
14954
|
+
sent: { type: integer, description: Recipients sent in this batch }
|
|
14955
|
+
failed: { type: integer, description: Recipients failed in this batch }
|
|
14956
|
+
recipientCount: { type: integer, description: Total recipient count }
|
|
14909
14957
|
'400': { description: Invalid status or no recipients }
|
|
14910
14958
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
14911
14959
|
'404': { $ref: '#/components/responses/NotFound' }
|
|
@@ -14993,7 +15041,41 @@ paths:
|
|
|
14993
15041
|
- { name: limit, in: query, schema: { type: integer, default: 50 } }
|
|
14994
15042
|
- { name: skip, in: query, schema: { type: integer, default: 0 } }
|
|
14995
15043
|
responses:
|
|
14996
|
-
'200':
|
|
15044
|
+
'200':
|
|
15045
|
+
description: Sequences list
|
|
15046
|
+
content:
|
|
15047
|
+
application/json:
|
|
15048
|
+
schema:
|
|
15049
|
+
type: object
|
|
15050
|
+
properties:
|
|
15051
|
+
success: { type: boolean }
|
|
15052
|
+
sequences:
|
|
15053
|
+
type: array
|
|
15054
|
+
items:
|
|
15055
|
+
type: object
|
|
15056
|
+
properties:
|
|
15057
|
+
id: { type: string }
|
|
15058
|
+
name: { type: string }
|
|
15059
|
+
description: { type: string }
|
|
15060
|
+
platform: { type: string }
|
|
15061
|
+
accountId: { type: string }
|
|
15062
|
+
accountName: { type: string, description: Display name of the sending account }
|
|
15063
|
+
messagePreview: { type: string, description: First step template name or message text snippet }
|
|
15064
|
+
status: { type: string, enum: [draft, active, paused] }
|
|
15065
|
+
stepsCount: { type: integer }
|
|
15066
|
+
exitOnReply: { type: boolean }
|
|
15067
|
+
exitOnUnsubscribe: { type: boolean }
|
|
15068
|
+
totalEnrolled: { type: integer }
|
|
15069
|
+
totalCompleted: { type: integer }
|
|
15070
|
+
totalExited: { type: integer }
|
|
15071
|
+
createdAt: { type: string, format: date-time }
|
|
15072
|
+
pagination:
|
|
15073
|
+
type: object
|
|
15074
|
+
properties:
|
|
15075
|
+
total: { type: integer }
|
|
15076
|
+
limit: { type: integer }
|
|
15077
|
+
skip: { type: integer }
|
|
15078
|
+
hasMore: { type: boolean }
|
|
14997
15079
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
14998
15080
|
post:
|
|
14999
15081
|
operationId: createSequence
|
|
@@ -110,7 +110,7 @@ describe 'BroadcastsApi' do
|
|
|
110
110
|
# @option opts [String] :platform
|
|
111
111
|
# @option opts [Integer] :limit
|
|
112
112
|
# @option opts [Integer] :skip
|
|
113
|
-
# @return [
|
|
113
|
+
# @return [ListBroadcasts200Response]
|
|
114
114
|
describe 'list_broadcasts test' do
|
|
115
115
|
it 'should work' do
|
|
116
116
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -133,7 +133,7 @@ describe 'BroadcastsApi' do
|
|
|
133
133
|
# Trigger immediate send
|
|
134
134
|
# @param broadcast_id
|
|
135
135
|
# @param [Hash] opts the optional parameters
|
|
136
|
-
# @return [
|
|
136
|
+
# @return [SendBroadcast200Response]
|
|
137
137
|
describe 'send_broadcast test' do
|
|
138
138
|
it 'should work' do
|
|
139
139
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|