Class: Cloverrb::Address

Inherits:
Client
  • Object
show all
Defined in:
lib/cloverrb/address.rb

Constant Summary

Constants inherited from Client

Client::AUTH_URL, Client::BASE_URL

Instance Method Summary collapse

Methods inherited from Client

generate_access_token, #get, #post, #put

Constructor Details

#initialize(token, merchant_code) ⇒ Address

Returns a new instance of Address.



3
4
5
6
# File 'lib/cloverrb/address.rb', line 3

def initialize(token, merchant_code)
  @token = token
  @merchant_code = merchant_code
end

Instance Method Details

#fetchObject



8
9
10
11
# File 'lib/cloverrb/address.rb', line 8

def fetch
  url = "/merchants/#{@merchant_code}/address"
  get(@token, url)
end