Sha256: a94d3da824cd7f25ce07a4dcf9aa65dcf187d0d088b2712f45b870aa648f66fb
Contents?: true
Size: 544 Bytes
Versions: 61
Compression:
Stored size: 544 Bytes
Contents
module CatarsePagarme class CreditCardDelegator attr_accessor :credit_card, :subscription def initialize(credit_card) configure_pagarme self.credit_card = credit_card end def cancel_subscription get_subscription self.subscription.cancel end def get_subscription self.subscription ||= ::PagarMe::Subscription.find_by_id(self.credit_card.subscription_id) end protected def configure_pagarme ::PagarMe.api_key = CatarsePagarme.configuration.api_key end end end
Version data entries
61 entries across 61 versions & 1 rubygems