Class: Portage::Ucp::FulfillmentEvent
- Inherits:
-
Data
- Object
- Data
- Portage::Ucp::FulfillmentEvent
- Defined in:
- lib/portage/ucp/value_objects.rb
Overview
schemas/shopping/types/fulfillment_event.json — append-only shipment event.
Instance Attribute Summary collapse
-
#carrier ⇒ Object
readonly
Returns the value of attribute carrier.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#line_items ⇒ Object
readonly
Returns the value of attribute line_items.
-
#occurred_at ⇒ Object
readonly
Returns the value of attribute occurred_at.
-
#tracking_number ⇒ Object
readonly
Returns the value of attribute tracking_number.
-
#tracking_url ⇒ Object
readonly
Returns the value of attribute tracking_url.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(id:, occurred_at:, type:, line_items:, tracking_number: nil, tracking_url: nil, carrier: nil, description: nil) ⇒ FulfillmentEvent
constructor
A new instance of FulfillmentEvent.
- #to_wire_h ⇒ Object
Constructor Details
#initialize(id:, occurred_at:, type:, line_items:, tracking_number: nil, tracking_url: nil, carrier: nil, description: nil) ⇒ FulfillmentEvent
Returns a new instance of FulfillmentEvent.
463 464 465 466 |
# File 'lib/portage/ucp/value_objects.rb', line 463 def initialize(id:, occurred_at:, type:, line_items:, tracking_number: nil, tracking_url: nil, carrier: nil, description: nil) super end |
Instance Attribute Details
#carrier ⇒ Object (readonly)
Returns the value of attribute carrier
461 462 463 |
# File 'lib/portage/ucp/value_objects.rb', line 461 def carrier @carrier end |
#description ⇒ Object (readonly)
Returns the value of attribute description
461 462 463 |
# File 'lib/portage/ucp/value_objects.rb', line 461 def description @description end |
#id ⇒ Object (readonly)
Returns the value of attribute id
461 462 463 |
# File 'lib/portage/ucp/value_objects.rb', line 461 def id @id end |
#line_items ⇒ Object (readonly)
Returns the value of attribute line_items
461 462 463 |
# File 'lib/portage/ucp/value_objects.rb', line 461 def line_items @line_items end |
#occurred_at ⇒ Object (readonly)
Returns the value of attribute occurred_at
461 462 463 |
# File 'lib/portage/ucp/value_objects.rb', line 461 def occurred_at @occurred_at end |
#tracking_number ⇒ Object (readonly)
Returns the value of attribute tracking_number
461 462 463 |
# File 'lib/portage/ucp/value_objects.rb', line 461 def tracking_number @tracking_number end |
#tracking_url ⇒ Object (readonly)
Returns the value of attribute tracking_url
461 462 463 |
# File 'lib/portage/ucp/value_objects.rb', line 461 def tracking_url @tracking_url end |
#type ⇒ Object (readonly)
Returns the value of attribute type
461 462 463 |
# File 'lib/portage/ucp/value_objects.rb', line 461 def type @type end |
Instance Method Details
#to_wire_h ⇒ Object
468 469 470 471 472 473 474 475 |
# File 'lib/portage/ucp/value_objects.rb', line 468 def to_wire_h h = { "id" => id, "occurred_at" => occurred_at, "type" => type, "line_items" => line_items } h["tracking_number"] = tracking_number if tracking_number h["tracking_url"] = tracking_url if tracking_url h["carrier"] = carrier if carrier h["description"] = description if description h end |