Class: Moip2::KeysApi

Inherits:
Object
  • Object
show all
Defined in:
lib/moip2/keys_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ KeysApi

Returns a new instance of KeysApi.



5
6
7
# File 'lib/moip2/keys_api.rb', line 5

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



3
4
5
# File 'lib/moip2/keys_api.rb', line 3

def client
  @client
end

Instance Method Details

#base_pathObject



9
10
11
# File 'lib/moip2/keys_api.rb', line 9

def base_path
  "/v2/keys"
end

#showObject



13
14
15
# File 'lib/moip2/keys_api.rb', line 13

def show
  Resource::Keys.new client, client.get("#{base_path}")
end