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.



3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
# File 'lib/basecamp/generated/types.rb', line 3426

def initialize(data = {})
  @action = data["action"]
  @app_url = data["app_url"]
  @bucket = parse_type(data["bucket"], "TodoBucket")
  @created_at = parse_datetime(data["created_at"])
  @creator = parse_type(data["creator"], "Person")
  @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.



3424
3425
3426
# File 'lib/basecamp/generated/types.rb', line 3424

def action
  @action
end

#app_urlObject

Returns the value of attribute app_url.



3424
3425
3426
# File 'lib/basecamp/generated/types.rb', line 3424

def app_url
  @app_url
end

#bucketObject

Returns the value of attribute bucket.



3424
3425
3426
# File 'lib/basecamp/generated/types.rb', line 3424

def bucket
  @bucket
end

#created_atObject

Returns the value of attribute created_at.



3424
3425
3426
# File 'lib/basecamp/generated/types.rb', line 3424

def created_at
  @created_at
end

#creatorObject

Returns the value of attribute creator.



3424
3425
3426
# File 'lib/basecamp/generated/types.rb', line 3424

def creator
  @creator
end

#idObject

Returns the value of attribute id.



3424
3425
3426
# File 'lib/basecamp/generated/types.rb', line 3424

def id
  @id
end

#kindObject

Returns the value of attribute kind.



3424
3425
3426
# File 'lib/basecamp/generated/types.rb', line 3424

def kind
  @kind
end

#parent_recording_idObject

Returns the value of attribute parent_recording_id.



3424
3425
3426
# File 'lib/basecamp/generated/types.rb', line 3424

def parent_recording_id
  @parent_recording_id
end

#summary_excerptObject

Returns the value of attribute summary_excerpt.



3424
3425
3426
# File 'lib/basecamp/generated/types.rb', line 3424

def summary_excerpt
  @summary_excerpt
end

#targetObject

Returns the value of attribute target.



3424
3425
3426
# File 'lib/basecamp/generated/types.rb', line 3424

def target
  @target
end

#titleObject

Returns the value of attribute title.



3424
3425
3426
# File 'lib/basecamp/generated/types.rb', line 3424

def title
  @title
end

#urlObject

Returns the value of attribute url.



3424
3425
3426
# File 'lib/basecamp/generated/types.rb', line 3424

def url
  @url
end

Instance Method Details

#to_hObject



3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
# File 'lib/basecamp/generated/types.rb', line 3441

def to_h
  {
    "action" => @action,
    "app_url" => @app_url,
    "bucket" => @bucket,
    "created_at" => @created_at,
    "creator" => @creator,
    "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



3458
3459
3460
# File 'lib/basecamp/generated/types.rb', line 3458

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