Skip to content
This repository has been archived by the owner on May 21, 2020. It is now read-only.

[RFC] agnostic address proposal #361

Closed
wants to merge 1 commit into from
Closed

Conversation

andrzejewsky
Copy link
Collaborator

  • I'm confirming that if i made any changes to public APIs or exposed any public APIs they are doccumented.

postcode?: string;
city?: string:
streetNumber?: string;
firstName?: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about another field: apartmentNumber


## Migration process

Prety straightforward, there is no address used besides comemrcools orders.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in my opinion, the address isn't agnostic, like Product, every platform may have different implementations, shopware example

export interface BillingAddress {
  countryId: string;
  salutationId: string;
  street: string;
  zipcode: string;
  city: string;
  title?: string;
  additionalAddressLine1?: string;
  additionalAddressLine2?: string;
  phoneNumber?: string;
}

export interface ShippingAddress extends BillingAddress {
  firstName: string;
  lastName: string;
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still, you can map your fields into the AgnosticAddress

countryId -> country,
salutationId -> region,
street -> street,
zipcode -> postcode,
city -> city,
title -> title,
additionalAddressLine1, additionalAddressLine2 -> additionalAddres (we can add it)
phoneNumber -> number

@rmakara
Copy link
Contributor

rmakara commented Apr 13, 2020

@andrzejewsky @patzick @defudef
https://youtu.be/DELWr2Cw30g?t=507

TL;DR; problem solved all around the world by postal offices :p do not reinvent the wheel. ;p

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
4 participants