2018-05-31 18:06:28 +02:00
|
|
|
module BizDev
|
|
|
|
BIZ_DEV_MAPPING = {
|
|
|
|
8 =>
|
|
|
|
{
|
|
|
|
full_name: "Camille Garrigue",
|
|
|
|
pipedrive_id: 3189424
|
|
|
|
},
|
|
|
|
9 =>
|
|
|
|
{
|
|
|
|
full_name: "Philippe Vrignaud",
|
|
|
|
pipedrive_id: 2753338
|
|
|
|
},
|
|
|
|
10 =>
|
|
|
|
{
|
|
|
|
full_name: "Benjamin Doberset",
|
|
|
|
pipedrive_id: 4223834
|
|
|
|
},
|
|
|
|
11 =>
|
|
|
|
{
|
|
|
|
full_name: "Rédouane Bouchane",
|
|
|
|
pipedrive_id: 4438645
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
BIZ_DEV_IDS = BIZ_DEV_MAPPING.keys
|
|
|
|
|
2018-06-06 16:07:29 +02:00
|
|
|
def self.full_name(administration_id)
|
2018-05-31 18:06:28 +02:00
|
|
|
id = ensure_proper_administration_id(administration_id)
|
|
|
|
|
|
|
|
BIZ_DEV_MAPPING[id][:full_name]
|
|
|
|
end
|
|
|
|
|
2018-06-06 16:07:29 +02:00
|
|
|
def self.pipedrive_id(administration_id)
|
2018-05-31 18:06:28 +02:00
|
|
|
id = ensure_proper_administration_id(administration_id)
|
|
|
|
|
|
|
|
BIZ_DEV_MAPPING[id][:pipedrive_id]
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
2018-06-06 16:07:29 +02:00
|
|
|
def self.ensure_proper_administration_id(administration_id)
|
2018-05-31 18:06:28 +02:00
|
|
|
if administration_id.in?(BIZ_DEV_IDS)
|
|
|
|
administration_id
|
|
|
|
else
|
|
|
|
BIZ_DEV_IDS[administration_id % BIZ_DEV_IDS.length]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|