Class: Portage::Ucp::RetailLocation
- Inherits:
-
Data
- Object
- Data
- Portage::Ucp::RetailLocation
- Defined in:
- lib/portage/ucp/value_objects.rb
Overview
schemas/shopping/types/retail_location.json — the pickup counterpart to
ShippingDestination; only address is optional.
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(id:, name:, address: nil) ⇒ RetailLocation
constructor
A new instance of RetailLocation.
- #to_wire_h ⇒ Object
Constructor Details
#initialize(id:, name:, address: nil) ⇒ RetailLocation
Returns a new instance of RetailLocation.
264 |
# File 'lib/portage/ucp/value_objects.rb', line 264 def initialize(id:, name:, address: nil) = super |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address
263 264 265 |
# File 'lib/portage/ucp/value_objects.rb', line 263 def address @address end |
#id ⇒ Object (readonly)
Returns the value of attribute id
263 264 265 |
# File 'lib/portage/ucp/value_objects.rb', line 263 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name
263 264 265 |
# File 'lib/portage/ucp/value_objects.rb', line 263 def name @name end |
Instance Method Details
#to_wire_h ⇒ Object
266 267 268 269 270 |
# File 'lib/portage/ucp/value_objects.rb', line 266 def to_wire_h h = { "id" => id, "name" => name } h["address"] = address.to_wire_h if address h end |