Class: GetStream::Generated::Models::ScheduledActivityResponse

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

Overview

An activity scheduled to be published at a future time

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 = {}) ⇒ ScheduledActivityResponse

Initialize with attributes



41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/getstream_ruby/generated/models/scheduled_activity_response.rb', line 41

def initialize(attributes = {})
  super(attributes)
  @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) }
  @user_id = attributes.fetch(:user_id) { attributes.fetch('user_id', nil) }
  @feeds = attributes.fetch(:feeds) { attributes.fetch('feeds', nil) }
  @activity = attributes.fetch(:activity) { attributes.fetch('activity', nil) }
  @failure_reason = attributes.fetch(:failure_reason) { attributes.fetch('failure_reason', nil) }
end

Instance Attribute Details

#activity ⇒ ScheduledActivityPreview

Returns The activity a scheduled activity will publish.

Returns:



35
36
37
# File 'lib/getstream_ruby/generated/models/scheduled_activity_response.rb', line 35

def activity
  @activity
end

#created_at ⇒ DateTime

Returns When the activity was scheduled.

Returns:

  • (DateTime) —

    When the activity was scheduled



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

def created_at
  @created_at
end

#failure_reason ⇒ ScheduledActivityFailureReason

Returns Why the publish failed; set only when status is failed.

Returns:



38
39
40
# File 'lib/getstream_ruby/generated/models/scheduled_activity_response.rb', line 38

def failure_reason
  @failure_reason
end

#feeds ⇒ Array<String>

Returns Feeds the activity will be added to.

Returns:

  • (Array<String>) —

    Feeds the activity will be added to



32
33
34
# File 'lib/getstream_ruby/generated/models/scheduled_activity_response.rb', line 32

def feeds
  @feeds
end

#id ⇒ String

Returns ID of the scheduled activity, also the ID the activity gets when published.

Returns:

  • (String) —

    ID of the scheduled activity, also the ID the activity gets when published



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

def id
  @id
end

#scheduled_at ⇒ DateTime

Returns When the activity will be published.

Returns:

  • (DateTime) —

    When the activity will be published



20
21
22
# File 'lib/getstream_ruby/generated/models/scheduled_activity_response.rb', line 20

def scheduled_at
  @scheduled_at
end

#status ⇒ ScheduledActivityStatus

Returns One of: scheduled, publishing, failed, canceled.

Returns:



23
24
25
# File 'lib/getstream_ruby/generated/models/scheduled_activity_response.rb', line 23

def status
  @status
end

#updated_at ⇒ DateTime

Returns When the scheduled activity was last changed.

Returns:

  • (DateTime) —

    When the scheduled activity was last changed



26
27
28
# File 'lib/getstream_ruby/generated/models/scheduled_activity_response.rb', line 26

def updated_at
  @updated_at
end

#user_id ⇒ String

Returns ID of the user the activity is published as.

Returns:

  • (String) —

    ID of the user the activity is published as



29
30
31
# File 'lib/getstream_ruby/generated/models/scheduled_activity_response.rb', line 29

def user_id
  @user_id
end

Class Method Details

.json_field_mappings ⇒ Object

Override field mappings for JSON serialization



55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/getstream_ruby/generated/models/scheduled_activity_response.rb', line 55

def self.json_field_mappings
  {
    created_at: 'created_at',
    id: 'id',
    scheduled_at: 'scheduled_at',
    status: 'status',
    updated_at: 'updated_at',
    user_id: 'user_id',
    feeds: 'feeds',
    activity: 'activity',
    failure_reason: 'failure_reason'
  }
end