예제 #1
0
        /// <summary>
        ///  retrieves all documentation for a Case Filing record
        ///  File Format. The following values are valid - ORIGINAL, MERGED_TIFF, MERGED_PDF
        ///  method set format to ORJINAL. Other format not used for us.
        /// </summary>
        /// <param name="caseId"></param>
        /// <returns>File converted to a base64 encoded string. File Format is ZIP Note: ZIP file may contain these formats...JPG, TIFF, PDF</returns>
        public CaseDetailRetrieveDocument RetrieveDocuments(long refKey, String caseId)
        {
            Dictionary <String, String> parameters = new Dictionary <string, string>();

            parameters.Add("format", "ORIGINAL");
            return(_apiController.Get <CaseDetailRetrieveDocument>(refKey, String.Format("cases/{0}/documents", caseId), parameters));
        }
예제 #2
0
        /// <summary>
        /// Retrieve Documentation
        /// </summary>
        /// <param name="claimId">Claim Id</param>
        /// <param name="chargebackId">Chargeback Id</param>
        /// <returns>File converted to a base64 encoded string. File Format is ZIP Note: ZIP file may contain these formats...JPG, TIFF, PDF</returns>
        public FileAttachment RetrieveDocumentation(long refKey, ChargebackRequest chargebackRequest)
        {
            Dictionary <String, String> parameters = new Dictionary <string, string>();

            parameters.Add("format", "ORIGINAL");
            String restUrl = String.Format("claims/{0}/chargebacks/{1}/documents", chargebackRequest.claimId, chargebackRequest.chargebackId);

            return(_apiController.Get <FileAttachment>(refKey, restUrl, parameters));
        }
예제 #3
0
        private void HandleRequest(HttpListenerContext ctx, List <string> el, Dictionary <string, string> urlParams)
        {
            string url = "/";

            IRequest request = new Request(ctx, DataProvider, AuthenticationProvider, urlParams);

            string[] splitUrl = ctx.Request.Url?.LocalPath.TrimStart('/').TrimEnd('/').Split("/");

            for (int i = 0; i < el.Count; i++)
            {
                if (el[i].StartsWith(":"))
                {
                    url += $":{el[i].TrimStart(':')}/";
                }
                else
                {
                    url += $"{splitUrl[i]}/";
                }
            }

            IApiController controller = Controllers[url.TrimEnd('/')];

            switch (ctx.Request.HttpMethod.ToUpper())
            {
            case "GET":
            {
                controller.Get(request);
                break;
            }

            case "POST":
            {
                controller.Post(request);
                break;
            }

            case "PUT":
            {
                controller.Put(request);
                break;
            }

            case "PATCH":
            {
                controller.Patch(request);
                break;
            }

            case "DELETE":
            {
                controller.Delete(request);
                break;
            }
            }
        }
예제 #4
0
파일: Queues.cs 프로젝트: emrahm/MasterCom
        public List <ResponseQueue> GetQueues(long refKey, String queueName)
        {
            if (String.IsNullOrWhiteSpace(queueName))
            {
                throw new Exception("QueueName can not be null or empty");
            }

            Dictionary <String, String> parameters = new Dictionary <string, string>();

            parameters.Add("queue-name", queueName);
            return(_apiController.Get <List <ResponseQueue> >(refKey, "queues", parameters));
        }
예제 #5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="claimId"></param>
 /// <param name="transactionId"></param>
 /// <returns></returns>
 public TransactionClearing ClearingTran(long refKey, String claimId, String transactionId)
 {
     return(_apiController.Get <TransactionClearing>(refKey, String.Format("claims/{0}/transactions/clearing/{1}", claimId, transactionId), null));
 }
예제 #6
0
파일: Claims.cs 프로젝트: emrahm/MasterCom
 public ClaimDetail GetClaim(long refKey, String claimId)
 {
     return _apiController.Get<ClaimDetail>(refKey, String.Format("claims/{0}", claimId), null);
 }
예제 #7
0
        private async void HandleIndex(HttpListenerContext ctx)
        {
            string url = "/";

            IRequest request = new Request(ctx, DataProvider, AuthenticationProvider, new Dictionary <string, string>()
            {
            });

            if (!Controllers.ContainsKey("/"))
            {
                HttpListenerResponse resp = ctx.Response;

                byte[] data = Encoding.UTF8.GetBytes(JsonSerializer.Serialize(new
                {
                    Error  = "404, Index Not Found",
                    Status = 404
                }));

                resp.StatusCode      = 404;
                resp.ContentType     = "application/json";
                resp.ContentEncoding = Encoding.UTF8;
                resp.ContentLength64 = data.LongLength;

                await resp.OutputStream.WriteAsync(data, 0, data.Length);

                resp.Close();

                return;
            }

            IApiController controller = Controllers["/"];

            switch (ctx.Request.HttpMethod.ToUpper())
            {
            case "GET":
            {
                controller.Get(request);
                break;
            }

            case "POST":
            {
                controller.Post(request);
                break;
            }

            case "PUT":
            {
                controller.Put(request);
                break;
            }

            case "PATCH":
            {
                controller.Patch(request);
                break;
            }

            case "DELETE":
            {
                controller.Delete(request);
                break;
            }
            }
        }
예제 #8
0
        public FileAttachment GetDocumentation(long refKey, string claimId, string requestId)
        {
            Dictionary <string, String> parameterQuery = new Dictionary <string, string>();

            return(_apiController.Get <FileAttachment>(refKey, String.Format("claims/{0}/retrievalrequests/{1}/documents", claimId, requestId), parameterQuery));
        }