Class: Basecamp::Types::TimelineEvent

Inherits:
Object
  • Object
show all
Includes:
TypeHelpers
Defined in:
lib/basecamp/generated/types.rb

Overview

TimelineEvent

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ TimelineEvent

Returns a new instance of TimelineEvent.



3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
# File 'lib/basecamp/generated/types.rb', line 3776

def initialize(data = {})
  @action = data["action"]
  @app_url = data["app_url"]
  @attachments = parse_array(data["attachments"], "TimelineAttachment")
  @avatars_sample = data["avatars_sample"]
  @bucket = parse_type(data["bucket"], "TodoBucket")
  @created_at = parse_datetime(data["created_at"])
  @creator = parse_type(data["creator"], "Person")
  @data = parse_type(data["data"], "TimelineEventData")
  @id = parse_integer(data["id"])
  @kind = data["kind"]
  @parent_recording_id = parse_integer(data["parent_recording_id"])
  @summary_excerpt = data["summary_excerpt"]
  @target = data["target"]
  @title = data["title"]
  @url = data["url"]
end

Instance Attribute Details

#actionObject

Returns the value of attribute action.



3774
3775
3776
# File 'lib/basecamp/generated/types.rb', line 3774

def action
  @action
end

#app_urlObject

Returns the value of attribute app_url.



3774
3775
3776
# File 'lib/basecamp/generated/types.rb', line 3774

def app_url
  @app_url
end

#attachmentsObject

Returns the value of attribute attachments.



3774
3775
3776
# File 'lib/basecamp/generated/types.rb', line 3774

def attachments
  @attachments
end

#avatars_sampleObject

Returns the value of attribute avatars_sample.



3774
3775
3776
# File 'lib/basecamp/generated/types.rb', line 3774

def avatars_sample
  @avatars_sample
end

#bucketObject

Returns the value of attribute bucket.



3774
3775
3776
# File 'lib/basecamp/generated/types.rb', line 3774

def bucket
  @bucket
end

#created_atObject

Returns the value of attribute created_at.



3774
3775
3776
# File 'lib/basecamp/generated/types.rb', line 3774

def created_at
  @created_at
end

#creatorObject

Returns the value of attribute creator.



3774
3775
3776
# File 'lib/basecamp/generated/types.rb', line 3774

def creator
  @creator
end

#dataObject

Returns the value of attribute data.



3774
3775
3776
# File 'lib/basecamp/generated/types.rb', line 3774

def data
  @data
end

#idObject

Returns the value of attribute id.



3774
3775
3776
# File 'lib/basecamp/generated/types.rb', line 3774

def id
  @id
end

#kindObject

Returns the value of attribute kind.



3774
3775
3776
# File 'lib/basecamp/generated/types.rb', line 3774

def kind
  @kind
end

#parent_recording_idObject

Returns the value of attribute parent_recording_id.



3774
3775
3776
# File 'lib/basecamp/generated/types.rb', line 3774

def parent_recording_id
  @parent_recording_id
end

#summary_excerptObject

Returns the value of attribute summary_excerpt.



3774
3775
3776
# File 'lib/basecamp/generated/types.rb', line 3774

def summary_excerpt
  @summary_excerpt
end

#targetObject

Returns the value of attribute target.



3774
3775
3776
# File 'lib/basecamp/generated/types.rb', line 3774

def target
  @target
end

#titleObject

Returns the value of attribute title.



3774
3775
3776
# File 'lib/basecamp/generated/types.rb', line 3774

def title
  @title
end

#urlObject

Returns the value of attribute url.



3774
3775
3776
# File 'lib/basecamp/generated/types.rb', line 3774

def url
  @url
end

Instance Method Details

#to_hObject



3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
# File 'lib/basecamp/generated/types.rb', line 3794

def to_h
  {
    "action" => @action,
    "app_url" => @app_url,
    "attachments" => @attachments,
    "avatars_sample" => @avatars_sample,
    "bucket" => @bucket,
    "created_at" => @created_at,
    "creator" => @creator,
    "data" => @data,
    "id" => @id,
    "kind" => @kind,
    "parent_recording_id" => @parent_recording_id,
    "summary_excerpt" => @summary_excerpt,
    "target" => @target,
    "title" => @title,
    "url" => @url,
  }.compact
end

#to_json(*args) ⇒ Object



3814
3815
3816
# File 'lib/basecamp/generated/types.rb', line 3814

def to_json(*args)
  to_h.to_json(*args)
end