Class: Portage::Ucp::Money

Inherits:
Data
  • Object
show all
Defined in:
lib/portage/ucp/value_objects.rb

Overview

Internal arithmetic helper only — never appears in a wire shape directly. Cart/Checkout/Order totals are bare minor-unit integers (Total#amount) once they reach a value object; Money exists so Support::Amounts has somewhere to hand back both the minor-unit amount and its currency together mid-conversion. Product/Variant carry currency-bearing wire fields directly (Price, below) rather than through Money.

Instance Attribute Summary collapse

Instance Attribute Details

#amount_minorObject (readonly)

Returns the value of attribute amount_minor

Returns:

  • (Object)

    the current value of amount_minor



9
10
11
# File 'lib/portage/ucp/value_objects.rb', line 9

def amount_minor
  @amount_minor
end

#currencyObject (readonly)

Returns the value of attribute currency

Returns:

  • (Object)

    the current value of currency



9
10
11
# File 'lib/portage/ucp/value_objects.rb', line 9

def currency
  @currency
end