Class: Basecamp::Types::UpcomingAssignable

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

Overview

UpcomingAssignable

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ UpcomingAssignable

Returns a new instance of UpcomingAssignable.



4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
# File 'lib/basecamp/generated/types.rb', line 4777

def initialize(data = {})
  @app_url = data["app_url"]
  @assignees = parse_array(data["assignees"], "UpcomingSchedulePerson")
  @bucket = parse_type(data["bucket"], "UpcomingScheduleBucket")
  @comments_count = parse_integer(data["comments_count"])
  @completed = parse_boolean(data["completed"])
  @completion_url = data["completion_url"]
  @content = data["content"]
  @id = parse_integer(data["id"])
  @parent = parse_type(data["parent"], "UpcomingAssignableParent")
  @repeating = parse_boolean(data["repeating"])
  @status = data["status"]
  @type = data["type"]
  @url = data["url"]
  @visible_to_clients = parse_boolean(data["visible_to_clients"])
  @completion = parse_type(data["completion"], "UpcomingAssignableCompletion")
  @due_on = data["due_on"]
  @starts_on = data["starts_on"]
end

Instance Attribute Details

#app_urlObject

Returns the value of attribute app_url.



4770
4771
4772
# File 'lib/basecamp/generated/types.rb', line 4770

def app_url
  @app_url
end

#assigneesObject

Returns the value of attribute assignees.



4770
4771
4772
# File 'lib/basecamp/generated/types.rb', line 4770

def assignees
  @assignees
end

#bucketObject

Returns the value of attribute bucket.



4770
4771
4772
# File 'lib/basecamp/generated/types.rb', line 4770

def bucket
  @bucket
end

#comments_countObject

Returns the value of attribute comments_count.



4770
4771
4772
# File 'lib/basecamp/generated/types.rb', line 4770

def comments_count
  @comments_count
end

#completedObject

Returns the value of attribute completed.



4770
4771
4772
# File 'lib/basecamp/generated/types.rb', line 4770

def completed
  @completed
end

#completionObject

Returns the value of attribute completion.



4770
4771
4772
# File 'lib/basecamp/generated/types.rb', line 4770

def completion
  @completion
end

#completion_urlObject

Returns the value of attribute completion_url.



4770
4771
4772
# File 'lib/basecamp/generated/types.rb', line 4770

def completion_url
  @completion_url
end

#contentObject

Returns the value of attribute content.



4770
4771
4772
# File 'lib/basecamp/generated/types.rb', line 4770

def content
  @content
end

#due_onObject

Returns the value of attribute due_on.



4770
4771
4772
# File 'lib/basecamp/generated/types.rb', line 4770

def due_on
  @due_on
end

#idObject

Returns the value of attribute id.



4770
4771
4772
# File 'lib/basecamp/generated/types.rb', line 4770

def id
  @id
end

#parentObject

Returns the value of attribute parent.



4770
4771
4772
# File 'lib/basecamp/generated/types.rb', line 4770

def parent
  @parent
end

#repeatingObject

Returns the value of attribute repeating.



4770
4771
4772
# File 'lib/basecamp/generated/types.rb', line 4770

def repeating
  @repeating
end

#starts_onObject

Returns the value of attribute starts_on.



4770
4771
4772
# File 'lib/basecamp/generated/types.rb', line 4770

def starts_on
  @starts_on
end

#statusObject

Returns the value of attribute status.



4770
4771
4772
# File 'lib/basecamp/generated/types.rb', line 4770

def status
  @status
end

#typeObject

Returns the value of attribute type.



4770
4771
4772
# File 'lib/basecamp/generated/types.rb', line 4770

def type
  @type
end

#urlObject

Returns the value of attribute url.



4770
4771
4772
# File 'lib/basecamp/generated/types.rb', line 4770

def url
  @url
end

#visible_to_clientsObject

Returns the value of attribute visible_to_clients.



4770
4771
4772
# File 'lib/basecamp/generated/types.rb', line 4770

def visible_to_clients
  @visible_to_clients
end

Class Method Details

.required_fieldsArray<Symbol>

Returns:

  • (Array<Symbol>)


4773
4774
4775
# File 'lib/basecamp/generated/types.rb', line 4773

def self.required_fields
  %i[app_url assignees bucket comments_count completed completion_url content id parent repeating status type url visible_to_clients].freeze
end

Instance Method Details

#to_hObject



4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
# File 'lib/basecamp/generated/types.rb', line 4797

def to_h
  {
    "app_url" => @app_url,
    "assignees" => @assignees,
    "bucket" => @bucket,
    "comments_count" => @comments_count,
    "completed" => @completed,
    "completion_url" => @completion_url,
    "content" => @content,
    "id" => @id,
    "parent" => @parent,
    "repeating" => @repeating,
    "status" => @status,
    "type" => @type,
    "url" => @url,
    "visible_to_clients" => @visible_to_clients,
    "completion" => @completion,
    "due_on" => @due_on,
    "starts_on" => @starts_on,
  }.compact
end

#to_json(*args) ⇒ Object



4819
4820
4821
# File 'lib/basecamp/generated/types.rb', line 4819

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