示例#1
0
        /// <summary>
        /// It returns the seach options for payer.
        /// https://gds.eligibleapi.com/v1.5/payers/00001/search_options
        /// </summary>
        /// <returns>single payer search options</returns>
        public PayerSearchOptionResponse SearchOptions(string payerId, RequestOptions options = null)
        {
            response = ExecuteObj.Execute(EligibleResources.PathToPayerById + payerId + EligibleResources.SearchOptions, SetRequestOptionsObject(options));
            var formattedResponse = RequestProcess.SimpleResponseValidation <PayerSearchOptionResponse>(response);

            formattedResponse.SetJsonResponse(response.Content);
            return(formattedResponse);
        }
示例#2
0
        /// <summary>
        /// Retrieve payer status
        /// GET https://gds.eligibleapi.com/v1.1/payers/status.json"
        /// </summary>
        /// <param name="RequestParams">Ex: transaction_type=270</param>
        /// <returns></returns>
        public StatusResponse Statusses([Optional, DefaultParameterValue("270")] string transactionType, RequestOptions options = null)
        {
            param = new Hashtable();
            param.Add("transaction_type", transactionType);
            response = ExecuteObj.Execute(EligibleResources.PathtoPayersStatus, SetRequestOptionsObject(options), param);
            var formattedResponse = RequestProcess.SimpleResponseValidation <StatusResponse>(response);

            formattedResponse.SetJsonResponse(response.Content);
            return(formattedResponse);
        }
示例#3
0
        /// <summary>
        /// It returns the list of seach options supported by each payer.
        /// API: https://gds.eligibleapi.com/v1.5/payers/search_options
        /// </summary>
        /// <returns>List of EligibleService.Model.PayerSearchOption</returns>
        public PayersSearchOptionResponse SearchOptions(RequestOptions options = null)
        {
            response = ExecuteObj.Execute(EligibleResources.PathToPayerSearchOptions, SetRequestOptionsObject(options));
            PayersSearchOptionResponse payersSearchOptionResponse = new PayersSearchOptionResponse();
            var formattedResponse = RequestProcess.SimpleResponseValidation <Collection <PayerSearchOptions> >(response);

            payersSearchOptionResponse.SearchOptionsList = formattedResponse;
            payersSearchOptionResponse.SetJsonResponse(response.Content);
            return(payersSearchOptionResponse);
        }
示例#4
0
        /// <summary>
        /// Get all the payers
        /// https://gds.eligibleapi.com/v1.5/payers.json
        /// </summary>
        /// <returns>List of EligibleService.Model.Payer</returns>
        public PayersResponse All([Optional, DefaultParameterValue("")] string endpoint, [Optional, DefaultParameterValue("")] string enrollmentRequired, RequestOptions options = null)
        {
            param = new Hashtable();
            param.Add("endpoint", endpoint);
            param.Add("enrollment_required", enrollmentRequired);
            response = ExecuteObj.Execute(EligibleResources.PathToPayers, SetRequestOptionsObject(options), param);
            var            formatResponse = RequestProcess.SimpleResponseValidation <Collection <PayerData> >(response);
            PayersResponse payers         = new PayersResponse();

            payers.Payers = formatResponse;
            payers.SetJsonResponse(response.Content);
            return(payers);
        }
示例#5
0
        /// <summary>
        /// Claim submission with Json formatted string of  params
        /// https://gds.eligibleapi.com/rest#claim_and_reports_create_a_claim
        /// </summary>
        /// <param name="claimParams">Please refer Eligible REST doc for claim parameter details</param>
        /// <returns></returns>
        public ClaimResponse Create(string jsonParams, RequestOptions options = null)
        {
            response = ExecuteObj.ExecutePostPut(EligibleResources.PathToClaims, jsonParams, SetRequestOptionsObject(options));
            ClaimResponse formattedResponse = RequestProcess.SimpleResponseValidation <ClaimResponse>(response);

            if (formattedResponse.Success == false)
            {
                throw new EligibleException(response.Content, formattedResponse);
            }
            else
            {
                formattedResponse.SetJsonResponse(response.Content);
                return(formattedResponse);
            }
        }