Beispiel #1
0
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            DeleteApiKeyResponse response = new DeleteApiKeyResponse();


            return(response);
        }
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>  
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            DeleteApiKeyResponse response = new DeleteApiKeyResponse();


            return response;
        }
Beispiel #3
0
        public DeleteApiKeyResponse DeleteApiKey(DeleteApiKeyRequest request)
        {
            DeleteApiKeyResponse response        = new DeleteApiKeyResponse();
            ThirdPartyClient     thirpartyClient = Mapper.Map <ThirdPartyClientViewModel, ThirdPartyClient>(request.ThirdPartyClientViewModel);

            thirdPartyClientRepository.DeleteThirdPartyClient(thirpartyClient);
            return(response);
        }
Beispiel #4
0
        /// <inheritdoc />
        public async Task <DeleteApiKeyResponse> DeleteApiKeyAsync(string apiKey, RequestOptions requestOptions = null,
                                                                   CancellationToken ct = default)
        {
            if (string.IsNullOrWhiteSpace(apiKey))
            {
                throw new ArgumentNullException(apiKey);
            }

            DeleteApiKeyResponse response = await _transport.ExecuteRequestAsync <DeleteApiKeyResponse>(
                HttpMethod.Delete,
                $"/1/keys/{WebUtility.UrlEncode(apiKey)}", CallType.Write, requestOptions, ct)
                                            .ConfigureAwait(false);

            response.GetApiKey = k => GetApiKey(k);
            response.Key       = apiKey;
            return(response);
        }