mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2025-01-15 16:21:14 +01:00
20 lines
467 B
PHP
20 lines
467 B
PHP
<?php
|
|
|
|
// SPDX-FileCopyrightText: 2025 Andreas Palm
|
|
//
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
namespace Xentral\Carrier\Go\Data;
|
|
|
|
class MoneyValue implements \JsonSerializable {
|
|
public float $amount = 0;
|
|
public string $currency = 'EUR';
|
|
|
|
public function jsonSerialize()
|
|
{
|
|
return [
|
|
'amount' => $this->amount > 0 ? (string)$this->amount : '',
|
|
'currency' => $this->amount > 0 ? $this->currency : '',
|
|
];
|
|
}
|
|
} |