/// <summary>
        /// Sends an UnsubscribePartNotification message to a store.
        /// </summary>
        /// <param name="requestUuid">The request UUID.</param>
        /// <returns>The message identifier.</returns>
        public long UnsubscribePartNotification(Guid requestUuid)
        {
            var header = CreateMessageHeader(Protocols.GrowingObjectNotification, MessageTypes.GrowingObjectNotification.UnsubscribePartNotification);

            var cancelNotification = new UnsubscribePartNotification
            {
                RequestUuid = requestUuid.ToUuid()
            };

            return(Session.SendMessage(header, cancelNotification));
        }
Beispiel #2
0
        /// <summary>
        /// Sends an UnsubscribePartNotification message to a store.
        /// </summary>
        /// <param name="requestUuid">The request UUID.</param>
        /// <returns>The sent message on success; <c>null</c> otherwise.</returns>
        public virtual EtpMessage <UnsubscribePartNotification> UnsubscribePartNotification(Guid requestUuid, IMessageHeaderExtension extension = null)
        {
            var body = new UnsubscribePartNotification
            {
                RequestUuid = requestUuid,
            };

            var message = SendRequest(body, extension: extension);

            if (message != null)
            {
                TryUnregisterSubscription(body, nameof(body.RequestUuid), message);
            }

            return(message);
        }
 /// <summary>
 /// Handles the UnsubscribePartNotification message from a customer.
 /// </summary>
 /// <param name="header">The message header.</param>
 /// <param name="request">The UnsubscribePartNotification message.</param>
 protected virtual void HandleUnsubscribePartNotification(IMessageHeader header, UnsubscribePartNotification request)
 {
     Notify(OnUnsubscribePartNotification, header, request);
 }