Class: Levelup::Endpoints::SpecificMerchant

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

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(merchant_id) ⇒ SpecificMerchant

Returns a new instance of SpecificMerchant.



9
10
11
# File 'lib/levelup/endpoints/specific_merchant.rb', line 9

def initialize(merchant_id)
  @id = merchant_id
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

Instance Method Details

#locationsObject



13
14
15
# File 'lib/levelup/endpoints/specific_merchant.rb', line 13

def locations
  MerchantLocations.new(id)
end

#ordersObject



17
18
19
# File 'lib/levelup/endpoints/specific_merchant.rb', line 17

def orders
  MerchantOrders.new(id)
end