/** * @param PayPalContext $context * @param string $name * @param int|float|string $price * @param int $quantity * @param string|null $currency */ public function __construct(PayPalContext $context, $name, $price, $quantity = 1, $currency = null) { parent::__construct($context); $this->name = $name; $this->quantity = $quantity; $this->price = $price; $this->currency = $currency; }
/** * @param PayPalContext $context * @param array $transactions */ public function __construct(PayPalContext $context, array $transactions) { parent::__construct($context); $this->checkTransactions($transactions); $this->transactions = $transactions; }