Class: MastercoinWallet::Transaction
- Inherits:
-
Object
- Object
- MastercoinWallet::Transaction
- Includes:
- HTTParty
- Defined in:
- lib/mastercoin-wallet/models/transaction.rb
Instance Attribute Summary collapse
-
#hash ⇒ Object
Returns the value of attribute hash.
-
#json_payload ⇒ Object
Returns the value of attribute json_payload.
Instance Method Summary collapse
- #create! ⇒ Object
-
#initialize(hash, json_payload) ⇒ Transaction
constructor
A new instance of Transaction.
Constructor Details
#initialize(hash, json_payload) ⇒ Transaction
Returns a new instance of Transaction.
8 9 10 11 |
# File 'lib/mastercoin-wallet/models/transaction.rb', line 8 def initialize(hash, json_payload) self.hash = hash self.json_payload = json_payload end |
Instance Attribute Details
#hash ⇒ Object
Returns the value of attribute hash.
6 7 8 |
# File 'lib/mastercoin-wallet/models/transaction.rb', line 6 def hash @hash end |
#json_payload ⇒ Object
Returns the value of attribute json_payload.
6 7 8 |
# File 'lib/mastercoin-wallet/models/transaction.rb', line 6 def json_payload @json_payload end |
Instance Method Details
#create! ⇒ Object
13 14 15 |
# File 'lib/mastercoin-wallet/models/transaction.rb', line 13 def create! self.class.post("/transactions.json", body: {transaction: {tx_hash: self.hash, json_payload: json_payload}}) end |