moov-io/customers

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

DylanAllen opened this issue · 0 comments

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"
      }
   ],
   ...
}