EasyPost\EasyPost::setApiBase PHP Метод

setApiBase() публичный статический Метод

set the API base URL
public static setApiBase ( string $apiBase )
$apiBase string
    public static function setApiBase($apiBase)
    {
        self::$apiBase = $apiBase;
    }

Usage Example

Пример #1
0
<?php

require_once "../lib/easypost.php";
\EasyPost\EasyPost::setApiKey('cueqNZUb3ldeWTNX7MU3Mel8UXtaAMUi');
\EasyPost\EasyPost::setApiBase('http://*****:*****@example.com");
$order = \EasyPost\Order::create(array("from_address" => $sf, "to_address" => $maryland, "shipments" => array(array("parcel" => array("length" => 12.0, "width" => 10.5, "height" => 6.8, "weight" => 12), "options" => array("cod_amount" => 14.99)), array("parcel" => array("length" => 11.9, "width" => 10.0, "height" => 7.3, "weight" => 18), "options" => array("cod_amount" => 9.56)))));
$order->buy(array("carrier" => "UPS", "service" => "Ground"));
print_r($order);