public void CanCreateUpdateAndDeleteTriggers() { var brand = new Brand() { Name = "Test Brand", Active = true, Subdomain = string.Format("test-{0}", Guid.NewGuid()) }; var res = api.Brands.CreateBrand(brand); Assert.Greater(res.Brand.Id, 0); res.Brand.Name = "Test Brand Updated"; var update = api.Brands.UpdateBrand(res.Brand); Assert.AreEqual(update.Brand.Name, res.Brand.Name); Assert.True(api.Brands.DeleteBrand(res.Brand.Id.Value)); }
public async Task<IndividualBrandResponse> UpdateBrandAsync(Brand brand) { var body = new { brand }; return await GenericPutAsync<IndividualBrandResponse>(string.Format("brands/{0}.json", brand.Id), body); }
public IndividualBrandResponse UpdateBrand(Brand brand) { var body = new { brand }; return GenericPut<IndividualBrandResponse>(string.Format("brands/{0}.json", brand.Id), body); }
public async Task<IndividualBrandResponse> CreateBrandAsync(Brand brand) { var body = new { brand }; return await GenericPostAsync<IndividualBrandResponse>("brands.json", body); }
public IndividualBrandResponse CreateBrand(Brand brand) { var body = new { brand }; return GenericPost<IndividualBrandResponse>("brands.json", body); }