Class: Basecamp::Types::Vault

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

Overview

Vault

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ Vault

Returns a new instance of Vault.



4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
# File 'lib/basecamp/generated/types.rb', line 4376

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_urlObject

Returns the value of attribute app_url.



4369
4370
4371
# File 'lib/basecamp/generated/types.rb', line 4369

def app_url
  @app_url
end

#bookmark_urlObject

Returns the value of attribute bookmark_url.



4369
4370
4371
# File 'lib/basecamp/generated/types.rb', line 4369

def bookmark_url
  @bookmark_url
end

#bucketObject

Returns the value of attribute bucket.



4369
4370
4371
# File 'lib/basecamp/generated/types.rb', line 4369

def bucket
  @bucket
end

#created_atObject

Returns the value of attribute created_at.



4369
4370
4371
# File 'lib/basecamp/generated/types.rb', line 4369

def created_at
  @created_at
end

#creatorObject

Returns the value of attribute creator.



4369
4370
4371
# File 'lib/basecamp/generated/types.rb', line 4369

def creator
  @creator
end

#documents_countObject

Returns the value of attribute documents_count.



4369
4370
4371
# File 'lib/basecamp/generated/types.rb', line 4369

def documents_count
  @documents_count
end

#documents_urlObject

Returns the value of attribute documents_url.



4369
4370
4371
# File 'lib/basecamp/generated/types.rb', line 4369

def documents_url
  @documents_url
end

#idObject

Returns the value of attribute id.



4369
4370
4371
# File 'lib/basecamp/generated/types.rb', line 4369

def id
  @id
end

#inherits_statusObject

Returns the value of attribute inherits_status.



4369
4370
4371
# File 'lib/basecamp/generated/types.rb', line 4369

def inherits_status
  @inherits_status
end

#parentObject

Returns the value of attribute parent.



4369
4370
4371
# File 'lib/basecamp/generated/types.rb', line 4369

def parent
  @parent
end

#positionObject

Returns the value of attribute position.



4369
4370
4371
# File 'lib/basecamp/generated/types.rb', line 4369

def position
  @position
end

#statusObject

Returns the value of attribute status.



4369
4370
4371
# File 'lib/basecamp/generated/types.rb', line 4369

def status
  @status
end

#titleObject

Returns the value of attribute title.



4369
4370
4371
# File 'lib/basecamp/generated/types.rb', line 4369

def title
  @title
end

#typeObject

Returns the value of attribute type.



4369
4370
4371
# File 'lib/basecamp/generated/types.rb', line 4369

def type
  @type
end

#updated_atObject

Returns the value of attribute updated_at.



4369
4370
4371
# File 'lib/basecamp/generated/types.rb', line 4369

def updated_at
  @updated_at
end

#uploads_countObject

Returns the value of attribute uploads_count.



4369
4370
4371
# File 'lib/basecamp/generated/types.rb', line 4369

def uploads_count
  @uploads_count
end

#uploads_urlObject

Returns the value of attribute uploads_url.



4369
4370
4371
# File 'lib/basecamp/generated/types.rb', line 4369

def uploads_url
  @uploads_url
end

#urlObject

Returns the value of attribute url.



4369
4370
4371
# File 'lib/basecamp/generated/types.rb', line 4369

def url
  @url
end

#vaults_countObject

Returns the value of attribute vaults_count.



4369
4370
4371
# File 'lib/basecamp/generated/types.rb', line 4369

def vaults_count
  @vaults_count
end

#vaults_urlObject

Returns the value of attribute vaults_url.



4369
4370
4371
# File 'lib/basecamp/generated/types.rb', line 4369

def vaults_url
  @vaults_url
end

#visible_to_clientsObject

Returns the value of attribute visible_to_clients.



4369
4370
4371
# File 'lib/basecamp/generated/types.rb', line 4369

def visible_to_clients
  @visible_to_clients
end

Class Method Details

.required_fieldsArray<Symbol>

Returns:

  • (Array<Symbol>)


4372
4373
4374
# File 'lib/basecamp/generated/types.rb', line 4372

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_hObject



4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
# File 'lib/basecamp/generated/types.rb', line 4400

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



4426
4427
4428
# File 'lib/basecamp/generated/types.rb', line 4426

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