Sha256: 27da1943fe6d00eff0c88dca0f0199234246d29ff92928e50a0b02225a9e0899
Contents?: true
Size: 536 Bytes
Versions: 44
Compression:
Stored size: 536 Bytes
Contents
# A subscription reaches the specified number of billing cycles and expires. module Pay module Braintree module Webhooks class SubscriptionExpired def call(event) subscription = event.subscription return if subscription.nil? pay_subscription = Pay::Subscription.find_by_processor_and_id(:braintree, subscription.id) return unless pay_subscription.present? pay_subscription.update!(ends_at: Time.current, status: :canceled) end end end end end
Version data entries
44 entries across 44 versions & 1 rubygems