}
private Shipment getShipment()
{
Shipment s = Utility.create(Shipment.class);
s.setExternalReferenceId(externalReferenceId.getText().trim());
//To address
Address a = Utility.create(Address.class);
a.setAddressee(toAddressee.getText().trim());
a.setAddressLine1(toAddressLine1.getText().trim());
a.setAddressLine2(toAddressLine2.getText().trim());
a.setCity(toCity.getText().trim());
a.setPostalCode(toPostalCode.getText().trim());
a.setState(toState.getText().trim());
s.setToAddress(a);
//From address
a = Utility.create(Address.class);
a.setAddressee(fromAddressee.getText().trim());
a.setAddressLine1(fromAddressLine1.getText().trim());
a.setAddressLine2(fromAddressLine2.getText().trim());
a.setCity(fromCity.getText().trim());
a.setPostalCode(fromPostalCode.getText().trim());
a.setState(fromState.getText().trim());
s.setFromAddress(a);
/* if(basicService.isSelected())
{
s.setShippingServiceName(ShippingServiceName.BASIC);
}
else if(expediatedService.isSelected())
{
s.setShippingServiceName(ShippingServiceName.EXPEDITED);
}
else
{
s.setShippingServiceName(ShippingServiceName.NEXT_DAY_AIR);
}*/
for(Parcel p : model.getParcels())
{
s.getParcels().add(p);
}
return (s);
}