/// <summary> /// /// </summary> /// <exception cref="LoanStreet.LoanServicing.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="principal"></param> /// <returns>ApiResponse of JwtAuthenticationToken</returns> public LoanStreet.LoanServicing.Client.ApiResponse <JwtAuthenticationToken> PrincipalWithHttpInfo(JwtAuthenticationToken principal) { // verify the required parameter 'principal' is set if (principal == null) { throw new LoanStreet.LoanServicing.Client.ApiException(400, "Missing required parameter 'principal' when calling AuthorizationApi->Principal"); } LoanStreet.LoanServicing.Client.RequestOptions localVarRequestOptions = new LoanStreet.LoanServicing.Client.RequestOptions(); String[] _contentTypes = new String[] { }; // to determine the Accept header String[] _accepts = new String[] { "application/json" }; var localVarContentType = LoanStreet.LoanServicing.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } var localVarAccept = LoanStreet.LoanServicing.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } if (principal != null) { foreach (var _kvp in LoanStreet.LoanServicing.Client.ClientUtils.ParameterToMultiMap("", "principal", principal)) { foreach (var _kvpValue in _kvp.Value) { localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } // make the HTTP request var localVarResponse = this.Client.Get <JwtAuthenticationToken>("/v1/public/principal", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("Principal", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }
/// <summary> /// /// </summary> /// <exception cref="LoanStreet.LoanServicing.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="facilityId"></param> /// <returns>ApiResponse of List<Charge></returns> public LoanStreet.LoanServicing.Client.ApiResponse <List <Charge> > ListChargesWithHttpInfo(string facilityId) { // verify the required parameter 'facilityId' is set if (facilityId == null) { throw new LoanStreet.LoanServicing.Client.ApiException(400, "Missing required parameter 'facilityId' when calling ChargesApi->ListCharges"); } LoanStreet.LoanServicing.Client.RequestOptions localVarRequestOptions = new LoanStreet.LoanServicing.Client.RequestOptions(); String[] _contentTypes = new String[] { }; // to determine the Accept header String[] _accepts = new String[] { "application/json" }; var localVarContentType = LoanStreet.LoanServicing.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } var localVarAccept = LoanStreet.LoanServicing.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } if (facilityId != null) { localVarRequestOptions.PathParameters.Add("facilityId", LoanStreet.LoanServicing.Client.ClientUtils.ParameterToString(facilityId)); // path parameter } // authentication (bearer-token) required // http basic authentication required if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + LoanStreet.LoanServicing.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } // make the HTTP request var localVarResponse = this.Client.Get <List <Charge> >("/v1/private/facilities/{facilityId}/charges", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("ListCharges", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }
/// <summary> /// /// </summary> /// <exception cref="LoanStreet.LoanServicing.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="facilityId"></param> /// <returns>Task of ApiResponse (Facility)</returns> public async System.Threading.Tasks.Task <LoanStreet.LoanServicing.Client.ApiResponse <Facility> > GetFacilityAsyncWithHttpInfo(string facilityId) { // verify the required parameter 'facilityId' is set if (facilityId == null) { throw new LoanStreet.LoanServicing.Client.ApiException(400, "Missing required parameter 'facilityId' when calling FacilitiesApi->GetFacility"); } LoanStreet.LoanServicing.Client.RequestOptions localVarRequestOptions = new LoanStreet.LoanServicing.Client.RequestOptions(); String[] _contentTypes = new String[] { }; // to determine the Accept header String[] _accepts = new String[] { "application/json" }; foreach (var _contentType in _contentTypes) { localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); } foreach (var _accept in _accepts) { localVarRequestOptions.HeaderParameters.Add("Accept", _accept); } if (facilityId != null) { localVarRequestOptions.PathParameters.Add("facilityId", LoanStreet.LoanServicing.Client.ClientUtils.ParameterToString(facilityId)); // path parameter } // authentication (bearer-token) required // http basic authentication required if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + LoanStreet.LoanServicing.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync <Facility>("/v1/private/facilities/{facilityId}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetFacility", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }
/// <summary> /// /// </summary> /// <exception cref="LoanStreet.LoanServicing.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="facility"> (optional)</param> /// <returns>ApiResponse of Facility</returns> public LoanStreet.LoanServicing.Client.ApiResponse <Facility> CreateFacilityWithHttpInfo(Facility facility = default(Facility)) { LoanStreet.LoanServicing.Client.RequestOptions localVarRequestOptions = new LoanStreet.LoanServicing.Client.RequestOptions(); String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] _accepts = new String[] { "application/json" }; var localVarContentType = LoanStreet.LoanServicing.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } var localVarAccept = LoanStreet.LoanServicing.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } localVarRequestOptions.Data = facility; // authentication (bearer-token) required // http basic authentication required if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + LoanStreet.LoanServicing.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } // make the HTTP request var localVarResponse = this.Client.Post <Facility>("/v1/private/facilities", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("CreateFacility", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }
/// <summary> /// /// </summary> /// <exception cref="LoanStreet.LoanServicing.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="createUserRequest"> (optional)</param> /// <returns>Task of ApiResponse (User)</returns> public async System.Threading.Tasks.Task <LoanStreet.LoanServicing.Client.ApiResponse <User> > CreateUserAsyncWithHttpInfo(CreateUserRequest createUserRequest = default(CreateUserRequest)) { LoanStreet.LoanServicing.Client.RequestOptions localVarRequestOptions = new LoanStreet.LoanServicing.Client.RequestOptions(); String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] _accepts = new String[] { "application/json" }; foreach (var _contentType in _contentTypes) { localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); } foreach (var _accept in _accepts) { localVarRequestOptions.HeaderParameters.Add("Accept", _accept); } localVarRequestOptions.Data = createUserRequest; // authentication (bearer-token) required // http basic authentication required if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + LoanStreet.LoanServicing.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync <User>("/v1/private/users", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("CreateUser", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }
/// <summary> /// /// </summary> /// <exception cref="LoanStreet.LoanServicing.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="passwordAuthRequest"> (optional)</param> /// <returns>ApiResponse of PasswordAuthResponse</returns> public LoanStreet.LoanServicing.Client.ApiResponse <PasswordAuthResponse> TokenWithHttpInfo(PasswordAuthRequest passwordAuthRequest = default(PasswordAuthRequest)) { LoanStreet.LoanServicing.Client.RequestOptions localVarRequestOptions = new LoanStreet.LoanServicing.Client.RequestOptions(); String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] _accepts = new String[] { "application/json" }; var localVarContentType = LoanStreet.LoanServicing.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } var localVarAccept = LoanStreet.LoanServicing.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } localVarRequestOptions.Data = passwordAuthRequest; // make the HTTP request var localVarResponse = this.Client.Post <PasswordAuthResponse>("/v1/public/token", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("Token", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }
/// <summary> /// /// </summary> /// <exception cref="LoanStreet.LoanServicing.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="inputDate"></param> /// <returns>ApiResponse of BusinessDayResponse</returns> public LoanStreet.LoanServicing.Client.ApiResponse <BusinessDayResponse> GetPreviousBusinessDayWithHttpInfo(DateTime inputDate) { LoanStreet.LoanServicing.Client.RequestOptions localVarRequestOptions = new LoanStreet.LoanServicing.Client.RequestOptions(); String[] _contentTypes = new String[] { }; // to determine the Accept header String[] _accepts = new String[] { "application/json" }; var localVarContentType = LoanStreet.LoanServicing.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } var localVarAccept = LoanStreet.LoanServicing.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } localVarRequestOptions.PathParameters.Add("inputDate", LoanStreet.LoanServicing.Client.ClientUtils.ParameterToString(inputDate)); // path parameter // make the HTTP request var localVarResponse = this.Client.Get <BusinessDayResponse>("/v1/public/finance/previous-business-day/{inputDate}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetPreviousBusinessDay", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }
/// <summary> /// /// </summary> /// <exception cref="LoanStreet.LoanServicing.Client.ApiException">Thrown when fails to make API call</exception> /// <returns>ApiResponse of string</returns> public LoanStreet.LoanServicing.Client.ApiResponse <string> AuthInstitutionWithHttpInfo() { LoanStreet.LoanServicing.Client.RequestOptions localVarRequestOptions = new LoanStreet.LoanServicing.Client.RequestOptions(); String[] _contentTypes = new String[] { }; // to determine the Accept header String[] _accepts = new String[] { "application/json" }; var localVarContentType = LoanStreet.LoanServicing.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } var localVarAccept = LoanStreet.LoanServicing.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } // make the HTTP request var localVarResponse = this.Client.Get <string>("/v1/public/auth/inst", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("AuthInstitution", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }
/// <summary> /// /// </summary> /// <exception cref="LoanStreet.LoanServicing.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="passwordAuthRequest"> (optional)</param> /// <returns>Task of ApiResponse (PasswordAuthResponse)</returns> public async System.Threading.Tasks.Task <LoanStreet.LoanServicing.Client.ApiResponse <PasswordAuthResponse> > TokenAsyncWithHttpInfo(PasswordAuthRequest passwordAuthRequest = default(PasswordAuthRequest)) { LoanStreet.LoanServicing.Client.RequestOptions localVarRequestOptions = new LoanStreet.LoanServicing.Client.RequestOptions(); String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] _accepts = new String[] { "application/json" }; foreach (var _contentType in _contentTypes) { localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); } foreach (var _accept in _accepts) { localVarRequestOptions.HeaderParameters.Add("Accept", _accept); } localVarRequestOptions.Data = passwordAuthRequest; // make the HTTP request var localVarResponse = await this.AsynchronousClient.PostAsync <PasswordAuthResponse>("/v1/public/token", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("Token", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }
/// <summary> /// /// </summary> /// <exception cref="LoanStreet.LoanServicing.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="inputDate"></param> /// <returns>Task of ApiResponse (BusinessDayResponse)</returns> public async System.Threading.Tasks.Task <LoanStreet.LoanServicing.Client.ApiResponse <BusinessDayResponse> > GetPreviousBusinessDayAsyncWithHttpInfo(DateTime inputDate) { LoanStreet.LoanServicing.Client.RequestOptions localVarRequestOptions = new LoanStreet.LoanServicing.Client.RequestOptions(); String[] _contentTypes = new String[] { }; // to determine the Accept header String[] _accepts = new String[] { "application/json" }; foreach (var _contentType in _contentTypes) { localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); } foreach (var _accept in _accepts) { localVarRequestOptions.HeaderParameters.Add("Accept", _accept); } localVarRequestOptions.PathParameters.Add("inputDate", LoanStreet.LoanServicing.Client.ClientUtils.ParameterToString(inputDate)); // path parameter // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync <BusinessDayResponse>("/v1/public/finance/previous-business-day/{inputDate}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetPreviousBusinessDay", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }
/// <summary> /// /// </summary> /// <exception cref="LoanStreet.LoanServicing.Client.ApiException">Thrown when fails to make API call</exception> /// <returns>Task of ApiResponse (string)</returns> public async System.Threading.Tasks.Task <LoanStreet.LoanServicing.Client.ApiResponse <string> > AuthInstitutionAsyncWithHttpInfo() { LoanStreet.LoanServicing.Client.RequestOptions localVarRequestOptions = new LoanStreet.LoanServicing.Client.RequestOptions(); String[] _contentTypes = new String[] { }; // to determine the Accept header String[] _accepts = new String[] { "application/json" }; foreach (var _contentType in _contentTypes) { localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); } foreach (var _accept in _accepts) { localVarRequestOptions.HeaderParameters.Add("Accept", _accept); } // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync <string>("/v1/public/auth/inst", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("AuthInstitution", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }
/// <summary> /// /// </summary> /// <exception cref="LoanStreet.LoanServicing.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="borrower"> (optional)</param> /// <param name="fund"> (optional)</param> /// <returns>Task of ApiResponse (List<Facility>)</returns> public async System.Threading.Tasks.Task <LoanStreet.LoanServicing.Client.ApiResponse <List <Facility> > > ListFacilitiesAsyncWithHttpInfo(string borrower = default(string), string fund = default(string)) { LoanStreet.LoanServicing.Client.RequestOptions localVarRequestOptions = new LoanStreet.LoanServicing.Client.RequestOptions(); String[] _contentTypes = new String[] { }; // to determine the Accept header String[] _accepts = new String[] { "application/json" }; foreach (var _contentType in _contentTypes) { localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); } foreach (var _accept in _accepts) { localVarRequestOptions.HeaderParameters.Add("Accept", _accept); } if (borrower != null) { foreach (var _kvp in LoanStreet.LoanServicing.Client.ClientUtils.ParameterToMultiMap("", "borrower", borrower)) { foreach (var _kvpValue in _kvp.Value) { localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } if (fund != null) { foreach (var _kvp in LoanStreet.LoanServicing.Client.ClientUtils.ParameterToMultiMap("", "fund", fund)) { foreach (var _kvpValue in _kvp.Value) { localVarRequestOptions.QueryParameters.Add(_kvp.Key, _kvpValue); } } } // authentication (bearer-token) required // http basic authentication required if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + LoanStreet.LoanServicing.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync <List <Facility> >("/v1/private/facilities", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("ListFacilities", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }