class Levelup::Endpoints::MerchantLocations
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.
Attributes
id[RW]
Public Class Methods
new(merchant_id)
click to toggle source
# File lib/levelup/endpoints/merchant_locations.rb, line 6 def initialize(merchant_id) @id = merchant_id end
Public Instance Methods
list(merchant_access_token)
click to toggle source
Provides a list of locations controlled by this merchant. This list is not paginated.
@param merchant_access_token [string] An access token for a user that manages this location.
# File lib/levelup/endpoints/merchant_locations.rb, line 13 def list(merchant_access_token) Requests::ListLocations.new(merchant_access_token: merchant_access_token). send_to_api(:get, endpoint_path(:v14)) end
Private Instance Methods
path()
click to toggle source
# File lib/levelup/endpoints/merchant_locations.rb, line 22 def path "merchants/#{id}/locations" end