Class: Braintree::MonetaryAmount

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

Instance Attribute Summary collapse

Class Method 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) ⇒ 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_codeObject (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

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

#inspectObject



12
13
14
# File 'lib/braintree/monetary_amount.rb', line 12

def inspect
  "#<MonetaryAmount currency_code:#{currency_code.inspect} value:#{value.inspect}>"
end