Class: Basecamp::Types::UpcomingScheduleEntry

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

Overview

UpcomingScheduleEntry

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ UpcomingScheduleEntry

Returns a new instance of UpcomingScheduleEntry.



4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
# File 'lib/basecamp/generated/types.rb', line 4915

def initialize(data = {})
  @all_day = parse_boolean(data["all_day"])
  @app_url = data["app_url"]
  @bucket = parse_type(data["bucket"], "UpcomingScheduleBucket")
  @comments_count = parse_integer(data["comments_count"])
  @creator = parse_type(data["creator"], "UpcomingSchedulePerson")
  @ends_at = data["ends_at"]
  @id = parse_integer(data["id"])
  @participants = parse_array(data["participants"], "UpcomingSchedulePerson")
  @recurring = parse_boolean(data["recurring"])
  @starts_at = data["starts_at"]
  @status = data["status"]
  @summary = data["summary"]
  @type = data["type"]
  @url = data["url"]
  @visible_to_clients = parse_boolean(data["visible_to_clients"])
end

Instance Attribute Details

#all_dayObject

Returns the value of attribute all_day.



4908
4909
4910
# File 'lib/basecamp/generated/types.rb', line 4908

def all_day
  @all_day
end

#app_urlObject

Returns the value of attribute app_url.



4908
4909
4910
# File 'lib/basecamp/generated/types.rb', line 4908

def app_url
  @app_url
end

#bucketObject

Returns the value of attribute bucket.



4908
4909
4910
# File 'lib/basecamp/generated/types.rb', line 4908

def bucket
  @bucket
end

#comments_countObject

Returns the value of attribute comments_count.



4908
4909
4910
# File 'lib/basecamp/generated/types.rb', line 4908

def comments_count
  @comments_count
end

#creatorObject

Returns the value of attribute creator.



4908
4909
4910
# File 'lib/basecamp/generated/types.rb', line 4908

def creator
  @creator
end

#ends_atObject

Returns the value of attribute ends_at.



4908
4909
4910
# File 'lib/basecamp/generated/types.rb', line 4908

def ends_at
  @ends_at
end

#idObject

Returns the value of attribute id.



4908
4909
4910
# File 'lib/basecamp/generated/types.rb', line 4908

def id
  @id
end

#participantsObject

Returns the value of attribute participants.



4908
4909
4910
# File 'lib/basecamp/generated/types.rb', line 4908

def participants
  @participants
end

#recurringObject

Returns the value of attribute recurring.



4908
4909
4910
# File 'lib/basecamp/generated/types.rb', line 4908

def recurring
  @recurring
end

#starts_atObject

Returns the value of attribute starts_at.



4908
4909
4910
# File 'lib/basecamp/generated/types.rb', line 4908

def starts_at
  @starts_at
end

#statusObject

Returns the value of attribute status.



4908
4909
4910
# File 'lib/basecamp/generated/types.rb', line 4908

def status
  @status
end

#summaryObject

Returns the value of attribute summary.



4908
4909
4910
# File 'lib/basecamp/generated/types.rb', line 4908

def summary
  @summary
end

#typeObject

Returns the value of attribute type.



4908
4909
4910
# File 'lib/basecamp/generated/types.rb', line 4908

def type
  @type
end

#urlObject

Returns the value of attribute url.



4908
4909
4910
# File 'lib/basecamp/generated/types.rb', line 4908

def url
  @url
end

#visible_to_clientsObject

Returns the value of attribute visible_to_clients.



4908
4909
4910
# File 'lib/basecamp/generated/types.rb', line 4908

def visible_to_clients
  @visible_to_clients
end

Class Method Details

.required_fieldsArray<Symbol>

Returns:

  • (Array<Symbol>)


4911
4912
4913
# File 'lib/basecamp/generated/types.rb', line 4911

def self.required_fields
  %i[all_day app_url bucket comments_count creator ends_at id participants recurring starts_at status summary type url visible_to_clients].freeze
end

Instance Method Details

#to_hObject



4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
# File 'lib/basecamp/generated/types.rb', line 4933

def to_h
  {
    "all_day" => @all_day,
    "app_url" => @app_url,
    "bucket" => @bucket,
    "comments_count" => @comments_count,
    "creator" => @creator,
    "ends_at" => @ends_at,
    "id" => @id,
    "participants" => @participants,
    "recurring" => @recurring,
    "starts_at" => @starts_at,
    "status" => @status,
    "summary" => @summary,
    "type" => @type,
    "url" => @url,
    "visible_to_clients" => @visible_to_clients,
  }.compact
end

#to_json(*args) ⇒ Object



4953
4954
4955
# File 'lib/basecamp/generated/types.rb', line 4953

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