This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://talent-hack.atlassian.net/browse/TAL-908 | |
client_email = 'brittanebates@gmail.com' | |
talent_email = 'hello@emimoves.com' | |
pass_title = 'Monthly Unlimited Virtual Classes - Reoccurring' | |
# References involved | |
client_user = User.find_by(email: client_email) | |
talent_user = User.find_by(email: talent_email) | |
pass = Pass.find_by(user_id: talent_user.id, title: pass_title) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def remove_class(class_id, remove) | |
klass = TalentClass.find(class_id) | |
amount_class_customers_removed = 0 | |
if klass | |
zoon_meeting = ZoomMeeting.find_by(talent_class_id: class_id) | |
if remove | |
ActiveRecord::Base.transaction do | |
zoon_meeting.delete if zoon_meeting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def free_pack_access(pack_id, users_emails, finish_date=nil) | |
pack = Pack.find(pack_id) | |
users_emails.each do |email| | |
current_user = User.find_by(email: email) | |
ActiveRecord::Base.transaction do | |
order = Order.create!( | |
user_id: current_user.id, | |
date: Time.now, | |
status: 'success', |
NewerOlder