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