class Monban::UseCase::Account::Unregister
Public Instance Methods
unregister(params)
click to toggle source
# File lib/monban/use_case/account/unregister.rb, line 20 def unregister(params) Getto::Params.new.validate(params) do |v| v.hash( account_id: v.integer{|val| param_error!(account_id: val) }, ) end or param_error!(params: params) repository.transaction do unless repository.account_exists?(account_id: params[:account_id]) error.not_found! "account_id: #{params[:account_id]}" end repository.delete_account(account_id: params[:account_id]) end nil end