Closed jmawebtech closed 3 years ago
Here is the final code:
long unixTimestamp = (long)DateTime.Today.TimeOfDay.TotalMilliseconds;
provider.Contacts.CreateConnexContact(new ConnexContact()
{
Email = "john2@squaredup.com",
BillingUserName = "mybillingusername",
ConnexForQuickBooksUserName = "connexusername",
DateCreditCardFailed = unixTimestamp,
InitialOrderId = "100",
InitialPurchaseDate = unixTimestamp,
QBVersion = "QuickBooks Desktop",
SubscriptionTransactionId = "RP123",
TrialExpirationDate = unixTimestamp,
WhatElseShouldWeKnow = "Test",
WhatSystemConnect = "Test",
FirstName = "John",
TrialExtended = "true",
LastName = "Smith",
Phone = "00000 000000",
Company = "Squared Up Ltd."
});
Describe the bug
I bound a DateTime property to the total milliseconds of a time, but I receive this error:
HubSpot.NET.Core.HubSpotException: 'Error from HubSpot, JSONResponse={"validationResults":[{"isValid":false,"message":"1606768561954 is at 20:36:1.954 UTC, not midnight!","error":"INVALID_DATE","name":"trial_end_date"},{"
Repro Steps
Here is my code:
Expected behavior
I expected a DateTime property to bind.
Screenshots If applicable, add screenshots to help explain your problem.
*Anything else?**
Can you add examples on how to map DateTime properties to your documentation?