/// <summary> /// Resolve a hubspot API path based off the entity and operation that is about to happen /// </summary> /// <param name="entity"></param> /// <param name="action"></param> /// <returns></returns> /// <exception cref="ArgumentOutOfRangeException"></exception> public string PathResolver(IOwnerHubSpotEntity entity, HubSpotAction action) { switch (action) { case HubSpotAction.List: return($"{entity.RouteBasePath}/owners"); case HubSpotAction.Get: return($"{entity.RouteBasePath}/owners/:ownerId:"); default: throw new ArgumentOutOfRangeException(nameof(action), action, null); } }
/// <summary> /// Resolve a hubspot API path based off the entity and opreation that is about to happen /// </summary> /// <param name="entity"></param> /// <param name="action"></param> /// <returns></returns> /// <exception cref="ArgumentOutOfRangeException"></exception> public string PathResolver(IOwnerHubSpotEntity entity, HubSpotAction action) { switch (action) { //case HubSpotAction.Create: // return $"{entity.RouteBasePath}/engagements"; //case HubSpotAction.Get: // return $"{entity.RouteBasePath}/contact/vid/:contactId:/profile"; //case HubSpotAction.GetByEmail: // return $"{entity.RouteBasePath}/contact/email/:contactEmail:/profile"; case HubSpotAction.List: return($"{entity.RouteBasePath}/owners"); //case HubSpotAction.Update: // return $"{entity.RouteBasePath}/contact/vid/:contactId:/profile"; //case HubSpotAction.Delete: // return $"{entity.RouteBasePath}/contact/vid/:contactId:"; default: throw new ArgumentOutOfRangeException(nameof(action), action, null); } }