Class: ChipRails::Client
- Inherits:
-
Object
- Object
- ChipRails::Client
- Defined in:
- lib/chip_rails.rb
Class Method Summary collapse
- .create(client_details) ⇒ Object
- .find_by_email(params) ⇒ Object
- .list ⇒ Object
- .list_find(params) ⇒ Object
- .retrieve(client_id) ⇒ Object
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 |
.list ⇒ Object
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 |