Sha256: c3dc72980e7b244ae61a2db11f1e3f765ff050f1af0f95a4e40f41452d2c46b7

Contents?: true

Size: 663 Bytes

Versions: 2

Compression:

Stored size: 663 Bytes

Contents

module Roqua
  module CoreApi
    module Sessions
      class DossierSession < DossierGroupSession
        attr_reader :dossier_id

        def initialize(dossier_id, dossier_group_id, organization_id, server_url = ENV["CORE_URL"])
          @dossier_id = dossier_id
          super(dossier_group_id, organization_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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
roqua-core-api-0.0.6 lib/roqua/core_api/sessions/dossier_session.rb
roqua-core-api-0.0.5 lib/roqua/core_api/sessions/dossier_session.rb