forked from DavidRouyer/pipedrive-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from The-Poolz/implement_add-lead
Implement `addLead`
- Loading branch information
Showing
6 changed files
with
77 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
using Pipedrive.Models.Response; | ||
|
||
namespace Pipedrive | ||
{ | ||
public class NewLead : IEntityWithCustomFields | ||
{ | ||
[JsonProperty("title")] | ||
public string Title { get; set; } | ||
|
||
[JsonProperty("owner_id", NullValueHandling = NullValueHandling.Ignore)] | ||
public long? OwnerId { get; set; } | ||
|
||
[JsonProperty("label_ids", NullValueHandling = NullValueHandling.Ignore)] | ||
public IEnumerable<Guid> LabelIds { get; set; } | ||
|
||
[JsonProperty("person_id", NullValueHandling = NullValueHandling.Ignore)] | ||
public long? PersonId { get; set; } | ||
|
||
[JsonProperty("organization_id", NullValueHandling = NullValueHandling.Ignore)] | ||
public long? OrganizationId { get; set; } | ||
|
||
[JsonProperty("value", NullValueHandling = NullValueHandling.Ignore)] | ||
public CurrencyAmount Value { get; set; } | ||
|
||
[JsonProperty("expected_close_date", NullValueHandling = NullValueHandling.Ignore)] | ||
public DateTime? ExpectedCloseDate { get; set; } | ||
|
||
[JsonProperty("visible_to", NullValueHandling = NullValueHandling.Ignore)] | ||
public Visibility? VisibleTo { get; set; } | ||
|
||
[JsonProperty("was_seen", NullValueHandling = NullValueHandling.Ignore)] | ||
public bool? WasSeen { get; set; } | ||
|
||
[JsonIgnore] | ||
public IDictionary<string, ICustomField> CustomFields { get; set; } = new Dictionary<string, ICustomField>(); | ||
|
||
public NewLead(string title) | ||
{ | ||
this.Title = title; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
namespace Pipedrive | ||
{ | ||
public class LeadCreated : AbstractLead { } | ||
} |