Class: Portage::Ucp::Expectation
- Inherits:
-
Data
- Object
- Data
- Portage::Ucp::Expectation
- Defined in:
- lib/portage/ucp/value_objects.rb
Overview
schemas/shopping/types/expectation.json — buyer-facing delivery grouping.
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#destination ⇒ Object
readonly
Returns the value of attribute destination.
-
#fulfillable_on ⇒ Object
readonly
Returns the value of attribute fulfillable_on.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#line_items ⇒ Object
readonly
Returns the value of attribute line_items.
-
#method_type ⇒ Object
readonly
Returns the value of attribute method_type.
Instance Method Summary collapse
-
#initialize(id:, line_items:, method_type:, destination:, description: nil, fulfillable_on: nil) ⇒ Expectation
constructor
A new instance of Expectation.
- #to_wire_h ⇒ Object
Constructor Details
#initialize(id:, line_items:, method_type:, destination:, description: nil, fulfillable_on: nil) ⇒ Expectation
Returns a new instance of Expectation.
110 |
# File 'lib/portage/ucp/value_objects.rb', line 110 def initialize(id:, line_items:, method_type:, destination:, description: nil, fulfillable_on: nil) = super |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description
109 110 111 |
# File 'lib/portage/ucp/value_objects.rb', line 109 def description @description end |
#destination ⇒ Object (readonly)
Returns the value of attribute destination
109 110 111 |
# File 'lib/portage/ucp/value_objects.rb', line 109 def destination @destination end |
#fulfillable_on ⇒ Object (readonly)
Returns the value of attribute fulfillable_on
109 110 111 |
# File 'lib/portage/ucp/value_objects.rb', line 109 def fulfillable_on @fulfillable_on end |
#id ⇒ Object (readonly)
Returns the value of attribute id
109 110 111 |
# File 'lib/portage/ucp/value_objects.rb', line 109 def id @id end |
#line_items ⇒ Object (readonly)
Returns the value of attribute line_items
109 110 111 |
# File 'lib/portage/ucp/value_objects.rb', line 109 def line_items @line_items end |
#method_type ⇒ Object (readonly)
Returns the value of attribute method_type
109 110 111 |
# File 'lib/portage/ucp/value_objects.rb', line 109 def method_type @method_type end |
Instance Method Details
#to_wire_h ⇒ Object
112 113 114 115 116 117 |
# File 'lib/portage/ucp/value_objects.rb', line 112 def to_wire_h h = { "id" => id, "line_items" => line_items, "method_type" => method_type, "destination" => destination } h["description"] = description if description h["fulfillable_on"] = fulfillable_on if fulfillable_on h end |