diff --git a/src/Pipedrive.net/Models/Response/Activity.cs b/src/Pipedrive.net/Models/Response/Activity.cs index 5094f979..49213815 100644 --- a/src/Pipedrive.net/Models/Response/Activity.cs +++ b/src/Pipedrive.net/Models/Response/Activity.cs @@ -35,8 +35,8 @@ public class Activity : IDealUpdateEntity [JsonProperty("duration")] public string Duration { get; set; } - [JsonProperty("add_date")] - public DateTime AddDate { get; set; } + [JsonProperty("add_time")] + public DateTime AddTime { get; set; } [JsonProperty("marked_as_done_time")] public DateTime? MarkedAsDoneTime { get; set; } diff --git a/src/Pipedrive.net/Models/Response/DealActivity.cs b/src/Pipedrive.net/Models/Response/DealActivity.cs index e2c8b783..539b7865 100644 --- a/src/Pipedrive.net/Models/Response/DealActivity.cs +++ b/src/Pipedrive.net/Models/Response/DealActivity.cs @@ -109,5 +109,24 @@ public class DealActivity [JsonProperty("assigned_to_user_id")] public long? AssignedToUserId { get; set; } + + public Activity ToActivity() + { + return new Activity + { + Subject = Subject, + Done = Done, + Type = Type, + DueDate = DueDate, + DueTime = DueTime, + Duration = Duration, + UserId = UserId.Id, + DealId = DealId.Id, + PersonId = PersonId.Value, + Participants = Participants, + OrgId = OrgId.Value, + Note = Note + }; + } } }