bombbomb 2.0.21454 → 2.0.22196

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +35 -14
  3. data/bombbomb.gemspec +1 -1
  4. data/docs/AutomationsApi.md +115 -0
  5. data/docs/EmailsApi.md +246 -0
  6. data/docs/JerichoConfiguration.md +5 -1
  7. data/docs/PromptBotBot.md +18 -0
  8. data/docs/PromptsApi.md +384 -3
  9. data/docs/SignUploadRequest.md +9 -0
  10. data/docs/SignUploadResponse.md +9 -0
  11. data/docs/VideoEmailPrompt.md +9 -2
  12. data/docs/VideoPublicRepresentation.md +18 -0
  13. data/docs/VideoRecorderMethodResponse.md +15 -0
  14. data/docs/VideosApi.md +175 -0
  15. data/lib/bombbomb.rb +9 -1
  16. data/lib/bombbomb/api/automations_api.rb +150 -0
  17. data/lib/bombbomb/api/curriculum_api.rb +1 -1
  18. data/lib/bombbomb/api/emails_api.rb +293 -0
  19. data/lib/bombbomb/api/prompts_api.rb +439 -5
  20. data/lib/bombbomb/api/teams_api.rb +1 -1
  21. data/lib/bombbomb/api/utilities_api.rb +1 -1
  22. data/lib/bombbomb/api/videos_api.rb +221 -0
  23. data/lib/bombbomb/api/webhooks_api.rb +1 -1
  24. data/lib/bombbomb/api_client.rb +1 -1
  25. data/lib/bombbomb/api_error.rb +1 -1
  26. data/lib/bombbomb/configuration.rb +1 -1
  27. data/lib/bombbomb/models/bb_web_hook.rb +1 -1
  28. data/lib/bombbomb/models/curriculum.rb +1 -1
  29. data/lib/bombbomb/models/curriculum_user_progress.rb +1 -1
  30. data/lib/bombbomb/models/curriculum_with_progress.rb +1 -1
  31. data/lib/bombbomb/models/inline_response_200.rb +1 -1
  32. data/lib/bombbomb/models/inline_response_200_items.rb +1 -1
  33. data/lib/bombbomb/models/jericho_configuration.rb +43 -3
  34. data/lib/bombbomb/models/jericho_performance.rb +1 -1
  35. data/lib/bombbomb/models/o_auth_client.rb +1 -1
  36. data/lib/bombbomb/models/prompt_bot_bot.rb +300 -0
  37. data/lib/bombbomb/models/sign_upload_request.rb +210 -0
  38. data/lib/bombbomb/models/sign_upload_response.rb +210 -0
  39. data/lib/bombbomb/models/string.rb +1 -1
  40. data/lib/bombbomb/models/team_public_representation.rb +1 -1
  41. data/lib/bombbomb/models/video_email_prompt.rb +79 -9
  42. data/lib/bombbomb/models/video_public_representation.rb +302 -0
  43. data/lib/bombbomb/models/video_recorder_method_response.rb +270 -0
  44. data/lib/bombbomb/version.rb +2 -2
  45. data/spec/api/automations_api_spec.rb +71 -0
  46. data/spec/api/emails_api_spec.rb +104 -0
  47. data/spec/api/videos_api_spec.rb +86 -0
  48. data/spec/models/prompt_bot_bot_spec.rb +113 -0
  49. data/spec/models/sign_upload_request_spec.rb +59 -0
  50. data/spec/models/sign_upload_response_spec.rb +59 -0
  51. data/spec/models/video_public_representation_spec.rb +113 -0
  52. data/spec/models/video_recorder_method_response_spec.rb +95 -0
  53. metadata +34 -2
@@ -3,7 +3,7 @@
3
3
 
4
4
  #We make it easy to build relationships using simple videos.
5
5
 
