Creating a Shipment with Insurance

UPS

Create a package with a high dollar insurance value:

<?php
$shipment = new \RocketShipIt\Shipment('UPS');

$shipment->setParameter('toCompany', 'John Doe');
$shipment->setParameter('toPhone', '1231231234');
$shipment->setParameter('toAddr1', '111 W Legion');
$shipment->setParameter('toCity', 'Whitehall');
$shipment->setParameter('toState', 'MT');
$shipment->setParameter('toCode', '59759');

$package = new \RocketShipIt\Package('UPS');
$package->setParameter('length','5');
$package->setParameter('width','5');
$package->setParameter('height','5');
$package->setParameter('weight','5');
$package->setParameter('insuredCurrency','USD');
$package->setParameter('insuredValue','1001.00');

$shipment->addPackageToShipment($package);

$response = $shipment->submitShipment();

FedEx

Example:

<?php
$shipment = new \RocketShipIt\Shipment('fedex');

$shipment->setParameter('toCompany', 'John Doe');
$shipment->setParameter('toName', 'John Doe');
$shipment->setParameter('toPhone', '1231231234');
$shipment->setParameter('toAddr1', '111 W Legion');
$shipment->setParameter('toCity', 'Whitehall');
$shipment->setParameter('toState', 'MT');
$shipment->setParameter('toCode', '59759');

$shipment->setParameter('length', '5');
$shipment->setParameter('width', '5');
$shipment->setParameter('height', '5');
$shipment->setParameter('weight','5');

// Insurance
$shipment->setParameter('insuredCurrency','USD');
$shipment->setParameter('insuredValue','899.00');

$response = $shipment->submitShipment();

DHL

Example:

<?php
$shipment = new \RocketShipIt\Shipment('DHL');
$shipment->setParameter('shipper', 'RocketShipIt');
$shipment->setParameter('shipAddr1', '76 Sycamore St');
$shipment->setParameter('shipCity', 'San Francisco');
$shipment->setParameter('shipState', 'California');
$shipment->setParameter('shipCode', '94110');
$shipment->setParameter('shipCountry', 'US');
$shipment->setParameter('toCompany', 'RocketShipIt');
$shipment->setParameter('toAddr1', '76 Sycamore St');
$shipment->setParameter('toCity', 'San Francisco');
$shipment->setParameter('toState', 'California');
$shipment->setParameter('toCode', '94110');
$shipment->setParameter('toCountry', 'US');
$shipment->setParameter('toName', 'Mark Sanborn');
$shipment->setParameter('toPhone', '1234567');
$shipment->setParameter('service', 'D');
$shipment->setParameter('weight', '5');

// Insurance
$shipment->setParameter('insuredValue','100.00');

$response = $shipment->submitShipment();