Class: SagePay::Server::Refund
- Defined in:
- lib/sage_pay/server/refund.rb
Instance Attribute Summary collapse
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#description ⇒ Object
Returns the value of attribute description.
-
#related_transaction ⇒ Object
Returns the value of attribute related_transaction.
Attributes inherited from Command
#mode, #vendor, #vendor_tx_code
Instance Method Summary collapse
- #live_service ⇒ Object
- #post_params ⇒ Object
- #response_from_response_body(response_body) ⇒ Object
- #simulator_service ⇒ Object
Methods inherited from Command
decimal_accessor, #initialize, #run!, #url
Constructor Details
This class inherits a constructor from SagePay::Server::Command
Instance Attribute Details
#currency ⇒ Object
Returns the value of attribute currency.
6 7 8 |
# File 'lib/sage_pay/server/refund.rb', line 6 def currency @currency end |
#description ⇒ Object
Returns the value of attribute description.
6 7 8 |
# File 'lib/sage_pay/server/refund.rb', line 6 def description @description end |
#related_transaction ⇒ Object
Returns the value of attribute related_transaction.
6 7 8 |
# File 'lib/sage_pay/server/refund.rb', line 6 def @related_transaction end |
Instance Method Details
#live_service ⇒ Object
29 30 31 |
# File 'lib/sage_pay/server/refund.rb', line 29 def live_service "refund" end |
#post_params ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/sage_pay/server/refund.rb', line 17 def post_params super.merge({ "Amount" => ("%.2f" % amount), "Currency" => currency, "Description" => description }).merge(.post_params) end |
#response_from_response_body(response_body) ⇒ Object
25 26 27 |
# File 'lib/sage_pay/server/refund.rb', line 25 def response_from_response_body(response_body) RefundResponse.from_response_body(response_body) end |
#simulator_service ⇒ Object
33 34 35 |
# File 'lib/sage_pay/server/refund.rb', line 33 def simulator_service "VendorRefundTx" end |