module Roqua module CoreApi module Sessions class DossierSession < OrganizationSession attr_reader :dossier def initialize(dossier, organization, key, server = ENV["CORE_URL"]) @dossier = dossier super(organization, key, server) 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