Class: RSperantito::Client

Inherits:
Base
  • Object
show all
Defined in:
lib/rsperantito/client.rb

Class Method Summary collapse

Class Method Details

.create(**params) ⇒ Object



16
17
18
19
20
21
# File 'lib/rsperantito/client.rb', line 16

def self.create(**params)
  url = 'clients'

  response = RSperantito.post(url, params)
  response['client']
end

.find(id) ⇒ Object



4
5
6
# File 'lib/rsperantito/client.rb', line 4

def self.find(id)
  super(id, 'client')
end

.list(page = 1, **options) ⇒ Object



8
9
10
# File 'lib/rsperantito/client.rb', line 8

def self.list(page=1, **options)
  super(page, 'client', options)
end

.search(q, page = 1) ⇒ Object



12
13
14
# File 'lib/rsperantito/client.rb', line 12

def self.search(q, page=1)
  super(q, 'client', page)
end