Class: Saferpay::TransactionParams
- Inherits:
-
Object
- Object
- Saferpay::TransactionParams
- Defined in:
- lib/ruby-saferpay.rb
Constant Summary collapse
- DEFAULTS =
{}
Instance Attribute Summary collapse
-
#params ⇒ Object
Returns the value of attribute params.
-
#token ⇒ Object
Returns the value of attribute token.
-
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
Instance Method Summary collapse
-
#initialize(params) ⇒ TransactionParams
constructor
A new instance of TransactionParams.
- #to_s ⇒ Object
Constructor Details
#initialize(params) ⇒ TransactionParams
Returns a new instance of TransactionParams.
347 348 349 350 351 |
# File 'lib/ruby-saferpay.rb', line 347 def initialize( params ) @params = DEFAULTS.merge( params ) @transaction_id = nil @token = nil end |
Instance Attribute Details
#params ⇒ Object
Returns the value of attribute params.
346 347 348 |
# File 'lib/ruby-saferpay.rb', line 346 def params @params end |
#token ⇒ Object
Returns the value of attribute token.
346 347 348 |
# File 'lib/ruby-saferpay.rb', line 346 def token @token end |
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
346 347 348 |
# File 'lib/ruby-saferpay.rb', line 346 def transaction_id @transaction_id end |
Instance Method Details
#to_s ⇒ Object
353 354 355 |
# File 'lib/ruby-saferpay.rb', line 353 def to_s @params.map{|k,v| "#{k.to_s.upcase} #{v}"}.join " -a " end |