Class: Upay::TransactionResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/upay/transaction.rb

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ TransactionResponse

Returns a new instance of TransactionResponse.



80
81
82
83
84
# File 'lib/upay/transaction.rb', line 80

def initialize(args = {})
  args.each do |k,v|
    instance_variable_set("@#{k}", v)
  end
end

Instance Method Details

#authorizationCodeObject



101
# File 'lib/upay/transaction.rb', line 101

def authorizationCode; @authorizationCode end

#authorizationCode=(authorizationCode = nil) ⇒ Object



102
# File 'lib/upay/transaction.rb', line 102

def authorizationCode=(authorizationCode=nil) @authorizationCode = authorizationCode; end

#errorCodeObject



110
# File 'lib/upay/transaction.rb', line 110

def errorCode; @errorCode end

#errorCode=(errorCode = nil) ⇒ Object



111
# File 'lib/upay/transaction.rb', line 111

def errorCode=(errorCode=nil) @errorCode = errorCode; end

#extraParametersObject



125
# File 'lib/upay/transaction.rb', line 125

def extraParameters; @extraParameters end

#extraParameters=(extraParameters = nil) ⇒ Object



126
# File 'lib/upay/transaction.rb', line 126

def extraParameters=(extraParameters=nil) @extraParameters = extraParameters; end

#operationDateObject



122
# File 'lib/upay/transaction.rb', line 122

def operationDate; @operationDate end

#operationDate=(operationDate = nil) ⇒ Object



123
# File 'lib/upay/transaction.rb', line 123

def operationDate=(operationDate=nil) @operationDate = operationDate; end

#orderIdObject



86
# File 'lib/upay/transaction.rb', line 86

def orderId; @orderId end

#orderId=(orderId = nil) ⇒ Object



87
# File 'lib/upay/transaction.rb', line 87

def orderId=(orderId=nil) @orderId = orderId; end

#paymentNetworkResponseCodeObject



92
# File 'lib/upay/transaction.rb', line 92

def paymentNetworkResponseCode; @paymentNetworkResponseCode end

#paymentNetworkResponseCode=(paymentNetworkResponseCode = nil) ⇒ Object



93
# File 'lib/upay/transaction.rb', line 93

def paymentNetworkResponseCode=(paymentNetworkResponseCode=nil) @paymentNetworkResponseCode = paymentNetworkResponseCode; end

#paymentNetworkResponseErrorMessageObject



95
# File 'lib/upay/transaction.rb', line 95

def paymentNetworkResponseErrorMessage; @paymentNetworkResponseErrorMessage end

#paymentNetworkResponseErrorMessage=(paymentNetworkResponseErrorMessage = nil) ⇒ Object



96
# File 'lib/upay/transaction.rb', line 96

def paymentNetworkResponseErrorMessage=(paymentNetworkResponseErrorMessage=nil) @paymentNetworkResponseErrorMessage = paymentNetworkResponseErrorMessage; end

#pendingReasonObject



104
# File 'lib/upay/transaction.rb', line 104

def pendingReason; @pendingReason end

#pendingReason=(pendingReason = nil) ⇒ Object



105
# File 'lib/upay/transaction.rb', line 105

def pendingReason=(pendingReason=nil) @pendingReason = pendingReason; end

#responseCodeObject



107
# File 'lib/upay/transaction.rb', line 107

def responseCode; @responseCode end

#responseCode=(responseCode = nil) ⇒ Object



108
# File 'lib/upay/transaction.rb', line 108

def responseCode=(responseCode=nil) @responseCode = responseCode; end

#responseMessageObject



113
# File 'lib/upay/transaction.rb', line 113

def responseMessage; @responseMessage end

#responseMessage=(responseMessage = nil) ⇒ Object



114
# File 'lib/upay/transaction.rb', line 114

def responseMessage=(responseMessage=nil) @responseMessage = responseMessage; end

#to_hashObject



133
134
135
# File 'lib/upay/transaction.rb', line 133

def to_hash
  transaction_hash = self.instance_variables.each_with_object({}) { |var,hash| hash[var.to_s.delete("@").to_sym] = self.instance_variable_get(var)}
end

#transactionDateObject



116
# File 'lib/upay/transaction.rb', line 116

def transactionDate; @transactionDate end

#transactionDate=(transactionDate = nil) ⇒ Object



117
# File 'lib/upay/transaction.rb', line 117

def transactionDate=(transactionDate=nil) @transactionDate = transactionDate; end

#transactionIdObject



89
# File 'lib/upay/transaction.rb', line 89

def transactionId; @transactionId end

#transactionId=(transactionId = nil) ⇒ Object



90
# File 'lib/upay/transaction.rb', line 90

def transactionId=(transactionId=nil) @transactionId = transactionId; end

#transactionTimeObject



119
# File 'lib/upay/transaction.rb', line 119

def transactionTime; @transactionTime end

#transactionTime=(transactionTime = nil) ⇒ Object



120
# File 'lib/upay/transaction.rb', line 120

def transactionTime=(transactionTime=nil) @transactionTime = transactionTime; end

#trazabilityCodeObject



98
# File 'lib/upay/transaction.rb', line 98

def trazabilityCode; @trazabilityCode end

#trazabilityCode=(trazabilityCode = nil) ⇒ Object



99
# File 'lib/upay/transaction.rb', line 99

def trazabilityCode=(trazabilityCode=nil) @trazabilityCode = trazabilityCode; end

#valid?Boolean

Returns:

  • (Boolean)


128
129
130
131
# File 'lib/upay/transaction.rb', line 128

def valid?
  #validator = TransactionValidator.new
  #validator.valid?(self)
end