Class: Sdp::RampQuote
- Inherits:
-
Struct
- Object
- Struct
- Sdp::RampQuote
- Defined in:
- lib/sdp/resources/ramps.rb
Overview
A ramp quote: indicative pricing plus a hosted checkout URL for an on-ramp. SDP omits optional fields, so each member is nil when absent. The *_currency members are passed through as { code, decimals, name, symbol } hashes; amounts are numbers as SDP sends them.
Instance Attribute Summary collapse
-
#delivery_mode ⇒ Object
Returns the value of attribute delivery_mode.
-
#exchange_rate ⇒ Object
Returns the value of attribute exchange_rate.
-
#expires_at ⇒ Object
Returns the value of attribute expires_at.
-
#fee_currency ⇒ Object
Returns the value of attribute fee_currency.
-
#fees_included ⇒ Object
Returns the value of attribute fees_included.
-
#hosted_url ⇒ Object
Returns the value of attribute hosted_url.
-
#id ⇒ Object
Returns the value of attribute id.
-
#payment_instructions ⇒ Object
Returns the value of attribute payment_instructions.
-
#provider ⇒ Object
Returns the value of attribute provider.
-
#receiving_currency ⇒ Object
Returns the value of attribute receiving_currency.
-
#sending_currency ⇒ Object
Returns the value of attribute sending_currency.
-
#status ⇒ Object
Returns the value of attribute status.
-
#total_receiving_amount ⇒ Object
Returns the value of attribute total_receiving_amount.
-
#total_sending_amount ⇒ Object
Returns the value of attribute total_sending_amount.
Class Method Summary collapse
Instance Attribute Details
#delivery_mode ⇒ Object
Returns the value of attribute delivery_mode
24 25 26 |
# File 'lib/sdp/resources/ramps.rb', line 24 def delivery_mode @delivery_mode end |
#exchange_rate ⇒ Object
Returns the value of attribute exchange_rate
24 25 26 |
# File 'lib/sdp/resources/ramps.rb', line 24 def exchange_rate @exchange_rate end |
#expires_at ⇒ Object
Returns the value of attribute expires_at
24 25 26 |
# File 'lib/sdp/resources/ramps.rb', line 24 def expires_at @expires_at end |
#fee_currency ⇒ Object
Returns the value of attribute fee_currency
24 25 26 |
# File 'lib/sdp/resources/ramps.rb', line 24 def fee_currency @fee_currency end |
#fees_included ⇒ Object
Returns the value of attribute fees_included
24 25 26 |
# File 'lib/sdp/resources/ramps.rb', line 24 def fees_included @fees_included end |
#hosted_url ⇒ Object
Returns the value of attribute hosted_url
24 25 26 |
# File 'lib/sdp/resources/ramps.rb', line 24 def hosted_url @hosted_url end |
#id ⇒ Object
Returns the value of attribute id
24 25 26 |
# File 'lib/sdp/resources/ramps.rb', line 24 def id @id end |
#payment_instructions ⇒ Object
Returns the value of attribute payment_instructions
24 25 26 |
# File 'lib/sdp/resources/ramps.rb', line 24 def payment_instructions @payment_instructions end |
#provider ⇒ Object
Returns the value of attribute provider
24 25 26 |
# File 'lib/sdp/resources/ramps.rb', line 24 def provider @provider end |
#receiving_currency ⇒ Object
Returns the value of attribute receiving_currency
24 25 26 |
# File 'lib/sdp/resources/ramps.rb', line 24 def receiving_currency @receiving_currency end |
#sending_currency ⇒ Object
Returns the value of attribute sending_currency
24 25 26 |
# File 'lib/sdp/resources/ramps.rb', line 24 def sending_currency @sending_currency end |
#status ⇒ Object
Returns the value of attribute status
24 25 26 |
# File 'lib/sdp/resources/ramps.rb', line 24 def status @status end |
#total_receiving_amount ⇒ Object
Returns the value of attribute total_receiving_amount
24 25 26 |
# File 'lib/sdp/resources/ramps.rb', line 24 def total_receiving_amount @total_receiving_amount end |
#total_sending_amount ⇒ Object
Returns the value of attribute total_sending_amount
24 25 26 |
# File 'lib/sdp/resources/ramps.rb', line 24 def total_sending_amount @total_sending_amount end |
Class Method Details
.from_hash(hash) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/sdp/resources/ramps.rb', line 28 def self.from_hash(hash) hash ||= {} new( id: hash[:id], provider: hash[:provider], status: hash[:status], delivery_mode: hash[:delivery_mode], hosted_url: hash[:hosted_url], payment_instructions: hash[:payment_instructions], exchange_rate: hash[:exchange_rate], total_sending_amount: hash[:total_sending_amount], sending_currency: hash[:sending_currency], total_receiving_amount: hash[:total_receiving_amount], receiving_currency: hash[:receiving_currency], fees_included: hash[:fees_included], fee_currency: hash[:fee_currency], expires_at: hash[:expires_at] ) end |