Skip to content

Commit

Permalink
fix: activity add time
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidRouyer committed Apr 18, 2019
1 parent 6b2ea88 commit efd66c1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Pipedrive.net/Models/Response/Activity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
19 changes: 19 additions & 0 deletions src/Pipedrive.net/Models/Response/DealActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
}
}
}

0 comments on commit efd66c1

Please sign in to comment.