forked from LiveCarta/PayPal-PHP-SDK
Cleaned up Code Comments and added Type-Hinting to all Class/Functions
This commit is contained in:
@@ -1,97 +1,147 @@
|
||||
<?php
|
||||
|
||||
namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PPModel;
|
||||
|
||||
class Item extends PPModel {
|
||||
/**
|
||||
* Number of items.
|
||||
* @param string $quantity
|
||||
*/
|
||||
public function setQuantity($quantity) {
|
||||
$this->quantity = $quantity;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Class Item
|
||||
*
|
||||
* @property string quantity
|
||||
* @property string name
|
||||
* @property string price
|
||||
* @property string currency
|
||||
* @property string sku
|
||||
*/
|
||||
class Item extends PPModel
|
||||
{
|
||||
/**
|
||||
* Set Quantity
|
||||
* Number of items
|
||||
*
|
||||
* @param string $quantity
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setQuantity($quantity)
|
||||
{
|
||||
$this->quantity = $quantity;
|
||||
|
||||
/**
|
||||
* Number of items.
|
||||
* @return string
|
||||
*/
|
||||
public function getQuantity() {
|
||||
return $this->quantity;
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Quantity
|
||||
* Number of items
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getQuantity()
|
||||
{
|
||||
return $this->quantity;
|
||||
}
|
||||
|
||||
/**
|
||||
* Name of the item.
|
||||
* @param string $name
|
||||
*/
|
||||
public function setName($name) {
|
||||
$this->name = $name;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Set Name
|
||||
* Name of the item
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->name = $name;
|
||||
|
||||
/**
|
||||
* Name of the item.
|
||||
* @return string
|
||||
*/
|
||||
public function getName() {
|
||||
return $this->name;
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Name
|
||||
* Name of the item
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cost of the item.
|
||||
* @param string $price
|
||||
*/
|
||||
public function setPrice($price) {
|
||||
$this->price = $price;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Set Price
|
||||
* Cost of the item
|
||||
*
|
||||
* @param string $price
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPrice($price)
|
||||
{
|
||||
$this->price = $price;
|
||||
|
||||
/**
|
||||
* Cost of the item.
|
||||
* @return string
|
||||
*/
|
||||
public function getPrice() {
|
||||
return $this->price;
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Price
|
||||
* Cost of the item
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPrice()
|
||||
{
|
||||
return $this->price;
|
||||
}
|
||||
|
||||
/**
|
||||
* 3-letter Currency Code
|
||||
* @param string $currency
|
||||
*/
|
||||
public function setCurrency($currency) {
|
||||
$this->currency = $currency;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Set Currency
|
||||
* Three Letter Currency Code
|
||||
*
|
||||
* @param string $currency
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCurrency($currency)
|
||||
{
|
||||
$this->currency = $currency;
|
||||
|
||||
/**
|
||||
* 3-letter Currency Code
|
||||
* @return string
|
||||
*/
|
||||
public function getCurrency() {
|
||||
return $this->currency;
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Currency
|
||||
* Three Letter Currency Code
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCurrency()
|
||||
{
|
||||
return $this->currency;
|
||||
}
|
||||
|
||||
/**
|
||||
* Number or code to identify the item in your catalog/records.
|
||||
* @param string $sku
|
||||
*/
|
||||
public function setSku($sku) {
|
||||
$this->sku = $sku;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Number or code to identify the item in your catalog/records.
|
||||
* @return string
|
||||
*/
|
||||
public function getSku() {
|
||||
return $this->sku;
|
||||
}
|
||||
/**
|
||||
* Set SKU
|
||||
* Number or code to identify the item in your catalog/records
|
||||
*
|
||||
* @param string $sku
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setSku($sku)
|
||||
{
|
||||
$this->sku = $sku;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get SKI
|
||||
* Number or code to identify the item in your catalog/records
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSku()
|
||||
{
|
||||
return $this->sku;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user