Class: Braintree::ExchangeRateQuote
- Inherits:
-
Object
- Object
- Braintree::ExchangeRateQuote
- Includes:
- BaseModule
- Defined in:
- lib/braintree/exchange_rate_quote.rb
Instance Attribute Summary collapse
-
#attrs ⇒ Object
readonly
Returns the value of attribute attrs.
-
#base_amount ⇒ Object
readonly
Returns the value of attribute base_amount.
-
#exchange_rate ⇒ Object
readonly
Returns the value of attribute exchange_rate.
-
#expires_at ⇒ Object
readonly
Returns the value of attribute expires_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#quote_amount ⇒ Object
readonly
Returns the value of attribute quote_amount.
-
#refreshes_at ⇒ Object
readonly
Returns the value of attribute refreshes_at.
-
#trade_rate ⇒ Object
readonly
Returns the value of attribute trade_rate.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ ExchangeRateQuote
constructor
A new instance of ExchangeRateQuote.
- #inspect ⇒ Object
Methods included from BaseModule
Methods included from BaseModule::Methods
#copy_instance_variables_from_object, #return_object_or_raise, #set_instance_variables_from_hash, #singleton_class
Constructor Details
#initialize(attributes) ⇒ ExchangeRateQuote
Returns a new instance of ExchangeRateQuote.
14 15 16 17 |
# File 'lib/braintree/exchange_rate_quote.rb', line 14 def initialize(attributes) @attrs = attributes.keys set_instance_variables_from_hash(attributes) end |
Instance Attribute Details
#attrs ⇒ Object (readonly)
Returns the value of attribute attrs.
5 6 7 |
# File 'lib/braintree/exchange_rate_quote.rb', line 5 def attrs @attrs end |
#base_amount ⇒ Object (readonly)
Returns the value of attribute base_amount.
6 7 8 |
# File 'lib/braintree/exchange_rate_quote.rb', line 6 def base_amount @base_amount end |
#exchange_rate ⇒ Object (readonly)
Returns the value of attribute exchange_rate.
7 8 9 |
# File 'lib/braintree/exchange_rate_quote.rb', line 7 def exchange_rate @exchange_rate end |
#expires_at ⇒ Object (readonly)
Returns the value of attribute expires_at.
8 9 10 |
# File 'lib/braintree/exchange_rate_quote.rb', line 8 def expires_at @expires_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
9 10 11 |
# File 'lib/braintree/exchange_rate_quote.rb', line 9 def id @id end |
#quote_amount ⇒ Object (readonly)
Returns the value of attribute quote_amount.
10 11 12 |
# File 'lib/braintree/exchange_rate_quote.rb', line 10 def quote_amount @quote_amount end |
#refreshes_at ⇒ Object (readonly)
Returns the value of attribute refreshes_at.
11 12 13 |
# File 'lib/braintree/exchange_rate_quote.rb', line 11 def refreshes_at @refreshes_at end |
#trade_rate ⇒ Object (readonly)
Returns the value of attribute trade_rate.
12 13 14 |
# File 'lib/braintree/exchange_rate_quote.rb', line 12 def trade_rate @trade_rate end |
Instance Method Details
#inspect ⇒ Object
19 20 21 22 |
# File 'lib/braintree/exchange_rate_quote.rb', line 19 def inspect inspected_attributes = @attrs.map { |attr| "#{attr}:#{send(attr).inspect}" } "#<#{self.class} #{inspected_attributes.join(" ")}>" end |