<?php
namespace PHPFUI\PayPal;
class Item extends \PHPFUI\PayPal\Base
{
protected static array $validFields = [
'name' => 'string',
'quantity' => 'integer',
'description' => 'string',
'sku' => 'string',
'tax' => \PHPFUI\PayPal\Currency::class,
'category' => ['DIGITAL_GOODS', 'PHYSICAL_GOODS'],
'unit_amount' => \PHPFUI\PayPal\Currency::class,
];
public function __construct(string $name, int $quantity, Currency $unit_amount)
{
parent::__construct();
$this->name = $name;
$this->quantity = $quantity;
$this->unit_amount = $unit_amount;
}
}