Class: Basecamp::Types::Vault
- Inherits:
-
Object
- Object
- Basecamp::Types::Vault
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
Vault
Instance Attribute Summary collapse
-
#app_url ⇒ Object
Returns the value of attribute app_url.
-
#bookmark_url ⇒ Object
Returns the value of attribute bookmark_url.
-
#bucket ⇒ Object
Returns the value of attribute bucket.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#creator ⇒ Object
Returns the value of attribute creator.
-
#documents_count ⇒ Object
Returns the value of attribute documents_count.
-
#documents_url ⇒ Object
Returns the value of attribute documents_url.
-
#id ⇒ Object
Returns the value of attribute id.
-
#inherits_status ⇒ Object
Returns the value of attribute inherits_status.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#position ⇒ Object
Returns the value of attribute position.
-
#status ⇒ Object
Returns the value of attribute status.
-
#title ⇒ Object
Returns the value of attribute title.
-
#type ⇒ Object
Returns the value of attribute type.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#uploads_count ⇒ Object
Returns the value of attribute uploads_count.
-
#uploads_url ⇒ Object
Returns the value of attribute uploads_url.
-
#url ⇒ Object
Returns the value of attribute url.
-
#vaults_count ⇒ Object
Returns the value of attribute vaults_count.
-
#vaults_url ⇒ Object
Returns the value of attribute vaults_url.
-
#visible_to_clients ⇒ Object
Returns the value of attribute visible_to_clients.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ Vault
constructor
A new instance of Vault.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ Vault
Returns a new instance of Vault.
5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 |
# File 'lib/basecamp/generated/types.rb', line 5267 def initialize(data = {}) @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"]) @inherits_status = parse_boolean(data["inherits_status"]) @status = data["status"] @title = data["title"] @type = data["type"] @updated_at = parse_datetime(data["updated_at"]) @url = data["url"] @visible_to_clients = parse_boolean(data["visible_to_clients"]) @bookmark_url = data["bookmark_url"] @documents_count = parse_integer(data["documents_count"]) @documents_url = data["documents_url"] @parent = parse_type(data["parent"], "RecordingParent") @position = parse_integer(data["position"]) @uploads_count = parse_integer(data["uploads_count"]) @uploads_url = data["uploads_url"] @vaults_count = parse_integer(data["vaults_count"]) @vaults_url = data["vaults_url"] end |
Instance Attribute Details
#app_url ⇒ Object
Returns the value of attribute app_url.
5260 5261 5262 |
# File 'lib/basecamp/generated/types.rb', line 5260 def app_url @app_url end |
#bookmark_url ⇒ Object
Returns the value of attribute bookmark_url.
5260 5261 5262 |
# File 'lib/basecamp/generated/types.rb', line 5260 def bookmark_url @bookmark_url end |
#bucket ⇒ Object
Returns the value of attribute bucket.
5260 5261 5262 |
# File 'lib/basecamp/generated/types.rb', line 5260 def bucket @bucket end |
#created_at ⇒ Object
Returns the value of attribute created_at.
5260 5261 5262 |
# File 'lib/basecamp/generated/types.rb', line 5260 def created_at @created_at end |
#creator ⇒ Object
Returns the value of attribute creator.
5260 5261 5262 |
# File 'lib/basecamp/generated/types.rb', line 5260 def creator @creator end |
#documents_count ⇒ Object
Returns the value of attribute documents_count.
5260 5261 5262 |
# File 'lib/basecamp/generated/types.rb', line 5260 def documents_count @documents_count end |
#documents_url ⇒ Object
Returns the value of attribute documents_url.
5260 5261 5262 |
# File 'lib/basecamp/generated/types.rb', line 5260 def documents_url @documents_url end |
#id ⇒ Object
Returns the value of attribute id.
5260 5261 5262 |
# File 'lib/basecamp/generated/types.rb', line 5260 def id @id end |
#inherits_status ⇒ Object
Returns the value of attribute inherits_status.
5260 5261 5262 |
# File 'lib/basecamp/generated/types.rb', line 5260 def inherits_status @inherits_status end |
#parent ⇒ Object
Returns the value of attribute parent.
5260 5261 5262 |
# File 'lib/basecamp/generated/types.rb', line 5260 def parent @parent end |
#position ⇒ Object
Returns the value of attribute position.
5260 5261 5262 |
# File 'lib/basecamp/generated/types.rb', line 5260 def position @position end |
#status ⇒ Object
Returns the value of attribute status.
5260 5261 5262 |
# File 'lib/basecamp/generated/types.rb', line 5260 def status @status end |
#title ⇒ Object
Returns the value of attribute title.
5260 5261 5262 |
# File 'lib/basecamp/generated/types.rb', line 5260 def title @title end |
#type ⇒ Object
Returns the value of attribute type.
5260 5261 5262 |
# File 'lib/basecamp/generated/types.rb', line 5260 def type @type end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
5260 5261 5262 |
# File 'lib/basecamp/generated/types.rb', line 5260 def updated_at @updated_at end |
#uploads_count ⇒ Object
Returns the value of attribute uploads_count.
5260 5261 5262 |
# File 'lib/basecamp/generated/types.rb', line 5260 def uploads_count @uploads_count end |
#uploads_url ⇒ Object
Returns the value of attribute uploads_url.
5260 5261 5262 |
# File 'lib/basecamp/generated/types.rb', line 5260 def uploads_url @uploads_url end |
#url ⇒ Object
Returns the value of attribute url.
5260 5261 5262 |
# File 'lib/basecamp/generated/types.rb', line 5260 def url @url end |
#vaults_count ⇒ Object
Returns the value of attribute vaults_count.
5260 5261 5262 |
# File 'lib/basecamp/generated/types.rb', line 5260 def vaults_count @vaults_count end |
#vaults_url ⇒ Object
Returns the value of attribute vaults_url.
5260 5261 5262 |
# File 'lib/basecamp/generated/types.rb', line 5260 def vaults_url @vaults_url end |
#visible_to_clients ⇒ Object
Returns the value of attribute visible_to_clients.
5260 5261 5262 |
# File 'lib/basecamp/generated/types.rb', line 5260 def visible_to_clients @visible_to_clients end |
Class Method Details
.required_fields ⇒ Array<Symbol>
5263 5264 5265 |
# File 'lib/basecamp/generated/types.rb', line 5263 def self.required_fields %i[app_url bucket created_at creator id inherits_status status title type updated_at url visible_to_clients].freeze end |
Instance Method Details
#to_h ⇒ Object
5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 |
# File 'lib/basecamp/generated/types.rb', line 5291 def to_h { "app_url" => @app_url, "bucket" => @bucket, "created_at" => @created_at, "creator" => @creator, "id" => @id, "inherits_status" => @inherits_status, "status" => @status, "title" => @title, "type" => @type, "updated_at" => @updated_at, "url" => @url, "visible_to_clients" => @visible_to_clients, "bookmark_url" => @bookmark_url, "documents_count" => @documents_count, "documents_url" => @documents_url, "parent" => @parent, "position" => @position, "uploads_count" => @uploads_count, "uploads_url" => @uploads_url, "vaults_count" => @vaults_count, "vaults_url" => @vaults_url, }.compact end |
#to_json(*args) ⇒ Object
5317 5318 5319 |
# File 'lib/basecamp/generated/types.rb', line 5317 def to_json(*args) to_h.to_json(*args) end |