NodeGeeks / loopback-connector-quickbooks

MIT License
6 stars 0 forks source link

QBModel Validation #6

Open TeknoloGenie opened 8 years ago

TeknoloGenie commented 8 years ago

QuickBooks has strict guidelines to QBxml request and what data can be passed, how its formatted, the order its sent in... needless to say its ridiculous. But we must conform to their ridiculousness lol.

Each QBModel has a .json schema file, validation should be defined within the appropriate schema file. In order to accomplish this we will need to do a major refactor within the buildXMLRequest method. Heres an example of what i would like this to look like.

"Add" : {
...
"4": {
"CompanyName": {
"type":"STRTYPE",
"required": true
}
},
...
}