# frozen_string_literal: true module FinApps module REST class Sessions < FinAppsCore::REST::Resources # :nodoc: using ObjectExtensions using StringExtensions # @param [Hash] params # @return [Array] def create(params) raise FinAppsCore::InvalidArgumentsError.new 'Invalid argument: params.' unless validates params super params, 'login' end private def validates(params) params.key?(:email) && params[:email].present? && params.key?(:password) && params[:password].present? end end end end