Mutualize a call Pipedrive::API.put
This commit is contained in:
parent
e31b839e0c
commit
4ff07f2b93
3 changed files with 4 additions and 4 deletions
|
@ -18,6 +18,6 @@ class Pipedrive::API
|
|||
private
|
||||
|
||||
def self.put(url, params)
|
||||
RestClient.put(url, params, { content_type: :json })
|
||||
RestClient.put(url, params.to_json, { content_type: :json })
|
||||
end
|
||||
end
|
||||
|
|
|
@ -22,7 +22,7 @@ class Pipedrive::DealAdapter
|
|||
lost_reason: PIPEDRIVE_LOST_REASON
|
||||
}
|
||||
|
||||
Pipedrive::API.put_deal(deal_id, params.to_json)
|
||||
Pipedrive::API.put_deal(deal_id, params)
|
||||
end
|
||||
|
||||
def self.fetch_waiting_deal_ids(person_id)
|
||||
|
@ -44,6 +44,6 @@ class Pipedrive::DealAdapter
|
|||
def self.update_deal_owner_and_stage(deal_id, owner_id, stage_id)
|
||||
params = { user_id: owner_id, stage_id: stage_id }
|
||||
|
||||
Pipedrive::API.put_deal(deal_id, params.to_json)
|
||||
Pipedrive::API.put_deal(deal_id, params)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -27,6 +27,6 @@ class Pipedrive::PersonAdapter
|
|||
def self.update_person_owner(person_id, owner_id)
|
||||
params = { owner_id: owner_id }
|
||||
|
||||
Pipedrive::API.put_person(person_id, params.to_json)
|
||||
Pipedrive::API.put_person(person_id, params)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue