|
|
|
|
What is correct use of SetNotificationPreferences
Posted:
Nov 23, 2009 4:29 PM
|
|
Hi, all:
I am testing SetNotificationPreferences but always get error. I've no idea what bit is missing.Below is my code:
SetNotificationPreferencesRequestType request = new SetNotificationPreferencesRequestType(); request.Version = VERSION_TRADING; request.ApplicationDeliveryPreferences = new ApplicationDeliveryPreferencesType(); request.ApplicationDeliveryPreferences.AlertEmail = "mailto://xxx@xxx.com"; request.ApplicationDeliveryPreferences.AlertEnable = EnableCodeType.Enable; request.ApplicationDeliveryPreferences.AlertEnableSpecified = true; request.ApplicationDeliveryPreferences.DeviceType = DeviceTypeCodeType.Platform; request.ApplicationDeliveryPreferences.DeviceTypeSpecified = true; request.ApplicationDeliveryPreferences.DeliveryURLDetails = new DeliveryURLDetailType[1]; request.ApplicationDeliveryPreferences.DeliveryURLDetails[0] = new DeliveryURLDetailType(); request.ApplicationDeliveryPreferences.DeliveryURLDetails[0].DeliveryURL = "mailto://xxx@xxx.com"; request.ApplicationDeliveryPreferences.DeliveryURLDetails[0].DeliveryURLName = "Email"; request.ApplicationDeliveryPreferences.DeliveryURLDetails[0].Status = EnableCodeType.Enable; request.ApplicationDeliveryPreferences.DeliveryURLDetails[0].StatusSpecified = true; request.DeliveryURLName = "Email";
request.UserDeliveryPreferenceArray = new NotificationEnableType[1]; request.UserDeliveryPreferenceArray[0] = new NotificationEnableType(); request.UserDeliveryPreferenceArray[0].EventEnable = EnableCodeType.Enable; request.UserDeliveryPreferenceArray[0].EventEnableSpecified = true; request.UserDeliveryPreferenceArray[0].EventType = NotificationEventTypeCodeType.ItemSold; request.UserDeliveryPreferenceArray[0].EventTypeSpecified = true;
SetNotificationPreferencesResponseType response = _apiService.SetNotificationPreferences(request);
The error is "Preference DeliveryURL is required, please provide it in your request.".
Obviously there is another DeliveryURL I need to look at. Where is it?
Thanks in advance for help.
|
|
|