Class: Levelup::Endpoints::MerchantLocations
- 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
-
#initialize(merchant_id) ⇒ MerchantLocations
constructor
A new instance of MerchantLocations.
-
#list(merchant_access_token) ⇒ Object
Provides a list of locations controlled by this merchant.
Constructor Details
#initialize(merchant_id) ⇒ MerchantLocations
Returns a new instance of MerchantLocations.
6 7 8 |
# File 'lib/levelup/endpoints/merchant_locations.rb', line 6 def initialize(merchant_id) @id = merchant_id end |
Instance Method Details
#list(merchant_access_token) ⇒ Object
Provides a list of locations controlled by this merchant. This list is not paginated.
13 14 15 16 |
# 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 |