lib/locklizard/publication_commands.rb
def revoke_publication_access(custid = nil)
    raise ArgumentError.new('Custid Parameter is nil. Aborting...') if custid.nil?
	# raise ArgumentError.new('Publication parameter is not an Array. Aborting') if !publication.is_a? Array
  
    # first revoke access to all the publication the user has:
	publication_ids = list_customer_publications(custid).join(",") # this returns a comma separated string
   	
	unless publication_ids.empty? # if publication_ids string "is not" empty 
      suburl = "&action=revoke_publication_access"
	  suburl << "&custid=" + custid.to_s + "&" + "publication=" + publication_ids
	  call_target_url(suburl)
    else # if publication string is empty
	  return "publication_ids_null".freeze
	end
	
  end
# Expects a customer locklicard id and an array of ids. Array can have 1 member too.

Expects a customer locklicard id and an array of ids. Array can have 1 member too.
Expects a customer locklicard id and an array of ids . Array can have 1 member too .
def revoke_publication_access(custid = nil)
    raise ArgumentError.new('Custid Parameter is nil. Aborting...') if custid.nil?
	publication_ids = list_customer_publications(custid).join(",") 
	unless publication_ids.empty? 
      suburl = "&action=revoke_publication_access"
	  suburl << "&custid=" + custid.to_s + "&" + "publication=" + publication_ids
	  call_target_url(suburl)
    else 
	  return "publication_ids_null".freeze
	end
  end
def revoke_publication_access ( custid = nil ) raise ArgumentError . new ( 'Custid Parameter is nil. Aborting...' ) if custid . nil? publication_ids = list_customer_publications ( custid ) . join ( "," ) unless publication_ids . empty? suburl = "&action=revoke_publication_access" suburl << "&custid=" + custid . to_s + "&" + "publication=" + publication_ids call_target_url ( suburl ) else return "publication_ids_null" . freeze end end
Expects a customer locklicard id and an array of ids.
Expects a customer locklicard id and an array of ids .
# raise ArgumentError.new('Publication parameter is not an Array. Aborting') if !publication.is_a? Array
 # first revoke access to all the publication the user has:
 # this returns a comma separated string
 # if publication_ids string "is not" empty 
 # if publication string is empty

custid