Class: Levelup::Endpoints::MerchantOrders

Inherits:
Base
  • Object
show all
Defined in:
lib/levelup/endpoints/merchant_orders.rb

Overview

The endpoint holding all functions relating to a single merchant’s orders. This is a v14 endpoint and should not be expected to remain functional indefinitely.

Instance Method Summary collapse

Constructor Details

#initialize(merchant_id) ⇒ MerchantOrders

Returns a new instance of MerchantOrders.



7
8
9
# File 'lib/levelup/endpoints/merchant_orders.rb', line 7

def initialize(merchant_id)
  @id = merchant_id
end

Instance Method Details

#details(uuid, merchant_access_token) ⇒ Object

Provides merchant-facing details about a specific order. For more information about the parameters, see OrderDetailsRequest.



13
14
15
16
17
# File 'lib/levelup/endpoints/merchant_orders.rb', line 13

def details(uuid, merchant_access_token)
  request = Requests::CreateOrderDetails.new(
    merchant_access_token: merchant_access_token)
  request.send_to_api(:get, endpoint_path(:v14) + "/#{uuid}")
end