def acquire(key, session, value = nil, options = {})
      custom_params = []
      custom_params << use_named_parameter('acquire', session)
      custom_params << use_named_parameter('dc', options[:dc]) if options[:dc]
      custom_params << use_named_parameter('flags', options[:flags]) if options && options[:flags]
      data = value unless value.nil?
      raw = send_put_request(@conn, ["/v1/kv/#{key}"], options, data, custom_params)
      raw.body.chomp == 'true'
    end
def acquire(key, session, value = nil, options = {})
      custom_params = []
      custom_params << use_named_parameter('acquire', session)
      custom_params << use_named_parameter('dc', options[:dc]) if options[:dc]
      custom_params << use_named_parameter('flags', options[:flags]) if options && options[:flags]
      data = value unless value.nil?
      raw = send_put_request(@conn, ["/v1/kv/#{key}"], options, data, custom_params)
      raw.body.chomp == 'true'
    end
Acquire a lock
 @param key [String] the key
 @param session [String] the session, generated from Diplomat::Session.create
 @param value [String] the value for the key
 @param options [Hash] options parameter hash
 @return [Boolean] If the lock was acquired