Class: EwayRapid::CancelAuthorisationResponse
- Inherits:
-
Object
- Object
- EwayRapid::CancelAuthorisationResponse
- Defined in:
- lib/eway_rapid/entities/cancel_authorisation_response.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#response_code ⇒ Object
Returns the value of attribute response_code.
-
#response_message ⇒ Object
Returns the value of attribute response_message.
-
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
-
#transaction_status ⇒ Object
(also: #transaction_status?)
Returns the value of attribute transaction_status.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#errors ⇒ Object
Returns the value of attribute errors.
7 8 9 |
# File 'lib/eway_rapid/entities/cancel_authorisation_response.rb', line 7 def errors @errors end |
#response_code ⇒ Object
Returns the value of attribute response_code.
3 4 5 |
# File 'lib/eway_rapid/entities/cancel_authorisation_response.rb', line 3 def response_code @response_code end |
#response_message ⇒ Object
Returns the value of attribute response_message.
4 5 6 |
# File 'lib/eway_rapid/entities/cancel_authorisation_response.rb', line 4 def @response_message end |
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
5 6 7 |
# File 'lib/eway_rapid/entities/cancel_authorisation_response.rb', line 5 def transaction_id @transaction_id end |
#transaction_status ⇒ Object Also known as: transaction_status?
Returns the value of attribute transaction_status.
6 7 8 |
# File 'lib/eway_rapid/entities/cancel_authorisation_response.rb', line 6 def transaction_status @transaction_status end |
Class Method Details
.from_hash(hash) ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/eway_rapid/entities/cancel_authorisation_response.rb', line 24 def self.from_hash(hash) = CancelAuthorisationResponse.new .response_code = hash[Constants::RESPONSE_CODE] . = hash[Constants::RESPONSE_MESSAGE] .transaction_id = hash[Constants::TRANSACTION_ID] .transaction_status = hash[Constants::TRANSACTION_STATUS] .errors = hash[Constants::ERRORS_CAPITALIZED] end |
.from_json(json) ⇒ Object
19 20 21 22 |
# File 'lib/eway_rapid/entities/cancel_authorisation_response.rb', line 19 def self.from_json(json) hash = JSON.parse(json) from_hash(hash) end |
Instance Method Details
#to_json(options = {}) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/eway_rapid/entities/cancel_authorisation_response.rb', line 11 def to_json(={}) { Constants::RESPONSE_CODE => response_code, Constants::RESPONSE_MESSAGE => , Constants::TRANSACTION_ID => transaction_id, Constants::TRANSACTION_STATUS => transaction_status, Constants::ERRORS => errors }.to_json end |