Class: Braintree::MonetaryAmount
- Inherits:
-
Object
- Object
- Braintree::MonetaryAmount
- Includes:
- BaseModule
- Defined in:
- lib/braintree/monetary_amount.rb
Instance Attribute Summary collapse
-
#currency_code ⇒ Object
readonly
Returns the value of attribute currency_code.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes) ⇒ MonetaryAmount
constructor
A new instance of MonetaryAmount.
- #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) ⇒ MonetaryAmount
Returns a new instance of MonetaryAmount.
8 9 10 |
# File 'lib/braintree/monetary_amount.rb', line 8 def initialize(attributes) set_instance_variables_from_hash(attributes) end |
Instance Attribute Details
#currency_code ⇒ Object (readonly)
Returns the value of attribute currency_code.
5 6 7 |
# File 'lib/braintree/monetary_amount.rb', line 5 def currency_code @currency_code end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
6 7 8 |
# File 'lib/braintree/monetary_amount.rb', line 6 def value @value end |
Class Method Details
._new(*args) ⇒ Object
20 21 22 |
# File 'lib/braintree/monetary_amount.rb', line 20 def self._new(*args) self.new(*args) end |
Instance Method Details
#inspect ⇒ Object
12 13 14 |
# File 'lib/braintree/monetary_amount.rb', line 12 def inspect "#<MonetaryAmount currency_code:#{currency_code.inspect} value:#{value.inspect}>" end |