late-sdk 0.0.75 → 0.0.77

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.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +28 -1
  3. data/docs/ActivateSequence200Response.md +20 -0
  4. data/docs/AddBroadcastRecipients200Response.md +22 -0
  5. data/docs/BroadcastsApi.md +56 -48
  6. data/docs/CancelBroadcast200Response.md +20 -0
  7. data/docs/CancelBroadcast200ResponseBroadcast.md +20 -0
  8. data/docs/CreateSequenceRequestStepsInner.md +1 -1
  9. data/docs/EnrollContacts200Response.md +22 -0
  10. data/docs/GetBroadcast200Response.md +20 -0
  11. data/docs/GetBroadcast200ResponseBroadcast.md +54 -0
  12. data/docs/{CreateSequenceRequestStepsInnerMessage.md → GetBroadcast200ResponseBroadcastMessage.md} +2 -2
  13. data/docs/GetBroadcast200ResponseBroadcastSegmentFilters.md +18 -0
  14. data/docs/GetSequence200Response.md +20 -0
  15. data/docs/GetSequence200ResponseSequence.md +44 -0
  16. data/docs/GetSequence200ResponseSequenceStepsInner.md +24 -0
  17. data/docs/GetSequence200ResponseSequenceStepsInnerTemplate.md +22 -0
  18. data/docs/ListBroadcastRecipients200Response.md +22 -0
  19. data/docs/ListBroadcastRecipients200ResponseRecipientsInner.md +38 -0
  20. data/docs/ListBroadcasts200Response.md +22 -0
  21. data/docs/ListBroadcasts200ResponseBroadcastsInner.md +50 -0
  22. data/docs/ListSequenceEnrollments200Response.md +22 -0
  23. data/docs/ListSequenceEnrollments200ResponseEnrollmentsInner.md +40 -0
  24. data/docs/ListSequences200Response.md +22 -0
  25. data/docs/ListSequences200ResponseSequencesInner.md +46 -0
  26. data/docs/ScheduleBroadcast200Response.md +20 -0
  27. data/docs/ScheduleBroadcast200ResponseBroadcast.md +22 -0
  28. data/docs/SendBroadcast200Response.md +26 -0
  29. data/docs/SequencesApi.md +49 -42
  30. data/docs/UpdateBroadcast200Response.md +20 -0
  31. data/docs/UpdateBroadcast200ResponseBroadcast.md +26 -0
  32. data/docs/UpdateSequence200Response.md +20 -0
  33. data/docs/UpdateSequence200ResponseSequence.md +32 -0
  34. data/lib/late-sdk/api/broadcasts_api.rb +40 -40
  35. data/lib/late-sdk/api/sequences_api.rb +35 -35
  36. data/lib/late-sdk/models/activate_sequence200_response.rb +156 -0
  37. data/lib/late-sdk/models/add_broadcast_recipients200_response.rb +167 -0
  38. data/lib/late-sdk/models/cancel_broadcast200_response.rb +156 -0
  39. data/lib/late-sdk/models/cancel_broadcast200_response_broadcast.rb +156 -0
  40. data/lib/late-sdk/models/create_sequence_request_steps_inner.rb +1 -1
  41. data/lib/late-sdk/models/enroll_contacts200_response.rb +167 -0
  42. data/lib/late-sdk/models/get_broadcast200_response.rb +156 -0
  43. data/lib/late-sdk/models/get_broadcast200_response_broadcast.rb +343 -0
  44. data/lib/late-sdk/models/{create_sequence_request_steps_inner_message.rb → get_broadcast200_response_broadcast_message.rb} +3 -3
  45. data/lib/late-sdk/models/get_broadcast200_response_broadcast_segment_filters.rb +149 -0
  46. data/lib/late-sdk/models/get_sequence200_response.rb +156 -0
  47. data/lib/late-sdk/models/get_sequence200_response_sequence.rb +300 -0
  48. data/lib/late-sdk/models/get_sequence200_response_sequence_steps_inner.rb +174 -0
  49. data/lib/late-sdk/models/get_sequence200_response_sequence_steps_inner_template.rb +165 -0
  50. data/lib/late-sdk/models/list_broadcast_recipients200_response.rb +167 -0
  51. data/lib/late-sdk/models/list_broadcast_recipients200_response_recipients_inner.rb +271 -0
  52. data/lib/late-sdk/models/list_broadcasts200_response.rb +167 -0
  53. data/lib/late-sdk/models/list_broadcasts200_response_broadcasts_inner.rb +327 -0
  54. data/lib/late-sdk/models/list_sequence_enrollments200_response.rb +167 -0
  55. data/lib/late-sdk/models/list_sequence_enrollments200_response_enrollments_inner.rb +280 -0
  56. data/lib/late-sdk/models/list_sequences200_response.rb +167 -0
  57. data/lib/late-sdk/models/list_sequences200_response_sequences_inner.rb +309 -0
  58. data/lib/late-sdk/models/schedule_broadcast200_response.rb +156 -0
  59. data/lib/late-sdk/models/schedule_broadcast200_response_broadcast.rb +165 -0
  60. data/lib/late-sdk/models/send_broadcast200_response.rb +221 -0
  61. data/lib/late-sdk/models/update_broadcast200_response.rb +156 -0
  62. data/lib/late-sdk/models/update_broadcast200_response_broadcast.rb +183 -0
  63. data/lib/late-sdk/models/update_sequence200_response.rb +156 -0
  64. data/lib/late-sdk/models/update_sequence200_response_sequence.rb +212 -0
  65. data/lib/late-sdk/version.rb +1 -1
  66. data/lib/late-sdk.rb +28 -1
  67. data/openapi.yaml +318 -15
  68. data/spec/api/broadcasts_api_spec.rb +8 -8
  69. data/spec/api/sequences_api_spec.rb +7 -7
  70. data/spec/models/activate_sequence200_response_spec.rb +42 -0
  71. data/spec/models/add_broadcast_recipients200_response_spec.rb +48 -0
  72. data/spec/models/cancel_broadcast200_response_broadcast_spec.rb +42 -0
  73. data/spec/models/cancel_broadcast200_response_spec.rb +42 -0
  74. data/spec/models/enroll_contacts200_response_spec.rb +48 -0
  75. data/spec/models/{create_sequence_request_steps_inner_message_spec.rb → get_broadcast200_response_broadcast_message_spec.rb} +6 -6
  76. data/spec/models/get_broadcast200_response_broadcast_segment_filters_spec.rb +36 -0
  77. data/spec/models/get_broadcast200_response_broadcast_spec.rb +148 -0
  78. data/spec/models/get_broadcast200_response_spec.rb +42 -0
  79. data/spec/models/get_sequence200_response_sequence_spec.rb +118 -0
  80. data/spec/models/get_sequence200_response_sequence_steps_inner_spec.rb +54 -0
  81. data/spec/models/get_sequence200_response_sequence_steps_inner_template_spec.rb +48 -0
  82. data/spec/models/get_sequence200_response_spec.rb +42 -0
  83. data/spec/models/list_broadcast_recipients200_response_recipients_inner_spec.rb +100 -0
  84. data/spec/models/list_broadcast_recipients200_response_spec.rb +48 -0
  85. data/spec/models/list_broadcasts200_response_broadcasts_inner_spec.rb +136 -0
  86. data/spec/models/list_broadcasts200_response_spec.rb +48 -0
  87. data/spec/models/list_sequence_enrollments200_response_enrollments_inner_spec.rb +106 -0
  88. data/spec/models/list_sequence_enrollments200_response_spec.rb +48 -0
  89. data/spec/models/list_sequences200_response_sequences_inner_spec.rb +124 -0
  90. data/spec/models/list_sequences200_response_spec.rb +48 -0
  91. data/spec/models/schedule_broadcast200_response_broadcast_spec.rb +48 -0
  92. data/spec/models/schedule_broadcast200_response_spec.rb +42 -0
  93. data/spec/models/send_broadcast200_response_spec.rb +64 -0
  94. data/spec/models/update_broadcast200_response_broadcast_spec.rb +60 -0
  95. data/spec/models/update_broadcast200_response_spec.rb +42 -0
  96. data/spec/models/update_sequence200_response_sequence_spec.rb +78 -0
  97. data/spec/models/update_sequence200_response_spec.rb +42 -0
  98. data/zernio-sdk-0.0.77.gem +0 -0
  99. metadata +114 -6
  100. data/zernio-sdk-0.0.75.gem +0 -0
