module Roqua module CoreApi module Sessions class DossierSession < OrganizationSession attr_reader :dossier_id def initialize(dossier_id, organization_id, app_id, server_url = ENV["CORE_URL"]) @dossier_id = dossier_id super(organization_id, app_id, server_url) end def start(attributes) response = put "/start", attributes: attributes fail response.inspect unless response.code / 100 == 2 # Success 2xx response end private def base_url super + "/dossiers/#{dossier_id}" end end end end end