Open theinventor opened 11 years ago
First, thanks for digging into this.
I'm surprised not sending an Address
works as Intuit indicates its a required field.
under Business Rules: "The customer address field is mandatory."
But I'm also confused by your note at the top. You say "sending an empty address does fail" but then also "You are able to send nothing at all". Do you mean that excluding certain parts of the Address
are OK? Can you please clarify?
Thanks again
For example, sending a nil street, city, state, but having the address tag in there, which a builds up the
If you don't send any
Troy Anderson
On Aug 26, 2013, at 10:00 AM, Cody Caughlan notifications@github.com wrote:
First, thanks for digging into this.
I'm surprised not sending an Address works as Intuit indicates its a required field.
under Business Rules: "The customer address field is mandatory."
But I'm also confused by your note at the top. You say "sending an empty address does fail" but then also "You are able to send nothing at all". Do you mean that excluding certain parts of the Address are OK? Can you please clarify?
Thanks again
— Reply to this email directly or view it on GitHub.
Ah ok, so sending a request with an actual "Address" element but which contains a set of empty values for Street, City, etc. will fail. But also sending a request with no "Address" at all will succeed.
So it seems like the validation rule is basically, in plain english, "If you give me an address then it needs to have non-blank values for all my children attributes (Street, City, State, Zip, etc)".
On Aug 26, 2013, at 10:41 AM, Troy Anderson notifications@github.com wrote:
For example, sending a nil street, city, state, but having the address tag in there, which a builds up the
XML element with a lot of empty fields will fail. If you don't send any
element at all, it works - I saw this eluded to on stackoverflow Troy Anderson
On Aug 26, 2013, at 10:00 AM, Cody Caughlan notifications@github.com wrote:
First, thanks for digging into this.
I'm surprised not sending an Address works as Intuit indicates its a required field.
under Business Rules: "The customer address field is mandatory."
But I'm also confused by your note at the top. You say "sending an empty address does fail" but then also "You are able to send nothing at all". Do you mean that excluding certain parts of the Address are OK? Can you please clarify?
Thanks again
— Reply to this email directly or view it on GitHub. — Reply to this email directly or view it on GitHub.
I actually don't know the rule though, I can do some more testing to reverse engineer it - I have a feeling if you leave out the street, but fill in the rest, it will work. and if you fill in the street and leave out the rest, it probably works.
I got a few validation errors on the address when I was testing, but I didn't explore enough to understand their rules.
I'm using it as-is for now, but I'll just be disabling that validation in my production app until this is firmed up and in another version release.
It's hard to tell my users it requires an address, when Quickbooks proper does not :(
On Aug 26, 2013, at 11:20 AM, Cody Caughlan notifications@github.com wrote:
Ah ok, so sending a request with an actual "Address" element but which contains a set of empty values for Street, City, etc. will fail. But also sending a request with no "Address" at all will succeed.
So it seems like the validation rule is basically, in plain english, "If you give me an address then it needs to have non-blank values for all my children attributes (Street, City, State, Zip, etc)".
On Aug 26, 2013, at 10:41 AM, Troy Anderson notifications@github.com wrote:
For example, sending a nil street, city, state, but having the address tag in there, which a builds up the
XML element with a lot of empty fields will fail. If you don't send any
element at all, it works - I saw this eluded to on stackoverflow Troy Anderson
On Aug 26, 2013, at 10:00 AM, Cody Caughlan notifications@github.com wrote:
First, thanks for digging into this.
I'm surprised not sending an Address works as Intuit indicates its a required field.
under Business Rules: "The customer address field is mandatory."
But I'm also confused by your note at the top. You say "sending an empty address does fail" but then also "You are able to send nothing at all". Do you mean that excluding certain parts of the Address are OK? Can you please clarify?
Thanks again
— Reply to this email directly or view it on GitHub. — Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHub.
At first I just removed the validation, but I think something should be there - since sending an empty address does fail.
You are able to send nothing at all, customer.addresses = nil seems to work;
I have no idea how to communicate this in a short validation error :)