Class: PlentyClient::Payment::Order
- Inherits:
-
Object
- Object
- PlentyClient::Payment::Order
- Defined in:
- lib/plenty_client/payment/order.rb
Constant Summary collapse
- LIST_ORDERS_PAYMENTS =
'/payments/orders/{orderId}'
- CREATE_PAYMENT_ORDER_RELATION =
'/payment/{paymentId}/order/{orderId}'
- DELETE_ORDERS_PAYMENT =
'/payment/{paymentId}/order'
Class Method Summary collapse
- .create(payment_id, order_id, body = {}) ⇒ Object
- .destroy(payment_id, body = {}) ⇒ Object
- .list(order_id, headers = {}, &block) ⇒ Object
Methods included from Request
Methods included from Endpoint
Class Method Details
.create(payment_id, order_id, body = {}) ⇒ Object
18 19 20 |
# File 'lib/plenty_client/payment/order.rb', line 18 def create(payment_id, order_id, body = {}) post(build_endpoint(CREATE_PAYMENT_ORDER_RELATION, payment: payment_id, order: order_id), body) end |
.destroy(payment_id, body = {}) ⇒ Object
22 23 24 |
# File 'lib/plenty_client/payment/order.rb', line 22 def destroy(payment_id, body = {}) delete(build_endpoint(DELETE_ORDERS_PAYMENT, payment: payment_id), body) end |
.list(order_id, headers = {}, &block) ⇒ Object
14 15 16 |
# File 'lib/plenty_client/payment/order.rb', line 14 def list(order_id, headers = {}, &block) get(build_endpoint(LIST_ORDERS_PAYMENTS, order: order_id), headers, &block) end |