Ejemplo n.º 1
0
        /// <summary>
        ///     Provides the route to an endpoint relative to the specified type key.
        /// </summary>
        /// <typeparam name="T">The IHubSpotModel-based type key used for the route.</typeparam>
        /// <returns>The full route for the DTO without parameters</returns>
        public virtual string GetRoute <T>()
            where T : IHubSpotObject
        {
            var routeValue = TryGetRouteValue <T>();

            return($"{MidRoute.TrimEnd('/')}/{routeValue.TrimStart('/')}");
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Provides the route to the midroute endpoint for the DTO group.
 /// This should be used when there is no need to add any parameters
 /// </summary>
 /// <returns>The cleaned midroute</returns>
 public virtual string GetRoute()
 => $"{MidRoute.TrimEnd('/')}";