Class: ApolloDeploySignalSdkRails::SendEmailResponse
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdkRails::SendEmailResponse
- Defined in:
- lib/apollo_deploy_signal_sdk_rails/types.rb
Overview
Schema type: SendEmailResponse
Instance Attribute Summary collapse
- #audience_id ⇒ String?
- #created_at ⇒ String
- #id ⇒ String
- #message_id ⇒ String?
- #messages ⇒ Array<BatchSendItemResponse>
- #scheduled_at ⇒ String?
- #status ⇒ String
Class Method Summary collapse
-
.from_json(attributes) ⇒ SendEmailResponse
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(id:, message_id:, status:, created_at:, scheduled_at: nil, audience_id: nil, messages: nil) ⇒ SendEmailResponse
constructor
A new instance of SendEmailResponse.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(id:, message_id:, status:, created_at:, scheduled_at: nil, audience_id: nil, messages: nil) ⇒ SendEmailResponse
Returns a new instance of SendEmailResponse.
317 318 319 320 321 322 323 324 325 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 317 def initialize(id: , message_id: , status: , created_at: , scheduled_at: nil, audience_id: nil, messages: nil) @id = id @message_id = @status = status @created_at = created_at @scheduled_at = scheduled_at @audience_id = audience_id @messages = end |
Instance Attribute Details
#audience_id ⇒ String?
312 313 314 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 312 def audience_id @audience_id end |
#created_at ⇒ String
308 309 310 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 308 def created_at @created_at end |
#id ⇒ String
302 303 304 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 302 def id @id end |
#message_id ⇒ String?
304 305 306 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 304 def @message_id end |
#messages ⇒ Array<BatchSendItemResponse>
314 315 316 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 314 def @messages end |
#scheduled_at ⇒ String?
310 311 312 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 310 def scheduled_at @scheduled_at end |
#status ⇒ String
306 307 308 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 306 def status @status end |
Class Method Details
.from_json(attributes) ⇒ SendEmailResponse
Create an instance from a parsed JSON hash.
343 344 345 346 347 348 349 350 351 352 353 354 355 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 343 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], status: attributes.key?("status") ? attributes["status"] : attributes[:status], created_at: attributes.key?("createdAt") ? attributes["createdAt"] : attributes[:created_at], scheduled_at: attributes.key?("scheduledAt") ? attributes["scheduledAt"] : attributes[:scheduled_at], audience_id: attributes.key?("audienceId") ? attributes["audienceId"] : attributes[:audience_id], messages: attributes.key?("messages") ? attributes["messages"] : attributes[:messages], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
328 329 330 331 332 333 334 335 336 337 338 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 328 def to_h { id: @id, message_id: @message_id, status: @status, created_at: @created_at, scheduled_at: @scheduled_at, audience_id: @audience_id, messages: @messages, }.compact end |