class EwayRapid::CapturePaymentResponse
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/capture_payment_response.rb, line 24 def self.from_hash(hash) capture_payment_response = CapturePaymentResponse.new capture_payment_response.response_code = hash[Constants::RESPONSE_CODE] capture_payment_response.response_message = hash[Constants::RESPONSE_MESSAGE] capture_payment_response.transaction_id = hash[Constants::TRANSACTION_ID] capture_payment_response.transaction_status = hash[Constants::TRANSACTION_STATUS] capture_payment_response.errors = hash[Constants::ERRORS_CAPITALIZED] capture_payment_response end
from_json(json)
click to toggle source
# File lib/eway_rapid/entities/capture_payment_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/capture_payment_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