class Levelup::Endpoints::SpecificOrder

Endpoint holding all functions relating to a specified order.

Attributes

uuid[RW]

Public Class Methods

new(order_uuid) click to toggle source
# File lib/levelup/endpoints/specific_order.rb, line 5
def initialize(order_uuid)
  self.uuid = order_uuid
end

Public Instance Methods

refund(merchant_access_token) click to toggle source

Refunds the order specified by this endpoint. @param merchant_access_token [string] An access token for a user that manages this location.

# File lib/levelup/endpoints/specific_order.rb, line 11
def refund(merchant_access_token)
  Requests::RefundOrder.new(merchant_access_token: merchant_access_token).
    send_to_api(:post, endpoint_path + '/refund')
end

Private Instance Methods

path() click to toggle source
# File lib/levelup/endpoints/specific_order.rb, line 20
def path
  "orders/#{uuid}"
end