Class: Braintree::ExchangeRateQuoteRequest
- Inherits:
-
Object
- Object
- Braintree::ExchangeRateQuoteRequest
- Includes:
- BaseModule
- Defined in:
- lib/braintree/exchange_rate_quote_request.rb
Instance Attribute Summary collapse
-
#quotes ⇒ Object
readonly
Returns the value of attribute quotes.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ ExchangeRateQuoteRequest
constructor
A new instance of ExchangeRateQuoteRequest.
- #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) ⇒ ExchangeRateQuoteRequest
Returns a new instance of ExchangeRateQuoteRequest.
7 8 9 10 11 |
# File 'lib/braintree/exchange_rate_quote_request.rb', line 7 def initialize(attributes) @attrs = attributes.keys set_instance_variables_from_hash(attributes) @quotes = (@quotes || []).map { |quote_hash| ExchangeRateQuoteInput.new(quote_hash) } end |
Instance Attribute Details
#quotes ⇒ Object (readonly)
Returns the value of attribute quotes.
5 6 7 |
# File 'lib/braintree/exchange_rate_quote_request.rb', line 5 def quotes @quotes end |
Instance Method Details
#inspect ⇒ Object
13 14 15 16 |
# File 'lib/braintree/exchange_rate_quote_request.rb', line 13 def inspect inspected_attributes = @attrs.map { |attr| "#{attr}:#{send(attr).inspect}" } "#<#{self.class} #{inspected_attributes.join(" ")}>" end |