Пример #1
0
 /// <summary>
 /// Get web hooks configured for a particular app
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='ownerName'>
 /// The name of the owner
 /// </param>
 /// <param name='appName'>
 /// The name of the application
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <AlertWebhookListResult> ListAsync(this IWebhooks operations, string ownerName, string appName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(ownerName, appName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #2
0
 /// <summary>
 /// Triggers an event of type "custom"
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Webhooks or Webhooks.Write.
 ///
 /// Required permissions: Webhooks.View.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// Any custom event data payload
 /// </param>
 /// <param name='expand'>
 /// Indicates the related entities to be represented inline. The maximum depth
 /// is 2.
 /// </param>
 /// <param name='select'>
 /// Limits the properties returned in the result.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CustomEventDto> TriggerCustomAsync(this IWebhooks operations, IDictionary <string, object> body = default(IDictionary <string, object>), string expand = default(string), string select = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.TriggerCustomWithHttpMessagesAsync(body, expand, select, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #3
0
 /// <summary>
 /// Create a new webhook subscription
 /// </summary>
 /// <remarks>
 /// Required permissions: Webhooks.Create.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='webhookDto'>
 /// The entity to post
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <WebhookDto> PostAsync(this IWebhooks operations, WebhookDto webhookDto, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     using (var _result = await operations.PostWithHttpMessagesAsync(webhookDto, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #4
0
 /// <summary>
 /// Patches a webhook
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Webhooks or Webhooks.Write.
 ///
 /// Required permissions: Webhooks.Edit.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='key'>
 /// </param>
 /// <param name='body'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <WebhookDto> PatchByIdAsync(this IWebhooks operations, long key, WebhookDto body = default(WebhookDto), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.PatchByIdWithHttpMessagesAsync(key, body, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #5
0
 /// <summary>
 /// Gets a single webhook
 /// </summary>
 /// <remarks>
 /// Required permissions: Webhooks.View.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// key: Id
 /// </param>
 /// <param name='expand'>
 /// Expands related entities inline.
 /// </param>
 /// <param name='select'>
 /// Selects which properties to include in the response.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <WebhookDto> GetByIdAsync(this IWebhooks operations, long id, string expand = default(string), string select = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     using (var _result = await operations.GetByIdWithHttpMessagesAsync(id, expand, select, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #6
0
 /// <summary>
 /// Sends a Ping request to webhook endpoint.
 /// Used for testing connectivity and availability of target URL
 /// </summary>
 /// <remarks>
 /// Required permissions: Webhooks.View.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// key: Id
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <PingEventDto> PingByIdAsync(this IWebhooks operations, long id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     using (var _result = await operations.PingByIdWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #7
0
 /// <summary>
 /// Triggers an event of type "custom"
 /// </summary>
 /// <remarks>
 /// Required permissions: Webhooks.View.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='eventData'>
 /// Any custom event data payload
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CustomEventDto> TriggerCustomAsync(this IWebhooks operations, object eventData, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     using (var _result = await operations.TriggerCustomWithHttpMessagesAsync(eventData, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #8
0
 /// <summary>
 /// Sends a Ping request to webhook endpoint.
 /// Used for testing connectivity and availability of target URL
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Webhooks or Webhooks.Write.
 ///
 /// Required permissions: Webhooks.View.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='key'>
 /// </param>
 /// <param name='expand'>
 /// Indicates the related entities to be represented inline. The maximum depth
 /// is 2.
 /// </param>
 /// <param name='select'>
 /// Limits the properties returned in the result.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <PingEventDto> PingByIdAsync(this IWebhooks operations, long key, string expand = default(string), string select = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.PingByIdWithHttpMessagesAsync(key, expand, select, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #9
0
 /// <summary>
 /// List webhooks
 /// </summary>
 /// <remarks>
 /// Required permissions: Webhooks.View.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='expand'>
 /// Expands related entities inline.
 /// </param>
 /// <param name='filter'>
 /// Filters the results, based on a Boolean condition.
 /// </param>
 /// <param name='select'>
 /// Selects which properties to include in the response.
 /// </param>
 /// <param name='orderby'>
 /// Sorts the results.
 /// </param>
 /// <param name='top'>
 /// Returns only the first n results.
 /// </param>
 /// <param name='skip'>
 /// Skips the first n results.
 /// </param>
 /// <param name='count'>
 /// Includes a count of the matching results in the response.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ODataResponseListWebhookDto> GetWebhooksAsync(this IWebhooks operations, string expand = default(string), string filter = default(string), string select = default(string), string orderby = default(string), int?top = default(int?), int?skip = default(int?), bool?count = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     using (var _result = await operations.GetWebhooksWithHttpMessagesAsync(expand, filter, select, orderby, top, skip, count, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #10
0
        public WebhookSender(IMemory memory, IWebhooks webhooks, IConfiguration config)
        {
            this._webhooks    = webhooks;
            this._memory      = memory;
            this._config      = config;
            this.sendInterval = _config.GetValue <int>("WebhookSendInterval");
            timer             = new System.Timers.Timer(sendInterval);
            this.webhookUrls  = _config.GetSection("WebhookUrls").Get <string[]>();

            if (this.webhookUrls == null)
            {
                throw new Exception("Loading webhook urls failed. Make sure WebhookUrls array in config exist and is not empty");
            }
            timer.AutoReset = true;
        }
Пример #11
0
 /// <summary>
 /// Gets the list of event types a webhook can subscribe to
 /// </summary>
 /// <remarks>
 /// Required permissions: Webhooks.View.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ODataResponseListWebhookEventTypeDto> GetEventTypesAsync(this IWebhooks operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     using (var _result = await operations.GetEventTypesWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #12
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Account                = new Account(this);
     Logs                   = new Logs(this);
     RobotsService          = new RobotsService(this);
     Stats                  = new Stats(this);
     Status                 = new Status(this);
     Translations           = new Translations(this);
     Alerts                 = new Alerts(this);
     Assets                 = new Assets(this);
     AuditLogs              = new AuditLogs(this);
     Environments           = new Environments(this);
     ExecutionMedia         = new ExecutionMedia(this);
     HostLicenses           = new HostLicenses(this);
     Jobs                   = new Jobs(this);
     Libraries              = new Libraries(this);
     LicensesNamedUser      = new LicensesNamedUser(this);
     LicensesRuntime        = new LicensesRuntime(this);
     Machines               = new Machines(this);
     MessageTemplates       = new MessageTemplates(this);
     Permissions            = new Permissions(this);
     Processes              = new Processes(this);
     ProcessSchedules       = new ProcessSchedules(this);
     QueueDefinitions       = new QueueDefinitions(this);
     QueueItemComments      = new QueueItemComments(this);
     QueueItemEvents        = new QueueItemEvents(this);
     QueueItems             = new QueueItems(this);
     QueueProcessingRecords = new QueueProcessingRecords(this);
     Queues                 = new Queues(this);
     Releases               = new Releases(this);
     RobotLogs              = new RobotLogs(this);
     Robots                 = new Robots(this);
     Roles                  = new Roles(this);
     Sessions               = new Sessions(this);
     Settings               = new Settings(this);
     Tenants                = new Tenants(this);
     UserLoginAttempts      = new UserLoginAttempts(this);
     Users                  = new Users(this);
     Webhooks               = new Webhooks(this);
     BaseUri                = new System.Uri("https://platform.uipath.com");
     SerializationSettings  = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new  List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
 }
Пример #13
0
 /// <summary>
 /// Gets the list of event types a webhook can subscribe to
 /// </summary>
 /// <remarks>
 /// Required permissions: Webhooks.View.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static ODataResponseListWebhookEventTypeDto GetEventTypes(this IWebhooks operations)
 {
     return(operations.GetEventTypesAsync().GetAwaiter().GetResult());
 }
Пример #14
0
 /// <summary>
 /// Update entity in EntitySet Webhooks
 /// </summary>
 /// <remarks>
 /// Required permissions: Webhooks.Edit.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// key: Id
 /// </param>
 /// <param name='webhookDto'>
 /// The entity to patch
 /// </param>
 public static WebhookDto PatchById(this IWebhooks operations, long id, WebhookDto webhookDto)
 {
     return(operations.PatchByIdAsync(id, webhookDto).GetAwaiter().GetResult());
 }
Пример #15
0
 /// <summary>
 /// Sends a Ping request to webhook endpoint.
 /// Used for testing connectivity and availability of target URL
 /// </summary>
 /// <remarks>
 /// Required permissions: Webhooks.View.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// key: Id
 /// </param>
 public static PingEventDto PingById(this IWebhooks operations, long id)
 {
     return(operations.PingByIdAsync(id).GetAwaiter().GetResult());
 }
Пример #16
0
 /// <summary>
 /// List webhooks
 /// </summary>
 /// <remarks>
 /// Required permissions: Webhooks.View.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='expand'>
 /// Expands related entities inline.
 /// </param>
 /// <param name='filter'>
 /// Filters the results, based on a Boolean condition.
 /// </param>
 /// <param name='select'>
 /// Selects which properties to include in the response.
 /// </param>
 /// <param name='orderby'>
 /// Sorts the results.
 /// </param>
 /// <param name='top'>
 /// Returns only the first n results.
 /// </param>
 /// <param name='skip'>
 /// Skips the first n results.
 /// </param>
 /// <param name='count'>
 /// Includes a count of the matching results in the response.
 /// </param>
 public static ODataResponseListWebhookDto GetWebhooks(this IWebhooks operations, string expand = default(string), string filter = default(string), string select = default(string), string orderby = default(string), int?top = default(int?), int?skip = default(int?), bool?count = default(bool?))
 {
     return(operations.GetWebhooksAsync(expand, filter, select, orderby, top, skip, count).GetAwaiter().GetResult());
 }
Пример #17
0
 /// <summary>
 /// Gets the list of event types a webhook can subscribe to
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Webhooks or Webhooks.Read.
 ///
 /// Required permissions: Webhooks.View.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='expand'>
 /// Indicates the related entities to be represented inline. The maximum depth
 /// is 2.
 /// </param>
 /// <param name='filter'>
 /// Restricts the set of items returned. The maximum number of expressions is
 /// 100.
 /// </param>
 /// <param name='select'>
 /// Limits the properties returned in the result.
 /// </param>
 /// <param name='orderby'>
 /// Specifies the order in which items are returned. The maximum number of
 /// expressions is 5.
 /// </param>
 /// <param name='count'>
 /// Indicates whether the total count of items within a collection are returned
 /// in the result.
 /// </param>
 public static ODataValueOfIEnumerableOfWebhookEventTypeDto GetEventTypes(this IWebhooks operations, string expand = default(string), string filter = default(string), string select = default(string), string orderby = default(string), bool?count = default(bool?))
 {
     return(operations.GetEventTypesAsync(expand, filter, select, orderby, count).GetAwaiter().GetResult());
 }
Пример #18
0
 /// <summary>
 /// Gets a single webhook
 /// </summary>
 /// <remarks>
 /// Required permissions: Webhooks.View.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// key: Id
 /// </param>
 /// <param name='expand'>
 /// Expands related entities inline.
 /// </param>
 /// <param name='select'>
 /// Selects which properties to include in the response.
 /// </param>
 public static WebhookDto GetById(this IWebhooks operations, long id, string expand = default(string), string select = default(string))
 {
     return(operations.GetByIdAsync(id, expand, select).GetAwaiter().GetResult());
 }
Пример #19
0
 /// <summary>
 /// Create a new webhook subscription
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Webhooks or Webhooks.Write.
 ///
 /// Required permissions: Webhooks.Create.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// </param>
 public static WebhookDto Post(this IWebhooks operations, WebhookDto body = default(WebhookDto))
 {
     return(operations.PostAsync(body).GetAwaiter().GetResult());
 }
Пример #20
0
 /// <summary>
 /// Delete a webhook subscription
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Webhooks or Webhooks.Write.
 ///
 /// Required permissions: Webhooks.Delete.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='key'>
 /// </param>
 public static void DeleteById(this IWebhooks operations, long key)
 {
     operations.DeleteByIdAsync(key).GetAwaiter().GetResult();
 }
Пример #21
0
 /// <summary>
 /// Patches a webhook
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Webhooks or Webhooks.Write.
 ///
 /// Required permissions: Webhooks.Edit.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='key'>
 /// </param>
 /// <param name='body'>
 /// </param>
 public static WebhookDto PatchById(this IWebhooks operations, long key, WebhookDto body = default(WebhookDto))
 {
     return(operations.PatchByIdAsync(key, body).GetAwaiter().GetResult());
 }
Пример #22
0
 /// <summary>
 /// Delete a webhook subscription
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Webhooks or Webhooks.Write.
 ///
 /// Required permissions: Webhooks.Delete.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='key'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteByIdAsync(this IWebhooks operations, long key, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteByIdWithHttpMessagesAsync(key, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Пример #23
0
 /// <summary>
 /// Triggers an event of type "custom"
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Webhooks or Webhooks.Write.
 ///
 /// Required permissions: Webhooks.View.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// Any custom event data payload
 /// </param>
 /// <param name='expand'>
 /// Indicates the related entities to be represented inline. The maximum depth
 /// is 2.
 /// </param>
 /// <param name='select'>
 /// Limits the properties returned in the result.
 /// </param>
 public static CustomEventDto TriggerCustom(this IWebhooks operations, IDictionary <string, object> body = default(IDictionary <string, object>), string expand = default(string), string select = default(string))
 {
     return(operations.TriggerCustomAsync(body, expand, select).GetAwaiter().GetResult());
 }
Пример #24
0
 /// <summary>
 /// Gets the list of event types a webhook can subscribe to
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Webhooks or Webhooks.Read.
 ///
 /// Required permissions: Webhooks.View.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='expand'>
 /// Indicates the related entities to be represented inline. The maximum depth
 /// is 2.
 /// </param>
 /// <param name='filter'>
 /// Restricts the set of items returned. The maximum number of expressions is
 /// 100.
 /// </param>
 /// <param name='select'>
 /// Limits the properties returned in the result.
 /// </param>
 /// <param name='orderby'>
 /// Specifies the order in which items are returned. The maximum number of
 /// expressions is 5.
 /// </param>
 /// <param name='count'>
 /// Indicates whether the total count of items within a collection are returned
 /// in the result.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ODataValueOfIEnumerableOfWebhookEventTypeDto> GetEventTypesAsync(this IWebhooks operations, string expand = default(string), string filter = default(string), string select = default(string), string orderby = default(string), bool?count = default(bool?), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetEventTypesWithHttpMessagesAsync(expand, filter, select, orderby, count, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #25
0
 /// <summary>
 /// Triggers an event of type "custom"
 /// </summary>
 /// <remarks>
 /// Required permissions: Webhooks.View.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='eventData'>
 /// Any custom event data payload
 /// </param>
 public static CustomEventDto TriggerCustom(this IWebhooks operations, object eventData)
 {
     return(operations.TriggerCustomAsync(eventData).GetAwaiter().GetResult());
 }
Пример #26
0
 /// <summary>
 /// Delete a webhook subscription
 /// </summary>
 /// <remarks>
 /// Required permissions: Webhooks.Delete.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// key: Id
 /// </param>
 /// <param name='ifMatch'>
 /// If-Match header
 /// </param>
 public static void DeleteById(this IWebhooks operations, long id, string ifMatch = default(string))
 {
     operations.DeleteByIdAsync(id, ifMatch).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Gets the list of event types a webhook can subscribe to
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Webhooks or Webhooks.Read.
 ///
 /// Required permissions: Webhooks.View.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static ODataValueIEnumerableWebhookEventTypeDto GetEventTypes(this IWebhooks operations)
 {
     return(operations.GetEventTypesAsync().GetAwaiter().GetResult());
 }
Пример #28
0
 /// <summary>
 /// Delete a webhook subscription
 /// </summary>
 /// <remarks>
 /// Required permissions: Webhooks.Delete.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// key: Id
 /// </param>
 /// <param name='ifMatch'>
 /// If-Match header
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteByIdAsync(this IWebhooks operations, long id, string ifMatch = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     (await operations.DeleteByIdWithHttpMessagesAsync(id, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Пример #29
0
 /// <summary>
 /// Create a new webhook subscription
 /// </summary>
 /// <remarks>
 /// Required permissions: Webhooks.Create.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='webhookDto'>
 /// The entity to post
 /// </param>
 public static WebhookDto Post(this IWebhooks operations, WebhookDto webhookDto)
 {
     return(operations.PostAsync(webhookDto).GetAwaiter().GetResult());
 }
Пример #30
0
 /// <summary>
 /// Sends a Ping request to webhook endpoint.
 /// Used for testing connectivity and availability of target URL
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Webhooks or Webhooks.Write.
 ///
 /// Required permissions: Webhooks.View.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='key'>
 /// </param>
 /// <param name='expand'>
 /// Indicates the related entities to be represented inline. The maximum depth
 /// is 2.
 /// </param>
 /// <param name='select'>
 /// Limits the properties returned in the result.
 /// </param>
 public static PingEventDto PingById(this IWebhooks operations, long key, string expand = default(string), string select = default(string))
 {
     return(operations.PingByIdAsync(key, expand, select).GetAwaiter().GetResult());
 }