You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems like a bug or an error in the documentation.
There seems to be a somewhat of a hack-ish way around, though.
If you, when updating the customer, set DefaultDeliveryTypes to null, the previous values seems to stick. Something like: var customer = new Customer{/*Add the properties to update*/, DefaultDeliveryTypes=null}
You may notice that I used a fair amount of "seems" in the statements above. Take that as an indication that I didn't test it that much and setting a property that is allocated in the constructor to null "feels" wrong...
I guess that the safest way to do it is to fetch the existing customer, update what ever you want to update and send the object back.
Thanks for the answer. I tested the things you suggest myself, and as far as I can tell, it works. Mainly, I wanted to highlight the issue, even though I am not sure about the best way to go about resolving it in a more permanent way.
When following the instructions here for updating a Customer, the Customers DefaultDeliveryTypes are all set to EMAIL.
This seems to be the issue, with DefaultDeliveryTypes being set in the constructor for the Customer class.
This clashes with the statement that only the properties that you provide will be updated.
The text was updated successfully, but these errors were encountered: