Class: Braspag::CreditCard
- Inherits:
-
Object
- Object
- Braspag::CreditCard
- Includes:
- ActiveAttr::Model
- Defined in:
- lib/cbraspag/payment/credit_card.rb
Defined Under Namespace
Classes: ExpiratorValidator
Instance Attribute Summary collapse
-
#alias ⇒ Object
Returns the value of attribute alias.
-
#holder_name ⇒ Object
Returns the value of attribute holder_name.
-
#id ⇒ Object
Returns the value of attribute id.
-
#month ⇒ Object
Returns the value of attribute month.
-
#number ⇒ Object
Returns the value of attribute number.
-
#verification_value ⇒ Object
Returns the value of attribute verification_value.
-
#year ⇒ Object
Returns the value of attribute year.
Instance Method Summary collapse
Instance Attribute Details
#alias ⇒ Object
Returns the value of attribute alias.
148 149 150 |
# File 'lib/cbraspag/payment/credit_card.rb', line 148 def alias @alias end |
#holder_name ⇒ Object
Returns the value of attribute holder_name.
148 149 150 |
# File 'lib/cbraspag/payment/credit_card.rb', line 148 def holder_name @holder_name end |
#id ⇒ Object
Returns the value of attribute id.
148 149 150 |
# File 'lib/cbraspag/payment/credit_card.rb', line 148 def id @id end |
#month ⇒ Object
Returns the value of attribute month.
148 149 150 |
# File 'lib/cbraspag/payment/credit_card.rb', line 148 def month @month end |
#number ⇒ Object
Returns the value of attribute number.
148 149 150 |
# File 'lib/cbraspag/payment/credit_card.rb', line 148 def number @number end |
#verification_value ⇒ Object
Returns the value of attribute verification_value.
148 149 150 |
# File 'lib/cbraspag/payment/credit_card.rb', line 148 def verification_value @verification_value end |
#year ⇒ Object
Returns the value of attribute year.
148 149 150 |
# File 'lib/cbraspag/payment/credit_card.rb', line 148 def year @year end |
Instance Method Details
#convert_to(method) ⇒ Object
185 186 187 |
# File 'lib/cbraspag/payment/credit_card.rb', line 185 def convert_to(method) self.send("to_#{method}") end |
#populate!(method, response) ⇒ Object
199 200 201 |
# File 'lib/cbraspag/payment/credit_card.rb', line 199 def populate!(method, response) end |
#to_authorize ⇒ Object
189 190 191 192 193 194 195 196 197 |
# File 'lib/cbraspag/payment/credit_card.rb', line 189 def year_normalize = year.to_s[-2, 2] { :holder => self.holder_name.to_s, :card_number => self.number.to_s, :expiration => "#{self.month}/#{year_normalize}", :security_code => self.verification_value.to_s, } end |