Class: Portage::Ucp::OrderConfirmation
- Inherits:
-
Data
- Object
- Data
- Portage::Ucp::OrderConfirmation
- Defined in:
- lib/portage/ucp/value_objects.rb
Overview
schemas/shopping/types/order_confirmation.json — requires id/permalink_url. Carried on Checkout#order once complete_checkout actually produces an order; nil until then.
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#permalink_url ⇒ Object
readonly
Returns the value of attribute permalink_url.
Instance Method Summary collapse
-
#initialize(id:, permalink_url:, label: nil) ⇒ OrderConfirmation
constructor
A new instance of OrderConfirmation.
- #to_wire_h ⇒ Object
Constructor Details
#initialize(id:, permalink_url:, label: nil) ⇒ OrderConfirmation
Returns a new instance of OrderConfirmation.
66 |
# File 'lib/portage/ucp/value_objects.rb', line 66 def initialize(id:, permalink_url:, label: nil) = super |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id
65 66 67 |
# File 'lib/portage/ucp/value_objects.rb', line 65 def id @id end |
#label ⇒ Object (readonly)
Returns the value of attribute label
65 66 67 |
# File 'lib/portage/ucp/value_objects.rb', line 65 def label @label end |
#permalink_url ⇒ Object (readonly)
Returns the value of attribute permalink_url
65 66 67 |
# File 'lib/portage/ucp/value_objects.rb', line 65 def permalink_url @permalink_url end |
Instance Method Details
#to_wire_h ⇒ Object
68 69 70 71 72 |
# File 'lib/portage/ucp/value_objects.rb', line 68 def to_wire_h h = { "id" => id, "permalink_url" => permalink_url } h["label"] = label if label h end |