public void QueryPaymentPlan_ShouldAllowPagination(string propertyName, int propertyValue) { var queryRequest = new QueryPaymentPlanRequest(); ReflectionHelper.SetPropertyValue(queryRequest, propertyName, propertyValue); var queryResponse = CheckoutClient.RecurringPaymentsService.QueryPaymentPlan(queryRequest); queryResponse.Should().NotBeNull(); queryResponse.HttpStatusCode.Should().Be(HttpStatusCode.OK); queryResponse.Model.TotalRows.Should().BeGreaterThan(0); ReflectionHelper.GetPropertyValue(queryResponse.Model, propertyName).ShouldBeEquivalentTo(propertyValue); }
public static QueryPaymentPlanRequest GetCustomQueryPaymentPlanRequest(string propertyName, object value, string currency = null) { var queryRequest = new QueryPaymentPlanRequest(); ReflectionHelper.SetPropertyValue(queryRequest, propertyName, value); // set currency in request when querying by value if (propertyName == "Value") { queryRequest.Currency = currency; } return(queryRequest); }
public HttpResponse <QueryPaymentPlanResponse> QueryPaymentPlan(QueryPaymentPlanRequest requestModel) { return(_recurringPaymentsServiceAsync.QueryPaymentPlanAsync(requestModel).Result); }
/// <summary> /// Searches for all Payment Plans created under a business based on the parameters passed in the request. /// </summary> /// <param name="requestModel"></param> /// <returns></returns> public HttpResponse <QueryPaymentPlanResponse> QueryPaymentPlan(QueryPaymentPlanRequest requestModel) { return(new ApiHttpClient().PostRequest <QueryPaymentPlanResponse>(ApiUrls.RecurringPaymentPlanSearch, AppSettings.SecretKey, requestModel)); }
public Task <HttpResponse <QueryPaymentPlanResponse> > QueryPaymentPlanAsync(QueryPaymentPlanRequest requestModel) { return(_apiHttpClient.PostRequest <QueryPaymentPlanResponse>(_configuration.ApiUrls.RecurringPaymentPlanSearch, _configuration.SecretKey, requestModel)); }