Class: MollieNLIDeal::PaymentRequest
- Inherits:
-
Object
- Object
- MollieNLIDeal::PaymentRequest
- Defined in:
- lib/mollienl-ideal/payment_request.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#message ⇒ Object
Returns the value of attribute message.
-
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(values = nil) ⇒ PaymentRequest
constructor
A new instance of PaymentRequest.
Constructor Details
#initialize(values = nil) ⇒ PaymentRequest
Returns a new instance of PaymentRequest.
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/mollienl-ideal/payment_request.rb', line 5 def initialize(values=nil) return if values.nil? if values.kind_of?(Hash) values.each { |key, value| self.send key.to_s + "=", value } elsif values.kind_of?(REXML::Element) @transaction_id = values.get_text("transaction_id").to_s @amount = values.get_text("amount").to_s.to_i @currency = values.get_text("currency").to_s @url = URI.unescape(values.get_text("URL").to_s) @message = values.get_text("message").to_s end end |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
3 4 5 |
# File 'lib/mollienl-ideal/payment_request.rb', line 3 def amount @amount end |
#currency ⇒ Object
Returns the value of attribute currency.
3 4 5 |
# File 'lib/mollienl-ideal/payment_request.rb', line 3 def currency @currency end |
#message ⇒ Object
Returns the value of attribute message.
3 4 5 |
# File 'lib/mollienl-ideal/payment_request.rb', line 3 def @message end |
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
3 4 5 |
# File 'lib/mollienl-ideal/payment_request.rb', line 3 def transaction_id @transaction_id end |
#url ⇒ Object
Returns the value of attribute url.
3 4 5 |
# File 'lib/mollienl-ideal/payment_request.rb', line 3 def url @url end |