benweatherman/python-ship

test.py

Closed this issue · 1 comments

Hi,

I ran into a few little bugs while trying to run test.py. Please see the following:

Line 55 in test.py:
response = u.label(intl_packages, shipper, r, ups.SERVICES[9][0], ups.PACKAGES[5][0], validate, [ 'test@garbagemail.com '], create_commercial_invoice=True, products=products)

products=products should be replaced by customs_info=products in order to match the following:
def label(self, packages, shipper_address, recipient_address, service, box_shape, validate_address, email_notifications=list(), create_commercial_invoice=False, customs_info=[])


Line 45 and 46 in test.py:
P(total=10, item_price=2, quantity=5, description='It\'s just a bunch of widgets')

ups.py requests for p.value and p.country both of which are missing in the above declaration. The following fixes this issue:
P(total=10, value=2, quantity=5, description='It\'s just a bunch of widgets', country = 'CA')

Mind submitting a pull request? It'll take me a few days otherwise.