jsgoupil / quickbooks-sync

Sync Quickbooks Desktop
MIT License
87 stars 40 forks source link

Add public properties to the DATETYPE object. #38

Closed rogerfar closed 5 years ago

rogerfar commented 5 years ago

We serialize the request and response objects to QB for debugging purposes, until now if you would send a TimeTracking object the TxnDate would be blank:

    "TimeTrackingRet": [
        {
            "TxnID": "70-1552405893",
            "TimeCreated": {
                "QuickBooksRawString": "2019-03-12T09:51:33-07:00",
                "UncorrectedDate": "2019-03-12T09:51:33-07:00",
                "Ticks": 636879810930000000,
                "Year": 2019,
                "Month": 3,
                "Day": 12,
                "Hour": 9,
                "Minute": 51,
                "Second": 33
            },
            "TxnDate": {},
        }

I added a few public properties to the DATETYPE object, similar to the DATETIMETYPE object so that when serializing the object it would come out as:

    "TimeTrackingRet": [
        {
            "TxnID": "70-1552405893",
            "TimeCreated": {
                "QuickBooksRawString": "2019-03-12T09:51:33-07:00",
                "UncorrectedDate": "2019-03-12T09:51:33-07:00",
                "Ticks": 636879810930000000,
                "Year": 2019,
                "Month": 3,
                "Day": 12,
                "Hour": 9,
                "Minute": 51,
                "Second": 33
            },
            "TxnDate": {
                "QuickBooksRawString": "2019-03-12",
                "Ticks": 636879456000000000,
                "Year": 2019,
                "Month": 3,
                "Day": 12
            },
        }
jsgoupil commented 5 years ago

So that I understand properly, this serializing is not for QuickBooks right? only to recover from your own serialization? It's quite strange that Travis is failing mmm

rogerfar commented 5 years ago

Sorry I forgot to write that part in!

We serialize both the request and response for transactions we do to a database, which I serialize to JSON first. So yes, it's a nice-to-have really, nothing that has to do with QB serialization.

I'm not sure what Travis is about, it's erroring out on various things, maybe it just has to run again?

jsgoupil commented 5 years ago

Yeah I tried to run it again and it failed once more.

jsgoupil commented 5 years ago

This Travis is driving me quite insane... I build before that PR and it passes fine.

jsgoupil commented 5 years ago

https://travis-ci.community/t/nuget-failing-resolvepackagedependencies/4745

rogerfar commented 5 years ago

@jsgoupil did you by any chance had a look at this PR? It seems that build was successful at one point: https://travis-ci.org/jsgoupil/quickbooks-sync/requests

jsgoupil commented 5 years ago

The build does not pass anymore... and until we get this figured out, it will mark the whole project as non-passing. I'm going on vacation for 1 week right now.

jsgoupil commented 5 years ago

https://docs.travis-ci.com/user/reference/overview/ Could you add

dist: trusty

in .travis.xml, I think that will fix it.

rogerfar commented 5 years ago

That seems to do the trick! No rush with this PR, enjoy your holidays!

jsgoupil commented 5 years ago

Published as qbxml-2.1.0 Thanks!