Class Index [+]

Quicksearch

ActiveMerchant::Billing::CreditCardMethods

Convenience methods that can be included into a custom Credit Card object, such as an ActiveRecord based Credit Card object.

Constants

CARD_COMPANIES

Public Class Methods

included(base) click to toggle source
    # File lib/active_merchant/billing/credit_card_methods.rb, line 20
20:       def self.included(base)
21:         base.extend(ClassMethods)
22:       end

Public Instance Methods

valid_expiry_year?(year) click to toggle source
    # File lib/active_merchant/billing/credit_card_methods.rb, line 28
28:       def valid_expiry_year?(year)
29:         (Time.now.year..Time.now.year + 20).include?(year.to_i)
30:       end
valid_issue_number?(number) click to toggle source
    # File lib/active_merchant/billing/credit_card_methods.rb, line 36
36:       def valid_issue_number?(number)
37:         number.to_s =~ /^\d{1,2}$/
38:       end
valid_month?(month) click to toggle source
    # File lib/active_merchant/billing/credit_card_methods.rb, line 24
24:       def valid_month?(month)
25:         (1..12).include?(month.to_i)
26:       end
valid_start_year?(year) click to toggle source
    # File lib/active_merchant/billing/credit_card_methods.rb, line 32
32:       def valid_start_year?(year)
33:         year.to_s =~ /^\d{4}$/ && year.to_i > 1987
34:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.