Sha256: b36cf2c839fce1b07a4ecda13cb9823466960a14e990e79bfb968c0f74cfbade

Contents?: true

Size: 548 Bytes

Versions: 13

Compression:

Stored size: 548 Bytes

Contents

# frozen_string_literal: true
module FinApps
  module REST
    class Sessions < FinAppsCore::REST::Resources # :nodoc:
      # @param [Hash] params
      # @return [Array<String>]
      def create(params, path=nil)
        raise FinAppsCore::InvalidArgumentsError.new 'Invalid argument: params.' unless validates params
        path ||= 'login'

        super params, path
      end

      private

      def validates(params)
        params.key?(:email) && params[:email] && params.key?(:password) && params[:password]
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
finapps-2.2.22 lib/finapps/rest/sessions.rb
finapps-2.2.21 lib/finapps/rest/sessions.rb
finapps-2.2.20 lib/finapps/rest/sessions.rb
finapps-2.2.19 lib/finapps/rest/sessions.rb
finapps-2.2.18 lib/finapps/rest/sessions.rb
finapps-2.2.17 lib/finapps/rest/sessions.rb
finapps-2.2.16 lib/finapps/rest/sessions.rb
finapps-2.2.15 lib/finapps/rest/sessions.rb
finapps-2.2.14 lib/finapps/rest/sessions.rb
finapps-2.2.13 lib/finapps/rest/sessions.rb
finapps-2.2.12 lib/finapps/rest/sessions.rb
finapps-2.2.11 lib/finapps/rest/sessions.rb
finapps-2.2.10 lib/finapps/rest/sessions.rb