Class: PlentyClient::Order::Date

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

Constant Summary collapse

LIST_ORDER_DATE_TYPE_NAMES =
'/orders/dates/types/{typeId}/names'
FIND_ORDER_DATE_TYPE_NAME =
'/orders/dates/types/{typeId}/names/{lang}'
LIST_ORDER_DATES =
'/orders/{orderId}/dates'
FIND_ORDER_DATE =
'/orders/{orderId}/dates/{typeId}'

Class Method Summary collapse

Methods included from Request

included

Methods included from Endpoint

included

Class Method Details

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



27
28
29
# File 'lib/plenty_client/order/date.rb', line 27

def find(order_id, type_id, headers = {}, &block)
  get(build_endpoint(FIND_ORDER_DATE, order: order_id, type: type_id), headers, &block)
end

.find_date_type_name(type_id, lang, headers = {}, &block) ⇒ Object



19
20
21
# File 'lib/plenty_client/order/date.rb', line 19

def find_date_type_name(type_id, lang, headers = {}, &block)
  get(build_endpoint(FIND_ORDER_DATE_TYPE_NAME, type: type_id, lang: lang), headers, &block)
end

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



23
24
25
# File 'lib/plenty_client/order/date.rb', line 23

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

.list_date_type_names(type_id, headers = {}, &block) ⇒ Object



15
16
17
# File 'lib/plenty_client/order/date.rb', line 15

def list_date_type_names(type_id, headers = {}, &block)
  get(build_endpoint(LIST_ORDER_DATE_TYPE_NAMES, type: type_id), headers, &block)
end