Sha256: d2c47322ab0ee8ef0d622ac701f7ad292e0480d3f45b04b749304260340e6779

Contents?: true

Size: 375 Bytes

Versions: 6

Compression:

Stored size: 375 Bytes

Contents

# frozen_string_literal: true

module Pipedrive
  module Operations
    module Update
      extend ActiveSupport::Concern

      def update(*args)
        params = args.extract_options!
        params.symbolize_keys!
        id = params.delete(:id) || args[0]
        raise 'id must be provided' unless id

        make_api_call(:put, id, params)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
pipedrive_api_rb-1.0.5 lib/pipedrive/operations/update.rb
pipedrive_api_rb-1.0.4 lib/pipedrive/operations/update.rb
pipedrive_api_rb-1.0.2 lib/pipedrive/operations/update.rb
pipedrive_api_rb-1.0.1 lib/pipedrive/operations/update.rb
pipedrive_api_rb-1.0.0 lib/pipedrive/operations/update.rb
pipedrive.rb-0.3.0 lib/pipedrive/operations/update.rb