Class: ChipRails::Client

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

Class Method Summary collapse

Class Method Details

.create(client_details) ⇒ Object



142
143
144
# File 'lib/chip_rails.rb', line 142

def self.create(client_details)
  ChipRails.make_request(:post, 'clients/', body: client_details)
end

.find_by_email(params) ⇒ Object



138
139
140
# File 'lib/chip_rails.rb', line 138

def self.find_by_email(params)
  ChipRails.make_request(:get, "clients/?q=#{params}")
end

.listObject



130
131
132
# File 'lib/chip_rails.rb', line 130

def self.list
  ChipRails.make_request(:get, 'clients/')
end

.list_find(params) ⇒ Object



134
135
136
# File 'lib/chip_rails.rb', line 134

def self.list_find(params)
  ChipRails.make_request(:get, "clients/?q=#{params}")
end

.retrieve(client_id) ⇒ Object



146
147
148
# File 'lib/chip_rails.rb', line 146

def self.retrieve(client_id)
  ChipRails.make_request(:get, "clients/#{client_id}/")
end