Class: DoorLoop::Vendors
- Inherits:
-
Object
- Object
- DoorLoop::Vendors
- Defined in:
- lib/doorloop/vendors.rb
Instance Method Summary collapse
- #create(params) ⇒ Object
- #delete(id) ⇒ Object
- #find(id) ⇒ Object
-
#initialize(client) ⇒ Vendors
constructor
A new instance of Vendors.
- #list(options = {}) ⇒ Object
- #update(id, params) ⇒ Object
Constructor Details
#initialize(client) ⇒ Vendors
Returns a new instance of Vendors.
5 6 7 |
# File 'lib/doorloop/vendors.rb', line 5 def initialize(client) @client = client end |
Instance Method Details
#create(params) ⇒ Object
13 14 15 |
# File 'lib/doorloop/vendors.rb', line 13 def create(params) @client.post('vendors', params) end |
#delete(id) ⇒ Object
25 26 27 |
# File 'lib/doorloop/vendors.rb', line 25 def delete(id) @client.delete("vendors/#{id}") end |
#find(id) ⇒ Object
17 18 19 |
# File 'lib/doorloop/vendors.rb', line 17 def find(id) @client.get("vendors/#{id}") end |
#list(options = {}) ⇒ Object
9 10 11 |
# File 'lib/doorloop/vendors.rb', line 9 def list( = {}) @client.get('vendors', ) end |
#update(id, params) ⇒ Object
21 22 23 |
# File 'lib/doorloop/vendors.rb', line 21 def update(id, params) @client.put("vendors/#{id}", params) end |