Class: Convoy::ApiKey

Instance Attribute Summary

Attributes inherited from ApiResource

#response

Instance Method Summary collapse

Methods included from Convoy::ApiOperations::Create

create

Methods included from Convoy::ApiOperations::List

included, #list

Methods included from Convoy::ApiOperations::Delete

#delete, included

Methods included from Convoy::ApiOperations::Save

included, #save, #update

Methods included from Convoy::ApiOperations::Get

#get, included

Methods inherited from ApiResource

#project_base_uri

Methods included from Convoy::ApiOperations::Request

#send_request

Constructor Details

#initialize(id = nil, config = Convoy.config, **kwargs) ⇒ ApiKey

Returns a new instance of ApiKey.



9
10
11
12
13
14
# File 'lib/convoy/resources/api_key.rb', line 9

def initialize(id = nil, config = Convoy.config, **kwargs)
  @id = id
  @config = config

  super(**kwargs)
end

Instance Method Details

#resource_uriObject



16
17
18
19
20
21
22
# File 'lib/convoy/resources/api_key.rb', line 16

def resource_uri
  if @id.nil?
    return "#{project_base_uri}/security/keys"
  end

  "#{project_base_uri}/security/keys/#{@id}"
end