Class: Basecamp::Types::FolderWithProjects
- Inherits:
-
Object
- Object
- Basecamp::Types::FolderWithProjects
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
FolderWithProjects
Instance Attribute Summary collapse
-
#bucket_ids ⇒ Object
Returns the value of attribute bucket_ids.
-
#color ⇒ Object
Returns the value of attribute color.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#gauges_url ⇒ Object
Returns the value of attribute gauges_url.
-
#id ⇒ Object
Returns the value of attribute id.
-
#image_url ⇒ Object
Returns the value of attribute image_url.
-
#is_emoji_only_name ⇒ Object
Returns the value of attribute is_emoji_only_name.
-
#name ⇒ Object
Returns the value of attribute name.
-
#projects ⇒ Object
Returns the value of attribute projects.
-
#star_url ⇒ Object
Returns the value of attribute star_url.
-
#type ⇒ Object
Returns the value of attribute type.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#url ⇒ Object
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ FolderWithProjects
constructor
A new instance of FolderWithProjects.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ FolderWithProjects
Returns a new instance of FolderWithProjects.
1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 |
# File 'lib/basecamp/generated/types.rb', line 1868 def initialize(data = {}) @bucket_ids = data["bucket_ids"] @color = data["color"] @created_at = parse_datetime(data["created_at"]) @gauges_url = data["gauges_url"] @id = parse_integer(data["id"]) @image_url = data["image_url"] @is_emoji_only_name = parse_boolean(data["is_emoji_only_name"]) @name = data["name"] @projects = parse_array(data["projects"], "Project") @star_url = data["star_url"] @type = data["type"] @updated_at = parse_datetime(data["updated_at"]) @url = data["url"] end |
Instance Attribute Details
#bucket_ids ⇒ Object
Returns the value of attribute bucket_ids.
1861 1862 1863 |
# File 'lib/basecamp/generated/types.rb', line 1861 def bucket_ids @bucket_ids end |
#color ⇒ Object
Returns the value of attribute color.
1861 1862 1863 |
# File 'lib/basecamp/generated/types.rb', line 1861 def color @color end |
#created_at ⇒ Object
Returns the value of attribute created_at.
1861 1862 1863 |
# File 'lib/basecamp/generated/types.rb', line 1861 def created_at @created_at end |
#gauges_url ⇒ Object
Returns the value of attribute gauges_url.
1861 1862 1863 |
# File 'lib/basecamp/generated/types.rb', line 1861 def gauges_url @gauges_url end |
#id ⇒ Object
Returns the value of attribute id.
1861 1862 1863 |
# File 'lib/basecamp/generated/types.rb', line 1861 def id @id end |
#image_url ⇒ Object
Returns the value of attribute image_url.
1861 1862 1863 |
# File 'lib/basecamp/generated/types.rb', line 1861 def image_url @image_url end |
#is_emoji_only_name ⇒ Object
Returns the value of attribute is_emoji_only_name.
1861 1862 1863 |
# File 'lib/basecamp/generated/types.rb', line 1861 def is_emoji_only_name @is_emoji_only_name end |
#name ⇒ Object
Returns the value of attribute name.
1861 1862 1863 |
# File 'lib/basecamp/generated/types.rb', line 1861 def name @name end |
#projects ⇒ Object
Returns the value of attribute projects.
1861 1862 1863 |
# File 'lib/basecamp/generated/types.rb', line 1861 def projects @projects end |
#star_url ⇒ Object
Returns the value of attribute star_url.
1861 1862 1863 |
# File 'lib/basecamp/generated/types.rb', line 1861 def star_url @star_url end |
#type ⇒ Object
Returns the value of attribute type.
1861 1862 1863 |
# File 'lib/basecamp/generated/types.rb', line 1861 def type @type end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
1861 1862 1863 |
# File 'lib/basecamp/generated/types.rb', line 1861 def updated_at @updated_at end |
#url ⇒ Object
Returns the value of attribute url.
1861 1862 1863 |
# File 'lib/basecamp/generated/types.rb', line 1861 def url @url end |
Class Method Details
.required_fields ⇒ Array<Symbol>
1864 1865 1866 |
# File 'lib/basecamp/generated/types.rb', line 1864 def self.required_fields %i[bucket_ids color created_at gauges_url id image_url is_emoji_only_name name projects star_url type updated_at url].freeze end |
Instance Method Details
#to_h ⇒ Object
1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 |
# File 'lib/basecamp/generated/types.rb', line 1884 def to_h { "bucket_ids" => @bucket_ids, "color" => @color, "created_at" => @created_at, "gauges_url" => @gauges_url, "id" => @id, "image_url" => @image_url, "is_emoji_only_name" => @is_emoji_only_name, "name" => @name, "projects" => @projects, "star_url" => @star_url, "type" => @type, "updated_at" => @updated_at, "url" => @url, }.reject { |k, v| v.nil? && !["color", "gauges_url", "image_url"].include?(k) } end |
#to_json(*args) ⇒ Object
1902 1903 1904 |
# File 'lib/basecamp/generated/types.rb', line 1902 def to_json(*args) to_h.to_json(*args) end |