Class: Portage::Ucp::SavedAddress

Inherits:
Data
  • Object
show all
Defined in:
lib/portage/ucp/value_objects.rb

Overview

Portage extension (app.portage-ucp.saved_address) — wraps the existing transient-checkout PostalAddress with an id + timestamp so it can be listed/deleted.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#address ⇒ Object (readonly)

Returns the value of attribute address

Returns:

  • (Object) —

    the current value of address



590
591
592
# File 'lib/portage/ucp/value_objects.rb', line 590

def address
  @address
end

#created_at ⇒ Object (readonly)

Returns the value of attribute created_at

Returns:

  • (Object) —

    the current value of created_at



590
591
592
# File 'lib/portage/ucp/value_objects.rb', line 590

def created_at
  @created_at
end

#id ⇒ Object (readonly)

Returns the value of attribute id

Returns:

  • (Object) —

    the current value of id



590
591
592
# File 'lib/portage/ucp/value_objects.rb', line 590

def id
  @id
end

Instance Method Details

#to_wire_h ⇒ Object



591
# File 'lib/portage/ucp/value_objects.rb', line 591

def to_wire_h = { "id" => id, "created_at" => created_at }.merge(address.to_wire_h)