GXParcelService

Implements \ParcelServiceInterface

Class GXParcelService

package

Default

Methods

GXParcelService constructor.

__construct(\ParcelServiceId $id, \NonEmptyStringType $name, \BoolType $isDefault, \ParcelServiceDescriptionCollection $descriptions) 

create

create(\ParcelServiceId $id, string $name, boolean $isDefault, \ParcelServiceDescriptionCollection $descriptions) : \GXParcelService
static

Arguments

$name

string

$isDefault

boolean

Response

\GXParcelService

New instance

Returns the ID of the parcel service if set. Otherwise null will be returned.

id() : integer|null

Response

integer|null

Checks if the parcel service is set as default.

isDefault() : boolean

Response

boolean

Returns the name of the parcel service.

name() : string

Response

string

Returns the parcel service descriptions as a ParcelServiceDescriptionCollection.

parcelServiceDescriptions() : \ParcelServiceDescriptionCollection

Properties

id

id : integer|null
var

Type(s)

integer|null

name

name : string
var

Type(s)

string

isDefault

isDefault : boolean
var

Type(s)

boolean

descriptions

descriptions : \ParcelServiceDescriptionCollection