/// <summary> /// An endpoint for getting your associated Instant Settlements /// </summary> /// <exception cref="YL.Web.Api.ThirdParty.InstantSettlement.Client.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="apiVersion"> (optional)</param> /// <returns>ApiResponse of List<InstantSettlementView></returns> public YL.Web.Api.ThirdParty.InstantSettlement.Client.Client.ApiResponse <List <InstantSettlementView> > ApiInstantSettlementGetWithHttpInfo(string apiVersion = default(string)) { YL.Web.Api.ThirdParty.InstantSettlement.Client.Client.RequestOptions localVarRequestOptions = new YL.Web.Api.ThirdParty.InstantSettlement.Client.Client.RequestOptions(); String[] _contentTypes = new String[] { }; // to determine the Accept header String[] _accepts = new String[] { "text/plain", "application/json", "text/json" }; var localVarContentType = YL.Web.Api.ThirdParty.InstantSettlement.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } var localVarAccept = YL.Web.Api.ThirdParty.InstantSettlement.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } if (apiVersion != null) { localVarRequestOptions.HeaderParameters.Add("api-version", YL.Web.Api.ThirdParty.InstantSettlement.Client.Client.ClientUtils.ParameterToString(apiVersion)); // header parameter } // authentication (oauth2) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request var localVarResponse = this.Client.Get <List <InstantSettlementView> >("/api/InstantSettlement", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("ApiInstantSettlementGet", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }
/// <summary> /// An endpoint for viewing the transactions for an Instant Settlement /// </summary> /// <exception cref="YL.Web.Api.ThirdParty.InstantSettlement.Client.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="instantSettlementNumber">The number of the Instant Settlement product</param> /// <param name="apiVersion"> (optional)</param> /// <returns>Task of ApiResponse (List<InstantSettlementTransactionModel>)</returns> public async System.Threading.Tasks.Task <YL.Web.Api.ThirdParty.InstantSettlement.Client.Client.ApiResponse <List <InstantSettlementTransactionModel> > > ApiInstantSettlementInstantSettlementNumberTransactionsGetAsyncWithHttpInfo(int instantSettlementNumber, string apiVersion = default(string)) { // verify the required parameter 'instantSettlementNumber' is set if (instantSettlementNumber == null) { throw new YL.Web.Api.ThirdParty.InstantSettlement.Client.Client.ApiException(400, "Missing required parameter 'instantSettlementNumber' when calling InstantSettlementApi->ApiInstantSettlementInstantSettlementNumberTransactionsGet"); } YL.Web.Api.ThirdParty.InstantSettlement.Client.Client.RequestOptions localVarRequestOptions = new YL.Web.Api.ThirdParty.InstantSettlement.Client.Client.RequestOptions(); String[] _contentTypes = new String[] { }; // to determine the Accept header String[] _accepts = new String[] { "text/plain", "application/json", "text/json" }; foreach (var _contentType in _contentTypes) { localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); } foreach (var _accept in _accepts) { localVarRequestOptions.HeaderParameters.Add("Accept", _accept); } if (instantSettlementNumber != null) { localVarRequestOptions.PathParameters.Add("instantSettlementNumber", YL.Web.Api.ThirdParty.InstantSettlement.Client.Client.ClientUtils.ParameterToString(instantSettlementNumber)); // path parameter } if (apiVersion != null) { localVarRequestOptions.HeaderParameters.Add("api-version", YL.Web.Api.ThirdParty.InstantSettlement.Client.Client.ClientUtils.ParameterToString(apiVersion)); // header parameter } // authentication (oauth2) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request var localVarResponse = await this.AsynchronousClient.GetAsync <List <InstantSettlementTransactionModel> >("/api/InstantSettlement/{instantSettlementNumber}/transactions", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("ApiInstantSettlementInstantSettlementNumberTransactionsGet", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }
/// <summary> /// Create instant settlement transactions for a specified instant settlement Sample request: POST /api/InstantSettlement/30000001 [{ \"transactionReferences\": [ \"ref\" ], \"currencyISOCode\": \"GBP\", \"totalSettlementAmount\": 10000, \"transactionDate\" : \"2020-02-16T18:25:43-05:00\" }, { \"transactionReferences\": [ \"ref\" ], \"currencyISOCode\": \"GBP\", \"totalSettlementAmount\": 500, \"transactionDate\" : \"2020-02-16T18:25:43-05:00\" }] /// </summary> /// <exception cref="YL.Web.Api.ThirdParty.InstantSettlement.Client.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="instantSettlementNumber">Instant settlement number (an integer)</param> /// <param name="apiVersion"> (optional)</param> /// <param name="createInstantSettlementTransactionModel"> (optional)</param> /// <returns>ApiResponse of Object(void)</returns> public YL.Web.Api.ThirdParty.InstantSettlement.Client.Client.ApiResponse <Object> ApiInstantSettlementInstantSettlementNumberPostWithHttpInfo(int instantSettlementNumber, string apiVersion = default(string), List <CreateInstantSettlementTransactionModel> createInstantSettlementTransactionModel = default(List <CreateInstantSettlementTransactionModel>)) { // verify the required parameter 'instantSettlementNumber' is set if (instantSettlementNumber == null) { throw new YL.Web.Api.ThirdParty.InstantSettlement.Client.Client.ApiException(400, "Missing required parameter 'instantSettlementNumber' when calling InstantSettlementApi->ApiInstantSettlementInstantSettlementNumberPost"); } YL.Web.Api.ThirdParty.InstantSettlement.Client.Client.RequestOptions localVarRequestOptions = new YL.Web.Api.ThirdParty.InstantSettlement.Client.Client.RequestOptions(); String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] _accepts = new String[] { }; var localVarContentType = YL.Web.Api.ThirdParty.InstantSettlement.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } var localVarAccept = YL.Web.Api.ThirdParty.InstantSettlement.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } if (instantSettlementNumber != null) { localVarRequestOptions.PathParameters.Add("instantSettlementNumber", YL.Web.Api.ThirdParty.InstantSettlement.Client.Client.ClientUtils.ParameterToString(instantSettlementNumber)); // path parameter } if (apiVersion != null) { localVarRequestOptions.HeaderParameters.Add("api-version", YL.Web.Api.ThirdParty.InstantSettlement.Client.Client.ClientUtils.ParameterToString(apiVersion)); // header parameter } localVarRequestOptions.Data = createInstantSettlementTransactionModel; // authentication (oauth2) required // oauth required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); } // make the HTTP request var localVarResponse = this.Client.Post <Object>("/api/InstantSettlement/{instantSettlementNumber}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("ApiInstantSettlementInstantSettlementNumberPost", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }