Exemplo n.º 1
0
        public void QueryCustomerPaymentPlan_ShouldAllowPagination(string propertyName, int propertyValue)
        {
            var queryRequest = new QueryCustomerPaymentPlanRequest();

            ReflectionHelper.SetPropertyValue(queryRequest, propertyName, propertyValue);
            var queryResponse = CheckoutClient.RecurringPaymentsService.QueryCustomerPaymentPlan(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 QueryCustomerPaymentPlanRequest GetCustomQueryCustomerPaymentPlanRequest(string propertyName, object value, string currency = null)
        {
            var queryRequest = new QueryCustomerPaymentPlanRequest();

            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 <QueryCustomerPaymentPlanResponse> QueryCustomerPaymentPlan(QueryCustomerPaymentPlanRequest requestModel)
 {
     return(_recurringPaymentsServiceAsync.QueryCustomerPaymentPlanAsync(requestModel).Result);
 }
 /// <summary>
 /// Searches for all customers and their associated Payment Plans created under a business based on the parameters passed in the request.
 /// </summary>
 /// <param name="requestModel"></param>
 /// <returns></returns>
 public HttpResponse <QueryCustomerPaymentPlanResponse> QueryCustomerPaymentPlan(QueryCustomerPaymentPlanRequest requestModel)
 {
     return(new ApiHttpClient().PostRequest <QueryCustomerPaymentPlanResponse>(ApiUrls.RecurringCustomerPaymentPlanSearch, AppSettings.SecretKey, requestModel));
 }
Exemplo n.º 5
0
 public Task <HttpResponse <QueryCustomerPaymentPlanResponse> > QueryCustomerPaymentPlanAsync(QueryCustomerPaymentPlanRequest requestModel)
 {
     return(_apiHttpClient.PostRequest <QueryCustomerPaymentPlanResponse>(_configuration.ApiUrls.RecurringCustomerPaymentPlanSearch, _configuration.SecretKey, requestModel));
 }