public void Setup()
 {
     customer = new Customer();
     restClient = new Mock<IRequestExecute>();
     param = new Hashtable();
     paramValues = new CustomerParams();
 }
示例#2
0
 private CustomerParams BuildCustomerParams(string companyName, string siteName, RequestOptions options)
 {
     CustomerParams custParams = new CustomerParams();
     options = SetRequestOptionsObject(options);
     custParams.Customer = new CustomerTag()
     {
         Name = companyName,
         SiteName = siteName
     };
     return custParams;
 }
示例#3
0
 /// <summary>
 /// It's a POST request to create Customer
 /// https://gds.eligibleapi.com/rest#create_customers
 /// </summary>
 /// <param name="CustomerParams">Required parameters in the form of CustomerParams object</param>
 /// <returns></returns>
 public CustomerResponse Create(CustomerParams customerParams, RequestOptions options = null)
 {
     return this.Create(JsonSerialize(customerParams), options);
 }
示例#4
0
 /// <summary>
 /// It's a PUT request to Update Customer
 /// https://gds.eligibleapi.com/rest#update_customers
 /// </summary>
 /// <param name="customerID"></param>
 /// <param name="jsonParams">Required params in the form of CustomerParams object</param>
 /// <returns></returns>
 public CustomerResponse Update(string customerId, CustomerParams customerParams, RequestOptions options = null)
 {
     return this.Update(customerId, JsonSerialize(customerParams), options);
 }