Class: CreateWalletService

Inherits:
ApplicationService show all
Defined in:
app/services/create_wallet_service.rb

Instance Method Summary collapse

Constructor Details

#initialize(user_id) ⇒ CreateWalletService

Returns a new instance of CreateWalletService.



4
5
6
# File 'app/services/create_wallet_service.rb', line 4

def initialize(user_id)
  @user_id = user_id
end

Instance Method Details

#callObject



9
10
11
12
# File 'app/services/create_wallet_service.rb', line 9

def call
  return if wallet_exists?("user_id", user_id)
  create_wallet
end