Move lndhub invoice creation to service
This commit is contained in:
13
app/services/lndhub_manager/create_user_invoice.rb
Normal file
13
app/services/lndhub_manager/create_user_invoice.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
module LndhubManager
|
||||
class CreateUserInvoice < Lndhub
|
||||
def initialize(user:, payload:)
|
||||
@user = user
|
||||
@payload = payload
|
||||
end
|
||||
|
||||
def call
|
||||
authenticate @user
|
||||
addinvoice @payload
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user