Class: GetStream::Generated::Models::ScheduledMessageResponse
- Inherits:
-
BaseModel
- Object
- BaseModel
- GetStream::Generated::Models::ScheduledMessageResponse
- Defined in:
- lib/getstream_ruby/generated/models/scheduled_message_response.rb
Overview
A message scheduled to be sent later
Instance Attribute Summary collapse
-
#channel ⇒ ScheduledMessageChannelResponse
The channel of a scheduled message.
-
#cid ⇒ String
The CID of the channel the message will be sent to.
-
#created_at ⇒ DateTime
Date/time of creation.
-
#failure_reason ⇒ ScheduledMessageFailureReason
Why sending the message failed.
-
#id ⇒ String
Unique identifier of the scheduled message.
-
#message ⇒ ScheduledMessageContentResponse
The message a scheduled message will send.
-
#scheduled_at ⇒ DateTime
Date/time the message is scheduled to be sent.
-
#status ⇒ ScheduledMessageStatus
Status of the scheduled message.
-
#updated_at ⇒ DateTime
Date/time of the last update.
-
#user ⇒ UserResponse
User response object.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ ScheduledMessageResponse
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ ScheduledMessageResponse
Initialize with attributes
44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/getstream_ruby/generated/models/scheduled_message_response.rb', line 44 def initialize(attributes = {}) super(attributes) @cid = attributes.fetch(:cid) { attributes.fetch('cid', nil) } @created_at = attributes.fetch(:created_at) { attributes.fetch('created_at', nil) } @id = attributes.fetch(:id) { attributes.fetch('id', nil) } @scheduled_at = attributes.fetch(:scheduled_at) { attributes.fetch('scheduled_at', nil) } @status = attributes.fetch(:status) { attributes.fetch('status', nil) } @updated_at = attributes.fetch(:updated_at) { attributes.fetch('updated_at', nil) } @message = attributes.fetch(:message) { attributes.fetch('message', nil) } @user = attributes.fetch(:user) { attributes.fetch('user', nil) } @failure_reason = attributes.fetch(:failure_reason) { attributes.fetch('failure_reason', nil) } @channel = attributes.fetch(:channel) { attributes.fetch('channel', nil) } end |
Instance Attribute Details
#channel ⇒ ScheduledMessageChannelResponse
Returns The channel of a scheduled message.
41 42 43 |
# File 'lib/getstream_ruby/generated/models/scheduled_message_response.rb', line 41 def channel @channel end |
#cid ⇒ String
Returns The CID of the channel the message will be sent to.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/scheduled_message_response.rb', line 14 def cid @cid end |
#created_at ⇒ DateTime
Returns Date/time of creation.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/scheduled_message_response.rb', line 17 def created_at @created_at end |
#failure_reason ⇒ ScheduledMessageFailureReason
Returns Why sending the message failed. Only set when status is failed. One of: banned, no_permission, channel_frozen, channel_deleted, user_deleted, moderation_blocked, hook_rejected, expired, internal_error, invalid_message, pending_not_supported.
38 39 40 |
# File 'lib/getstream_ruby/generated/models/scheduled_message_response.rb', line 38 def failure_reason @failure_reason end |
#id ⇒ String
Returns Unique identifier of the scheduled message.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/scheduled_message_response.rb', line 20 def id @id end |
#message ⇒ ScheduledMessageContentResponse
Returns The message a scheduled message will send.
32 33 34 |
# File 'lib/getstream_ruby/generated/models/scheduled_message_response.rb', line 32 def @message end |
#scheduled_at ⇒ DateTime
Returns Date/time the message is scheduled to be sent.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/scheduled_message_response.rb', line 23 def scheduled_at @scheduled_at end |
#status ⇒ ScheduledMessageStatus
Returns Status of the scheduled message. One of: scheduled, sending, failed, canceled, sent. A message is sending from its first send attempt until it is sent or fails, including while it waits to retry a failed attempt; it cannot be edited, canceled or sent now while sending.
26 27 28 |
# File 'lib/getstream_ruby/generated/models/scheduled_message_response.rb', line 26 def status @status end |
#updated_at ⇒ DateTime
Returns Date/time of the last update.
29 30 31 |
# File 'lib/getstream_ruby/generated/models/scheduled_message_response.rb', line 29 def updated_at @updated_at end |
#user ⇒ UserResponse
Returns User response object.
35 36 37 |
# File 'lib/getstream_ruby/generated/models/scheduled_message_response.rb', line 35 def user @user end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/getstream_ruby/generated/models/scheduled_message_response.rb', line 59 def self.json_field_mappings { cid: 'cid', created_at: 'created_at', id: 'id', scheduled_at: 'scheduled_at', status: 'status', updated_at: 'updated_at', message: 'message', user: 'user', failure_reason: 'failure_reason', channel: 'channel' } end |