Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contact Get Requests does not return 'CreatedAt' and 'UpdatedAt' #130

Open
SteDuk opened this issue Oct 31, 2023 · 1 comment
Open

Contact Get Requests does not return 'CreatedAt' and 'UpdatedAt' #130

SteDuk opened this issue Oct 31, 2023 · 1 comment

Comments

@SteDuk
Copy link

SteDuk commented Oct 31, 2023

Describe the bug
When requesting the contacts list or a single contact by Id I do not get any value for CreatedAt and UpdatedAt

Repro Steps
`var api = new HubSpotApi("Access token here")

        var contact = api.Contact.GetById<ContactHubSpotModel>(request.Id);

        return new ContactsDetailsResponse
        {
            Company = contact.Company,
            Email = contact.Email,
            FirstName = contact.FirstName,
            LastName = contact.LastName,
            Id = contact.Id,
            Phone = contact.Phone,
            CreatedAt = contact.CreatedAt,
            UpdatedAt = contact.UpdatedAt
        };`

Expected behavior
Should return the Contact object including CreaetdAt and UpdatedAt

@SteDuk
Copy link
Author

SteDuk commented Oct 31, 2023

It seems, that the DataMember Name of these Properties are outdated.

Workaround
I created a class which inherits from ContactHubSpotModel:

public class MyHubspotContact : ContactHubSpotModel
    {
        [DataMember(Name = "createdate")]
        public DateTime? CreateDate { get; set; }

        [DataMember(Name = "lastmodifieddate")]
        public DateTime? UpdateDate { get; set; }
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant