/// <summary>
        /// update Profile
        /// </summary>
        /// <param name="profile">Profile</param>
        /// <returns>Profile</returns>
        public Profile update(Profile profile)
        {
            profile.setRequiredFields(new List <string> {
                CustomerVaultConstants.id
            });
            profile.checkRequiredFields();
            profile.setRequiredFields(new List <string> {
                CustomerVaultConstants.merchantCustomerId,
                CustomerVaultConstants.locale
            });
            profile.setOptionalFields(new List <string> {
                CustomerVaultConstants.firstName,
                CustomerVaultConstants.middleName,
                CustomerVaultConstants.lastName,
                CustomerVaultConstants.dateOfBirth,
                CustomerVaultConstants.ip,
                CustomerVaultConstants.gender,
                CustomerVaultConstants.nationality,
                CustomerVaultConstants.email,
                CustomerVaultConstants.phone,
                CustomerVaultConstants.cellPhone
            });

            Request request = new Request(
                method: RequestType.PUT,
                uri: this.prepareURI("/profiles/" + profile.id()),
                body: profile
                );

            dynamic response = this.client.processRequest(request);

            return(new Profile(response));
        }
        /// <summary>
        /// delete profile
        /// </summary>
        /// <param name="profile">Profile</param>
        /// <returns>bool</returns>
        public bool delete(Profile profile)
        {
            profile.setRequiredFields(new List <string> {
                CustomerVaultConstants.id
            });
            profile.checkRequiredFields();

            Request request = new Request(
                method: RequestType.DELETE,
                uri: this.prepareURI("/profiles/" + profile.id())
                );

            this.client.processRequest(request);

            return(true);
        }
        /// <summary>
        /// get profile with subcomponents
        /// </summary>
        /// <param name="profile">Profile</param>
        /// <returns>Profile</returns>
        public Profile get(Profile profile, bool includeAddresses = false, bool includeCards           = false, bool includeACHBankAccounts  = false,
                           bool includeBACSBankAccounts           = false, bool includeEFTBankAccounts = false, bool includeSEPABankAccounts = false)
        {
            profile.setRequiredFields(new List <string> {
                CustomerVaultConstants.id
            });
            profile.checkRequiredFields();

            Dictionary <string, string> queryStr = new Dictionary <string, string>();
            StringBuilder toInclude = new StringBuilder();

            if (includeAddresses)
            {
                toInclude.Append("addresses");
            }
            if (includeCards)
            {
                if (toInclude.Length > 0)
                {
                    toInclude.Append(",");
                }
                toInclude.Append("cards");
            }
            if (includeACHBankAccounts)
            {
                if (toInclude.Length > 0)
                {
                    toInclude.Append(",");
                }
                toInclude.Append("achbankaccounts");
            }
            if (includeBACSBankAccounts)
            {
                if (toInclude.Length > 0)
                {
                    toInclude.Append(",");
                }
                toInclude.Append("bacsbankaccounts");
            }
            if (includeEFTBankAccounts)
            {
                if (toInclude.Length > 0)
                {
                    toInclude.Append(",");
                }
                toInclude.Append("eftbankaccounts");
            }
            if (includeSEPABankAccounts)
            {
                if (toInclude.Length > 0)
                {
                    toInclude.Append(",");
                }
                toInclude.Append("sepabankaccounts");
            }

            queryStr.Add("fields", toInclude.ToString());
            Request request = new Request(
                method: RequestType.GET,
                uri: this.prepareURI("/profiles/" + profile.id()),
                queryString: queryStr
                );

            dynamic response = this.client.processRequest(request);

            return(new Profile(response));
        }