Class: BankLink::Bank
- Inherits:
-
Object
- Object
- BankLink::Bank
- Defined in:
- lib/bank_link/bank.rb
Instance Attribute Summary collapse
-
#authorization_link(url = nil, &block) ⇒ Object
Returns the value of attribute authorization_link.
-
#name ⇒ Object
Returns the value of attribute name.
-
#payment_link(url = nil, &block) ⇒ Object
Returns the value of attribute payment_link.
-
#settings(&block) ⇒ Object
Returns the value of attribute settings.
Instance Method Summary collapse
-
#initialize(name) {|_self| ... } ⇒ Bank
constructor
A new instance of Bank.
- #verify(params) ⇒ Object
Constructor Details
#initialize(name) {|_self| ... } ⇒ Bank
Returns a new instance of Bank.
7 8 9 10 11 12 13 14 |
# File 'lib/bank_link/bank.rb', line 7 def initialize name, &block self.name = name self.settings = Hashie::Mash.new( :mac_class => Mac::VK, :digest => OpenSSL::Digest::SHA1 ) yield(self) if block_given? end |
Instance Attribute Details
#authorization_link(url = nil, &block) ⇒ Object
Returns the value of attribute authorization_link.
5 6 7 |
# File 'lib/bank_link/bank.rb', line 5 def @authorization_link end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/bank_link/bank.rb', line 5 def name @name end |
#payment_link(url = nil, &block) ⇒ Object
Returns the value of attribute payment_link.
5 6 7 |
# File 'lib/bank_link/bank.rb', line 5 def payment_link @payment_link end |
#settings(&block) ⇒ Object
Returns the value of attribute settings.
5 6 7 |
# File 'lib/bank_link/bank.rb', line 5 def settings @settings end |
Instance Method Details
#verify(params) ⇒ Object
16 17 18 19 20 |
# File 'lib/bank_link/bank.rb', line 16 def verify params content = Hashie::Mash.new(params) mac = settings.mac_class.new(self, content) mac.verify content end |