class Levelup::Endpoints::QrCodes
The endpoint holding all functions related to managing users' QR codes.
Attributes
color[RW]
tip_amount[RW]
tip_percent[RW]
Public Class Methods
new(options = {})
click to toggle source
# 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
Public Instance Methods
get(user_access_token)
click to toggle source
Retrieves the specified user's QR code using parameters specified in the endpoint.
# 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
Private Instance Methods
path()
click to toggle source
# File lib/levelup/endpoints/qr_codes.rb, line 21 def path "qr_codes?preferences[color]=#{color}&preferences[tip_amount]="\ "#{tip_amount}&preferences[tip_percent]=#{tip_percent}" end