Class: Portage::Ucp::FulfillmentAvailableMethod
- Inherits:
-
Data
- Object
- Data
- Portage::Ucp::FulfillmentAvailableMethod
- Defined in:
- lib/portage/ucp/value_objects.rb
Overview
schemas/shopping/types/fulfillment_available_method.json — an inventory availability hint (preorder/pickup-today/etc.), independent of whether the buyer has actually chosen that method yet.
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#fulfillable_on ⇒ Object
readonly
Returns the value of attribute fulfillable_on.
-
#line_item_ids ⇒ Object
readonly
Returns the value of attribute line_item_ids.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type:, line_item_ids:, fulfillable_on: nil, description: nil) ⇒ FulfillmentAvailableMethod
constructor
A new instance of FulfillmentAvailableMethod.
- #to_wire_h ⇒ Object
Constructor Details
#initialize(type:, line_item_ids:, fulfillable_on: nil, description: nil) ⇒ FulfillmentAvailableMethod
Returns a new instance of FulfillmentAvailableMethod.
327 |
# File 'lib/portage/ucp/value_objects.rb', line 327 def initialize(type:, line_item_ids:, fulfillable_on: nil, description: nil) = super |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description
326 327 328 |
# File 'lib/portage/ucp/value_objects.rb', line 326 def description @description end |
#fulfillable_on ⇒ Object (readonly)
Returns the value of attribute fulfillable_on
326 327 328 |
# File 'lib/portage/ucp/value_objects.rb', line 326 def fulfillable_on @fulfillable_on end |
#line_item_ids ⇒ Object (readonly)
Returns the value of attribute line_item_ids
326 327 328 |
# File 'lib/portage/ucp/value_objects.rb', line 326 def line_item_ids @line_item_ids end |
#type ⇒ Object (readonly)
Returns the value of attribute type
326 327 328 |
# File 'lib/portage/ucp/value_objects.rb', line 326 def type @type end |
Instance Method Details
#to_wire_h ⇒ Object
329 330 331 332 333 334 |
# File 'lib/portage/ucp/value_objects.rb', line 329 def to_wire_h h = { "type" => type, "line_item_ids" => line_item_ids } h["fulfillable_on"] = fulfillable_on if fulfillable_on h["description"] = description if description h end |