class Eligible::PublicKey
Public Class Methods
activate(params, api_key = nil)
click to toggle source
# File lib/eligible/public_key.rb, line 13 def self.activate(params, api_key = nil) key_id = Util.value(params, :key_id) send_request(:get, "/public_keys/#{key_id}/activate.json", api_key, params, :key_id) end
all(params, api_key = nil)
click to toggle source
# File lib/eligible/public_key.rb, line 18 def self.all(params, api_key = nil) send_request(:get, api_url('public_keys'), api_key, params) end
create_pair()
click to toggle source
# File lib/eligible/public_key.rb, line 22 def self.create_pair rsa_key = OpenSSL::PKey::RSA.new(4096) [ rsa_key.to_pem, rsa_key.public_key.to_pem ] end
get(params, api_key = nil)
click to toggle source
# File lib/eligible/public_key.rb, line 5 def self.get(params, api_key = nil) send_request(:get, api_url('public_keys', params, :key_id), api_key, params, :key_id) end
post(params, api_key = nil)
click to toggle source
# File lib/eligible/public_key.rb, line 9 def self.post(params, api_key = nil) send_request(:post, api_url('public_keys'), api_key, params) end