Skip to content

Commit

Permalink
payment_method should allow for credit cards expiring this year
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoline committed Jun 20, 2012
1 parent bd97d1e commit d20546a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/zuora/objects/payment_method.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class PaymentMethod < Base
validates_length_of :credit_card_postal_code, :maximum => 20, :if => :card?
validates_length_of :credit_card_country, :maximum => 40, :allow_nil => true, :if => :card?
validates_numericality_of :credit_card_expiration_month, :integer_only => true, :within => 1..12, :if => :card?
validates_numericality_of :credit_card_expiration_year, :integer_only => true, :greater_than => lambda{|e| Date.today.year }, :if => :card?
validates_numericality_of :credit_card_expiration_year, :integer_only => true, :greater_than => lambda{|e| (Date.today - 1.year).year }, :if => :card?
validates_length_of :credit_card_holder_name, :maximum => 50, :if => :card?
validates_length_of :credit_card_number, :maximum => 16, :if => :card?
validates_inclusion_of :credit_card_type, :in => %w(AmericanExpress Discover MasterCard Visa), :if => :card?
Expand Down

0 comments on commit d20546a

Please sign in to comment.