Util
in package
Table of Contents
- convertEasyPostObjectToArray() : array<string|int, mixed>
- Convert EasyPost object to an array.
- convertToEasyPostObject() : mixed
- Convert input to an EasyPost object.
- getLowestObjectRate() : Rate
- Get the lowest rate of an EasyPost object (eg: Shipment, Order, Pickup).
- isList() : bool
- Check if input is a list.
Methods
convertEasyPostObjectToArray()
Convert EasyPost object to an array.
public
static convertEasyPostObjectToArray(mixed $values) : array<string|int, mixed>
Parameters
- $values : mixed
Return values
array<string|int, mixed> —convertToEasyPostObject()
Convert input to an EasyPost object.
public
static convertToEasyPostObject(mixed $response, string $apiKey[, string $parent = null ][, string $name = null ]) : mixed
Parameters
- $response : mixed
- $apiKey : string
- $parent : string = null
- $name : string = null
Return values
mixed —getLowestObjectRate()
Get the lowest rate of an EasyPost object (eg: Shipment, Order, Pickup).
public
static getLowestObjectRate(mixed $easypostObject[, array<string|int, mixed> $carriers = [] ][, array<string|int, mixed> $services = [] ][, string $ratesKey = 'rates' ]) : Rate
To exclude a carrier or service, prepend the string with !.
This internal utility is intended to be used by other EasyPost lowest_rate functions.
Parameters
- $easypostObject : mixed
- $carriers : array<string|int, mixed> = []
- $services : array<string|int, mixed> = []
- $ratesKey : string = 'rates'
Tags
Return values
Rate —isList()
Check if input is a list.
public
static isList( $array) : bool