Using Your Application Objects as Package Sources |
Using Your Application Objects as Package Sources |
------------------------------------------------- |
------------------------------------------------- |
|
|
It also accepts any custom objects of your own design, that are registered with |
In addition to PyDicia-defined objects and sequences thereof, the |
the ``pydicia.add_to_package()`` or ``pydicia.iter_options()`` generic |
``add_package()`` method also accepts any custom objects of your own design |
functions:: |
that have been registered with the ``pydicia.add_to_package()`` or |
|
``pydicia.iter_options()`` generic functions:: |
|
|
>>> class Customer: |
>>> class Customer: |
... def __init__(self, **kw): |
... def __init__(self, **kw): |
Multi-Batch Shipments |
Multi-Batch Shipments |
===================== |
===================== |
|
|
Certain DAZzle options can only be set once per file, such as the choice of |
Certain DAZzle options can only be set once per XML file, such as the choice of |
layout file. If you are shipping multiple packages with different label |
layout file. If you are shipping multiple packages with different label |
layouts (such as domestic vs. international mail), you need to separate these |
layouts (such as domestic vs. international mail), you need to separate these |
packages into different batches. The ``Shipment`` class handles this |
packages into different batches, each of which will be in a separate XML file. |
separation for you automatically. |
The ``Shipment`` class handles this separation for you automatically. |
|
|
When you create a shipment, it initially has no batches:: |
When you create a shipment, it initially has no batches:: |
|
|
Status : 'Rejected (-3)' |
Status : 'Rejected (-3)' |
ErrorCode : -3 |
ErrorCode : -3 |
ToAddress : [] |
ToAddress : [] |
|
ToZip4 : '1234' |
PIC : '123465874359' |
PIC : '123465874359' |
FinalPostage : Decimal("4.60") |
FinalPostage : Decimal("4.60") |
TransactionDateTime : datetime.datetime(2007, 7, 4, 17, 32, 21) |
TransactionDateTime : datetime.datetime(2007, 7, 4, 17, 32, 21) |