Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow BillThirdPartyConsignee to be set in ItemizedPaymentInformation #343

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

coenjacobs
Copy link

As per the UPS OnLine® Tools Shipping XML Tool Developers Guide (non-official link) (page 76), the BillThirdPartyConsignee element can be present instead of the BillThirdPartyShipper inside of a ItemizedPaymentInformation element:

This element or its sibling element, BillThirdPartyShipper, must be present but no more than one can be present.

The purpose of this field is to have a separate BillThirdParty inside your ItemizedPaymentInformation that is not charged for shipping, but (for example) only for duties and taxes (using the SHIPMENT_CHARGE_TYPE_DUTIES type on the ShipmentCharge).

In this pull request I've repurposed the main BillThirdParty object to be passed as a BillThirdPartyShipper parameter, as they are identical in terms of fields and methods. I'm open to suggestions to make this more optimal, if needed.

Store this separately so it can be treated differently than a regular
BillThirdParty, as it has to be stored in a different root element in
the XML being generated.

BillThirdPartyConsignee can be a regular BillThirdParty object
These are only required on the ShipmentCharge, where it is then passed
onto the XML creating logic.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant