Class: Basecamp::Types::Questionnaire

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

Overview

Questionnaire

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ Questionnaire

Returns a new instance of Questionnaire.



3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
# File 'lib/basecamp/generated/types.rb', line 3052

def initialize(data = {})
  @app_url = data["app_url"]
  @bucket = parse_type(data["bucket"], "RecordingBucket")
  @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"])
  @name = data["name"]
  @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"]
  @questions_count = parse_integer(data["questions_count"])
  @questions_url = data["questions_url"]
end

Instance Attribute Details

#app_urlObject

Returns the value of attribute app_url.



3045
3046
3047
# File 'lib/basecamp/generated/types.rb', line 3045

def app_url
  @app_url
end

#bookmark_urlObject

Returns the value of attribute bookmark_url.



3045
3046
3047
# File 'lib/basecamp/generated/types.rb', line 3045

def bookmark_url
  @bookmark_url
end

#bucketObject

Returns the value of attribute bucket.



3045
3046
3047
# File 'lib/basecamp/generated/types.rb', line 3045

def bucket
  @bucket
end

#created_atObject

Returns the value of attribute created_at.



3045
3046
3047
# File 'lib/basecamp/generated/types.rb', line 3045

def created_at
  @created_at
end

#creatorObject

Returns the value of attribute creator.



3045
3046
3047
# File 'lib/basecamp/generated/types.rb', line 3045

def creator
  @creator
end

#idObject

Returns the value of attribute id.



3045
3046
3047
# File 'lib/basecamp/generated/types.rb', line 3045

def id
  @id
end

#inherits_statusObject

Returns the value of attribute inherits_status.



3045
3046
3047
# File 'lib/basecamp/generated/types.rb', line 3045

def inherits_status
  @inherits_status
end

#nameObject

Returns the value of attribute name.



3045
3046
3047
# File 'lib/basecamp/generated/types.rb', line 3045

def name
  @name
end

#questions_countObject

Returns the value of attribute questions_count.



3045
3046
3047
# File 'lib/basecamp/generated/types.rb', line 3045

def questions_count
  @questions_count
end

#questions_urlObject

Returns the value of attribute questions_url.



3045
3046
3047
# File 'lib/basecamp/generated/types.rb', line 3045

def questions_url
  @questions_url
end

#statusObject

Returns the value of attribute status.



3045
3046
3047
# File 'lib/basecamp/generated/types.rb', line 3045

def status
  @status
end

#titleObject

Returns the value of attribute title.



3045
3046
3047
# File 'lib/basecamp/generated/types.rb', line 3045

def title
  @title
end

#typeObject

Returns the value of attribute type.



3045
3046
3047
# File 'lib/basecamp/generated/types.rb', line 3045

def type
  @type
end

#updated_atObject

Returns the value of attribute updated_at.



3045
3046
3047
# File 'lib/basecamp/generated/types.rb', line 3045

def updated_at
  @updated_at
end

#urlObject

Returns the value of attribute url.



3045
3046
3047
# File 'lib/basecamp/generated/types.rb', line 3045

def url
  @url
end

#visible_to_clientsObject

Returns the value of attribute visible_to_clients.



3045
3046
3047
# File 'lib/basecamp/generated/types.rb', line 3045

def visible_to_clients
  @visible_to_clients
end

Class Method Details

.required_fieldsArray<Symbol>

Returns:

  • (Array<Symbol>)


3048
3049
3050
# File 'lib/basecamp/generated/types.rb', line 3048

def self.required_fields
  %i[app_url bucket created_at creator id inherits_status name status title type updated_at url visible_to_clients].freeze
end

Instance Method Details

#to_hObject



3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
# File 'lib/basecamp/generated/types.rb', line 3071

def to_h
  {
    "app_url" => @app_url,
    "bucket" => @bucket,
    "created_at" => @created_at,
    "creator" => @creator,
    "id" => @id,
    "inherits_status" => @inherits_status,
    "name" => @name,
    "status" => @status,
    "title" => @title,
    "type" => @type,
    "updated_at" => @updated_at,
    "url" => @url,
    "visible_to_clients" => @visible_to_clients,
    "bookmark_url" => @bookmark_url,
    "questions_count" => @questions_count,
    "questions_url" => @questions_url,
  }.compact
end

#to_json(*args) ⇒ Object



3092
3093
3094
# File 'lib/basecamp/generated/types.rb', line 3092

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