示例#1
0
        /// <summary>
        /// Set a webhook config.
        /// </summary>
        /// <param name="config">the webhook config</param>
        /// <returns>a task</returns>
        public Task SetWebhookConfig(WebhookConfig config)
        {
            var request = new SetWebhookConfigRequest {
                Config = config
            };

            return(gateway(authenticationContext()).SetWebhookConfigAsync(request).ToTask());
        }
示例#2
0
        /// <summary>
        /// Set a webhook config.
        /// </summary>
        /// <param name="tpp">The TPP member</param>
        public static void SetWebhookConfig(TppMember tpp)
        {
            WebhookConfig config = new WebhookConfig
            {
                Url = "http://example.token.io/webhook"
            };

            config.Type.Add(EventType.TransferStatusChanged);

            tpp.SetWebhookConfigBlocking(config);
        }
示例#3
0
 /// <summary>
 /// Set a webhook config.
 /// </summary>
 /// <param name="config">the webhook config</param>
 public void SetWebhookConfigBlocking(WebhookConfig config)
 {
     SetWebhookConfig(config).Wait();
 }
示例#4
0
 /// <summary>
 /// Set a webhook config.
 /// </summary>
 /// <param name="config">the webhook config</param>
 /// <returns>a task</returns>
 public Task SetWebhookConfig(WebhookConfig config)
 {
     return(client.SetWebhookConfig(config));
 }