Sha256: d51f48cdf4bd6a7a553ee543a8bc0f564b934608ed57e0d5756782d3abfc0863
Contents?: true
Size: 481 Bytes
Versions: 8
Compression:
Stored size: 481 Bytes
Contents
module Zoop class PaymentMethodCommon < Model def create return super if self.token.present? token = Zoop::Token.create(to_hash) token.payment_method.token = token.id token.payment_method end def associate(customer_id) raise RequestError.new('Invalid Token ID') unless token.present? self.class.associate(customer: customer_id.to_s, token: token.to_s) end class << self alias :associate :create end end end
Version data entries
8 entries across 8 versions & 1 rubygems