Module: PlentyClient::Order::CouponCode

Extended by:
Endpoint, Request
Defined in:
lib/plenty_client/order/coupon_code.rb,
lib/plenty_client/order/coupon_code/contact.rb,
lib/plenty_client/order/coupon_code/validation.rb

Defined Under Namespace

Classes: Contact, Validation

Constant Summary collapse

UPDATE_COUPON_CODE =
'/orders/{orderId}/coupons/{coupon}'.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

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



10
11
12
13
14
# File 'lib/plenty_client/order/coupon_code.rb', line 10

def update(order_id, coupon_string, headers = {}, &block)
  post(build_endpoint(UPDATE_COUPON_CODE,
                      order: order_id,
                      coupon_string: coupon_string), headers, &block)
end