Class: IOSTSdk::Http::GetTxReceiptByTxHash
- Inherits:
-
Object
- Object
- IOSTSdk::Http::GetTxReceiptByTxHash
- Defined in:
- lib/iost_sdk/http/get_tx_receipt_by_tx_hash.rb
Instance Method Summary collapse
Instance Method Details
#invoke(base_url:, hash_value:) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/iost_sdk/http/get_tx_receipt_by_tx_hash.rb', line 8 def invoke(base_url:, hash_value:) resp = HTTParty.get("#{base_url}/getTxReceiptByTxHash/#{hash_value}") raise HttpRequestError.new(status_code: resp.code, body: resp.body) unless resp.code == 200 IOSTSdk::Models::TxReceipt.new.populate(model_data: JSON.parse(resp.body)) end |