public Task<Campaign> UpdateCampaign(Campaign campaign) { return campaign.PutToService(_token, _baseAddress, $"api/v1/campaigns/{campaign.Id}"); }
static void AddACampaignToACustomer(string baseAddress, string token, int customerId) { var campaignRepo = new CampaignRepository(baseAddress, token); "Create a campaign".ConsoleBlue(); var campaign = campaignRepo.CreateCampaign(new Campaign { CampaignName = "Test Campaign", CampaignUrl = "http://www.mytestcustomer.com", CurrencyCode = "GBP", CustomerId = customerId, Product = "PPC" }); campaign.Result?.PrintObjectToConsole(); _campaign = campaign.Result; }
public Task<Campaign> CreateCampaign(Campaign campaign) { return campaign.PostToService(_token, _baseAddress, "api/v1/campaigns"); }