houdini/lib/update/update_billing_subscriptions.rb
2019-08-02 19:07:29 +02:00

13 lines
347 B
Ruby

# frozen_string_literal: true
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
module UpdateBillingSubscriptions
def self.activate_from_trial(np_id)
Qx.update(:billing_subscriptions)
.set(status: 'active')
.timestamps
.where('nonprofit_id=$id', id: np_id)
.execute
end
end