Class: Roqua::RomApi::ListResponses Private
- Defined in:
- lib/roqua/rom_api/list_responses.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #execute ⇒ Object private
- #filter_params ⇒ Object private
- #response_to_result(response) ⇒ Object private
Instance Method Details
#execute ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
14 15 16 17 18 |
# File 'lib/roqua/rom_api/list_responses.rb', line 14 def execute validate_response_for do basic_auth_session.get "/dossiers/#{dossier_id}/responses", filter_params end end |
#filter_params ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/roqua/rom_api/list_responses.rb', line 20 def filter_params { response_ids: response_ids, respondent_type: respondent_type, status: status, questionnaire_keys: questionnaire_keys, completed_after: completed_after, completed_before: completed_before, protocol_subscription_id: protocol_subscription_id }.keep_if { |_k, v| v.present? } end |
#response_to_result(response) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
32 33 34 |
# File 'lib/roqua/rom_api/list_responses.rb', line 32 def response_to_result(response) response.map { |r| Models::Response.new(r) } end |