コード例 #1
0
        /// <summary>
        /// Delete a Do Not Contact(DNC) value.
        /// </summary>
        /// <param name="number">number to remove dnc for</param>
        /// <exception cref="BadRequestException">          in case HTTP response code is 400 - Bad request, the request was formatted improperly.</exception>
        /// <exception cref="UnauthorizedException">        in case HTTP response code is 401 - Unauthorized, API Key missing or invalid.</exception>
        /// <exception cref="AccessForbiddenException">     in case HTTP response code is 403 - Forbidden, insufficient permissions.</exception>
        /// <exception cref="ResourceNotFoundException">    in case HTTP response code is 404 - NOT FOUND, the resource requested does not exist.</exception>
        /// <exception cref="InternalServerErrorException"> in case HTTP response code is 500 - Internal Server Error.</exception>
        /// <exception cref="CallfireApiException">         in case HTTP response code is something different from codes listed above.</exception>
        /// <exception cref="CallfireClientException">      in case error has occurred in client.</exception>
        public void Delete(string number)
        {
            Validate.NotNull(number, "number");
            string path = DNC_NUMBER_PATH.ReplaceFirst(ClientConstants.PLACEHOLDER, number);

            Client.Delete(path);
        }
コード例 #2
0
        public void DeleteOperation_ShouldDeleteFromDB()
        {
            Assert.True(_apiClient.Post("/api/v1/Operations/Save", SampleOperation()).IsSuccessStatusCode);

            var getOperationsResp = _apiClient.Post("/api/v1/Operations/List", new OperationGetRequest());

            Assert.True(getOperationsResp.IsSuccessStatusCode);
            var ops = getOperationsResp.Deserialize <IList <OperationResponse> >();

            Assert.Equal(1, ops.Count);

            var deleteResp = _apiClient.Delete("/api/v1/Operations/" + ops[0].Id.ToString());

            Assert.True(deleteResp.IsSuccessStatusCode);

            getOperationsResp = _apiClient.Post("/api/v1/Operations/List", new OperationGetRequest());
            Assert.True(getOperationsResp.IsSuccessStatusCode);
            ops = getOperationsResp.Deserialize <IList <OperationResponse> >();
            Assert.Equal(0, ops.Count);
        }
コード例 #3
0
        public void DeleteResource_ShouldDeleteFromDB()
        {
            Assert.True(_apiClient.Post("/api/v1/Resources/Save", SampleResource()).IsSuccessStatusCode);

            var getResourcesResp = _apiClient.Post("/api/v1/Resources/List", new ResourceGetRequest());

            Assert.True(getResourcesResp.IsSuccessStatusCode);
            var resources = getResourcesResp.Deserialize <IList <ResourceResponse> >();

            Assert.Equal(1, resources.Count);

            var deleteResp = _apiClient.Delete("/api/v1/Resources/" + resources[0].Id.ToString());

            Assert.True(deleteResp.IsSuccessStatusCode);

            getResourcesResp = _apiClient.Post("/api/v1/Resources/List", new ResourceGetRequest());
            Assert.True(getResourcesResp.IsSuccessStatusCode);
            resources = getResourcesResp.Deserialize <IList <ResourceResponse> >();
            Assert.Equal(0, resources.Count);
        }
コード例 #4
0
 /// <summary>
 /// Delete a contact that is stored in your Ez Texting account
 /// </summary>
 /// <param name="id">contact's id</param>
 /// <exception cref="EzTextingApiException">in case error has occurred on server side, check provided error description.</exception>
 /// <exception cref="EzTextingClientException">in case error has occurred in client.</exception>
 public void Delete(string id)
 {
     Validate.NotBlank(id, "id cannot be blank");
     _client.Delete(ContactsItemPath.ReplaceFirst(ClientConstants.Placeholder, id));
 }
コード例 #5
0
 /// <summary>
 /// Delete a group that is stored in your Ez Texting account
 /// </summary>
 /// <param name="id">group's id</param>
 /// <exception cref="EzTextingApiException">in case error has occurred on server side, check provided error description.</exception>
 /// <exception cref="EzTextingClientException">in case error has occurred in client.</exception>
 public void Delete(long id)
 {
     _client.Delete(GroupsItemPath.ReplaceFirst(ClientConstants.Placeholder, id.ToString()));
 }
コード例 #6
0
 public Job Delete(long id)
 {
     return(jobsApiClient.Delete(id));
 }
コード例 #7
0
 /// <summary>
 /// Delete subscription by id
 /// </summary>
 /// <param name="id">id of subscription</param>
 /// <exception cref="BadRequestException">          in case HTTP response code is 400 - Bad request, the request was formatted improperly.</exception>
 /// <exception cref="UnauthorizedException">        in case HTTP response code is 401 - Unauthorized, API Key missing or invalid.</exception>
 /// <exception cref="AccessForbiddenException">     in case HTTP response code is 403 - Forbidden, insufficient permissions.</exception>
 /// <exception cref="ResourceNotFoundException">    in case HTTP response code is 404 - NOT FOUND, the resource requested does not exist.</exception>
 /// <exception cref="InternalServerErrorException"> in case HTTP response code is 500 - Internal Server Error.</exception>
 /// <exception cref="CallfireApiException">         in case HTTP response code is something different from codes listed above.</exception>
 /// <exception cref="CallfireClientException">      in case error has occurred in client.</exception>
 public void Delete(long id)
 {
     Client.Delete(SUBSCRIPTIONS_ITEM_PATH.ReplaceFirst(ClientConstants.PLACEHOLDER, id.ToString()));
 }
