PHP Class Pop\Shipping\Shipping

Author: Nick Sagona, III ([email protected])
Datei anzeigen Open project: nicksagona/PopPHP Class Usage Examples

Protected Properties

Property Type Description
$adapter mixed Shipping adapter

Public Methods

Method Description
__construct ( AbstractAdapter $adapter ) : Shipping Constructor
adapter ( ) : AbstractAdapter Access the adapter
getRates ( ) : array Get service rates
getResponse ( ) : object Get response
getResponseCode ( ) : integer Get response code
getResponseMessage ( ) : string Get response message
isError ( ) : boolean Return whether the transaction is an error
isSuccess ( ) : boolean Return whether the transaction is success
send ( ) : void Send transaction data
setDimensions ( array $dimensions, string $unit = null ) : self Set dimensions
setWeight ( string $weight, string $unit = null ) : self Set dimensions
shipFrom ( array $shipFrom ) : self Set ship from
shipTo ( array $shipTo ) : self Set ship to

Method Details

__construct() public method

Instantiate the shipping object
public __construct ( AbstractAdapter $adapter ) : Shipping
$adapter Pop\Shipping\Adapter\AbstractAdapter
return Shipping

adapter() public method

Access the adapter
public adapter ( ) : AbstractAdapter
return Pop\Shipping\Adapter\AbstractAdapter

getRates() public method

Get service rates
public getRates ( ) : array
return array

getResponse() public method

Get response
public getResponse ( ) : object
return object

getResponseCode() public method

Get response code
public getResponseCode ( ) : integer
return integer

getResponseMessage() public method

Get response message
public getResponseMessage ( ) : string
return string

isError() public method

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

isSuccess() public method

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

send() public method

Send transaction data
public send ( ) : void
return void

setDimensions() public method

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

setWeight() public method

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

shipFrom() public method

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

shipTo() public method

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

Property Details

$adapter protected_oe property

Shipping adapter
protected mixed $adapter
return mixed