profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/mgkimsal/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Michael Kimsal mgkimsal Foster Burgess, LLC Raleigh, NC http://michaelkimsal.com/

mgkimsal/Cinch 2

A project to develop a bulk download and FTP service to a central repository that will maintain original file timestamps, extract file level metadata, create file checksums and periodically validate checksums for continued file integrity. Users merely need to upload a list of URLs to download or an FTP address and when the process completes they can download the requested files and file metadata to their local environment. Funding for the CINCH: Capture, Ingest, & Checksum tool is made possible through an IMLS Sparks! Ignition grant.

mgkimsal/adzerk-api 1

Clients and documentation for the adzerk api

mgkimsal/bsdemo 1

Bootstrap demo

mgkimsal/cloud9 1

Cloud9 IDE - by javascripter for javascripters - Powered by Ajax.org

mgkimsal/grails-session-temp-files 1

A plugin for Grails that provides temporary file storage bound to the HTTP session, destroyed when the session expires.

mgkimsal/grails-solr-plugin 1

Provides search capabilities for Grails domain model and more using the excellent Solr open source search server through the SolrJ library.

mgkimsal/angLarvVolunteerCredits 0

volunteer credits application made with Angular & Laravel 5 & deployed to cloud

startedmarkkimsal/phusion-php

started time in 14 days

issue commentintuit/QuickBooks-V3-PHP-SDK

bug: removeNullProperties removes regular arrays too

Looking at this more, I'm guessing more people use a 'loose collection' style... ?

Invoice::create([
  'CustomerRef'=>['value'=>58],
  'Lines'=>[],// etc
]);

and perhaps this wasn't/isn't a problem?

I was/am using code more like this...

        $customerRef = new IPPReferenceType();
        $customerRef->value = $qbCustomer->Id;
        $customerRef->name = $qbCustomer->FullyQualifiedName;

        $qbInvoice = new IPPInvoice();
        $qbInvoice->CustomerRef = $customerRef;
...
        $qbInvoice->Lines = []; // multiple IPPLines there
        $quickbooks->Add($qbInvoice);

This is where I kept getting "CustomerRef is missing" errors, because the Add() call something that eventually gets down to a serializer - XML or JSON. The XML one never worked for me...

Trying to get property 'CustomLogger' of non-object in .../vendor/quickbooks/v3-php-sdk/src/Core/Http/Serialization/XmlObjectSerializer.php

When I discovered you could swap with ->useJson() it seemed to get much farther than that, and I got real 'error messages' back - I tried to dig in to the XmlObjectSerializer.php a bit more but... there's some magic going on there that I couldn't get past.

This was a problem for me on both PHP 7.4.20 and 8.0.6. The 'fix' I have works in both cases.

mgkimsal

comment created time in 2 months

issue openedintuit/QuickBooks-V3-PHP-SDK

bug: removeNullProperties removes regular arrays too

https://github.com/intuit/QuickBooks-V3-PHP-SDK/pull/420

I've seen others with the same error messages I was seeing yesterday

"CustomerRef is missing" from posting an Invoice object.

Using JSON, the serializer 'removeNullProperties' method was filtering out the "CustomerRef" key/value, because the value itself was not a 'recurrsiveArray' (typo there - wasn't sure if I should change that too?)

Added a test to validate/demonstrate what I need (and assume should be correct behavior).

created time in 2 months

PR opened intuit/QuickBooks-V3-PHP-SDK

fix: removeNullProperties should not filter out regular arrays

Existing removeNullProperties filtered out standard arrays, causing problems. Specifically, an $invoice object with $customerRef on it (with $customerRef['value']) was filtered out, causing "CustomerRef is missing" validation errors.

I added the count() check to ignore empty array values, which seems in spirit with the 'removeNull' intention.

Adding a test, based on the previously added testThatRemoveNullPropertiesLeavesNonNullValuesInPlace

+35 -1

0 comment

2 changed files

pr created time in 2 months

push eventmgkimsal/QuickBooks-V3-PHP-SDK

Michael Kimsal

commit sha e99044595837448dd934a0e177636b35643651ca

fix: removeNullProperties filtered out regular arrays Existing removeNullProperties filtered out standard arrays, causing problems. Specifically, an $invoice object with $customerRef on it (with $customerRef['value']) was filtered out, causing "CustomerRef is missing" validation errors. I added the count() check to ignore empty array values, which seems in spirit with the 'removeNull' intention. Adding a test, based on the previously added testThatRemoveNullPropertiesLeavesNonNullValuesInPlace

view details

push time in 2 months

fork mgkimsal/QuickBooks-V3-PHP-SDK

Official PHP SDK for QuickBooks REST API v3.0: https://developer.intuit.com/

fork in 2 months

startedimba/imba

started time in 2 months

startedcogitools/dusk

started time in 2 months