Use better names for PipedriveService methods
This commit is contained in:
parent
71e9a6056d
commit
4c24c8346a
3 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
class PipedriveAcceptsDealsJob < ApplicationJob
|
||||
def perform(person_id, owner_id, stage_id)
|
||||
PipedriveService.accept_deals_from_person(person_id, owner_id, stage_id)
|
||||
PipedriveService.accept_demande_from_person(person_id, owner_id, stage_id)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
class PipedriveRefusesDealsJob < ApplicationJob
|
||||
def perform(person_id, owner_id)
|
||||
PipedriveService.refuse_deals_from_person(person_id, owner_id)
|
||||
PipedriveService.refuse_demande_from_person(person_id, owner_id)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
class PipedriveService
|
||||
def self.accept_deals_from_person(person_id, owner_id, stage_id)
|
||||
def self.accept_demande_from_person(person_id, owner_id, stage_id)
|
||||
waiting_deal_ids = Pipedrive::DealAdapter.fetch_waiting_deal_ids(person_id)
|
||||
waiting_deal_ids.each { |deal_id| Pipedrive::DealAdapter.update_deal_owner_and_stage(deal_id, owner_id, stage_id) }
|
||||
Pipedrive::PersonAdapter.update_person_owner(person_id, owner_id)
|
||||
end
|
||||
|
||||
def self.refuse_deals_from_person(person_id, owner_id)
|
||||
def self.refuse_demande_from_person(person_id, owner_id)
|
||||
waiting_deal_ids = Pipedrive::DealAdapter.fetch_waiting_deal_ids(person_id)
|
||||
waiting_deal_ids.each { |deal_id| Pipedrive::DealAdapter.refuse_deal(deal_id, owner_id) }
|
||||
Pipedrive::PersonAdapter.update_person_owner(person_id, owner_id)
|
||||
|
|
Loading…
Reference in a new issue