Hello,
i’m having issues adding/updating customers phone number.
So e.g. we have existing customer that may or may not have phone number set. If i try to add or update phone with patch request as suggested, patch data looking like this:
[{op: ‘add’, path: ‘/phones’, value: {:MOBILE=>{:areaCode=>‘44’, :localPhoneNumber=>‘7786675605’}}}]
request goes through and everything seems to be fine.
But when i try to fetch this customer afterwards, i’m getting this error:
JSON patch is invalid: Null key for a Map not allowed in JSON (use a converting NullKeySerializer?) (through reference chain: co.poynt.api.model.Customer[ " phones " ]->java.util.HashMap[ " null " ])
Just one note to add, if i create new customer with same json structure, meaning:
{phones: {:MOBILE=>{:areaCode=>‘44’, :localPhoneNumber=>‘7786675605’}}}
everything is fine, customer is created with phone and reachable afterwards.
Also creating and adding/updating customers emails works fine, its just phones that are making issues for me.
Any help would be appreciated.
Cheers