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.
396 |
# File 'lib/portage/ucp/value_objects.rb', line 396 def initialize(id:, permalink_url:, label: nil) = super |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id
395 396 397 |
# File 'lib/portage/ucp/value_objects.rb', line 395 def id @id end |
#label ⇒ Object (readonly)
Returns the value of attribute label
395 396 397 |
# File 'lib/portage/ucp/value_objects.rb', line 395 def label @label end |
#permalink_url ⇒ Object (readonly)
Returns the value of attribute permalink_url
395 396 397 |
# File 'lib/portage/ucp/value_objects.rb', line 395 def permalink_url @permalink_url end |
Instance Method Details
#to_wire_h ⇒ Object
398 399 400 401 402 |
# File 'lib/portage/ucp/value_objects.rb', line 398 def to_wire_h h = { "id" => id, "permalink_url" => permalink_url } h["label"] = label if label h end |