Class: Sdp::RampCurrencies
- Inherits:
-
Struct
- Object
- Struct
- Sdp::RampCurrencies
- Defined in:
- lib/sdp/resources/ramps.rb
Overview
Currency discovery for a ramp direction: which fiat/crypto SDP can move between and which providers serve each pair. Passed through close to how SDP reports it — pairs is an array of { source, dest, providers } hashes.
Instance Attribute Summary collapse
-
#destinations ⇒ Object
Returns the value of attribute destinations.
-
#pairs ⇒ Object
Returns the value of attribute pairs.
-
#sources ⇒ Object
Returns the value of attribute sources.
-
#support_hash ⇒ Object
Returns the value of attribute support_hash.
Class Method Summary collapse
Instance Attribute Details
#destinations ⇒ Object
Returns the value of attribute destinations
7 8 9 |
# File 'lib/sdp/resources/ramps.rb', line 7 def destinations @destinations end |
#pairs ⇒ Object
Returns the value of attribute pairs
7 8 9 |
# File 'lib/sdp/resources/ramps.rb', line 7 def pairs @pairs end |
#sources ⇒ Object
Returns the value of attribute sources
7 8 9 |
# File 'lib/sdp/resources/ramps.rb', line 7 def sources @sources end |
#support_hash ⇒ Object
Returns the value of attribute support_hash
7 8 9 |
# File 'lib/sdp/resources/ramps.rb', line 7 def support_hash @support_hash end |
Class Method Details
.from_hash(hash) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/sdp/resources/ramps.rb', line 8 def self.from_hash(hash) hash ||= {} currencies = hash[:currencies] || {} new( sources: currencies[:sources] || [], destinations: currencies[:destinations] || [], pairs: hash[:pairs] || [], support_hash: hash[:support_hash] ) end |