@@ -0,0 +1,280 @@
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 ListSequenceEnrollments200ResponseEnrollmentsInner < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :contact_id
21
+
22
+ attr_accessor :channel_id
23
+
24
+ attr_accessor :platform_identifier
25
+
26
+ attr_accessor :contact_name
27
+
28
+ attr_accessor :current_step_index
29
+
30
+ attr_accessor :status
31
+
32
+ attr_accessor :exit_reason
33
+
34
+ attr_accessor :next_step_at
35
+
36
+ attr_accessor :steps_sent
37
+
38
+ attr_accessor :last_step_sent_at
39
+
40
+ attr_accessor :created_at
41
+
42
+ class EnumAttributeValidator
43
+ attr_reader :datatype
44
+ attr_reader :allowable_values
45
+
46
+ def initialize(datatype, allowable_values)
47
+ @allowable_values = allowable_values.map do |value|
48
+ case datatype.to_s
49
+ when /Integer/i
50
+ value.to_i
51
+ when /Float/i
52
+ value.to_f
53
+ else
54
+ value
55
+ end
56
+ end
57
+ end
58
+
59
+ def valid?(value)
60
+ !value || allowable_values.include?(value)
61
+ end
62
+ end
63
+
64
+ # Attribute mapping from ruby-style variable name to JSON key.
65
+ def self.attribute_map
66
+ {
67
+ :'id' => :'id',
68
+ :'contact_id' => :'contactId',
69
+ :'channel_id' => :'channelId',
70
+ :'platform_identifier' => :'platformIdentifier',
71
+ :'contact_name' => :'contactName',
72
+ :'current_step_index' => :'currentStepIndex',
73
+ :'status' => :'status',
74
+ :'exit_reason' => :'exitReason',
75
+ :'next_step_at' => :'nextStepAt',
76
+ :'steps_sent' => :'stepsSent',
77
+ :'last_step_sent_at' => :'lastStepSentAt',
78
+ :'created_at' => :'createdAt'
79
+ }
80
+ end
81
+
82
+ # Returns attribute mapping this model knows about
83
+ def self.acceptable_attribute_map
84
+ attribute_map
85
+ end
86
+
87
+ # Returns all the JSON keys this model knows about
88
+ def self.acceptable_attributes
89
+ acceptable_attribute_map.values
90
+ end
91
+
92
+ # Attribute type mapping.
93
+ def self.openapi_types
94
+ {
95
+ :'id' => :'String',
96
+ :'contact_id' => :'String',
97
+ :'channel_id' => :'String',
98
+ :'platform_identifier' => :'String',
99
+ :'contact_name' => :'String',
100
+ :'current_step_index' => :'Integer',
101
+ :'status' => :'String',
102
+ :'exit_reason' => :'String',
103
+ :'next_step_at' => :'Time',
104
+ :'steps_sent' => :'Integer',
105
+ :'last_step_sent_at' => :'Time',
106
+ :'created_at' => :'Time'
107
+ }
108
+ end
109
+
110
+ # List of attributes with nullable: true
111
+ def self.openapi_nullable
112
+ Set.new([
113
+ ])
114
+ end
115
+
116
+ # Initializes the object
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ def initialize(attributes = {})
119
+ if (!attributes.is_a?(Hash))
120
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::ListSequenceEnrollments200ResponseEnrollmentsInner` initialize method"
121
+ end
122
+
123
+ # check to see if the attribute exists and convert string to symbol for hash key
124
+ acceptable_attribute_map = self.class.acceptable_attribute_map
125
+ attributes = attributes.each_with_object({}) { |(k, v), h|
126
+ if (!acceptable_attribute_map.key?(k.to_sym))
127
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::ListSequenceEnrollments200ResponseEnrollmentsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
128
+ end
129
+ h[k.to_sym] = v
130
+ }
131
+
132
+ if attributes.key?(:'id')
133
+ self.id = attributes[:'id']
134
+ end
135
+
136
+ if attributes.key?(:'contact_id')
137
+ self.contact_id = attributes[:'contact_id']
138
+ end
139
+
140
+ if attributes.key?(:'channel_id')
141
+ self.channel_id = attributes[:'channel_id']
142
+ end
143
+
144
+ if attributes.key?(:'platform_identifier')
145
+ self.platform_identifier = attributes[:'platform_identifier']
146
+ end
147
+
148
+ if attributes.key?(:'contact_name')
149
+ self.contact_name = attributes[:'contact_name']
150
+ end
151
+
152
+ if attributes.key?(:'current_step_index')
153
+ self.current_step_index = attributes[:'current_step_index']
154
+ end
155
+
156
+ if attributes.key?(:'status')
157
+ self.status = attributes[:'status']
158
+ end
159
+
160
+ if attributes.key?(:'exit_reason')
161
+ self.exit_reason = attributes[:'exit_reason']
162
+ end
163
+
164
+ if attributes.key?(:'next_step_at')
165
+ self.next_step_at = attributes[:'next_step_at']
166
+ end
167
+
168
+ if attributes.key?(:'steps_sent')
169
+ self.steps_sent = attributes[:'steps_sent']
170
+ end
171
+
172
+ if attributes.key?(:'last_step_sent_at')
173
+ self.last_step_sent_at = attributes[:'last_step_sent_at']
174
+ end
175
+
176
+ if attributes.key?(:'created_at')
177
+ self.created_at = attributes[:'created_at']
178
+ end
179
+ end
180
+
181
+ # Show invalid properties with the reasons. Usually used together with valid?
182
+ # @return Array for valid properties with the reasons
183
+ def list_invalid_properties
184
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
185
+ invalid_properties = Array.new
186
+ invalid_properties
187
+ end
188
+
189
+ # Check to see if the all the properties in the model are valid
190
+ # @return true if the model is valid
191
+ def valid?
192
+ warn '[DEPRECATED] the `valid?` method is obsolete'
193
+ status_validator = EnumAttributeValidator.new('String', ["active", "completed", "exited", "paused"])
194
+ return false unless status_validator.valid?(@status)
195
+ true
196
+ end
197
+
198
+ # Custom attribute writer method checking allowed values (enum).
199
+ # @param [Object] status Object to be assigned
200
+ def status=(status)
201
+ validator = EnumAttributeValidator.new('String', ["active", "completed", "exited", "paused"])
202
+ unless validator.valid?(status)
203
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
204
+ end
205
+ @status = status
206
+ end
207
+
208
+ # Checks equality by comparing each attribute.
209
+ # @param [Object] Object to be compared
210
+ def ==(o)
211
+ return true if self.equal?(o)
212
+ self.class == o.class &&
213
+ id == o.id &&
214
+ contact_id == o.contact_id &&
215
+ channel_id == o.channel_id &&
216
+ platform_identifier == o.platform_identifier &&
217
+ contact_name == o.contact_name &&
218
+ current_step_index == o.current_step_index &&
219
+ status == o.status &&
220
+ exit_reason == o.exit_reason &&
221
+ next_step_at == o.next_step_at &&
222
+ steps_sent == o.steps_sent &&
223
+ last_step_sent_at == o.last_step_sent_at &&
224
+ created_at == o.created_at
225
+ end
226
+
227
+ # @see the `==` method
228
+ # @param [Object] Object to be compared
229
+ def eql?(o)
230
+ self == o
231
+ end
232
+
233
+ # Calculates hash code according to all attributes.
234
+ # @return [Integer] Hash code
235
+ def hash
236
+ [id, contact_id, channel_id, platform_identifier, contact_name, current_step_index, status, exit_reason, next_step_at, steps_sent, last_step_sent_at, created_at].hash
237
+ end
238
+
239
+ # Builds the object from hash
240
+ # @param [Hash] attributes Model attributes in the form of hash
241
+ # @return [Object] Returns the model itself
242
+ def self.build_from_hash(attributes)
243
+ return nil unless attributes.is_a?(Hash)
244
+ attributes = attributes.transform_keys(&:to_sym)
245
+ transformed_hash = {}
246
+ openapi_types.each_pair do |key, type|
247
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
248
+ transformed_hash["#{key}"] = nil
249
+ elsif type =~ /\AArray<(.*)>/i
250
+ # check to ensure the input is an array given that the attribute
251
+ # is documented as an array but the input is not
252
+ if attributes[attribute_map[key]].is_a?(Array)
253
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
254
+ end
255
+ elsif !attributes[attribute_map[key]].nil?
256
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
257
+ end
258
+ end
259
+ new(transformed_hash)
260
+ end
261
+
262
+ # Returns the object in the form of hash
263
+ # @return [Hash] Returns the object in the form of hash
264
+ def to_hash
265
+ hash = {}
266
+ self.class.attribute_map.each_pair do |attr, param|
267
+ value = self.send(attr)
268
+ if value.nil?
269
+ is_nullable = self.class.openapi_nullable.include?(attr)
270
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
271
+ end
272
+
273
+ hash[param] = _to_hash(value)
274
+ end
275
+ hash
276
+ end
277
+
278
+ end
279
+
280
+ end
@@ -0,0 +1,167 @@
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 ListSequences200Response < ApiModelBase
18
+ attr_accessor :success
19
+
20
+ attr_accessor :sequences
21
+
22
+ attr_accessor :pagination
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'success' => :'success',
28
+ :'sequences' => :'sequences',
29
+ :'pagination' => :'pagination'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'success' => :'Boolean',
47
+ :'sequences' => :'Array<ListSequences200ResponseSequencesInner>',
48
+ :'pagination' => :'GetWhatsAppContacts200ResponsePagination'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::ListSequences200Response` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::ListSequences200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'success')
75
+ self.success = attributes[:'success']
76
+ end
77
+
78
+ if attributes.key?(:'sequences')
79
+ if (value = attributes[:'sequences']).is_a?(Array)
80
+ self.sequences = value
81
+ end
82
+ end
83
+
84
+ if attributes.key?(:'pagination')
85
+ self.pagination = attributes[:'pagination']
86
+ end
87
+ end
88
+
89
+ # Show invalid properties with the reasons. Usually used together with valid?
90
+ # @return Array for valid properties with the reasons
91
+ def list_invalid_properties
92
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
93
+ invalid_properties = Array.new
94
+ invalid_properties
95
+ end
96
+
97
+ # Check to see if the all the properties in the model are valid
98
+ # @return true if the model is valid
99
+ def valid?
100
+ warn '[DEPRECATED] the `valid?` method is obsolete'
101
+ true
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ success == o.success &&
110
+ sequences == o.sequences &&
111
+ pagination == o.pagination
112
+ end
113
+
114
+ # @see the `==` method
115
+ # @param [Object] Object to be compared
116
+ def eql?(o)
117
+ self == o
118
+ end
119
+
120
+ # Calculates hash code according to all attributes.
121
+ # @return [Integer] Hash code
122
+ def hash
123
+ [success, sequences, pagination].hash
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def self.build_from_hash(attributes)
130
+ return nil unless attributes.is_a?(Hash)
131
+ attributes = attributes.transform_keys(&:to_sym)
132
+ transformed_hash = {}
133
+ openapi_types.each_pair do |key, type|
134
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
135
+ transformed_hash["#{key}"] = nil
136
+ elsif type =~ /\AArray<(.*)>/i
137
+ # check to ensure the input is an array given that the attribute
138
+ # is documented as an array but the input is not
139
+ if attributes[attribute_map[key]].is_a?(Array)
140
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
141
+ end
142
+ elsif !attributes[attribute_map[key]].nil?
143
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
144
+ end
145
+ end
146
+ new(transformed_hash)
147
+ end
148
+
149
+ # Returns the object in the form of hash
150
+ # @return [Hash] Returns the object in the form of hash
151
+ def to_hash
152
+ hash = {}
153
+ self.class.attribute_map.each_pair do |attr, param|
154
+ value = self.send(attr)
155
+ if value.nil?
156
+ is_nullable = self.class.openapi_nullable.include?(attr)
157
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
158
+ end
159
+
160
+ hash[param] = _to_hash(value)
161
+ end
162
+ hash
163
+ end
164
+
165
+ end
166
+
167
+ end