moov-io / customers

Customer registry supporting Know Your Customer (KYC), Customer Identification Program (CIP), and OFAC checks
https://moov.io
Apache License 2.0
69 stars 19 forks source link

Address type being overwritten as empty string on PUT to /customers/{customerID} #265

Closed DylanAllen closed 4 years ago

DylanAllen commented 4 years ago

Customers Version: 0.5.0-dev31

What were you trying to do? PUT /customers/{customerID} to update fields

What did you expect to see? All address data passed would come back as sent.

What did you see? The Address type came back as an empty string even though a type was passed as "primary" to the PUT.

How can we reproduce the problem? PUT /customers/{customerID} Request:

{
   "customerID":"{customerID}",
   ...
   "addresses":[
      {
         "addressID":"fa2100431d957fa7adc914dc8828424d31410275",
         "type":"primary",
         "address1":"1234 E 58th Pl",
         "city":"Tulsa",
         "state":"OK",
         "postalCode":"71234",
         "country":"US"
      }
   ],
   ...
}

Response:

{
   "customerID":"{customerID}",
   ...
   "addresses":[
      {
         "addressID":"fa2100431d957fa7adc914dc8828424d31410275",
         "type":"",
         "address1":"1234 E 58th Pl",
         "city":"Tulsa",
         "state":"OK",
         "postalCode":"71234",
         "country":"US"
      }
   ],
   ...
}