Class: Roistat::Resources::Orders
- Defined in:
- lib/roistat/resources/orders.rb,
sig/roistat.rbs
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#add(orders) ⇒ Object
POST /project/add-orders — body is a JSON array.
-
#custom_fields(**body) ⇒ Object
POST /project/analytics/order-custom-fields.
-
#delete(order_id:) ⇒ Object
POST /project/integration/order/orderId/delete.
-
#delete_many(ids:) ⇒ Object
POST /project/integration/order/delete.
-
#external_url(order_id:) ⇒ Object
GET /project/orders/orderId/external-url.
-
#goal_update(order_id:, **body) ⇒ Object
POST /project/integration/order/orderId/goal/update.
-
#info(order_id:) ⇒ Object
GET /project/orders/orderId/info.
-
#list(**body) ⇒ Object
POST /project/integration/order/list.
-
#set_statuses(statuses) ⇒ Object
POST /project/set-statuses — body is a JSON array.
-
#status_list(**body) ⇒ Object
POST /project/integration/status/list.
-
#status_update(order_id:, status_id:) ⇒ Object
POST /project/integration/order/orderId/status/update.
-
#update(orders:) ⇒ Object
POST /project/integration/order/update.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Roistat::Resources::Base
Instance Method Details
#add(orders) ⇒ Object
POST /project/add-orders — body is a JSON array
10 11 12 |
# File 'lib/roistat/resources/orders.rb', line 10 def add(orders) client.post("project/add-orders", body: orders) end |
#custom_fields(**body) ⇒ Object
POST /project/analytics/order-custom-fields
35 36 37 |
# File 'lib/roistat/resources/orders.rb', line 35 def custom_fields(**body) post("project/analytics/order-custom-fields", body: body) end |
#delete(order_id:) ⇒ Object
POST /project/integration/order/orderId/delete
58 59 60 |
# File 'lib/roistat/resources/orders.rb', line 58 def delete(order_id:) client.post("project/integration/order/#{order_id}/delete") end |
#delete_many(ids:) ⇒ Object
POST /project/integration/order/delete
63 64 65 |
# File 'lib/roistat/resources/orders.rb', line 63 def delete_many(ids:) client.post("project/integration/order/delete", body: {ids: ids}) end |
#external_url(order_id:) ⇒ Object
GET /project/orders/orderId/external-url
20 21 22 |
# File 'lib/roistat/resources/orders.rb', line 20 def external_url(order_id:) client.get("project/orders/#{order_id}/external-url") end |
#goal_update(order_id:, **body) ⇒ Object
POST /project/integration/order/orderId/goal/update
48 49 50 |
# File 'lib/roistat/resources/orders.rb', line 48 def goal_update(order_id:, **body) client.post("project/integration/order/#{order_id}/goal/update", body: body) end |
#info(order_id:) ⇒ Object
GET /project/orders/orderId/info
15 16 17 |
# File 'lib/roistat/resources/orders.rb', line 15 def info(order_id:) client.get("project/orders/#{order_id}/info") end |
#list(**body) ⇒ Object
POST /project/integration/order/list
5 6 7 |
# File 'lib/roistat/resources/orders.rb', line 5 def list(**body) post("project/integration/order/list", body: body) end |
#set_statuses(statuses) ⇒ Object
POST /project/set-statuses — body is a JSON array
30 31 32 |
# File 'lib/roistat/resources/orders.rb', line 30 def set_statuses(statuses) client.post("project/set-statuses", body: statuses) end |
#status_list(**body) ⇒ Object
POST /project/integration/status/list
25 26 27 |
# File 'lib/roistat/resources/orders.rb', line 25 def status_list(**body) post("project/integration/status/list", body: body) end |
#status_update(order_id:, status_id:) ⇒ Object
POST /project/integration/order/orderId/status/update
40 41 42 43 44 45 |
# File 'lib/roistat/resources/orders.rb', line 40 def status_update(order_id:, status_id:) client.post( "project/integration/order/#{order_id}/status/update", body: {status_id: status_id} ) end |
#update(orders:) ⇒ Object
POST /project/integration/order/update
53 54 55 |
# File 'lib/roistat/resources/orders.rb', line 53 def update(orders:) client.post("project/integration/order/update", body: {orders: orders}) end |