Package
extends AbstractApiObject
in package
Package class defines package dimensions.
Tags
Table of Contents
- $id : id
- $required : required
- $declared_value : declared_value
- Use this to book additional insurance or expand the liability for a shipment. Caution: Please keep in mind that additional fees are charged by the carrier.
- $description : description
- Text that describes the contents of the package. This parameter is mandatory if you're using UPS with service 'returns'.
- $height : height
- $length : length
- $type : type
- Defines packages of being of a certain type - if no value is given, parcel will be used.
- $weight : weight
- $width : width
- __construct() : void
- Properties constructor.
- get_declared_value() : DeclaredValue
- Getter method for declared value.
- get_description() : string
- Getter method for description.
- get_height() : float
- Getter method for height.
- get_id() : string|null
- Getter method for id.
- get_length() : float
- Getter method for length.
- get_required_fields() : array<string|int, mixed>
- Getter method for id.
- get_type() : string
- Getter method for type.
- get_weight() : float
- Getter method for weight.
- get_width() : float
- Getter method for width.
- set_declared_value() : void
- Setter method for declared value.
- set_description() : void
- Setter method for description.
- set_height() : void
- Setter method for height.
- set_id() : void
- Setter method for id.
- set_length() : void
- Setter method for length.
- set_type() : void
- Setter method for type.
- set_weight() : void
- Setter method for weight.
- set_width() : void
- Setter method for width.
- to_array() : array<string|int, mixed>
- Getter method for parameter array.
- to_string() : string
- Getter method for string representation.
Properties
$id
protected
id
$id
$required
protected
required
$required
$declared_value
Use this to book additional insurance or expand the liability for a shipment. Caution: Please keep in mind that additional fees are charged by the carrier.
private
declared_value
$declared_value
Tags
$description
Text that describes the contents of the package. This parameter is mandatory if you're using UPS with service 'returns'.
private
description
$description
$height
private
height
$height
$length
private
length
$length
$type
Defines packages of being of a certain type - if no value is given, parcel will be used.
private
type
$type
Tags
$weight
private
weight
$weight
$width
private
width
$width
Methods
__construct()
Properties constructor.
public
__construct(float $width, float $height, float $length, float $weight) : void
Parameters
- $width : float
- $height : float
- $length : float
- $weight : float
Return values
void —get_declared_value()
Getter method for declared value.
public
get_declared_value() : DeclaredValue
Return values
DeclaredValue —The declared value.
get_description()
Getter method for description.
public
get_description() : string
Return values
string —The description.
get_height()
Getter method for height.
public
get_height() : float
Return values
float —The height.
get_id()
Getter method for id.
public
get_id() : string|null
Return values
string|null —The id.
get_length()
Getter method for length.
public
get_length() : float
Return values
float —The length.
get_required_fields()
Getter method for id.
public
get_required_fields() : array<string|int, mixed>
Return values
array<string|int, mixed> —The id.
get_type()
Getter method for type.
public
get_type() : string
Return values
string —The type.
get_weight()
Getter method for weight.
public
get_weight() : float
Return values
float —The weight.
get_width()
Getter method for width.
public
get_width() : float
Return values
float —The width.
set_declared_value()
Setter method for declared value.
public
set_declared_value(DeclaredValue $declared_value) : void
Parameters
- $declared_value : DeclaredValue
-
The declared value to set.
Tags
Return values
void —set_description()
Setter method for description.
public
set_description(string $description) : void
Parameters
- $description : string
-
The description to set.
Return values
void —set_height()
Setter method for height.
public
set_height(float $height) : void
Parameters
- $height : float
-
The height to set.
Tags
Return values
void —set_id()
Setter method for id.
public
set_id(string $id) : void
Parameters
- $id : string
-
The id to set.
Return values
void —set_length()
Setter method for length.
public
set_length(float $length) : void
Parameters
- $length : float
-
The length to set.
Tags
Return values
void —set_type()
Setter method for type.
public
set_type(string $type) : void
Parameters
- $type : string
-
The type to set.
Tags
Return values
void —set_weight()
Setter method for weight.
public
set_weight(float $weight) : void
Parameters
- $weight : float
-
The weight to set.
Tags
Return values
void —set_width()
Setter method for width.
public
set_width(float $width) : void
Parameters
- $width : float
-
The width to set.
Tags
Return values
void —to_array()
Getter method for parameter array.
public
to_array() : array<string|int, mixed>
Return values
array<string|int, mixed> —The class object as array.
to_string()
Getter method for string representation.
public
to_string() : string
Return values
string —The object as string representation.
