Class: GetStream::Generated::Models::UpdateScheduledMessageRequest

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/update_scheduled_message_request.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#==, #inspect, omit_empty_fields, #to_h, #to_json

Constructor Details

#initialize(attributes = {}) ⇒ UpdateScheduledMessageRequest

Initialize with attributes



20
21
22
23
24
# File 'lib/getstream_ruby/generated/models/update_scheduled_message_request.rb', line 20

def initialize(attributes = {})
  super(attributes)
  @scheduled_at = attributes.fetch(:scheduled_at) { attributes.fetch('scheduled_at', nil) }
  @message = attributes.fetch(:message) { attributes.fetch('message', nil) }
end

Instance Attribute Details

#message ⇒ MessageRequest

Returns Message data for creating or updating a message.

Returns:

  • (MessageRequest) —

    Message data for creating or updating a message



17
18
19
# File 'lib/getstream_ruby/generated/models/update_scheduled_message_request.rb', line 17

def message
  @message
end

#scheduled_at ⇒ DateTime

Returns New send time (UTC). Must be in the future and at most the app's maximum lead time from now. Rounded up to the first whole minute that is at least 1 minute from now, never earlier than requested. Resending the stored time leaves it unchanged.

Returns:

  • (DateTime) —

    New send time (UTC). Must be in the future and at most the app's maximum lead time from now. Rounded up to the first whole minute that is at least 1 minute from now, never earlier than requested. Resending the stored time leaves it unchanged



14
15
16
# File 'lib/getstream_ruby/generated/models/update_scheduled_message_request.rb', line 14

def scheduled_at
  @scheduled_at
end

Class Method Details

.json_field_mappings ⇒ Object

Override field mappings for JSON serialization



27
28
29
30
31
32
# File 'lib/getstream_ruby/generated/models/update_scheduled_message_request.rb', line 27

def self.json_field_mappings
  {
    scheduled_at: 'scheduled_at',
    message: 'message'
  }
end