Class: PrismPay::CreditCard
- Inherits:
-
Object
- Object
- PrismPay::CreditCard
- Defined in:
- lib/prismpay/prismpay.rb
Overview
BankAccount
Instance Attribute Summary collapse
-
#first_name ⇒ Object
credit card information…
-
#last_name ⇒ Object
credit card information…
-
#month ⇒ Object
credit card information…
-
#number ⇒ Object
credit card information…
-
#type ⇒ Object
credit card information…
-
#verification_value ⇒ Object
credit card information…
-
#year ⇒ Object
credit card information…
Instance Method Summary collapse
- #[](method) ⇒ Object
- #[]=(method, rval) ⇒ Object
-
#initialize(ccinfo = {}) ⇒ CreditCard
constructor
A new instance of CreditCard.
- #name ⇒ Object
- #name=(n) ⇒ Object
Constructor Details
#initialize(ccinfo = {}) ⇒ CreditCard
Returns a new instance of CreditCard.
562 563 564 565 566 567 568 569 570 571 |
# File 'lib/prismpay/prismpay.rb', line 562 def initialize(ccinfo = {}) if ccinfo.respond_to?("has_key?") @number = ccinfo[:number] if ccinfo.has_key?(:number) @month = ccinfo[:month] if ccinfo.has_key?(:month) @year = ccinfo[:year] if ccinfo.has_key?(:year) @name = ccinfo[:name] if ccinfo.has_key?(:name) @verification_value = ccinfo[:verification_value] if ccinfo.has_key?(:verification_value) @type = ccinfo[:type] if ccinfo.has_key?(:type) end end |
Instance Attribute Details
#first_name ⇒ Object
credit card information… mimic ActiveMerchant
541 542 543 |
# File 'lib/prismpay/prismpay.rb', line 541 def first_name @first_name end |
#last_name ⇒ Object
credit card information… mimic ActiveMerchant
541 542 543 |
# File 'lib/prismpay/prismpay.rb', line 541 def last_name @last_name end |
#month ⇒ Object
credit card information… mimic ActiveMerchant
541 542 543 |
# File 'lib/prismpay/prismpay.rb', line 541 def month @month end |
#number ⇒ Object
credit card information… mimic ActiveMerchant
541 542 543 |
# File 'lib/prismpay/prismpay.rb', line 541 def number @number end |
#type ⇒ Object
credit card information… mimic ActiveMerchant
541 542 543 |
# File 'lib/prismpay/prismpay.rb', line 541 def type @type end |
#verification_value ⇒ Object
credit card information… mimic ActiveMerchant
541 542 543 |
# File 'lib/prismpay/prismpay.rb', line 541 def verification_value @verification_value end |
#year ⇒ Object
credit card information… mimic ActiveMerchant
541 542 543 |
# File 'lib/prismpay/prismpay.rb', line 541 def year @year end |
Instance Method Details
#[](method) ⇒ Object
544 545 546 |
# File 'lib/prismpay/prismpay.rb', line 544 def [](method) eval ("self.#{method}") end |
#[]=(method, rval) ⇒ Object
558 559 560 |
# File 'lib/prismpay/prismpay.rb', line 558 def []=(method, rval) eval ("self.#{method} = rval") end |
#name ⇒ Object
548 549 550 |
# File 'lib/prismpay/prismpay.rb', line 548 def name join(@first_name, @last_name) end |
#name=(n) ⇒ Object
552 553 554 555 556 |
# File 'lib/prismpay/prismpay.rb', line 552 def name=(n) names = n.split(' ') @first_name = names[0] @last_name = names[1] end |