Skip to content

Commit 877800c

Browse files
committed
feat: add missing fields parameter in search
1 parent 82d7cc0 commit 877800c

8 files changed

+67
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace Pipedrive
2+
{
3+
public enum DealSearchField
4+
{
5+
custom_fields,
6+
notes,
7+
title
8+
}
9+
}

src/Pipedrive.net/Models/Request/Search/DealSearchFilters.cs src/Pipedrive.net/Models/Request/Deals/DealSearchFilters.cs

+7
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ public static DealSearchFilters None
99
get { return new DealSearchFilters(); }
1010
}
1111

12+
public DealSearchField? Fields { get; set; }
13+
1214
public bool? ExactMatch { get; set; }
1315

1416
public long? PersonId { get; set; }
@@ -31,6 +33,11 @@ public IDictionary<string, string> Parameters
3133
get
3234
{
3335
var d = new Dictionary<string, string>();
36+
if (Fields.HasValue)
37+
{
38+
d.Add("fields", Fields.Value.ToString());
39+
}
40+
3441
if (ExactMatch.HasValue)
3542
{
3643
d.Add("exact_match", ExactMatch.Value.ToString());
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace Pipedrive
2+
{
3+
public enum OrganizationSearchField
4+
{
5+
address,
6+
custom_fields,
7+
notes,
8+
name
9+
}
10+
}

src/Pipedrive.net/Models/Request/Search/OrganizationSearchFilters.cs src/Pipedrive.net/Models/Request/Organizations/OrganizationSearchFilters.cs

+7
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ public static OrganizationSearchFilters None
99
get { return new OrganizationSearchFilters(); }
1010
}
1111

12+
public OrganizationSearchField? Fields { get; set; }
13+
1214
public bool? ExactMatch { get; set; }
1315

1416
public int? StartPage { get; set; }
@@ -25,6 +27,11 @@ public IDictionary<string, string> Parameters
2527
get
2628
{
2729
var d = new Dictionary<string, string>();
30+
if (Fields.HasValue)
31+
{
32+
d.Add("fields", Fields.Value.ToString());
33+
}
34+
2835
if (ExactMatch.HasValue)
2936
{
3037
d.Add("exact_match", ExactMatch.Value.ToString());
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
namespace Pipedrive
2+
{
3+
public enum PersonSearchField
4+
{
5+
custom_fields,
6+
email,
7+
notes,
8+
phone,
9+
name
10+
}
11+
}

src/Pipedrive.net/Models/Request/Search/PersonSearchFilters.cs src/Pipedrive.net/Models/Request/Persons/PersonSearchFilters.cs

+7
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ public static PersonSearchFilters None
99
get { return new PersonSearchFilters(); }
1010
}
1111

12+
public PersonSearchField? Fields { get; set; }
13+
1214
public bool? ExactMatch { get; set; }
1315

1416
public long? OrganizationId { get; set; }
@@ -27,6 +29,11 @@ public IDictionary<string, string> Parameters
2729
get
2830
{
2931
var d = new Dictionary<string, string>();
32+
if (Fields.HasValue)
33+
{
34+
d.Add("fields", Fields.Value.ToString());
35+
}
36+
3037
if (ExactMatch.HasValue)
3138
{
3239
d.Add("exact_match", ExactMatch.Value.ToString());
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace Pipedrive
2+
{
3+
public enum ProductSearchField
4+
{
5+
code,
6+
custom_fields,
7+
name
8+
}
9+
}

src/Pipedrive.net/Models/Request/Search/ProductSearchFilters.cs src/Pipedrive.net/Models/Request/Products/ProductSearchFilters.cs

+7
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ public static ProductSearchFilters None
99
get { return new ProductSearchFilters(); }
1010
}
1111

12+
public ProductSearchField? Fields { get; set; }
13+
1214
public bool? ExactMatch { get; set; }
1315

1416
public int? StartPage { get; set; }
@@ -25,6 +27,11 @@ public IDictionary<string, string> Parameters
2527
get
2628
{
2729
var d = new Dictionary<string, string>();
30+
if (Fields.HasValue)
31+
{
32+
d.Add("fields", Fields.Value.ToString());
33+
}
34+
2835
if (ExactMatch.HasValue)
2936
{
3037
d.Add("exact_match", ExactMatch.Value.ToString());

0 commit comments

Comments
 (0)