class EwayRapid::CancelAuthorisationResponse
Attributes
errors[RW]
response_code[RW]
response_message[RW]
transaction_id[RW]
transaction_status[RW]
transaction_status?[RW]
Public Class Methods
from_hash(hash)
click to toggle source
# File lib/eway_rapid/entities/cancel_authorisation_response.rb, line 24 def self.from_hash(hash) cancel_authorisation_response = CancelAuthorisationResponse.new cancel_authorisation_response.response_code = hash[Constants::RESPONSE_CODE] cancel_authorisation_response.response_message = hash[Constants::RESPONSE_MESSAGE] cancel_authorisation_response.transaction_id = hash[Constants::TRANSACTION_ID] cancel_authorisation_response.transaction_status = hash[Constants::TRANSACTION_STATUS] cancel_authorisation_response.errors = hash[Constants::ERRORS_CAPITALIZED] cancel_authorisation_response end
from_json(json)
click to toggle source
# File lib/eway_rapid/entities/cancel_authorisation_response.rb, line 19 def self.from_json(json) hash = JSON.parse(json) from_hash(hash) end
Public Instance Methods
to_json(options={})
click to toggle source
# File lib/eway_rapid/entities/cancel_authorisation_response.rb, line 11 def to_json(options={}) { Constants::RESPONSE_CODE => response_code, Constants::RESPONSE_MESSAGE => response_message, Constants::TRANSACTION_ID => transaction_id, Constants::TRANSACTION_STATUS => transaction_status, Constants::ERRORS => errors }.to_json end