Module: PlentyClient::Order
- Extended by:
- Endpoint, Request
- Defined in:
- lib/plenty_client.rb,
lib/plenty_client/order.rb,
lib/plenty_client/order/date.rb,
lib/plenty_client/order/item.rb,
lib/plenty_client/order/currency.rb,
lib/plenty_client/order/property.rb,
lib/plenty_client/order/referrer.rb,
lib/plenty_client/order/shipping.rb,
lib/plenty_client/order/item/date.rb,
lib/plenty_client/order/coupon_code.rb,
lib/plenty_client/order/contact_wish.rb,
lib/plenty_client/order/item/property.rb,
lib/plenty_client/order/shipping/country.rb,
lib/plenty_client/order/shipping/package.rb,
lib/plenty_client/order/shipping/profile.rb,
lib/plenty_client/order/item/serial_number.rb,
lib/plenty_client/order/coupon_code/contact.rb,
lib/plenty_client/order/shipping/information.rb,
lib/plenty_client/order/coupon_code/validation.rb,
lib/plenty_client/order/shipping/service_provider.rb
Defined Under Namespace
Modules: ContactWish, CouponCode, Item, Shipping
Classes: Currency, Date, Property, Referrer
Constant Summary
collapse
- CREATE_ORDER =
'/orders'.freeze
- LIST_ORDERS =
'/orders'.freeze
- FIND_ORDER =
'/orders/{orderId}'.freeze
- LIST_CONTACTS_ORDERS =
'/orders/contacts/{contactId}'.freeze
- UPDATE_ORDER =
'/orders/{orderId}'.freeze
- LIST_ORDERS_PACKAGE_NUMBERS =
'/orders/{orderId}/packagenumbers'.freeze
- DELETE_ORDER =
'/orders/{orderId}'.freeze
Class Method Summary
collapse
Methods included from Endpoint
build_endpoint, routes
Methods included from Request
delete, get, patch, post, put, request
Class Method Details
.create(body = {}) ⇒ Object
15
16
17
|
# File 'lib/plenty_client/order.rb', line 15
def create(body = {})
post(build_endpoint(CREATE_ORDER), body)
end
|
.delete(order_id, body = {}) ⇒ Object
38
39
40
|
# File 'lib/plenty_client/order.rb', line 38
def delete(order_id, body = {})
delete(build_endpoint(DELETE_ORDER, order: order_id), body)
end
|
.find(order_id = nil, headers = {}, &block) ⇒ Object
30
31
32
|
# File 'lib/plenty_client/order.rb', line 30
def find(order_id = nil, = {}, &block)
get(build_endpoint(FIND_ORDER, order: order_id), , &block)
end
|
.list(headers = {}, &block) ⇒ Object
19
20
21
|
# File 'lib/plenty_client/order.rb', line 19
def list( = {}, &block)
get(build_endpoint(LIST_ORDERS), , &block)
end
|
23
24
25
|
# File 'lib/plenty_client/order.rb', line 23
def list_contacts_orders(contact_id, = {}, &block)
get(build_endpoint(LIST_CONTACTS_ORDERS, contact: contact_id), , &block)
end
|
.update(order_id, body = {}) ⇒ Object
34
35
36
|
# File 'lib/plenty_client/order.rb', line 34
def update(order_id, body = {})
put(build_endpoint(UPDATE_ORDER, order: order_id), body)
end
|