Comments (11)
@PleasantD Between now and Sunday.
from quickbooks-sync.
I have a fork that includes some common interfaces for the Ret types. I don't think I did anything with VendorAddress
and BillAddress
, but on quick check both of those are already partials. I have been meaning to do a PR for a long time. I'll try to go look at the status of my fork and see if I can get that in.
@jsgoupil accepts PRs if you wanted to add the interface for VendorAddress
and BillAddress
and any of the address address types that have common fields.
from quickbooks-sync.
Adding a partial
is a good idea, however, it also allows you to add fields/properties. And that would be problematic for the XML generation. This would allow people to add types the way they want.
Adding an interface ourselves is also a possibility but the maintainability can be quite the nightmare; finding common types can be quite suggestive. Deciding what is a common type ourselves can be complicated.
What do you think @tofer regarding this? what approach would you go? I don't see anything being partial right now.
from quickbooks-sync.
OK, PR #45 created
from quickbooks-sync.
@jsgoupil You don't see anything partial? Seems like every class generated in Objects.cs
is partial.
Looking at the XSD, we should absolutely be able to add a common interfaceto the Addresses. Most of them reference either group AddressData
or AddressBlockData
. Might be able to do it similarly to the way I did for the *Ret intefaces I just did the PR for.
<xsd:element name="LegalAddress">
<xsd:complexType>
<xsd:sequence>
<xsd:group ref="AddressData"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="BillAddress">
<xsd:complexType>
<xsd:sequence>
<xsd:group ref="AddressData"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="BillAddressBlock">
<xsd:complexType>
<xsd:sequence>
<xsd:group ref="AddressBlockData"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="VendorAddress">
<xsd:complexType>
<xsd:sequence>
<xsd:group ref="AddressData"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
from quickbooks-sync.
Well it was really easy to add interfaces for the AddressData
and AddressBlockData
groups in the XSD (IQbAddress
and IQbAddressBlock
), so I went ahead and just did it and pushed another commit to the PR here.
While I was in there, I noticed some other very commonly used groups, namely ContactInfo
, CommInfo
, and PersonName
, so I also added interfaces IQbContactInfo
, IQbCommInfo
, and IQbPersonName
respectively as well in case that is useful.
from quickbooks-sync.
Maybe it has to do with how it's packaged?
from quickbooks-sync.
Oh yea, I forgot partials all have to be in the same library. So if you are decompiling to view source, that is probably not shown since it can't be treated as partial across libraries.
from quickbooks-sync.
So he couldn't really do partial then in his own project. We needed a PR.
Thanks for that PR. I will be updating this real soon.
from quickbooks-sync.
So he couldn't really do partial then in his own project. We needed a PR.
This is correct. Partials only exist withing a compilation unit and don't allow for extending a type.
They are just a friendly way for a large type to span multiple files, or for generated code to allow for custom extension within the compilation unit it is generated in.
This kind of common interfacing will help reduce the duplication I currently need.
When is a new release expected?
from quickbooks-sync.
Fixed in 2644a55
Released as qbxml-2.2.0
from quickbooks-sync.
Related Issues (20)
- InvoiceAdd.InvoiceLineAdd items being reordered HOT 4
- Parsing amounts incorrectly from string to decimal HOT 18
- SoapCore 0.9.9 is not compatible with .NET core 3.1 HOT 3
- How can i Iterator for JournalEntryAddRqType. HOT 3
- Tracking iterator progress HOT 4
- Unexpected keys in EmployeePayrollInfo causing issues deserializing HOT 5
- Support QBXml 14. HOT 11
- Add support for Nullable=enable
- Upgrade to QbSync 2.3.0 causes MissingMethodException HOT 8
- Payment receipt template returns `true` for template type HOT 4
- decimal precision in QUANTYPE HOT 6
- QuickBooks Sync does not work with .NET 7 HOT 9
- Unable to add a new Application to the Web Connector in 3.1.0 HOT 21
- SONumber HOT 6
- XmlCodeExporter Missing HOT 1
- Authenticator Null Reference HOT 5
- UnitOfMeasureUnit is missing from ColDesc in reports.
- Upgrade from old version HOT 2
- Rate or RatePercent not being set on SalesOrderLineRet
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quickbooks-sync.