Example #1
0
 public SetWebhookCriteria(
     WebhookIdentifiersCriteria ids,
     string baseUrl,
     Dictionary <string, string> headers,
     WebhookFormats format,
     string templateId,
     Dictionary <string, string> templateFields,
     string downlinkApiKey,
     WebhookMessageCriteria uplinkMessage,
     WebhookMessageCriteria joinAccept,
     WebhookMessageCriteria downlinkAck,
     WebhookMessageCriteria downlinkNack,
     WebhookMessageCriteria downlinkSent,
     WebhookMessageCriteria downlinkFailed,
     WebhookMessageCriteria downlinkQueued,
     WebhookMessageCriteria downlinkQueueInvalidated,
     WebhookMessageCriteria locationSolved,
     WebhookMessageCriteria serviceData)
 {
     this.Ids                      = ids;
     this.BaseUrl                  = baseUrl;
     this.Headers                  = headers;
     this.Format                   = format;
     this.TemplateId               = templateId;
     this.TemplateFields           = templateFields;
     this.DownlinkApiKey           = downlinkApiKey;
     this.UplinkMessage            = uplinkMessage;
     this.JoinAccept               = joinAccept;
     this.DownlinkAck              = downlinkAck;
     this.DownlinkNack             = downlinkNack;
     this.DownlinkSent             = downlinkSent;
     this.DownlinkFailed           = downlinkFailed;
     this.DownlinkQueued           = downlinkQueued;
     this.DownlinkQueueInvalidated = downlinkQueueInvalidated;
     this.LocationSolved           = locationSolved;
     this.ServiceData              = serviceData;
 }
Example #2
0
        public SetWebhookCriteria(
            string id,
            string applicationId,
            string baseUrl,
            Dictionary <string, string> headers,
            WebhookFormats format,
            string templateId,
            Dictionary <string, string> templateFields,
            string downlinkApiKey,
            string uplinkMessagePath,
            string joinAcceptPath,
            string downlinkAckPath,
            string downlinkNackPath,
            string downlinkSentPath,
            string downlinkFailedPath,
            string downlinkQueuedPath,
            string downlinkQueueInvalidatedPath,
            string locationSolvedPath,
            string serviceDataPath)
        {
            this.Ids = new WebhookIdentifiersCriteria(
                applicationIdentifiers: new ApplicationIdentifierCriteria(applicationId: applicationId),
                webhookId: id);

            this.BaseUrl        = baseUrl;
            this.Headers        = headers;
            this.Format         = format;
            this.TemplateId     = templateId;
            this.TemplateFields = templateFields;
            this.DownlinkApiKey = downlinkApiKey;

            if (!string.IsNullOrWhiteSpace(uplinkMessagePath))
            {
                this.UplinkMessage = new WebhookMessageCriteria(path: uplinkMessagePath);
            }

            if (!string.IsNullOrWhiteSpace(joinAcceptPath))
            {
                this.JoinAccept = new WebhookMessageCriteria(path: joinAcceptPath);
            }

            if (!string.IsNullOrWhiteSpace(downlinkAckPath))
            {
                this.DownlinkAck = new WebhookMessageCriteria(path: downlinkAckPath);
            }

            if (!string.IsNullOrWhiteSpace(downlinkNackPath))
            {
                this.DownlinkNack = new WebhookMessageCriteria(path: downlinkNackPath);
            }

            if (!string.IsNullOrWhiteSpace(downlinkSentPath))
            {
                this.DownlinkSent = new WebhookMessageCriteria(path: downlinkSentPath);
            }

            if (!string.IsNullOrWhiteSpace(downlinkFailedPath))
            {
                this.DownlinkFailed = new WebhookMessageCriteria(path: downlinkFailedPath);
            }

            if (!string.IsNullOrWhiteSpace(downlinkQueuedPath))
            {
                this.DownlinkQueued = new WebhookMessageCriteria(path: downlinkQueuedPath);
            }

            if (!string.IsNullOrWhiteSpace(downlinkQueueInvalidatedPath))
            {
                this.DownlinkQueueInvalidated = new WebhookMessageCriteria(path: downlinkQueueInvalidatedPath);
            }

            if (!string.IsNullOrWhiteSpace(locationSolvedPath))
            {
                this.LocationSolved = new WebhookMessageCriteria(path: locationSolvedPath);
            }

            if (!string.IsNullOrWhiteSpace(serviceDataPath))
            {
                this.ServiceData = new WebhookMessageCriteria(path: serviceDataPath);
            }
        }