Sha256: 5e98665195cd2c2403e7c8a9c02812db5c4bb41257913da84755c6c56bd07c1a
Contents?: true
Size: 691 Bytes
Versions: 13
Compression:
Stored size: 691 Bytes
Contents
# frozen_string_literal: true module FinApps module REST class OperatorsPasswordResets < FinAppsCore::REST::Resources def create(params, path=nil) not_blank(params, :params) validates_email(params) if path.nil? path ||= 'operators/password/forgot' super params, path end def update(params) not_blank(params, :params) path = 'operators/password/reset' create params, path end private def validates_email(params) unless params.key?(:email) && params[:email] raise FinAppsCore::InvalidArgumentsError.new 'Invalid argument: params.' end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems