lib/pay/billable.rb in pay-2.2.2 vs lib/pay/billable.rb in pay-2.3.0

- old
+ new

@@ -17,10 +17,11 @@ included do |base| include Pay::Billable::SyncEmail include Pay::Stripe::Billable if defined? ::Stripe include Pay::Braintree::Billable if defined? ::Braintree + include Pay::Paddle::Billable if defined? ::PaddlePay has_many :charges, class_name: Pay.chargeable_class, foreign_key: :owner_id, inverse_of: :owner, as: :owner has_many :subscriptions, class_name: Pay.subscription_class, foreign_key: :owner_id, inverse_of: :owner, as: :owner attribute :plan, :string @@ -114,9 +115,13 @@ processor == "braintree" end def paypal? braintree? && card_type == "PayPal" + end + + def paddle? + processor == "paddle" end def has_incomplete_payment?(name: "default") subscription(name: name)&.has_incomplete_payment? end