PHP Class Usps\ServiceDeliveryCalculator

Inheritance: extends USPSBase
Mostra file Open project: vinceg/usps-php-api

Protected Properties

Property Type Description
$apiVersion - the api version used for this type of call
$route - route added so far.

Public Methods

Method Description
addRoute ( $mail_class, $origin_zip, $destination_zip, null $accept_date = null, null $accept_time = null )
getPostFields ( ) : array returns array of all routes added so far.
getServiceDeliveryCalculation ( ) : string Perform the API call.

Method Details

addRoute() public method

public addRoute ( $mail_class, $origin_zip, $destination_zip, null $accept_date = null, null $accept_time = null )
$mail_class integer from 0 to 6 indicating the class of mail. “0” = All Mail Classes “1” = Express Mail “2” = Priority Mail “3” = First Class Mail “4” = Standard Mail “5” = Periodicals “6” = Package Services
$origin_zip 5 digit zip code.
$destination_zip 5 digit zip code.
$accept_date null string in the format dd-mmm-yyyy.
$accept_time null string in the format HHMM.

getPostFields() public method

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

getServiceDeliveryCalculation() public method

Perform the API call.

Property Details

$apiVersion protected_oe property

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

$route protected_oe property

- route added so far.
protected $route