public static function getDefaultShipment()
 {
     parent::setTestApiKey();
     $addressFrom = Shippo_AddressTest::getDefaultAddress();
     $addressTo = Shippo_AddressTest::getDefaultAddress();
     $parcel = Shippo_ParcelTest::getDefaultParcel();
     return Shippo_Shipment::create(array('object_purpose' => 'QUOTE', 'address_from' => $addressFrom->object_id, 'address_to' => $addressTo->object_id, 'parcel' => $parcel->object_id, 'submission_type' => 'PICKUP', 'submission_date' => '2013-12-03T12:00:00.000Z', 'insurance_amount' => '30', 'insurance_currency' => 'USD', 'extra' => '{signature_confirmation: true}', 'customs_declaration' => '', 'reference_1' => '', 'reference_2' => '', 'metadata' => 'Customer ID 123456'));
 }
 public static function getDefaultRate()
 {
     parent::setTestApiKey();
     $shipment = Shippo_ShipmentTest::getDefaultShipment();
     try {
         Shippo_Shipment::get_shipping_rates(array('id' => $shipment->object_id, 'currency' => 'USD'));
     } catch (Exception $e) {
         // Expected Exception, rates not ready, prompting to server to generate
     }
     sleep(5);
     return Shippo_Shipment::get_shipping_rates(array('id' => $shipment->object_id, 'currency' => 'USD'));
 }
 public static function getDefaultTransaction()
 {
     parent::setTestApiKey();
     $rate = Shippo_RateTest::getDefaultRate();
     return Shippo_Transaction::create(array('rate' => $rate->results[0]->object_id, 'notification_email_from' => 'true', 'notification_email_to' => 'false', 'notification_email_other' => '*****@*****.**', 'metadata' => 'Customer ID 123456'));
 }
 public static function getDefaultAddress()
 {
     parent::setTestApiKey();
     return Shippo_Address::create(array('object_purpose' => 'QUOTE', 'name' => 'John Smith', 'company' => 'Initech', 'street1' => 'Greene Rd.', 'street_no' => '6512', 'street2' => '', 'city' => 'Woodridge', 'state' => 'IL', 'zip' => '60517', 'country' => 'US', 'phone' => '123 353 2345', 'email' => '*****@*****.**', 'metadata' => 'Customer ID 234;234'));
 }
 public static function getDefaultCustomsDeclaration()
 {
     parent::setTestApiKey();
     $customsItem = Shippo_CustomsItemTest::getDefaultCustomsItem();
     return Shippo_CustomsDeclaration::create(array('exporter_reference' => '', 'importer_reference' => '', 'contents_type' => 'MERCHANDISE', 'contents_explanation' => 'T-Shirt purchase', 'invoice' => '#123123', 'license' => '', 'certificate' => '', 'notes' => '', 'eel_pfc' => 'NOEEI_30_37_a', 'aes_itn' => '', 'non_delivery_option' => 'ABANDON', 'certify' => 'true', 'certify_signer' => 'Laura Behrens Wu', 'disclaimer' => '', 'incoterm' => '', 'items' => array($customsItem->object_id), 'metadata' => 'Order ID #123123'));
 }
 public static function getDefaultParcel()
 {
     parent::setTestApiKey();
     return Shippo_Parcel::create(array('length' => '5', 'width' => '5', 'height' => '5', 'distance_unit' => 'cm', 'weight' => '2', 'mass_unit' => 'lb', 'template' => '', 'metadata' => 'Customer ID 123456'));
 }
 public static function getDefaultManifest()
 {
     parent::setTestApiKey();
     $address = Shippo_AddressTest::getDefaultAddress();
     return Shippo_Manifest::create(array('provider' => 'USPS', 'submission_date' => '2014-05-16T23:59:59Z', 'address_from' => $address->object_id));
 }
 public static function getDefaultCustomsItem()
 {
     parent::setTestApiKey();
     return Shippo_CustomsItem::create(array('description' => 'T-Shirt', 'quantity' => '2', 'net_weight' => '400', 'mass_unit' => 'g', 'value_amount' => '20', 'value_currency' => 'USD', 'tariff_number' => '', 'origin_country' => 'US', 'metadata' => 'Order ID #123123'));
 }