Ejemplo n.º 1
0
 /// <summary>
 /// Update a specific milestone Update the specific milestones for a loan.
 /// </summary>
 /// <exception cref="Elli.Api.Loans.Client.ApiException">Thrown when fails to make API call</exception>
 /// <param name="logId">Unique Identifier of log(LogId)</param>
 /// <param name="id">Unique Identifier of loan(LoanId)</param>
 /// <param name="action">Optional parameter to perform specific action on a milestone. Action can be &#39;AcceptFile&#39;, &#39;ReturnFile&#39;, &#39;Unfinish&#39; and &#39;Finish&#39; (complete) milestone (optional)</param>
 /// <param name="milestoneLogContract"> (optional)</param>
 /// <returns>Task of void</returns>
 public async System.Threading.Tasks.Task UpdateMilestoneAsync(string logId, string id, string action = null, MilestoneContract milestoneLogContract = null)
 {
     await UpdateMilestoneAsyncWithHttpInfo(logId, id, action, milestoneLogContract);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Update a specific milestone Update the specific milestones for a loan.
        /// </summary>
        /// <exception cref="Elli.Api.Loans.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="logId">Unique Identifier of log(LogId)</param>
        /// <param name="id">Unique Identifier of loan(LoanId)</param>
        /// <param name="action">Optional parameter to perform specific action on a milestone. Action can be &#39;AcceptFile&#39;, &#39;ReturnFile&#39;, &#39;Unfinish&#39; and &#39;Finish&#39; (complete) milestone (optional)</param>
        /// <param name="milestoneLogContract"> (optional)</param>
        /// <returns>Task of ApiResponse</returns>
        public async System.Threading.Tasks.Task <ApiResponse <Object> > UpdateMilestoneAsyncWithHttpInfo(string logId, string id, string action = null, MilestoneContract milestoneLogContract = null)
        {
            // verify the required parameter 'logId' is set
            if (logId == null)
            {
                throw new ApiException(400, "Missing required parameter 'logId' when calling MilestonesApi->UpdateMilestone");
            }
            // verify the required parameter 'id' is set
            if (id == null)
            {
                throw new ApiException(400, "Missing required parameter 'id' when calling MilestonesApi->UpdateMilestone");
            }

            var    localVarPath         = "/encompass/v1/loans/{id}/milestones/{logId}";
            var    localVarPathParams   = new Dictionary <String, String>();
            var    localVarQueryParams  = new Dictionary <String, String>();
            var    localVarHeaderParams = new Dictionary <String, String>(Configuration.DefaultHeader);
            var    localVarFormParams   = new Dictionary <String, String>();
            var    localVarFileParams   = new Dictionary <String, FileParameter>();
            Object localVarPostBody     = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
                "application/json"
            };
            String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json"
            };
            String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);

            if (localVarHttpHeaderAccept != null)
            {
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
            }

            if (logId != null)
            {
                localVarPathParams.Add("logId", Configuration.ApiClient.ParameterToString(logId));                // path parameter
            }
            if (id != null)
            {
                localVarPathParams.Add("id", Configuration.ApiClient.ParameterToString(id));             // path parameter
            }
            if (action != null)
            {
                localVarQueryParams.Add("action", Configuration.ApiClient.ParameterToString(action));                 // query parameter
            }
            if (milestoneLogContract != null && milestoneLogContract.GetType() != typeof(byte[]))
            {
                localVarPostBody = Configuration.ApiClient.Serialize(milestoneLogContract); // http body (model) parameter
            }
            else
            {
                localVarPostBody = milestoneLogContract; // byte array
            }

            // authentication (bearerAuth) required
            // oauth required
            if (!String.IsNullOrEmpty(Configuration.AccessToken))
            {
                localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken;
            }

            // make the HTTP request
            IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
                                                                                                       Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                                                                                                       localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int)localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("UpdateMilestone", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <Object>(localVarStatusCode,
                                            localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
                                            null));
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Update a specific milestone Update the specific milestones for a loan.
 /// </summary>
 /// <exception cref="Elli.Api.Loans.Client.ApiException">Thrown when fails to make API call</exception>
 /// <param name="logId">Unique Identifier of log(LogId)</param>
 /// <param name="id">Unique Identifier of loan(LoanId)</param>
 /// <param name="action">Optional parameter to perform specific action on a milestone. Action can be &#39;AcceptFile&#39;, &#39;ReturnFile&#39;, &#39;Unfinish&#39; and &#39;Finish&#39; (complete) milestone (optional)</param>
 /// <param name="milestoneLogContract"> (optional)</param>
 /// <returns></returns>
 public void UpdateMilestone(string logId, string id, string action = null, MilestoneContract milestoneLogContract = null)
 {
     UpdateMilestoneWithHttpInfo(logId, id, action, milestoneLogContract);
 }