Class: Levelup::Endpoints::QrCodes

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

Overview

The endpoint holding all functions related to managing users' QR codes.

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ QrCodes

Returns a new instance of QrCodes



5
6
7
8
9
# File 'lib/levelup/endpoints/qr_codes.rb', line 5

def initialize(options = {})
  self.color = options[:color] || 0
  self.tip_amount = options[:tip_amount] || 0
  self.tip_percent = options[:tip_percent] || 0
end

Instance Method Details

#get(user_access_token) ⇒ Object

Retrieves the specified user's QR code using parameters specified in the endpoint.



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

def get(user_access_token)
  Requests::GetQrCode.new(user_access_token: user_access_token).
    send_to_api(:get, endpoint_path)
end