Class: Erede::Services::CancelTransaction
- Defined in:
- lib/erede/services/cancel_transaction.rb
Constant Summary
Constants inherited from Base
Base::GET, Base::POST, Base::PUT
Instance Attribute Summary collapse
-
#transaction ⇒ Object
Returns the value of attribute transaction.
Attributes inherited from Base
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(store, transaction) ⇒ CancelTransaction
constructor
A new instance of CancelTransaction.
- #url ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(store, transaction) ⇒ CancelTransaction
6 7 8 9 |
# File 'lib/erede/services/cancel_transaction.rb', line 6 def initialize(store, transaction) super(store) self.transaction = transaction end |
Instance Attribute Details
#transaction ⇒ Object
Returns the value of attribute transaction.
4 5 6 |
# File 'lib/erede/services/cancel_transaction.rb', line 4 def transaction @transaction end |
Instance Method Details
#execute ⇒ Object
15 16 17 |
# File 'lib/erede/services/cancel_transaction.rb', line 15 def execute send_request(POST, transaction.to_json) end |
#url ⇒ Object
11 12 13 |
# File 'lib/erede/services/cancel_transaction.rb', line 11 def url "#{super}/#{transaction.tid}/refunds" end |