Class: Levelup::Endpoints::MerchantLocations

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

Overview

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

Instance Method Summary collapse

Constructor Details

#initialize(merchant_id) ⇒ MerchantLocations

Returns a new instance of MerchantLocations.



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

def initialize(merchant_id)
  @id = merchant_id
end

Instance Method Details

#list(merchant_auth_token) ⇒ Object

Provides a list of locations controlled by this merchant. This list is not paginated.

merchant_auth_token

An authorization token with permission to view this merchant.



17
18
19
20
21
# File 'lib/levelup/endpoints/merchant_locations.rb', line 17

def list(merchant_auth_token)
  request = Requests::ListLocations.new(
    merchant_access_token: merchant_auth_token)
  request.send_to_api(:get, endpoint_path(:v14))
end