Class: Basecamp3::QuestionAnswer

Inherits:
Model
  • Object
show all
Includes:
Concerns::Bucketable, Concerns::Creatorable, Concerns::Parentable
Defined in:
lib/basecamp3/models/question_answer.rb

Overview

Constant Summary

Constants inherited from Model

Model::REQUIRED_FIELDS

Instance Attribute Summary collapse

Class Method Summary collapse

Methods included from Concerns::Parentable

#parent

Methods included from Concerns::Bucketable

#bucket

Methods included from Concerns::Creatorable

#creator

Methods inherited from Model

#initialize

Constructor Details

This class inherits a constructor from Basecamp3::Model

Instance Attribute Details

#contentObject

Returns the value of attribute content



9
10
11
# File 'lib/basecamp3/models/question_answer.rb', line 9

def content
  @content
end

#created_atObject

Returns the value of attribute created_at



9
10
11
# File 'lib/basecamp3/models/question_answer.rb', line 9

def created_at
  @created_at
end

#group_onObject

Returns the value of attribute group_on



9
10
11
# File 'lib/basecamp3/models/question_answer.rb', line 9

def group_on
  @group_on
end

#idObject

Returns the value of attribute id



9
10
11
# File 'lib/basecamp3/models/question_answer.rb', line 9

def id
  @id
end

#statusObject

Returns the value of attribute status



9
10
11
# File 'lib/basecamp3/models/question_answer.rb', line 9

def status
  @status
end

#updated_atObject

Returns the value of attribute updated_at



9
10
11
# File 'lib/basecamp3/models/question_answer.rb', line 9

def updated_at
  @updated_at
end

Class Method Details

.all(bucket_id, parent_id, params = {}) ⇒ Array<Basecamp3::QuestionAnswer>

Returns a paginated list of answers.

Parameters:

  • params (Hash) (defaults to: {})

    additional parameters

Options Hash (params):

  • :page (Integer) — default: optional

    to paginate results

Returns:



22
23
24
# File 'lib/basecamp3/models/question_answer.rb', line 22

def self.all(bucket_id, parent_id, params = {})
  Basecamp3.request.get("/buckets/#{bucket_id}/questions/#{parent_id}/answers", params, Basecamp3::QuestionAnswer)
end

.find(bucket_id, id) ⇒ Basecamp3::QuestionAnswer

Returns the answer.

Parameters:

  • bucket_id (Integer)

    the id of the bucket

  • id (Integer)

    the id of the question

Returns:



32
33
34
# File 'lib/basecamp3/models/question_answer.rb', line 32

def self.find(bucket_id, id)
  Basecamp3.request.get("/buckets/#{bucket_id}/question_answers/#{id}", {}, Basecamp3::QuestionAnswer)
end