Class: Erede::Services::CreateTransaction
- Defined in:
- lib/erede/services/create_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) ⇒ CreateTransaction
constructor
A new instance of CreateTransaction.
Methods inherited from Base
Constructor Details
#initialize(store, transaction) ⇒ CreateTransaction
Returns a new instance of CreateTransaction.
6 7 8 9 |
# File 'lib/erede/services/create_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/create_transaction.rb', line 4 def transaction @transaction end |
Instance Method Details
#execute ⇒ Object
11 12 13 |
# File 'lib/erede/services/create_transaction.rb', line 11 def execute send_request(POST, transaction.to_json) end |