Weak hands cannot be planted, meager skills have no foundation. Shallow wisdom is futile, how can one hope for a good name?扰扰从役倦，屑屑身事微。少壮轻年月，迟暮惜光辉。
<html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><?php

namespace Hostinger\Reach\Dto;

class Cart {

    private string $hash;
    private string $email;
    private string $currency;
    private array $items;
    private array $totals;

    public function __construct( string $hash, string $email, string $currency, array $items, array $totals ) {
        $this->hash     = $hash;
        $this->email    = $email;
        $this->currency = $currency;
        $this->items    = $items;
        $this->totals   = $totals;
    }

    public function get_hash(): string {
        return $this->hash;
    }

    public function get_currency(): string {
        return $this->currency;
    }

    public function get_email(): string {
        return $this->email;
    }

    public function get_items(): array {
        return array_map(
            function ( $item ) {
                $cart_item = new CartItem( $item['product_id'], $item['quantity'] );

                return $cart_item->to_array();
            },
            $this->items
        );
    }

    public function get_totals(): array {
        $totals = Totals::from_cart_totals( $this->totals, $this->currency );

        return $totals->to_array();
    }

    publ