Class: Braintree::ExchangeRateQuote

Inherits:
Object
  • Object
show all
Includes:
BaseModule
Defined in:
lib/braintree/exchange_rate_quote.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) ⇒ 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

#attrsObject (readonly)

Returns the value of attribute attrs.



5
6
7
# File 'lib/braintree/exchange_rate_quote.rb', line 5

def attrs
  @attrs
end

#base_amountObject (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_rateObject (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_atObject (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

#idObject (readonly)

Returns the value of attribute id.



9
10
11
# File 'lib/braintree/exchange_rate_quote.rb', line 9

def id
  @id
end

#quote_amountObject (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_atObject (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_rateObject (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

#inspectObject



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