PHP Класс Usps\PriorityLabel

Наследование: extends USPSBase
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$apiVersion - the api version used for this type of call
$fields - route added so far.

Открытые методы

Метод Описание
createLabel ( ) : string Perform the API call.
getConfirmationNumber ( ) : string | boolean Return the USPS confirmation/tracking number if we have one.
getLabelContents ( ) : string | boolean Return the USPS label as a base64 encoded string.
getPostFields ( ) : array returns array of all fields added.
getReceiptContents ( ) : string | boolean Return the USPS receipt as a base64 encoded string.
setField ( integer $position, string $key, string $value ) : object Set any other requried string make sure you set the correct position as well as the position of the items matters.
setFromAddress ( string $firstName, string $lastName, string $company, string $address, string $city, string $state, string $zip, string $address2 = null, string $zip4 = null, string $phone = null ) : object Set the from address.
setToAddress ( string $firstName, string $lastName, string $company, string $address, string $city, string $state, string $zip, string $address2 = null, string $zip4 = null, string $phone = null ) : object Set the to address.
setWeightOunces ( $weight ) Set package weight in ounces.

Защищенные методы

Метод Описание
addMissingRequired ( ) : void Add missing required elements.

Описание методов

addMissingRequired() защищенный Метод

Add missing required elements.
protected addMissingRequired ( ) : void
Результат void

createLabel() публичный Метод

Perform the API call.
public createLabel ( ) : string
Результат string

getConfirmationNumber() публичный Метод

Return the USPS confirmation/tracking number if we have one.
public getConfirmationNumber ( ) : string | boolean
Результат string | boolean

getLabelContents() публичный Метод

Return the USPS label as a base64 encoded string.
public getLabelContents ( ) : string | boolean
Результат string | boolean

getPostFields() публичный Метод

returns array of all fields added.
public getPostFields ( ) : array
Результат array

getReceiptContents() публичный Метод

Return the USPS receipt as a base64 encoded string.
public getReceiptContents ( ) : string | boolean
Результат string | boolean

setField() публичный Метод

Set any other requried string make sure you set the correct position as well as the position of the items matters.
public setField ( integer $position, string $key, string $value ) : object
$position integer
$key string
$value string
Результат object

setFromAddress() публичный Метод

Set the from address.
public setFromAddress ( string $firstName, string $lastName, string $company, string $address, string $city, string $state, string $zip, string $address2 = null, string $zip4 = null, string $phone = null ) : object
$firstName string
$lastName string
$company string
$address string
$city string
$state string
$zip string
$address2 string
$zip4 string
$phone string
Результат object

setToAddress() публичный Метод

Set the to address.
public setToAddress ( string $firstName, string $lastName, string $company, string $address, string $city, string $state, string $zip, string $address2 = null, string $zip4 = null, string $phone = null ) : object
$firstName string
$lastName string
$company string
$address string
$city string
$state string
$zip string
$address2 string
$zip4 string
$phone string
Результат object

setWeightOunces() публичный Метод

Set package weight in ounces.
public setWeightOunces ( $weight )
$weight

Описание свойств

$apiVersion защищенное свойство

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

$fields защищенное свойство

- route added so far.
protected $fields