Class: LolitaBankLink::Request
- Inherits:
-
Object
- Object
- LolitaBankLink::Request
- Defined in:
- lib/lolita-bank-link/request.rb
Instance Attribute Summary collapse
-
#crypt ⇒ Object
readonly
Returns the value of attribute crypt.
-
#payment ⇒ Object
readonly
Returns the value of attribute payment.
-
#transaction ⇒ Object
readonly
Returns the value of attribute transaction.
Instance Method Summary collapse
- #build_form_data(data = {}) ⇒ Object
-
#initialize(payment, transaction) ⇒ Request
constructor
A new instance of Request.
Constructor Details
#initialize(payment, transaction) ⇒ Request
Returns a new instance of Request.
5 6 7 8 9 |
# File 'lib/lolita-bank-link/request.rb', line 5 def initialize payment, transaction @transaction = transaction @payment = payment @crypt = LolitaBankLink::Crypt.new end |
Instance Attribute Details
#crypt ⇒ Object (readonly)
Returns the value of attribute crypt.
3 4 5 |
# File 'lib/lolita-bank-link/request.rb', line 3 def crypt @crypt end |
#payment ⇒ Object (readonly)
Returns the value of attribute payment.
3 4 5 |
# File 'lib/lolita-bank-link/request.rb', line 3 def payment @payment end |
#transaction ⇒ Object (readonly)
Returns the value of attribute transaction.
3 4 5 |
# File 'lib/lolita-bank-link/request.rb', line 3 def transaction @transaction end |
Instance Method Details
#build_form_data(data = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/lolita-bank-link/request.rb', line 11 def build_form_data(data = {}) data[:stamp] = self.payment.id data[:ref] = self.transaction.id data[:snd_id] = LolitaBankLink.sender data[:amount] = amount(self.payment.price) data[:curr] = self.payment.currency data[:msg] = self.payment.description prepare_for_banklink(data) end |