6
- OpenAPI spec version: 2.0.21454
6
+ OpenAPI spec version: 2.0.22196
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
@@ -0,0 +1,300 @@
1
+ =begin
2
+ #BombBomb
3
+
4
+ #We make it easy to build relationships using simple videos.
5
+
6
+ OpenAPI spec version: 2.0.22196
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ =end
23
+
24
+ require 'date'
25
+
26
+ module BombBomb
27
+ # The PromptBot\\Bot class
28
+ class PromptBotBot
29
+ # The identifier of the prompt bot. Read Only.
30
+ attr_accessor :id
31
+
32
+ # The prompt bot's owner. Read Only.
33
+ attr_accessor :user_id
34
+
35
+ # The default email being sent to contacts in the prompt bot list.
36
+ attr_accessor :email_id
37
+
38
+ # The list to attach the Prompt Bot to.
39
+ attr_accessor :list_id
40
+
41
+ # The prompt subject.
42
+ attr_accessor :prompt_subject
43
+
44
+ # The prompt body.
45
+ attr_accessor :prompt_body
46
+
47
+ # The status of the prompt bot. Read Only.
48
+ attr_accessor :status
49
+
50
+ # when the bot started
51
+ attr_accessor :start_date
52
+
53
+ # when the bot should finish
54
+ attr_accessor :end_date
55
+
56
+ # The type of bot.
57
+ attr_accessor :bot_type_id
58
+
59
+ # The template id used to generate the default email.
60
+ attr_accessor :template_id
61
+
62
+
63
+ # Attribute mapping from ruby-style variable name to JSON key.
64
+ def self.attribute_map
65
+ {
66
+ :'id' => :'id',
67
+ :'user_id' => :'userId',
68
+ :'email_id' => :'emailId',
69
+ :'list_id' => :'listId',
70
+ :'prompt_subject' => :'promptSubject',
71
+ :'prompt_body' => :'promptBody',
72
+ :'status' => :'status',
73
+ :'start_date' => :'startDate',
74
+ :'end_date' => :'endDate',
75
+ :'bot_type_id' => :'botTypeId',
76
+ :'template_id' => :'templateId'
77
+ }
78
+ end
79
+
80
+ # Attribute type mapping.
81
+ def self.swagger_types
82
+ {
83
+ :'id' => :'String',
84
+ :'user_id' => :'String',
85
+ :'email_id' => :'String',
86
+ :'list_id' => :'String',
87
+ :'prompt_subject' => :'String',
88
+ :'prompt_body' => :'String',
89
+ :'status' => :'String',
90
+ :'start_date' => :'DateTime',
91
+ :'end_date' => :'DateTime',
92
+ :'bot_type_id' => :'String',
93
+ :'template_id' => :'String'
94
+ }
95
+ end
96
+
97
+ # Initializes the object
98
+ # @param [Hash] attributes Model attributes in the form of hash
99
+ def initialize(attributes = {})
100
+ return unless attributes.is_a?(Hash)
101
+
102
+ # convert string to symbol for hash key
103
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
104
+
105
+ if attributes.has_key?(:'id')
106
+ self.id = attributes[:'id']
107
+ end
108
+
109
+ if attributes.has_key?(:'userId')
110
+ self.user_id = attributes[:'userId']
111
+ end
112
+
113
+ if attributes.has_key?(:'emailId')
114
+ self.email_id = attributes[:'emailId']
115
+ end
116
+
117
+ if attributes.has_key?(:'listId')
118
+ self.list_id = attributes[:'listId']
119
+ end
120
+
121
+ if attributes.has_key?(:'promptSubject')
122
+ self.prompt_subject = attributes[:'promptSubject']
123
+ end
124
+
125
+ if attributes.has_key?(:'promptBody')
126
+ self.prompt_body = attributes[:'promptBody']
127
+ end
128
+
129
+ if attributes.has_key?(:'status')
130
+ self.status = attributes[:'status']
131
+ end
132
+
133
+ if attributes.has_key?(:'startDate')
134
+ self.start_date = attributes[:'startDate']
135
+ end
136
+
137
+ if attributes.has_key?(:'endDate')
138
+ self.end_date = attributes[:'endDate']
139
+ end
140
+
141
+ if attributes.has_key?(:'botTypeId')
142
+ self.bot_type_id = attributes[:'botTypeId']
143
+ end
144
+
145
+ if attributes.has_key?(:'templateId')
146
+ self.template_id = attributes[:'templateId']
147
+ end
148
+
149
+ end
150
+
151
+ # Show invalid properties with the reasons. Usually used together with valid?
152
+ # @return Array for valid properies with the reasons
153
+ def list_invalid_properties
154
+ invalid_properties = Array.new
155
+ return invalid_properties
156
+ end
157
+
158
+ # Check to see if the all the properties in the model are valid
159
+ # @return true if the model is valid
160
+ def valid?
161
+ return true
162
+ end
163
+
164
+ # Checks equality by comparing each attribute.
165
+ # @param [Object] Object to be compared
166
+ def ==(o)
167
+ return true if self.equal?(o)
168
+ self.class == o.class &&
169
+ id == o.id &&
170
+ user_id == o.user_id &&
171
+ email_id == o.email_id &&
172
+ list_id == o.list_id &&
173
+ prompt_subject == o.prompt_subject &&
174
+ prompt_body == o.prompt_body &&
175
+ status == o.status &&
176
+ start_date == o.start_date &&
177
+ end_date == o.end_date &&
178
+ bot_type_id == o.bot_type_id &&
179
+ template_id == o.template_id
180
+ end
181
+
182
+ # @see the `==` method
183
+ # @param [Object] Object to be compared
184
+ def eql?(o)
185
+ self == o
186
+ end
187
+
188
+ # Calculates hash code according to all attributes.
189
+ # @return [Fixnum] Hash code
190
+ def hash
191
+ [id, user_id, email_id, list_id, prompt_subject, prompt_body, status, start_date, end_date, bot_type_id, template_id].hash
192
+ end
193
+
194
+ # Builds the object from hash
195
+ # @param [Hash] attributes Model attributes in the form of hash
196
+ # @return [Object] Returns the model itself
197
+ def build_from_hash(attributes)
198
+ return nil unless attributes.is_a?(Hash)
199
+ self.class.swagger_types.each_pair do |key, type|
200
+ if type =~ /^Array<(.*)>/i
201
+ # check to ensure the input is an array given that the the attribute
202
+ # is documented as an array but the input is not
203
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
204
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
205
+ end
206
+ elsif !attributes[self.class.attribute_map[key]].nil?
207
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
208
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
209
+ end
210
+
211
+ self
212
+ end
213
+
214
+ # Deserializes the data based on type
215
+ # @param string type Data type
216
+ # @param string value Value to be deserialized
217
+ # @return [Object] Deserialized data
218
+ def _deserialize(type, value)
219
+ case type.to_sym
220
+ when :DateTime
221
+ DateTime.parse(value)
222
+ when :Date
223
+ Date.parse(value)
224
+ when :String
225
+ value.to_s
226
+ when :Integer
227
+ value.to_i
228
+ when :Float
229
+ value.to_f
230
+ when :BOOLEAN
231
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
232
+ true
233
+ else
234
+ false
235
+ end
236
+ when :Object
237
+ # generic object (usually a Hash), return directly
238
+ value
239
+ when /\AArray<(?<inner_type>.+)>\z/
240
+ inner_type = Regexp.last_match[:inner_type]
241
+ value.map { |v| _deserialize(inner_type, v) }
242
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
243
+ k_type = Regexp.last_match[:k_type]
244
+ v_type = Regexp.last_match[:v_type]
245
+ {}.tap do |hash|
246
+ value.each do |k, v|
247
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
248
+ end
249
+ end
250
+ else # model
251
+ temp_model = BombBomb.const_get(type).new
252
+ temp_model.build_from_hash(value)
253
+ end
254
+ end
255
+
256
+ # Returns the string representation of the object
257
+ # @return [String] String presentation of the object
258
+ def to_s
259
+ to_hash.to_s
260
+ end
261
+
262
+ # to_body is an alias to to_hash (backward compatibility)
263
+ # @return [Hash] Returns the object in the form of hash
264
+ def to_body
265
+ to_hash
266
+ end
267
+
268
+ # Returns the object in the form of hash
269
+ # @return [Hash] Returns the object in the form of hash
270
+ def to_hash
271
+ hash = {}
272
+ self.class.attribute_map.each_pair do |attr, param|
273
+ value = self.send(attr)
274
+ next if value.nil?
275
+ hash[param] = _to_hash(value)
276
+ end
277
+ hash
278
+ end
279
+
280
+ # Outputs non-array value in the form of hash
281
+ # For object, use to_hash. Otherwise, just return the value
282
+ # @param [Object] value Any valid value
283
+ # @return [Hash] Returns the value in the form of hash
284
+ def _to_hash(value)
285
+ if value.is_a?(Array)
286
+ value.compact.map{ |v| _to_hash(v) }
287
+ elsif value.is_a?(Hash)
288
+ {}.tap do |hash|
289
+ value.each { |k, v| hash[k] = _to_hash(v) }
290
+ end
291
+ elsif value.respond_to? :to_hash
292
+ value.to_hash
293
+ else
294
+ value
295
+ end
296
+ end
297
+
298
+ end
299
+
300
+ end
@@ -0,0 +1,210 @@
1
+ =begin
2
+ #BombBomb
3
+
4
+ #We make it easy to build relationships using simple videos.
5
+
6
+ OpenAPI spec version: 2.0.22196
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ =end
23
+
24
+ require 'date'
25
+
26
+ module BombBomb
27
+ # The SignUploadRequest class
28
+ class SignUploadRequest
29
+ # when the upload will expire.
30
+ attr_accessor :expiration
31
+
32
+ # Key/Value object of request conditions.
33
+ attr_accessor :conditions
34
+
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ def self.attribute_map
38
+ {
39
+ :'expiration' => :'expiration',
40
+ :'conditions' => :'conditions'
41
+ }
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.swagger_types
46
+ {
47
+ :'expiration' => :'DateTime',
48
+ :'conditions' => :'Object'
49
+ }
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param [Hash] attributes Model attributes in the form of hash
54
+ def initialize(attributes = {})
55
+ return unless attributes.is_a?(Hash)
56
+
57
+ # convert string to symbol for hash key
58
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
59
+
60
+ if attributes.has_key?(:'expiration')
61
+ self.expiration = attributes[:'expiration']
62
+ end
63
+
64
+ if attributes.has_key?(:'conditions')
65
+ self.conditions = attributes[:'conditions']
66
+ end
67
+
68
+ end
69
+
70
+ # Show invalid properties with the reasons. Usually used together with valid?
71
+ # @return Array for valid properies with the reasons
72
+ def list_invalid_properties
73
+ invalid_properties = Array.new
74
+ return invalid_properties
75
+ end
76
+
77
+ # Check to see if the all the properties in the model are valid
78
+ # @return true if the model is valid
79
+ def valid?
80
+ return true
81
+ end
82
+
83
+ # Checks equality by comparing each attribute.
84
+ # @param [Object] Object to be compared
85
+ def ==(o)
86
+ return true if self.equal?(o)
87
+ self.class == o.class &&
88
+ expiration == o.expiration &&
89
+ conditions == o.conditions
90
+ end
91
+
92
+ # @see the `==` method
93
+ # @param [Object] Object to be compared
94
+ def eql?(o)
95
+ self == o
96
+ end
97
+
98
+ # Calculates hash code according to all attributes.
99
+ # @return [Fixnum] Hash code
100
+ def hash
101
+ [expiration, conditions].hash
102
+ end
103
+
104
+ # Builds the object from hash
105
+ # @param [Hash] attributes Model attributes in the form of hash
106
+ # @return [Object] Returns the model itself
107
+ def build_from_hash(attributes)
108
+ return nil unless attributes.is_a?(Hash)
109
+ self.class.swagger_types.each_pair do |key, type|
110
+ if type =~ /^Array<(.*)>/i
111
+ # check to ensure the input is an array given that the the attribute
112
+ # is documented as an array but the input is not
113
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
114
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
115
+ end
116
+ elsif !attributes[self.class.attribute_map[key]].nil?
117
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
118
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
119
+ end
120
+
121
+ self
122
+ end
123
+
124
+ # Deserializes the data based on type
125
+ # @param string type Data type
126
+ # @param string value Value to be deserialized
127
+ # @return [Object] Deserialized data
128
+ def _deserialize(type, value)
129
+ case type.to_sym
130
+ when :DateTime
131
+ DateTime.parse(value)
132
+ when :Date
133
+ Date.parse(value)
134
+ when :String
135
+ value.to_s
136
+ when :Integer
137
+ value.to_i
138
+ when :Float
139
+ value.to_f
140
+ when :BOOLEAN
141
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
142
+ true
143
+ else
144
+ false
145
+ end
146
+ when :Object
147
+ # generic object (usually a Hash), return directly
148
+ value
149
+ when /\AArray<(?<inner_type>.+)>\z/
150
+ inner_type = Regexp.last_match[:inner_type]
151
+ value.map { |v| _deserialize(inner_type, v) }
152
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
153
+ k_type = Regexp.last_match[:k_type]
154
+ v_type = Regexp.last_match[:v_type]
155
+ {}.tap do |hash|
156
+ value.each do |k, v|
157
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
158
+ end
159
+ end
160
+ else # model
161
+ temp_model = BombBomb.const_get(type).new
162
+ temp_model.build_from_hash(value)
163
+ end
164
+ end
165
+
166
+ # Returns the string representation of the object
167
+ # @return [String] String presentation of the object
168
+ def to_s
169
+ to_hash.to_s
170
+ end
171
+
172
+ # to_body is an alias to to_hash (backward compatibility)
173
+ # @return [Hash] Returns the object in the form of hash
174
+ def to_body
175
+ to_hash
176
+ end
177
+
178
+ # Returns the object in the form of hash
179
+ # @return [Hash] Returns the object in the form of hash
180
+ def to_hash
181
+ hash = {}
182
+ self.class.attribute_map.each_pair do |attr, param|
183
+ value = self.send(attr)
184
+ next if value.nil?
185
+ hash[param] = _to_hash(value)
186
+ end
187
+ hash
188
+ end
189
+
190
+ # Outputs non-array value in the form of hash
191
+ # For object, use to_hash. Otherwise, just return the value
192
+ # @param [Object] value Any valid value
193
+ # @return [Hash] Returns the value in the form of hash
194
+ def _to_hash(value)
195
+ if value.is_a?(Array)
196
+ value.compact.map{ |v| _to_hash(v) }
197
+ elsif value.is_a?(Hash)
198
+ {}.tap do |hash|
199
+ value.each { |k, v| hash[k] = _to_hash(v) }
200
+ end
201
+ elsif value.respond_to? :to_hash
202
+ value.to_hash
203
+ else
204
+ value
205
+ end
206
+ end
207
+
208
+ end
209
+
210
+ end