Class: EasyLabs::Resources::Orders
- Defined in:
- lib/easylabs/resources/orders.rb
Instance Method Summary collapse
- #list(limit: nil, offset: nil, ids: nil) ⇒ Object
- #retrieve(id) ⇒ Object
-
#update_tags(id, tags:) ⇒ Object
PATCH /orders/:id with ‘{ tags }` body.
Methods inherited from Base
Constructor Details
This class inherits a constructor from EasyLabs::Resources::Base
Instance Method Details
#list(limit: nil, offset: nil, ids: nil) ⇒ Object
8 9 10 |
# File 'lib/easylabs/resources/orders.rb', line 8 def list(limit: nil, offset: nil, ids: nil) request(:get, "/orders", query: pagination_query(limit: limit, offset: offset, ids: ids)) end |
#retrieve(id) ⇒ Object
12 13 14 |
# File 'lib/easylabs/resources/orders.rb', line 12 def retrieve(id) request(:get, "/orders/#{id}") end |
#update_tags(id, tags:) ⇒ Object
PATCH /orders/:id with ‘{ tags }` body. The legacy /orders/:id/tags suffix the older JS SDK used returns 404 on the current API — the suffix has been dropped here.
19 20 21 |
# File 'lib/easylabs/resources/orders.rb', line 19 def (id, tags:) request(:patch, "/orders/#{id}", body: { tags: }) end |