Class: Braintree::ExchangeRateQuoteRequest

Inherits:
Object
  • Object
show all
Includes:
BaseModule
Defined in:
lib/braintree/exchange_rate_quote_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from BaseModule

included

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

#quotesObject (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

#inspectObject



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