Class: Roqua::CoreApi::CreateDossier Private

Inherits:
Base
  • Object
show all
Defined in:
lib/roqua/core_api/create_dossier.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#executeObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/roqua/core_api/create_dossier.rb', line 11

def execute
  response = session.post "/dossier_groups/#{dossier_group_id}/dossiers",
                          person: attribute_hash(person),
                          dossier: dossier_attributes,
                          credential: attribute_hash(credential)
  if response.code == 422
    errors_to_object(response, person)
    errors_to_object(response, dossier)
    errors_to_object(response, credential)
  end
  Models::Dossier.new(response)
end