Class: Saferpay::TransactionParams

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby-saferpay.rb

Constant Summary collapse

DEFAULTS =
{}

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#paramsObject

Returns the value of attribute params.



346
347
348
# File 'lib/ruby-saferpay.rb', line 346

def params
  @params
end

#tokenObject

Returns the value of attribute token.



346
347
348
# File 'lib/ruby-saferpay.rb', line 346

def token
  @token
end

#transaction_idObject

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_sObject



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