Class: PlentyClient::Order::Referrer

Inherits:
Object
  • Object
show all
Extended by:
Endpoint, Request
Defined in:
lib/plenty_client/order/referrer.rb

Constant Summary collapse

LIST_REFERRERS =
'/orders/referrers'.freeze
CREATE_ORDER_REFERRER =
'/orders/referrers/{parentReferrerId}'.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(parent_referrer_id, body = {}) ⇒ Object



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

def create(parent_referrer_id, body = {})
  post(build_endpoint(CREATE_ORDER_REFERRER, parent_referrer: parent_referrer_id), body)
end

.list(headers = {}) ⇒ Object



11
12
13
# File 'lib/plenty_client/order/referrer.rb', line 11

def list(headers = {})
  get(build_endpoint(LIST_REFERRERS), headers)
end