Class: GetStream::Generated::Models::UpdateScheduledActivityRequest

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/update_scheduled_activity_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 = {}) ⇒ UpdateScheduledActivityRequest

Initialize with attributes



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

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

Instance Attribute Details

#activity ⇒ ActivityRequest

Returns:



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

def activity
  @activity
end

#scheduled_at ⇒ DateTime

Returns When to publish the activity, an RFC 3339 time. A time less than a minute ahead or in the past is moved to one minute from now, and the time is rounded up to a whole minute.

Returns:

  • (DateTime) —

    When to publish the activity, an RFC 3339 time. A time less than a minute ahead or in the past is moved to one minute from now, and the time is rounded up to a whole minute.



14
15
16
# File 'lib/getstream_ruby/generated/models/update_scheduled_activity_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_activity_request.rb', line 27

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