Class: Portage::Ucp::Price
- Inherits:
-
Data
- Object
- Data
- Portage::Ucp::Price
- Defined in:
- lib/portage/ucp/value_objects.rb
Overview
schemas/shopping/types/price.json — the wire-shape counterpart to Money above: an integer minor-unit amount paired with its currency, appearing directly in Product/Variant payloads.
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
Instance Method Summary collapse
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount
14 15 16 |
# File 'lib/portage/ucp/value_objects.rb', line 14 def amount @amount end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency
14 15 16 |
# File 'lib/portage/ucp/value_objects.rb', line 14 def currency @currency end |
Instance Method Details
#to_wire_h ⇒ Object
15 |
# File 'lib/portage/ucp/value_objects.rb', line 15 def to_wire_h = { "amount" => amount, "currency" => currency } |