Class: Basecamp::Types::Project

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

Overview

Project

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ Project

Returns a new instance of Project.



2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
# File 'lib/basecamp/generated/types.rb', line 2474

def initialize(data = {})
  @app_url = data["app_url"]
  @created_at = parse_datetime(data["created_at"])
  @id = parse_integer(data["id"])
  @name = data["name"]
  @status = data["status"]
  @updated_at = parse_datetime(data["updated_at"])
  @url = data["url"]
  @bookmark_url = data["bookmark_url"]
  @bookmarked = parse_boolean(data["bookmarked"])
  @client_company = parse_type(data["client_company"], "ClientCompany")
  @clients_enabled = parse_boolean(data["clients_enabled"])
  @clientside = parse_type(data["clientside"], "ClientSide")
  @description = data["description"]
  @dock = parse_array(data["dock"], "DockItem")
  @end_date = data["end_date"]
  @purpose = data["purpose"]
  @start_date = data["start_date"]
end

Instance Attribute Details

#app_urlObject

Returns the value of attribute app_url.



2467
2468
2469
# File 'lib/basecamp/generated/types.rb', line 2467

def app_url
  @app_url
end

#bookmark_urlObject

Returns the value of attribute bookmark_url.



2467
2468
2469
# File 'lib/basecamp/generated/types.rb', line 2467

def bookmark_url
  @bookmark_url
end

#bookmarkedObject

Returns the value of attribute bookmarked.



2467
2468
2469
# File 'lib/basecamp/generated/types.rb', line 2467

def bookmarked
  @bookmarked
end

#client_companyObject

Returns the value of attribute client_company.



2467
2468
2469
# File 'lib/basecamp/generated/types.rb', line 2467

def client_company
  @client_company
end

#clients_enabledObject

Returns the value of attribute clients_enabled.



2467
2468
2469
# File 'lib/basecamp/generated/types.rb', line 2467

def clients_enabled
  @clients_enabled
end

#clientsideObject

Deprecated.

This shape is deprecated since 2024-01: Use Client Visibility feature instead



2467
# File 'lib/basecamp/generated/types.rb', line 2467

attr_accessor :app_url, :created_at, :id, :name, :status, :updated_at, :url, :bookmark_url, :bookmarked, :client_company, :clients_enabled, :clientside, :description, :dock, :end_date, :purpose, :start_date

#created_atObject

Returns the value of attribute created_at.



2467
2468
2469
# File 'lib/basecamp/generated/types.rb', line 2467

def created_at
  @created_at
end

#descriptionObject

Returns the value of attribute description.



2467
2468
2469
# File 'lib/basecamp/generated/types.rb', line 2467

def description
  @description
end

#dockObject

Returns the value of attribute dock.



2467
2468
2469
# File 'lib/basecamp/generated/types.rb', line 2467

def dock
  @dock
end

#end_dateObject

Returns the value of attribute end_date.



2467
2468
2469
# File 'lib/basecamp/generated/types.rb', line 2467

def end_date
  @end_date
end

#idObject

Returns the value of attribute id.



2467
2468
2469
# File 'lib/basecamp/generated/types.rb', line 2467

def id
  @id
end

#nameObject

Returns the value of attribute name.



2467
2468
2469
# File 'lib/basecamp/generated/types.rb', line 2467

def name
  @name
end

#purposeObject

Returns the value of attribute purpose.



2467
2468
2469
# File 'lib/basecamp/generated/types.rb', line 2467

def purpose
  @purpose
end

#start_dateObject

Returns the value of attribute start_date.



2467
2468
2469
# File 'lib/basecamp/generated/types.rb', line 2467

def start_date
  @start_date
end

#statusObject

Returns the value of attribute status.



2467
2468
2469
# File 'lib/basecamp/generated/types.rb', line 2467

def status
  @status
end

#updated_atObject

Returns the value of attribute updated_at.



2467
2468
2469
# File 'lib/basecamp/generated/types.rb', line 2467

def updated_at
  @updated_at
end

#urlObject

Returns the value of attribute url.



2467
2468
2469
# File 'lib/basecamp/generated/types.rb', line 2467

def url
  @url
end

Class Method Details

.required_fieldsArray<Symbol>

Returns:

  • (Array<Symbol>)


2470
2471
2472
# File 'lib/basecamp/generated/types.rb', line 2470

def self.required_fields
  %i[app_url created_at id name status updated_at url].freeze
end

Instance Method Details

#to_hObject



2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
# File 'lib/basecamp/generated/types.rb', line 2494

def to_h
  {
    "app_url" => @app_url,
    "created_at" => @created_at,
    "id" => @id,
    "name" => @name,
    "status" => @status,
    "updated_at" => @updated_at,
    "url" => @url,
    "bookmark_url" => @bookmark_url,
    "bookmarked" => @bookmarked,
    "client_company" => @client_company,
    "clients_enabled" => @clients_enabled,
    "clientside" => @clientside,
    "description" => @description,
    "dock" => @dock,
    "end_date" => @end_date,
    "purpose" => @purpose,
    "start_date" => @start_date,
  }.compact
end

#to_json(*args) ⇒ Object



2516
2517
2518
# File 'lib/basecamp/generated/types.rb', line 2516

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