Class: Unitpost::Resources::ApiKeys

Inherits:
Base
  • Object
show all
Defined in:
lib/unitpost/resources.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Unitpost::Resources::Base

Instance Method Details

#create(body) ⇒ Object



420
421
422
# File 'lib/unitpost/resources.rb', line 420

def create(body)
  @http.request("POST", "/api-keys", body: body)
end

#delete(id) ⇒ Object



424
425
426
# File 'lib/unitpost/resources.rb', line 424

def delete(id)
  @http.request("DELETE", "/api-keys/#{enc(id)}")
end

#list(limit: nil, after: nil, before: nil) ⇒ Object



412
413
414
# File 'lib/unitpost/resources.rb', line 412

def list(limit: nil, after: nil, before: nil)
  @http.request("GET", "/api-keys", query: list_params(limit: limit, after: after, before: before))
end

#list_all(**params) ⇒ Object



416
417
418
# File 'lib/unitpost/resources.rb', line 416

def list_all(**params)
  paginate("/api-keys", params)
end