Files
x-stake/app/services/auth/profile.rb
2021-08-04 18:49:11 -03:00

16 lines
289 B
Ruby

# frozen_string_literal: true
module Auth
class Profile
attr_reader :id, :email
def initialize(attributes)
@id = attributes[:sub]
@email = attributes[:email]
end
def customer
@customer ||= Customer.find_by(email: email, auth_id: id)
end
end
end