FedExRegistrationService
extends BaseService
in package
FedExRegistration service containing all the logic to make API calls.
Table of Contents
- $client : EasyPostClient
- registerAddress() : mixed
- Register the billing address for a FedEx account.
- requestPin() : mixed
- Request a PIN for FedEx account verification.
- submitInvoice() : mixed
- Submit invoice information to complete FedEx account registration.
- validatePin() : mixed
- Validate the PIN entered by the user for FedEx account verification.
- __construct() : mixed
- Service constructor shared by all child services.
- allResources() : mixed
- Internal retrieve all method.
- className() : string
- The class name of an object.
- classUrl() : string
- The class URL of an object.
- createResource() : mixed
- Internal create method.
- deleteResource() : void
- Internal delete method.
- getNextPageResources() : mixed
- Internal retrieve next page method.
- instanceUrl() : string
- The instance URL of an object.
- retrieveResource() : mixed
- Internal retrieve method.
- serviceModelClassName() : string
- Gets the class name of a Service's model.
- updateResource() : mixed
- Internal update method.
- validate() : void
- Validate library usage.
- ensureNameField() : void
- Ensures the "name" field exists in the provided array.
- wrapAddressValidation() : array<string, mixed>
- Wraps address validation parameters and ensures the "name" field exists.
- wrapInvoiceValidation() : array<string, mixed>
- Wraps invoice validation parameters and ensures the "name" field exists.
- wrapPinValidation() : array<string, mixed>
- Wraps PIN validation parameters and ensures the "name" field exists.
Properties
$client
protected
EasyPostClient
$client
Methods
registerAddress()
Register the billing address for a FedEx account.
public
registerAddress(string $fedexAccountNumber[, mixed $params = null ]) : mixed
Advanced method for custom parameter structures.
Parameters
- $fedexAccountNumber : string
- $params : mixed = null
Return values
mixed —requestPin()
Request a PIN for FedEx account verification.
public
requestPin(string $fedexAccountNumber, string $pinMethodOption) : mixed
Parameters
- $fedexAccountNumber : string
- $pinMethodOption : string
Return values
mixed —submitInvoice()
Submit invoice information to complete FedEx account registration.
public
submitInvoice(string $fedexAccountNumber[, mixed $params = null ]) : mixed
Parameters
- $fedexAccountNumber : string
- $params : mixed = null
Return values
mixed —validatePin()
Validate the PIN entered by the user for FedEx account verification.
public
validatePin(string $fedexAccountNumber[, mixed $params = null ]) : mixed
Parameters
- $fedexAccountNumber : string
- $params : mixed = null
Return values
mixed —__construct()
Service constructor shared by all child services.
protected
__construct(EasyPostClient $client) : mixed
Parameters
- $client : EasyPostClient
Return values
mixed —allResources()
Internal retrieve all method.
protected
allResources(string $class[, mixed $params = null ][, bool $beta = false ]) : mixed
Parameters
- $class : string
- $params : mixed = null
- $beta : bool = false
Return values
mixed —className()
The class name of an object.
protected
static className(string $class) : string
Parameters
- $class : string
Return values
string —classUrl()
The class URL of an object.
protected
static classUrl(string $class) : string
Parameters
- $class : string
Return values
string —createResource()
Internal create method.
protected
createResource(string $class[, mixed $params = null ][, bool $beta = false ]) : mixed
Parameters
- $class : string
- $params : mixed = null
- $beta : bool = false
Return values
mixed —deleteResource()
Internal delete method.
protected
deleteResource(string $class, string $id[, mixed $params = null ][, bool $beta = false ]) : void
Parameters
- $class : string
- $id : string
- $params : mixed = null
- $beta : bool = false
Return values
void —getNextPageResources()
Internal retrieve next page method.
protected
getNextPageResources(string $class, mixed $collection[, int|null $pageSize = null ]) : mixed
TODO: Use this method in EndShipper and Batch once the API fully support it.
Parameters
- $class : string
- $collection : mixed
- $pageSize : int|null = null
Return values
mixed —instanceUrl()
The instance URL of an object.
protected
instanceUrl(string $class, string $id) : string
Parameters
- $class : string
- $id : string
Tags
Return values
string —retrieveResource()
Internal retrieve method.
protected
retrieveResource(string $class, string $id[, bool $beta = false ]) : mixed
Parameters
- $class : string
- $id : string
- $beta : bool = false
Return values
mixed —serviceModelClassName()
Gets the class name of a Service's model.
protected
static serviceModelClassName(string $serviceClassName) : string
Parameters
- $serviceClassName : string
Return values
string —updateResource()
Internal update method.
protected
updateResource(string $class, string $id[, mixed $params = null ][, string $method = 'patch' ][, bool $beta = false ]) : mixed
Parameters
- $class : string
- $id : string
- $params : mixed = null
- $method : string = 'patch'
- $beta : bool = false
Return values
mixed —validate()
Validate library usage.
protected
static validate([mixed $params = null ]) : void
Parameters
- $params : mixed = null
Tags
Return values
void —ensureNameField()
Ensures the "name" field exists in the provided array.
private
ensureNameField(array<string, mixed> &$array) : void
If not present, generates a unique ID as the name. This follows the pattern used in the web UI implementation.
Parameters
- $array : array<string, mixed>
Return values
void —wrapAddressValidation()
Wraps address validation parameters and ensures the "name" field exists.
private
wrapAddressValidation(mixed $params) : array<string, mixed>
If not present, generates a UUID (with hyphens removed) as the name.
Parameters
- $params : mixed
Return values
array<string, mixed> —wrapInvoiceValidation()
Wraps invoice validation parameters and ensures the "name" field exists.
private
wrapInvoiceValidation(mixed $params) : array<string, mixed>
If not present, generates a UUID (with hyphens removed) as the name.
Parameters
- $params : mixed
Return values
array<string, mixed> —wrapPinValidation()
Wraps PIN validation parameters and ensures the "name" field exists.
private
wrapPinValidation(mixed $params) : array<string, mixed>
If not present, generates a UUID (with hyphens removed) as the name.
Parameters
- $params : mixed