Creating a FedEx One Rate Shipment

Example

Here is an 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');

$shipment->setParameter('packagingType', 'FEDEX_SMALL_BOX');
$shipment->setParameter('service', 'FEDEX_EXPRESS_SAVER');
$shipment->setParameter('fedexOneRate', 'YES');

$response = $shipment->submitShipment();

Eligible packagingType parameters for FedEx One Rate

packagingType Maxiumum Weight
FEDEX_SMALL_BOX 50
FEDEX_MEDIUM_BOX 50
FEDEX_LARGE_BOX 50
FEDEX_EXTRA_LARGE_BOX 50
FEDEX_PAK 50
FEDEX_TUBE 50
FEDEX_ENVELOPE 10

Eligible service parameters for FedEx One Rate

Service  
FIRST_OVERNIGHT  
PRIORITY_OVERNIGHT  
STANDARD_OVERNIGHT  
2_DAY  
2_DAY_AM  
EXPRESS_SAVER