Skip to content

Commit

Permalink
feat: add missing fields parameter in search
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidRouyer committed Jul 5, 2021
1 parent 82d7cc0 commit 877800c
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Pipedrive.net/Models/Request/Deals/DealSearchField.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace Pipedrive
{
public enum DealSearchField
{
custom_fields,
notes,
title
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ public static DealSearchFilters None
get { return new DealSearchFilters(); }
}

public DealSearchField? Fields { get; set; }

public bool? ExactMatch { get; set; }

public long? PersonId { get; set; }
Expand All @@ -31,6 +33,11 @@ public IDictionary<string, string> Parameters
get
{
var d = new Dictionary<string, string>();
if (Fields.HasValue)
{
d.Add("fields", Fields.Value.ToString());
}

if (ExactMatch.HasValue)
{
d.Add("exact_match", ExactMatch.Value.ToString());
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace Pipedrive
{
public enum OrganizationSearchField
{
address,
custom_fields,
notes,
name
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ public static OrganizationSearchFilters None
get { return new OrganizationSearchFilters(); }
}

public OrganizationSearchField? Fields { get; set; }

public bool? ExactMatch { get; set; }

public int? StartPage { get; set; }
Expand All @@ -25,6 +27,11 @@ public IDictionary<string, string> Parameters
get
{
var d = new Dictionary<string, string>();
if (Fields.HasValue)
{
d.Add("fields", Fields.Value.ToString());
}

if (ExactMatch.HasValue)
{
d.Add("exact_match", ExactMatch.Value.ToString());
Expand Down
11 changes: 11 additions & 0 deletions src/Pipedrive.net/Models/Request/Persons/PersonSearchField.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace Pipedrive
{
public enum PersonSearchField
{
custom_fields,
email,
notes,
phone,
name
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ public static PersonSearchFilters None
get { return new PersonSearchFilters(); }
}

public PersonSearchField? Fields { get; set; }

public bool? ExactMatch { get; set; }

public long? OrganizationId { get; set; }
Expand All @@ -27,6 +29,11 @@ public IDictionary<string, string> Parameters
get
{
var d = new Dictionary<string, string>();
if (Fields.HasValue)
{
d.Add("fields", Fields.Value.ToString());
}

if (ExactMatch.HasValue)
{
d.Add("exact_match", ExactMatch.Value.ToString());
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace Pipedrive
{
public enum ProductSearchField
{
code,
custom_fields,
name
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ public static ProductSearchFilters None
get { return new ProductSearchFilters(); }
}

public ProductSearchField? Fields { get; set; }

public bool? ExactMatch { get; set; }

public int? StartPage { get; set; }
Expand All @@ -25,6 +27,11 @@ public IDictionary<string, string> Parameters
get
{
var d = new Dictionary<string, string>();
if (Fields.HasValue)
{
d.Add("fields", Fields.Value.ToString());
}

if (ExactMatch.HasValue)
{
d.Add("exact_match", ExactMatch.Value.ToString());
Expand Down

0 comments on commit 877800c

Please sign in to comment.