Class: BombBomb::VideoEmailPrompt
- Inherits:
-
Object
- Object
- BombBomb::VideoEmailPrompt
- Defined in:
- lib/bombbomb/models/video_email_prompt.rb
Overview
Configures a single prompt which asks a user to record a video into an outgoing email.
Instance Attribute Summary collapse
-
#apply_template ⇒ Object
Controls whether a user template is applied to the message as it is sent.
-
#client_group_id ⇒ Object
The client group campaign that created the prompt.
-
#contact_id ⇒ Object
Contact Id to send the final email to.
-
#created_date ⇒ Object
When the email was first sent out.
-
#email_content ⇒ Object
The HTML content of the final email.
-
#email_id ⇒ Object
The email that was created by the prompt Read Only.
-
#email_subject_line ⇒ Object
The subject line of the final email.
-
#example_video_id ⇒ Object
An example or explanatory video to help the user understand what to say.
-
#followup_video_id ⇒ Object
An example or explanatory video to help the user understand what to say.
-
#id ⇒ Object
The identifier of the prompt.
-
#jericho_id ⇒ Object
If sent in a jericho context, this will have the jericho id.
-
#job_id ⇒ Object
The job sent by the prompt Read Only.
-
#last_notified ⇒ Object
When the user was last notified about a prompt email waiting for a video.
-
#prompt_bot_id ⇒ Object
The bot that created the prompt.
-
#prompt_html ⇒ Object
The suggested script of the prompt.
-
#prompt_intro ⇒ Object
A paragraph intro statement about the purpose of the email you’re recording a video for.
-
#prompt_subject ⇒ Object
The prompt’s subject line.
-
#scheduled_send_date ⇒ Object
When the final email is scheduled to be sent.
-
#send_without_video ⇒ Object
Whether to send the email if no video is recorded.
-
#status ⇒ Object
The status of the prompt: created = 0, sent = 10, recorded = 20, job_created = 30, timed_out = 40, declined = 50 Read Only.
-
#template_id ⇒ Object
Optional.
-
#thumbnail_url ⇒ Object
The URL of a thumbnail image for this prompt.
-
#to_lists ⇒ Object
List Ids to send the final email to.
-
#user_id ⇒ Object
The prompt’s owner.
-
#video_due_date ⇒ Object
When the video must be recorded by.
-
#video_id ⇒ Object
The video that was added to the prompt.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ VideoEmailPrompt
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ VideoEmailPrompt
Initializes the object
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 174 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} if attributes.has_key?(:'id') self.id = attributes[:'id'] end if attributes.has_key?(:'userId') self.user_id = attributes[:'userId'] end if attributes.has_key?(:'templateId') self.template_id = attributes[:'templateId'] end if attributes.has_key?(:'emailSubjectLine') self.email_subject_line = attributes[:'emailSubjectLine'] end if attributes.has_key?(:'emailContent') self.email_content = attributes[:'emailContent'] end if attributes.has_key?(:'thumbnailUrl') self.thumbnail_url = attributes[:'thumbnailUrl'] end if attributes.has_key?(:'contactId') self.contact_id = attributes[:'contactId'] end if attributes.has_key?(:'toLists') if (value = attributes[:'toLists']).is_a?(Array) self.to_lists = value end end if attributes.has_key?(:'jerichoId') self.jericho_id = attributes[:'jerichoId'] end if attributes.has_key?(:'promptSubject') self.prompt_subject = attributes[:'promptSubject'] end if attributes.has_key?(:'promptHtml') self.prompt_html = attributes[:'promptHtml'] end if attributes.has_key?(:'promptIntro') self.prompt_intro = attributes[:'promptIntro'] end if attributes.has_key?(:'exampleVideoId') self.example_video_id = attributes[:'exampleVideoId'] end if attributes.has_key?(:'followupVideoId') self.followup_video_id = attributes[:'followupVideoId'] end if attributes.has_key?(:'sendWithoutVideo') self.send_without_video = attributes[:'sendWithoutVideo'] end if attributes.has_key?(:'videoDueDate') self.video_due_date = attributes[:'videoDueDate'] end if attributes.has_key?(:'scheduledSendDate') self.scheduled_send_date = attributes[:'scheduledSendDate'] end if attributes.has_key?(:'videoId') self.video_id = attributes[:'videoId'] end if attributes.has_key?(:'emailId') self.email_id = attributes[:'emailId'] end if attributes.has_key?(:'jobId') self.job_id = attributes[:'jobId'] end if attributes.has_key?(:'promptBotId') self.prompt_bot_id = attributes[:'promptBotId'] end if attributes.has_key?(:'clientGroupId') self.client_group_id = attributes[:'clientGroupId'] end if attributes.has_key?(:'status') self.status = attributes[:'status'] end if attributes.has_key?(:'applyTemplate') self.apply_template = attributes[:'applyTemplate'] end if attributes.has_key?(:'createdDate') self.created_date = attributes[:'createdDate'] end if attributes.has_key?(:'lastNotified') self.last_notified = attributes[:'lastNotified'] end end |
Instance Attribute Details
#apply_template ⇒ Object
Controls whether a user template is applied to the message as it is sent
99 100 101 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 99 def apply_template @apply_template end |
#client_group_id ⇒ Object
The client group campaign that created the prompt.
93 94 95 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 93 def client_group_id @client_group_id end |
#contact_id ⇒ Object
Contact Id to send the final email to
48 49 50 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 48 def contact_id @contact_id end |
#created_date ⇒ Object
When the email was first sent out
102 103 104 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 102 def created_date @created_date end |
#email_content ⇒ Object
The HTML content of the final email
42 43 44 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 42 def email_content @email_content end |
#email_id ⇒ Object
The email that was created by the prompt Read Only.
84 85 86 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 84 def email_id @email_id end |
#email_subject_line ⇒ Object
The subject line of the final email
39 40 41 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 39 def email_subject_line @email_subject_line end |
#example_video_id ⇒ Object
An example or explanatory video to help the user understand what to say.
66 67 68 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 66 def example_video_id @example_video_id end |
#followup_video_id ⇒ Object
An example or explanatory video to help the user understand what to say.
69 70 71 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 69 def followup_video_id @followup_video_id end |
#id ⇒ Object
The identifier of the prompt. Read Only.
30 31 32 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 30 def id @id end |
#jericho_id ⇒ Object
If sent in a jericho context, this will have the jericho id
54 55 56 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 54 def jericho_id @jericho_id end |
#job_id ⇒ Object
The job sent by the prompt Read Only.
87 88 89 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 87 def job_id @job_id end |
#last_notified ⇒ Object
When the user was last notified about a prompt email waiting for a video
105 106 107 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 105 def last_notified @last_notified end |
#prompt_bot_id ⇒ Object
The bot that created the prompt.
90 91 92 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 90 def prompt_bot_id @prompt_bot_id end |
#prompt_html ⇒ Object
The suggested script of the prompt.
60 61 62 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 60 def prompt_html @prompt_html end |
#prompt_intro ⇒ Object
A paragraph intro statement about the purpose of the email you’re recording a video for.
63 64 65 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 63 def prompt_intro @prompt_intro end |
#prompt_subject ⇒ Object
The prompt’s subject line
57 58 59 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 57 def prompt_subject @prompt_subject end |
#scheduled_send_date ⇒ Object
When the final email is scheduled to be sent
78 79 80 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 78 def scheduled_send_date @scheduled_send_date end |
#send_without_video ⇒ Object
Whether to send the email if no video is recorded. If set to require a video, and none is added before the videoDueDate, the prompt is cancelled.
72 73 74 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 72 def send_without_video @send_without_video end |
#status ⇒ Object
The status of the prompt: created = 0, sent = 10, recorded = 20, job_created = 30, timed_out = 40, declined = 50 Read Only
96 97 98 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 96 def status @status end |
#template_id ⇒ Object
Optional. The email template to be used in the sent email, if none supplied, the users’ default will be applied.
36 37 38 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 36 def template_id @template_id end |
#thumbnail_url ⇒ Object
The URL of a thumbnail image for this prompt
45 46 47 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 45 def thumbnail_url @thumbnail_url end |
#to_lists ⇒ Object
List Ids to send the final email to
51 52 53 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 51 def to_lists @to_lists end |
#user_id ⇒ Object
The prompt’s owner. Read Only.
33 34 35 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 33 def user_id @user_id end |
#video_due_date ⇒ Object
When the video must be recorded by
75 76 77 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 75 def video_due_date @video_due_date end |
#video_id ⇒ Object
The video that was added to the prompt. Read Only.
81 82 83 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 81 def video_id @video_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 109 def self.attribute_map { :'id' => :'id', :'user_id' => :'userId', :'template_id' => :'templateId', :'email_subject_line' => :'emailSubjectLine', :'email_content' => :'emailContent', :'thumbnail_url' => :'thumbnailUrl', :'contact_id' => :'contactId', :'to_lists' => :'toLists', :'jericho_id' => :'jerichoId', :'prompt_subject' => :'promptSubject', :'prompt_html' => :'promptHtml', :'prompt_intro' => :'promptIntro', :'example_video_id' => :'exampleVideoId', :'followup_video_id' => :'followupVideoId', :'send_without_video' => :'sendWithoutVideo', :'video_due_date' => :'videoDueDate', :'scheduled_send_date' => :'scheduledSendDate', :'video_id' => :'videoId', :'email_id' => :'emailId', :'job_id' => :'jobId', :'prompt_bot_id' => :'promptBotId', :'client_group_id' => :'clientGroupId', :'status' => :'status', :'apply_template' => :'applyTemplate', :'created_date' => :'createdDate', :'last_notified' => :'lastNotified' } end |
.swagger_types ⇒ Object
Attribute type mapping.
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 141 def self.swagger_types { :'id' => :'String', :'user_id' => :'String', :'template_id' => :'String', :'email_subject_line' => :'String', :'email_content' => :'String', :'thumbnail_url' => :'String', :'contact_id' => :'String', :'to_lists' => :'Array<String>', :'jericho_id' => :'String', :'prompt_subject' => :'String', :'prompt_html' => :'String', :'prompt_intro' => :'String', :'example_video_id' => :'String', :'followup_video_id' => :'String', :'send_without_video' => :'BOOLEAN', :'video_due_date' => :'DateTime', :'scheduled_send_date' => :'DateTime', :'video_id' => :'String', :'email_id' => :'String', :'job_id' => :'String', :'prompt_bot_id' => :'String', :'client_group_id' => :'String', :'status' => :'Integer', :'apply_template' => :'BOOLEAN', :'created_date' => :'DateTime', :'last_notified' => :'DateTime' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 308 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && user_id == o.user_id && template_id == o.template_id && email_subject_line == o.email_subject_line && email_content == o.email_content && thumbnail_url == o.thumbnail_url && contact_id == o.contact_id && to_lists == o.to_lists && jericho_id == o.jericho_id && prompt_subject == o.prompt_subject && prompt_html == o.prompt_html && prompt_intro == o.prompt_intro && example_video_id == o.example_video_id && followup_video_id == o.followup_video_id && send_without_video == o.send_without_video && video_due_date == o.video_due_date && scheduled_send_date == o.scheduled_send_date && video_id == o.video_id && email_id == o.email_id && job_id == o.job_id && prompt_bot_id == o.prompt_bot_id && client_group_id == o.client_group_id && status == o.status && apply_template == o.apply_template && created_date == o.created_date && last_notified == o.last_notified end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 375 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /^(true|t|yes|y|1)$/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = BombBomb.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
441 442 443 444 445 446 447 448 449 450 451 452 453 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 441 def _to_hash(value) if value.is_a?(Array) value.compact.map{ |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 354 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
341 342 343 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 341 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
347 348 349 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 347 def hash [id, user_id, template_id, email_subject_line, email_content, thumbnail_url, contact_id, to_lists, jericho_id, prompt_subject, prompt_html, prompt_intro, example_video_id, followup_video_id, send_without_video, video_due_date, scheduled_send_date, video_id, email_id, job_id, prompt_bot_id, client_group_id, status, apply_template, created_date, last_notified].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
290 291 292 293 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 290 def list_invalid_properties invalid_properties = Array.new return invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
421 422 423 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 421 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
427 428 429 430 431 432 433 434 435 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 427 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
415 416 417 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 415 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
297 298 299 300 301 302 303 304 |
# File 'lib/bombbomb/models/video_email_prompt.rb', line 297 def valid? return false if @email_subject_line.nil? return false if @email_content.nil? return false if @prompt_subject.nil? return false if @prompt_html.nil? return false if @scheduled_send_date.nil? return true end |