Skip to content

Commit 9395b12

Browse files
committed
Revert "added new list object that inherits from DealListHubSpotModel, added methods to retrieve recently modified/created deals"
This reverts commit e1aa702.
1 parent e1aa702 commit 9395b12

File tree

3 files changed

+0
-109
lines changed

3 files changed

+0
-109
lines changed

HubSpot.NET/Api/Deal/Dto/DealRecentListHubSpotModel.cs

Lines changed: 0 additions & 27 deletions
This file was deleted.

HubSpot.NET/Api/Deal/HubSpotDealApi.cs

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -99,80 +99,6 @@ public HubSpotDealApi(IHubSpotClient client)
9999
return data;
100100
}
101101

102-
public DealRecentListHubSpotModel<T> RecentlyCreatedList<T>(bool includePropertyVersions, string since = "", ListRequestOptions opts = null) where T : DealHubSpotModel, new()
103-
{
104-
if (opts == null)
105-
{
106-
opts = new ListRequestOptions();
107-
}
108-
109-
var path = $"{new DealRecentListHubSpotModel<T>().RouteBasePath}/deal/recent/created"
110-
.SetQueryParam("limit", opts.Limit);
111-
112-
if (opts.Offset.HasValue)
113-
{
114-
path = path.SetQueryParam("offset", opts.Offset);
115-
}
116-
117-
// Recently created deals does not have an includeAssociations query parameter
118-
// but does have 'includePropertyVersions and 'since' query parameters.
119-
if (includePropertyVersions)
120-
{
121-
path = path.SetQueryParam("includePropertyVersions", "true");
122-
}
123-
124-
if (!string.IsNullOrEmpty(since))
125-
{
126-
path = path.SetQueryParam("since", since);
127-
}
128-
129-
if (opts.PropertiesToInclude.Any())
130-
{
131-
path = path.SetQueryParam("properties", opts.PropertiesToInclude);
132-
}
133-
134-
var data = _client.ExecuteList<DealRecentListHubSpotModel<T>>(path, opts);
135-
136-
return data;
137-
}
138-
139-
public DealRecentListHubSpotModel<T> RecentlyModifiedList<T>(bool includePropertyVersions, string since = "", ListRequestOptions opts = null) where T : DealHubSpotModel, new()
140-
{
141-
if (opts == null)
142-
{
143-
opts = new ListRequestOptions();
144-
}
145-
146-
var path = $"{new DealRecentListHubSpotModel<T>().RouteBasePath}/deal/recent/modified"
147-
.SetQueryParam("limit", opts.Limit);
148-
149-
if (opts.Offset.HasValue)
150-
{
151-
path = path.SetQueryParam("offset", opts.Offset);
152-
}
153-
154-
// Recently created deals does not have an includeAssociations query parameter
155-
// but does have 'includePropertyVersions and 'since' query parameters.
156-
if (includePropertyVersions)
157-
{
158-
path = path.SetQueryParam("includePropertyVersions", "true");
159-
}
160-
161-
if (!string.IsNullOrEmpty(since))
162-
{
163-
path = path.SetQueryParam("since", since);
164-
}
165-
166-
if (opts.PropertiesToInclude.Any())
167-
{
168-
path = path.SetQueryParam("properties", opts.PropertiesToInclude);
169-
}
170-
171-
var data = _client.ExecuteList<DealRecentListHubSpotModel<T>>(path, opts);
172-
173-
return data;
174-
}
175-
176102
/// <summary>
177103
/// Deletes a given deal (by ID)
178104
/// </summary>
@@ -183,7 +109,5 @@ public void Delete(long dealId)
183109

184110
_client.Execute(path, method: Method.DELETE);
185111
}
186-
187-
188112
}
189113
}

HubSpot.NET/Core/Interfaces/IHubSpotDealApi.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,5 @@ public interface IHubSpotDealApi
1212

1313
DealListHubSpotModel<T> List<T>(bool includeAssociations, ListRequestOptions opts = null)
1414
where T : DealHubSpotModel, new();
15-
16-
DealRecentListHubSpotModel<T> RecentlyCreatedList<T>(bool includePropertyVersions, string since = "", ListRequestOptions opts = null)
17-
where T : DealHubSpotModel, new();
18-
19-
DealRecentListHubSpotModel<T> RecentlyModifiedList<T>(bool includePropertyVersions, string since = "", ListRequestOptions opts = null)
20-
where T : DealHubSpotModel, new();
2115
}
2216
}

0 commit comments

Comments
 (0)