Class: ApolloDeploySignalSdkRails::EmailDetailResponse
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdkRails::EmailDetailResponse
- Defined in:
- lib/apollo_deploy_signal_sdk_rails/types.rb
Overview
Schema type: EmailDetailResponse
Instance Attribute Summary collapse
- #bcc ⇒ Array<String>
- #cc ⇒ Array<String>
- #created_at ⇒ String
- #error ⇒ String?
- #from ⇒ String
- #html ⇒ String?
- #id ⇒ String
- #message_id ⇒ String?
- #metadata ⇒ Hash{String => String}
- #reply_to ⇒ String?
- #sent_at ⇒ String?
- #status ⇒ String
- #subject ⇒ String
- #tags ⇒ Hash{String => String}
- #test_mode ⇒ Boolean
- #text ⇒ String?
- #to ⇒ Array<String>
- #topic_id ⇒ String?
- #updated_at ⇒ String?
Class Method Summary collapse
-
.from_json(attributes) ⇒ EmailDetailResponse
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(id:, message_id:, from:, to:, cc:, bcc:, reply_to:, subject:, html: nil, text: nil, status:, error:, tags:, metadata:, test_mode:, topic_id: nil, created_at:, sent_at:, updated_at:) ⇒ EmailDetailResponse
constructor
A new instance of EmailDetailResponse.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(id:, message_id:, from:, to:, cc:, bcc:, reply_to:, subject:, html: nil, text: nil, status:, error:, tags:, metadata:, test_mode:, topic_id: nil, created_at:, sent_at:, updated_at:) ⇒ EmailDetailResponse
Returns a new instance of EmailDetailResponse.
400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 400 def initialize(id: , message_id: , from: , to: , cc: , bcc: , reply_to: , subject: , html: nil, text: nil, status: , error: , tags: , metadata: , test_mode: , topic_id: nil, created_at: , sent_at: , updated_at: ) @id = id @message_id = @from = from @to = to @cc = cc @bcc = bcc @reply_to = reply_to @subject = subject @html = html @text = text @status = status @error = error @tags = @metadata = @test_mode = test_mode @topic_id = topic_id @created_at = created_at @sent_at = sent_at @updated_at = updated_at end |
Instance Attribute Details
#bcc ⇒ Array<String>
371 372 373 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 371 def bcc @bcc end |
#cc ⇒ Array<String>
369 370 371 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 369 def cc @cc end |
#created_at ⇒ String
393 394 395 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 393 def created_at @created_at end |
#error ⇒ String?
383 384 385 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 383 def error @error end |
#from ⇒ String
365 366 367 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 365 def from @from end |
#html ⇒ String?
377 378 379 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 377 def html @html end |
#id ⇒ String
361 362 363 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 361 def id @id end |
#message_id ⇒ String?
363 364 365 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 363 def @message_id end |
#metadata ⇒ Hash{String => String}
387 388 389 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 387 def @metadata end |
#reply_to ⇒ String?
373 374 375 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 373 def reply_to @reply_to end |
#sent_at ⇒ String?
395 396 397 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 395 def sent_at @sent_at end |
#status ⇒ String
381 382 383 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 381 def status @status end |
#subject ⇒ String
375 376 377 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 375 def subject @subject end |
#tags ⇒ Hash{String => String}
385 386 387 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 385 def @tags end |
#test_mode ⇒ Boolean
389 390 391 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 389 def test_mode @test_mode end |
#text ⇒ String?
379 380 381 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 379 def text @text end |
#to ⇒ Array<String>
367 368 369 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 367 def to @to end |
#topic_id ⇒ String?
391 392 393 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 391 def topic_id @topic_id end |
#updated_at ⇒ String?
397 398 399 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 397 def updated_at @updated_at end |
Class Method Details
.from_json(attributes) ⇒ EmailDetailResponse
Create an instance from a parsed JSON hash.
450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 450 def self.from_json(attributes) return nil unless attributes.is_a?(Hash) new( id: attributes.key?("id") ? attributes["id"] : attributes[:id], message_id: attributes.key?("messageId") ? attributes["messageId"] : attributes[:message_id], from: attributes.key?("from") ? attributes["from"] : attributes[:from], to: attributes.key?("to") ? attributes["to"] : attributes[:to], cc: attributes.key?("cc") ? attributes["cc"] : attributes[:cc], bcc: attributes.key?("bcc") ? attributes["bcc"] : attributes[:bcc], reply_to: attributes.key?("replyTo") ? attributes["replyTo"] : attributes[:reply_to], subject: attributes.key?("subject") ? attributes["subject"] : attributes[:subject], html: attributes.key?("html") ? attributes["html"] : attributes[:html], text: attributes.key?("text") ? attributes["text"] : attributes[:text], status: attributes.key?("status") ? attributes["status"] : attributes[:status], error: attributes.key?("error") ? attributes["error"] : attributes[:error], tags: attributes.key?("tags") ? attributes["tags"] : attributes[:tags], metadata: attributes.key?("metadata") ? attributes["metadata"] : attributes[:metadata], test_mode: attributes.key?("testMode") ? attributes["testMode"] : attributes[:test_mode], topic_id: attributes.key?("topicId") ? attributes["topicId"] : attributes[:topic_id], created_at: attributes.key?("createdAt") ? attributes["createdAt"] : attributes[:created_at], sent_at: attributes.key?("sentAt") ? attributes["sentAt"] : attributes[:sent_at], updated_at: attributes.key?("updatedAt") ? attributes["updatedAt"] : attributes[:updated_at], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 423 def to_h { id: @id, message_id: @message_id, from: @from, to: @to, cc: @cc, bcc: @bcc, reply_to: @reply_to, subject: @subject, html: @html, text: @text, status: @status, error: @error, tags: @tags, metadata: @metadata, test_mode: @test_mode, topic_id: @topic_id, created_at: @created_at, sent_at: @sent_at, updated_at: @updated_at, }.compact end |