1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-10 21:24:20 +01:00
fab-manager/app/workers/stripe_worker.rb

18 lines
391 B
Ruby
Raw Normal View History

2016-03-23 18:39:41 +01:00
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