@@ -109,5 +109,78 @@ public void Delete(long dealId)
109109
110110 _client . Execute ( path , method : Method . DELETE ) ;
111111 }
112+
113+ /// <summary>
114+ /// Gets a list of recently created deals
115+ /// </summary>
116+ /// <typeparam name="T">Implementation of DealListHubSpotModel</typeparam>
117+ /// <param name="opts">Options (limit, offset) relating to request</param>
118+ /// <returns>List of deals</returns>
119+ public DealRecentListHubSpotModel < T > RecentlyCreated < T > ( DealRecentRequestOptions opts = null ) where T : DealHubSpotModel , new ( )
120+ {
121+
122+ if ( opts == null )
123+ {
124+ opts = new DealRecentRequestOptions ( ) ;
125+ }
126+
127+ var path = $ "{ new DealRecentListHubSpotModel < T > ( ) . RouteBasePath } /deal/recent/created"
128+ . SetQueryParam ( "limit" , opts . Limit ) ;
129+
130+ if ( opts . Offset . HasValue )
131+ {
132+ path = path . SetQueryParam ( "offset" , opts . Offset ) ;
133+ }
134+
135+ if ( opts . IncludePropertyVersion )
136+ {
137+ path = path . SetQueryParam ( "includePropertyVersions" , "true" ) ;
138+ }
139+
140+ if ( ! string . IsNullOrEmpty ( opts . Since ) )
141+ {
142+ path = path . SetQueryParam ( "since" , opts . Since ) ;
143+ }
144+
145+ var data = _client . ExecuteList < DealRecentListHubSpotModel < T > > ( path , opts ) ;
146+
147+ return data ;
148+ }
149+
150+ /// <summary>
151+ /// Gets a list of recently modified deals
152+ /// </summary>
153+ /// <typeparam name="T">Implementation of DealListHubSpotModel</typeparam>
154+ /// <param name="opts">Options (limit, offset) relating to request</param>
155+ /// <returns>List of deals</returns>
156+ public DealRecentListHubSpotModel < T > RecentlyUpdated < T > ( DealRecentRequestOptions opts = null ) where T : DealHubSpotModel , new ( )
157+ {
158+ if ( opts == null )
159+ {
160+ opts = new DealRecentRequestOptions ( ) ;
161+ }
162+
163+ var path = $ "{ new DealRecentListHubSpotModel < T > ( ) . RouteBasePath } /deal/recent/modified"
164+ . SetQueryParam ( "limit" , opts . Limit ) ;
165+
166+ if ( opts . Offset . HasValue )
167+ {
168+ path = path . SetQueryParam ( "offset" , opts . Offset ) ;
169+ }
170+
171+ if ( opts . IncludePropertyVersion )
172+ {
173+ path = path . SetQueryParam ( "includePropertyVersions" , "true" ) ;
174+ }
175+
176+ if ( ! string . IsNullOrEmpty ( opts . Since ) )
177+ {
178+ path = path . SetQueryParam ( "since" , opts . Since ) ;
179+ }
180+
181+ var data = _client . ExecuteList < DealRecentListHubSpotModel < T > > ( path , opts ) ;
182+
183+ return data ;
184+ }
112185 }
113186}
0 commit comments