Class: Sdp::PreparedTransfer
- Inherits:
-
Struct
- Object
- Struct
- Sdp::PreparedTransfer
- Defined in:
- lib/sdp/resources/payments.rb
Overview
Result of POST /v1/payments/transfers/prepare: the provisional transfer plus the unsigned transaction the caller must sign and submit before blockhash expiry. simulation is SDP’s simulation result passed through as a hash when present.
Instance Attribute Summary collapse
-
#blockhash ⇒ Object
Returns the value of attribute blockhash.
-
#last_valid_block_height ⇒ Object
Returns the value of attribute last_valid_block_height.
-
#serialized ⇒ Object
Returns the value of attribute serialized.
-
#simulation ⇒ Object
Returns the value of attribute simulation.
-
#transfer ⇒ Object
Returns the value of attribute transfer.
Class Method Summary collapse
Instance Attribute Details
#blockhash ⇒ Object
Returns the value of attribute blockhash
34 35 36 |
# File 'lib/sdp/resources/payments.rb', line 34 def blockhash @blockhash end |
#last_valid_block_height ⇒ Object
Returns the value of attribute last_valid_block_height
34 35 36 |
# File 'lib/sdp/resources/payments.rb', line 34 def last_valid_block_height @last_valid_block_height end |
#serialized ⇒ Object
Returns the value of attribute serialized
34 35 36 |
# File 'lib/sdp/resources/payments.rb', line 34 def serialized @serialized end |
#simulation ⇒ Object
Returns the value of attribute simulation
34 35 36 |
# File 'lib/sdp/resources/payments.rb', line 34 def simulation @simulation end |
#transfer ⇒ Object
Returns the value of attribute transfer
34 35 36 |
# File 'lib/sdp/resources/payments.rb', line 34 def transfer @transfer end |
Class Method Details
.from_hash(hash) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/sdp/resources/payments.rb', line 36 def self.from_hash(hash) hash ||= {} prepared = hash[:prepared_transaction] || {} new( transfer: Transfer.from_hash(hash[:transfer]), serialized: prepared[:serialized], blockhash: prepared[:blockhash], last_valid_block_height: prepared[:last_valid_block_height], simulation: hash[:simulation] ) end |