Exemplo n.º 1
0
        /// <summary>
        /// Sends a CancelNotification message to a store.
        /// </summary>
        /// <param name="requestUuid">The request UUID.</param>
        /// <returns>The message identifier.</returns>
        public long CancelNotification(string requestUuid)
        {
            var header = CreateMessageHeader(Protocols.StoreNotification, MessageTypes.StoreNotification.CancelNotification);

            var cancelNotification = new CancelNotification()
            {
                RequestUuid = requestUuid
            };

            return(Session.SendMessage(header, cancelNotification));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Sends a CancelNotification 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 <CancelNotification> CancelNotification(Guid requestUuid)
        {
            var body = new CancelNotification()
            {
                RequestUuid = requestUuid,
            };

            var message = SendRequest(body);

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

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