1, 'name' => 'Item name', 'price' => 1000, 'currency' => 'USD', 'weight' => 0, ]; /** * Get the identifier of the Buyable item. * * @return int|string */ public function getBuyableIdentifier(CartItemOptions $options) { return $this->id; } /** * Get the description or title of the Buyable item. * * @return string */ public function getBuyableDescription(CartItemOptions $options): ?string { return $this->name; } /** * Get the price of the Buyable item. */ public function getBuyablePrice(CartItemOptions $options): Money { return new Money($this->price, new Currency($this->currency)); } /** * Get the price of the Buyable item. */ public function getBuyableWeight(CartItemOptions $options): int { return $this->weight; } public function getBuyableTaxRate(CartItemOptions $options): float { return $this->tax_rate; } }