PHP Class Pop\Shipping\Adapter\Ups

Author: Nick Sagona, III ([email protected])
Inheritance: extends AbstractAdapter
Mostrar archivo Open project: nicksagona/PopPHP

Protected Properties

Property Type Description
$accessRequest Pop\Dom\Dom Access Request XML
$dimensions array Package dimensions
$packageType string Package type
$packagingTypes array Pickup Types
$pickupType string Pickup type
$pickupTypes array Pickup Types
$rateRequest Pop\Dom\Dom Rate Request XML
$service string Service
$services array Services
$shipFrom array Ship from fields
$shipTo array Ship to fields
$url string API URL
$userId string User ID
$weight array Package weight

Public Methods

Method Description
__construct ( string $accessKey, string $userId, string $password ) : Ups Constructor
getPackagingTypes ( ) : array Static method to get the packaging types
getPickupTypes ( ) : array Static method to get the pickup types
getServices ( ) : array Static method to get the services
isError ( ) : boolean Return whether the transaction is an error
isSuccess ( ) : boolean Return whether the transaction is a success
send ( boolean $verifyPeer = true ) : void Send transaction
setDimensions ( array $dimensions, string $unit = null ) : void Set dimensions
setPackage ( string $code ) : void Set package type
setPickup ( string $code ) : void Set pickup type
setService ( string $code ) : void Set service
setWeight ( string $weight, string $unit = null ) : void Set dimensions
shipFrom ( array $shipFrom ) : void Set ship from
shipTo ( array $shipTo ) : void Set ship to

Protected Methods

Method Description
buildRateRequest ( ) : void Build rate request

Method Details

__construct() public method

Method to instantiate an UPS shipping adapter object
public __construct ( string $accessKey, string $userId, string $password ) : Ups
$accessKey string
$userId string
$password string
return Ups

buildRateRequest() protected method

Build rate request
protected buildRateRequest ( ) : void
return void

getPackagingTypes() public static method

Static method to get the packaging types
public static getPackagingTypes ( ) : array
return array

getPickupTypes() public static method

Static method to get the pickup types
public static getPickupTypes ( ) : array
return array

getServices() public static method

Static method to get the services
public static getServices ( ) : array
return array

isError() public method

Return whether the transaction is an error
public isError ( ) : boolean
return boolean

isSuccess() public method

Return whether the transaction is a success
public isSuccess ( ) : boolean
return boolean

send() public method

Send transaction
public send ( boolean $verifyPeer = true ) : void
$verifyPeer boolean
return void

setDimensions() public method

Set dimensions
public setDimensions ( array $dimensions, string $unit = null ) : void
$dimensions array
$unit string
return void

setPackage() public method

Set package type
public setPackage ( string $code ) : void
$code string
return void

setPickup() public method

Set pickup type
public setPickup ( string $code ) : void
$code string
return void

setService() public method

Set service
public setService ( string $code ) : void
$code string
return void

setWeight() public method

Set dimensions
public setWeight ( string $weight, string $unit = null ) : void
$weight string
$unit string
return void

shipFrom() public method

Set ship from
public shipFrom ( array $shipFrom ) : void
$shipFrom array
return void

shipTo() public method

Set ship to
public shipTo ( array $shipTo ) : void
$shipTo array
return void

Property Details

$accessRequest protected_oe property

Access Request XML
protected Dom,Pop\Dom $accessRequest
return Pop\Dom\Dom

$dimensions protected_oe property

Package dimensions
protected array $dimensions
return array

$packageType protected_oe property

Package type
protected string $packageType
return string

$packagingTypes protected_oe static_oe property

Pickup Types
protected static array $packagingTypes
return array

$pickupType protected_oe property

Pickup type
protected string $pickupType
return string

$pickupTypes protected_oe static_oe property

Pickup Types
protected static array $pickupTypes
return array

$rateRequest protected_oe property

Rate Request XML
protected Dom,Pop\Dom $rateRequest
return Pop\Dom\Dom

$service protected_oe property

Service
protected string $service
return string

$services protected_oe static_oe property

Services
protected static array $services
return array

$shipFrom protected_oe property

Ship from fields
protected array $shipFrom
return array

$shipTo protected_oe property

Ship to fields
protected array $shipTo
return array

$url protected_oe property

API URL
protected string $url
return string

$userId protected_oe property

User ID
protected string $userId
return string

$weight protected_oe property

Package weight
protected array $weight
return array