module Roqua module CoreApi # @api private class CreateDossier < ActiveInteraction::Base model :session, class: Sessions::AuthSession string :dossier_group_id hash :attributes, strip: false def execute response = session.post "/dossier_groups/#{dossier_group_id}/dossiers", person: attributes.delete(:person), dossier: attributes Models::Dossier.new(response) end end end end