public async Task DeleteCustomerAsync(string customerId = null) { if (string.IsNullOrEmpty(customerId) && _customerFactory == null) { throw new ArgumentNullException( nameof(customerId), "Missing both customerId and customer factory, so can not determine who to track"); } customerId = customerId ?? _customerFactory.GetCustomerId(); // do not transmit events if we do not have a customer id if (customerId == null) { return; } var resource = $"{TrackEndpoint}/customers/{customerId}"; await CallMethodAsync(resource, HttpMethod.Delete, null).ConfigureAwait(false); }
public async Task IdentifyAsync() { var id = _customerFactory.GetCustomerId(); await CallMethodAsync(MethodCustomer, id, Method.PUT, _customerFactory.GetCustomerDetails()); }