Properties

$response

$response : object

Response object

Type

object

$responseCode

$responseCode : integer

Response code

Type

integer

$responseMessage

$responseMessage : string

Response message

Type

string

$rates

$rates : array

Service rates

Type

array

$url

$url : string

API URL

Type

string

$userId

$userId : string

User ID

Type

string

$accessRequest

$accessRequest : string

Access Request XML

Type

string

$rateRequest

$rateRequest : string

Rate Request XML

Type

string

$pickupTypes

$pickupTypes : array

Pickup Types

Type

array

$packagingTypes

$packagingTypes : array

Pickup Types

Type

array

$services

$services : array

Services

Type

array

$shipTo

$shipTo : array

Ship to fields

Type

array

$shipFrom

$shipFrom : array

Ship from fields

Type

array

$pickupType

$pickupType : string

Pickup type

Type

string

$packageType

$packageType : string

Package type

Type

string

$service

$service : string

Service

Type

string

$dimensions

$dimensions : array

Package dimensions

Type

array

$weight

$weight : array

Package weight

Type

array

Methods

send()

send(boolean  $verifyPeer = true) : void

Send transaction

Parameters

boolean $verifyPeer

isSuccess()

isSuccess() : boolean

Return whether the transaction is a success

Returns

boolean

isError()

isError() : boolean

Return whether the transaction is an error

Returns

boolean

getResponse()

getResponse() : object

Get response

Returns

object

getResponseCode()

getResponseCode() : integer

Get response code

Returns

integer

getResponseMessage()

getResponseMessage() : string

Get response message

Returns

string

getRates()

getRates() : array

Get service rates

Returns

array

__construct()

__construct(string  $accessKey, string  $userId, string  $password) : \Pop\Shipping\Adapter\Ups

Constructor

Method to instantiate an UPS shipping adapter object

Parameters

string $accessKey
string $userId
string $password

Returns

\Pop\Shipping\Adapter\Ups

getPickupTypes()

getPickupTypes() : array

Static method to get the pickup types

Returns

array

getPackagingTypes()

getPackagingTypes() : array

Static method to get the packaging types

Returns

array

getServices()

getServices() : array

Static method to get the services

Returns

array

setPickup()

setPickup(string  $code) : void

Set pickup type

Parameters

string $code

Throws

\Pop\Shipping\Adapter\Exception

setPackage()

setPackage(string  $code) : void

Set package type

Parameters

string $code

Throws

\Pop\Shipping\Adapter\Exception

setService()

setService(string  $code) : void

Set service

Parameters

string $code

Throws

\Pop\Shipping\Adapter\Exception

shipTo()

shipTo(array  $shipTo) : void

Set ship to

Parameters

array $shipTo

shipFrom()

shipFrom(array  $shipFrom) : void

Set ship from

Parameters

array $shipFrom

setDimensions()

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

Set dimensions

Parameters

array $dimensions
string $unit

setWeight()

setWeight(string  $weight, string  $unit = null) : void

Set dimensions

Parameters

string $weight
string $unit

parseResponse()

parseResponse(resource  $curl) : string

Parse the curl response

Parameters

resource $curl

Returns

string

buildRateRequest()

buildRateRequest() : void

Build rate request