public void Setup() { customer = new Customer(); restClient = new Mock<IRequestExecute>(); param = new Hashtable(); paramValues = new CustomerParams(); }
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; }
/// <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); }
/// <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); }