Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 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));
 }
Exemplo n.º 5
0
 public Task <HttpResponse <QueryPaymentPlanResponse> > QueryPaymentPlanAsync(QueryPaymentPlanRequest requestModel)
 {
     return(_apiHttpClient.PostRequest <QueryPaymentPlanResponse>(_configuration.ApiUrls.RecurringPaymentPlanSearch, _configuration.SecretKey, requestModel));
 }