1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00
fab-manager/app/workers/stripe_worker.rb
2016-03-23 18:39:41 +01:00

18 lines
391 B
Ruby

class StripeWorker
include Sidekiq::Worker
sidekiq_options :queue => :stripe
def perform(action, *params)
send(action, *params)
end
def create_stripe_customer(user_id)
user = User.find(user_id)
customer = Stripe::Customer.create(
description: user.profile.full_name,
email: user.email
)
user.update_columns(stp_customer_id: customer.id)
end
end