Class: PlentyClient::Order::Shipping::Information

Inherits:
Object
  • Object
show all
Includes:
Endpoint, Request
Defined in:
lib/plenty_client/order/shipping/information.rb

Constant Summary collapse

SINGLE_PATH =
'/orders/{orderId}/shipping/shipping_information'
MULTIPLE_PATH =
'/orders/shipping/shipping_information'
UPDATE_STATUS =
SINGLE_PATH + '/status'
UPDATE_ADDITIONAL_DATA =
SINGLE_PATH + '/additional_data'

Class Method Summary collapse

Methods included from Request

included

Methods included from Endpoint

included

Class Method Details

.create(body = {}) ⇒ Object



21
22
23
# File 'lib/plenty_client/order/shipping/information.rb', line 21

def create(body = {})
  post(MULTIPLE_PATH, body)
end

.destroy(order_id, body = {}) ⇒ Object



33
34
35
# File 'lib/plenty_client/order/shipping/information.rb', line 33

def destroy(order_id, body = {})
  delete(build_endpoint(SINGLE_PATH, order: order_id), body)
end

.list(order_id, headers = {}, &block) ⇒ Object



17
18
19
# File 'lib/plenty_client/order/shipping/information.rb', line 17

def list(order_id, headers = {}, &block)
  get(build_endpoint(SINGLE_PATH, order: order_id), headers, &block)
end

.update_data(order_id, body = {}) ⇒ Object



29
30
31
# File 'lib/plenty_client/order/shipping/information.rb', line 29

def update_data(order_id, body = {})
  put(build_endpoint(UPDATE_ADDITIONAL_DATA, order: order_id), body)
end

.update_status(order_id, body = {}) ⇒ Object



25
26
27
# File 'lib/plenty_client/order/shipping/information.rb', line 25

def update_status(order_id, body = {})
  put(build_endpoint(UPDATE_STATUS, order: order_id), body)
end