コード例 #8
0
 /// <summary>
 /// Cancels an active Keyword on Ez Texting's short code in the country your account is set to send messages to.
 /// </summary>
 /// <param name="keyword">keyword</param>
 /// <exception cref="EzTextingApiException">in case error has occurred on server side, check provided error description.</exception>
 /// <exception cref="EzTextingClientException">in case error has occurred in client.</exception>
 public void Cancel(string keyword)
 {
     Validate.NotBlank(keyword, "keyword cannot be blank");
     _client.Delete(KeywordsItemPath.ReplaceFirst(ClientConstants.Placeholder, keyword));
 }
コード例 #9
0
 /// <summary>
 /// Delete DNC list
 /// </summary>
 /// <param name="id">DNC list id</param>
 /// <exception cref="BadRequestException">          in case HTTP response code is 400 - Bad request, the request was formatted improperly.</exception>
 /// <exception cref="UnauthorizedException">        in case HTTP response code is 401 - Unauthorized, API Key missing or invalid.</exception>
 /// <exception cref="AccessForbiddenException">     in case HTTP response code is 403 - Forbidden, insufficient permissions.</exception>
 /// <exception cref="ResourceNotFoundException">    in case HTTP response code is 404 - NOT FOUND, the resource requested does not exist.</exception>
 /// <exception cref="InternalServerErrorException"> in case HTTP response code is 500 - Internal Server Error.</exception>
 /// <exception cref="CallfireApiException">         in case HTTP response code is something different from codes listed above.</exception>
 /// <exception cref="CallfireClientException">      in case error has occurred in client.</exception>
 public void Delete(long id)
 {
     Client.Delete(DNC_LISTS_LIST_PATH.ReplaceFirst(ClientConstants.PLACEHOLDER, id.ToString()));
 }
コード例 #10
0
 /// <summary>
 /// Delete API credentials by id
 /// </summary>
 /// <param name="id">id of credentials</param>
 /// <exception cref="BadRequestException">          in case HTTP response code is 400 - Bad request, the request was formatted improperly.</exception>
 /// <exception cref="UnauthorizedException">        in case HTTP response code is 401 - Unauthorized, API Key missing or invalid.</exception>
 /// <exception cref="AccessForbiddenException">     in case HTTP response code is 403 - Forbidden, insufficient permissions.</exception>
 /// <exception cref="ResourceNotFoundException">    in case HTTP response code is 404 - NOT FOUND, the resource requested does not exist.</exception>
 /// <exception cref="InternalServerErrorException"> in case HTTP response code is 500 - Internal Server Error.</exception>
 /// <exception cref="CallfireApiException">         in case HTTP response code is something different from codes listed above.</exception>
 /// <exception cref="CallfireClientException">      in case error has occurred in client.</exception>
 public void DeleteApiCredentials(long id)
 {
     Client.Delete(ME_API_CREDS_ITEM_PATH.ReplaceFirst(ClientConstants.PLACEHOLDER, id.ToString()));
 }
コード例 #11
0
        /// <summary>
        /// Delete a single CampaignSound instance for a given campaign sound id.
        /// </summary>
        /// <param name="id">id of campaign sound</param>
        /// <exception cref="BadRequestException">          in case HTTP response code is 400 - Bad request, the request was formatted improperly.</exception>
        /// <exception cref="UnauthorizedException">        in case HTTP response code is 401 - Unauthorized, API Key missing or invalid.</exception>
        /// <exception cref="AccessForbiddenException">     in case HTTP response code is 403 - Forbidden, insufficient permissions.</exception>
        /// <exception cref="ResourceNotFoundException">    in case HTTP response code is 404 - NOT FOUND, the resource requested does not exist.</exception>
        /// <exception cref="InternalServerErrorException"> in case HTTP response code is 500 - Internal Server Error.</exception>
        /// <exception cref="CallfireApiException">         in case HTTP response code is something different from codes listed above.</exception>
        /// <exception cref="CallfireClientException">      in case error has occurred in client.</exception>
        public void Delete(long id)
        {
            string path = SOUNDS_ITEM_PATH.ReplaceFirst(ClientConstants.PLACEHOLDER, id.ToString());

            Client.Delete(path);
        }
コード例 #12
0
 ///
 /// Delete text auto reply message attached to number.
 /// Can not delete a TextAutoReply currently active on a campaign.
 /// <param name="id">id of text auto reply</param>
 /// <exception cref="BadRequestException">          in case HTTP response code is 400 - Bad request, the request was formatted improperly.</exception>
 /// <exception cref="UnauthorizedException">        in case HTTP response code is 401 - Unauthorized, API Key missing or invalid.</exception>
 /// <exception cref="AccessForbiddenException">     in case HTTP response code is 403 - Forbidden, insufficient permissions.</exception>
 /// <exception cref="ResourceNotFoundException">    in case HTTP response code is 404 - NOT FOUND, the resource requested does not exist.</exception>
 /// <exception cref="InternalServerErrorException"> in case HTTP response code is 500 - Internal Server Error.</exception>
 /// <exception cref="CallfireApiException">         in case HTTP response code is something different from codes listed above.</exception>
 /// <exception cref="CallfireClientException">      in case error has occurred in client.</exception>
 public void Delete(long id)
 {
     Client.Delete(TEXT_AUTO_REPLIES_ITEM_PATH.ReplaceFirst(ClientConstants.PLACEHOLDER, id.ToString()));
 }