Class: Upay::TransactionResponse
- Inherits:
-
Object
- Object
- Upay::TransactionResponse
- Defined in:
- lib/upay/transaction.rb
Instance Method Summary collapse
- #authorizationCode ⇒ Object
- #authorizationCode=(authorizationCode = nil) ⇒ Object
- #errorCode ⇒ Object
- #errorCode=(errorCode = nil) ⇒ Object
- #extraParameters ⇒ Object
- #extraParameters=(extraParameters = nil) ⇒ Object
-
#initialize(args = {}) ⇒ TransactionResponse
constructor
A new instance of TransactionResponse.
- #operationDate ⇒ Object
- #operationDate=(operationDate = nil) ⇒ Object
- #orderId ⇒ Object
- #orderId=(orderId = nil) ⇒ Object
- #paymentNetworkResponseCode ⇒ Object
- #paymentNetworkResponseCode=(paymentNetworkResponseCode = nil) ⇒ Object
- #paymentNetworkResponseErrorMessage ⇒ Object
- #paymentNetworkResponseErrorMessage=(paymentNetworkResponseErrorMessage = nil) ⇒ Object
- #pendingReason ⇒ Object
- #pendingReason=(pendingReason = nil) ⇒ Object
- #responseCode ⇒ Object
- #responseCode=(responseCode = nil) ⇒ Object
- #responseMessage ⇒ Object
- #responseMessage=(responseMessage = nil) ⇒ Object
- #to_hash ⇒ Object
- #transactionDate ⇒ Object
- #transactionDate=(transactionDate = nil) ⇒ Object
- #transactionId ⇒ Object
- #transactionId=(transactionId = nil) ⇒ Object
- #transactionTime ⇒ Object
- #transactionTime=(transactionTime = nil) ⇒ Object
- #trazabilityCode ⇒ Object
- #trazabilityCode=(trazabilityCode = nil) ⇒ Object
- #valid? ⇒ Boolean
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
#authorizationCode ⇒ Object
101 |
# File 'lib/upay/transaction.rb', line 101 def ; end |
#authorizationCode=(authorizationCode = nil) ⇒ Object
102 |
# File 'lib/upay/transaction.rb', line 102 def (=nil) = ; end |
#errorCode ⇒ Object
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 |
#extraParameters ⇒ Object
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 |
#operationDate ⇒ Object
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 |
#orderId ⇒ Object
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 |
#paymentNetworkResponseCode ⇒ Object
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 |
#paymentNetworkResponseErrorMessage ⇒ Object
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 |
#pendingReason ⇒ Object
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 |
#responseCode ⇒ Object
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 |
#responseMessage ⇒ Object
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_hash ⇒ Object
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 |
#transactionDate ⇒ Object
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 |
#transactionId ⇒ Object
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 |
#transactionTime ⇒ Object
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 |
#trazabilityCode ⇒ Object
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
128 129 130 131 |
# File 'lib/upay/transaction.rb', line 128 def valid? #validator = TransactionValidator.new #validator.valid?(self) end |