public void Can_Customer_StoreCredit_Be_Updated_Then_Get_Will_IfModifiedSince() { var response = Client.Utilities.GetTime(); var date = response.Data.CurrentDateTime; var serverdatetime = string.Format("{0:r}", date); decimal storecredit = 8000.00M; var updatedata = new { store_credit = storecredit }; string json = JsonConvert.SerializeObject(updatedata, Formatting.None); var response1 = Client.Customers.Update(TEST_CUSTOMER_ID, json); Assert.AreNotEqual(null, response.Data); Assert.AreEqual(TEST_CUSTOMER_ID, response1.Data.Id); Assert.AreEqual(storecredit, response1.Data.StoreCredit); var filter = new Api.FilterCustomers(); filter.IfModifiedSince = ((DateTime)date).AddMinutes(-10); var response2 = Client.Customers.Count(filter); Assert.Greater(0, response2.Data.Count); }
public void Can_Get_List_Of_Customers_Using_Filter() { var filter = new Api.FilterCustomers() { MinimumId = 2600, MaximumId = 2600 }; var response = Client.Customers.Get(filter); Assert.AreEqual(response.RestResponse.StatusCode, System.Net.HttpStatusCode.OK); Assert.AreEqual(response.Data.Count, 1); Assert.AreEqual(response.Data[0].Id, 2600); }