Sha256: b522b968750f66f19c354a79756c5dbe77c65ac595ab36d6cc936c250322b397
Contents?: true
Size: 442 Bytes
Versions: 5
Compression:
Stored size: 442 Bytes
Contents
class StripeModelCallbacks::Plan::UpdatedService < StripeModelCallbacks::BaseEventService def perform plan = StripePlan.find_or_initialize_by(stripe_id: object.id) plan.assign_from_stripe(object) plan.deleted_at ||= Time.zone.now if event.type == "plan.deleted" if plan.save plan.create_activity :deleted if event.type == "plan.deleted" succeed! else fail! plan.errors.full_messages end end end
Version data entries
5 entries across 5 versions & 1 rubygems