PHP Class Usps\Rate

Since: 1.0
Author: Vincent Gabriel
Inheritance: extends USPSBase
Datei anzeigen Open project: vinceg/usps-php-api

Protected Properties

Property Type Description
$apiVersion - the api version used for this type of call
$packages - list of all addresses added so far

Public Methods

Method Description
addExtraOption ( string | integer $key, string | integer $value ) Add other option for International & Insurance.
addPackage ( RatePackage $data, string $id = null ) Add Package to the stack.
getPostFields ( ) : array returns array of all packages added so far.
getRate ( ) : string Perform the API call.
setInternationalCall ( $status ) : array sets the type of call to perform domestic or international.

Method Details

addExtraOption() public method

Add other option for International & Insurance.
public addExtraOption ( string | integer $key, string | integer $value )
$key string | integer
$value string | integer

addPackage() public method

Add Package to the stack.
public addPackage ( RatePackage $data, string $id = null )
$data RatePackage
$id string the address unique id

getPostFields() public method

returns array of all packages added so far.
public getPostFields ( ) : array
return array

getRate() public method

Perform the API call.
public getRate ( ) : string
return string

setInternationalCall() public method

sets the type of call to perform domestic or international.
public setInternationalCall ( $status ) : array
$status
return array

Property Details

$apiVersion protected_oe property

- the api version used for this type of call
protected $apiVersion

$packages protected_oe property

- list of all addresses added so far
protected $packages