public function ShippingRate::toArray in Commerce Shipping 8.2
Gets the array representation of the shipping rate.
Return value
array The array representation of the shipping rate.
File
- src/
ShippingRate.php, line 232
Class
- ShippingRate
- Represents a shipping rate.
Namespace
Drupal\commerce_shippingCode
public function toArray() : array {
return [
'id' => $this->id,
'shipping_method_id' => $this->shippingMethodId,
'service' => $this->service,
'original_amount' => $this->originalAmount,
'amount' => $this->amount,
'description' => $this->description,
'delivery_date' => $this->deliveryDate,
];
}