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'.freeze
FIND_ORDER_DATE_TYPE_NAME =
'/orders/dates/types/{typeId}/names/{lang}'.freeze
LIST_ORDER_DATES =
'/orders/{orderId}/dates'.freeze
FIND_ORDER_DATE =
'/orders/{orderId}/dates/{typeId}'.freeze

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



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

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



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

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



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

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



13
14
15
# File 'lib/plenty_client/order/date.rb', line 13

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