[fix #1701] Use DS form to enroll admin

This commit is contained in:
simon lehericey 2018-05-24 16:40:39 +02:00
parent 0b19f1a8c5
commit aaebcd3494
9 changed files with 137 additions and 1 deletions

View file

@ -14,4 +14,10 @@ class PipedriveService
def self.get_demandes
Pipedrive::PersonAdapter.get_demandes_from_persons_owned_by_robot
end
def self.add_demande(email, phone, name, poste, source, organization_name, address)
organization_id = Pipedrive::OrganizationAdapter.add_organization(organization_name, address)
person_id = Pipedrive::PersonAdapter.add_person(email, phone, name, organization_id, poste, source)
Pipedrive::DealAdapter.add_deal(organization_id, person_id, organization_name)
end
end