Module: Pipedrive::Merge

Included in:
Deal, Organization, Person
Defined in:
lib/pipedrive/merge.rb

Instance Method Summary collapse

Instance Method Details

#merge(with_id:) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/pipedrive/merge.rb', line 5

def merge(with_id:)
  raise "with_id must be an integer" unless with_id&.is_a?(Integer)

  response = request(:put,
                     "#{resource_url}/merge",
                     merge_with_id: with_id)
  self.class.new(response.dig(:data))
end