/// <summary>
        /// Update currency switch payments control
        /// </summary>
        /// <param name="cardUid">Required parameter: Card uid of the targeted card</param>
        /// <param name="body">Required parameter: Whether currency switch payments should be allowed for a given currency. Set to false to block, true to allow.</param>
        /// <return>Returns the void response from the API call</return>
        public async Task UpdateEnableCurrencySwitchAsync(Guid cardUid, CurrencyFlag body)
        {
            //validating required parameters
            if (null == body)
            {
                throw new ArgumentNullException(nameof(body), "The parameter \"body\" is a required parameter and cannot be null.");
            }

            //the base uri for api requests
            var baseUri = Configuration.GetBaseURI();

            //prepare query string for API call
            var queryBuilder = new StringBuilder(baseUri);

            queryBuilder.Append("/api/v2/cards/{cardUid}/controls/currency-switch");

            //process optional template parameters
            APIHelper.AppendUrlWithTemplateParameters(queryBuilder, new Dictionary <string, object>
            {
                { "cardUid", cardUid }
            });


            //validate and preprocess url
            var queryUrl = APIHelper.CleanUrl(queryBuilder);

            //append request with appropriate headers and parameters
            var headers = APIHelper.GetContentRequestHeaders();

            //append body params
            var serializedBody = APIHelper.JsonSerialize(body);

            //prepare the API call request to fetch the response
            var request = ClientInstance.PutBody(queryUrl, headers, serializedBody);

            //invoke request and get response
            var response = (HttpStringResponse)await ClientInstance.ExecuteAsStringAsync(request).ConfigureAwait(false);

            var context = new HTTPContext(request, response);

            //handle errors
            ValidateResponse(response, context);
        }
        /// <summary>
        /// Update currency switch payments control
        /// </summary>
        /// <param name="cardUid">Required parameter: Card uid of the targeted card</param>
        /// <param name="body">Required parameter: Whether currency switch payments should be allowed for a given currency. Set to false to block, true to allow.</param>
        /// <return>Returns the void response from the API call</return>
        public void UpdateEnableCurrencySwitch(Guid cardUid, CurrencyFlag body)
        {
            var t = UpdateEnableCurrencySwitchAsync(cardUid, body);

            APIHelper.RunTaskSynchronously(t);
        }