Payments API Updates

This commit is contained in:
Jay Patel
2015-10-02 14:25:46 -05:00
parent 02fca1bda4
commit a37b880e96
112 changed files with 3857 additions and 1495 deletions

View File

@@ -10,56 +10,50 @@ use PayPal\Validation\UrlValidator;
/**
* Class Item
*
* An item being paid for.
* Item details.
*
* @package PayPal\Api
*
* @property string quantity
* @property string sku
* @property string name
* @property string description
* @property string quantity
* @property string price
* @property string tax
* @property string currency
* @property string sku
* @property string tax
* @property string url
* @property string category
* @property \PayPal\Api\Measurement weight
* @property \PayPal\Api\Measurement length
* @property \PayPal\Api\Measurement height
* @property \PayPal\Api\Measurement width
* @property \PayPal\Api\NameValuePair[] supplementary_data
* @property \PayPal\Api\NameValuePair[] postback_data
*/
class Item extends PayPalModel
{
/**
* Number of items.
* Stock keeping unit corresponding (SKU) to item.
*
* @param string $sku
*
* @param string $quantity
*
* @return $this
*/
public function setQuantity($quantity)
public function setSku($sku)
{
$this->quantity = $quantity;
$this->sku = $sku;
return $this;
}
/**
* Number of items.
* Stock keeping unit corresponding (SKU) to item.
*
* @return string
*/
public function getQuantity()
public function getSku()
{
return $this->quantity;
return $this->sku;
}
/**
* Name of the item.
* Item name. 127 characters max.
*
* @param string $name
*
*
* @return $this
*/
public function setName($name)
@@ -69,7 +63,7 @@ class Item extends PayPalModel
}
/**
* Name of the item.
* Item name. 127 characters max.
*
* @return string
*/
@@ -79,10 +73,10 @@ class Item extends PayPalModel
}
/**
* Description of the item.
* Description of the item. Only supported when the `payment_method` is set to `paypal`.
*
* @param string $description
*
*
* @return $this
*/
public function setDescription($description)
@@ -92,7 +86,7 @@ class Item extends PayPalModel
}
/**
* Description of the item.
* Description of the item. Only supported when the `payment_method` is set to `paypal`.
*
* @return string
*/
@@ -102,10 +96,33 @@ class Item extends PayPalModel
}
/**
* Cost of the item.
* Number of a particular item. 10 characters max.
*
* @param string $quantity
*
* @return $this
*/
public function setQuantity($quantity)
{
$this->quantity = $quantity;
return $this;
}
/**
* Number of a particular item. 10 characters max.
*
* @return string
*/
public function getQuantity()
{
return $this->quantity;
}
/**
* Item cost. 10 characters max.
*
* @param string|double $price
*
*
* @return $this
*/
public function setPrice($price)
@@ -117,7 +134,7 @@ class Item extends PayPalModel
}
/**
* Cost of the item.
* Item cost. 10 characters max.
*
* @return string
*/
@@ -127,10 +144,33 @@ class Item extends PayPalModel
}
/**
* tax of the item.
* 3-letter [currency code](https://developer.paypal.com/docs/integration/direct/rest_api_payment_country_currency_support/).
*
* @param string $currency
*
* @return $this
*/
public function setCurrency($currency)
{
$this->currency = $currency;
return $this;
}
/**
* 3-letter [currency code](https://developer.paypal.com/docs/integration/direct/rest_api_payment_country_currency_support/).
*
* @return string
*/
public function getCurrency()
{
return $this->currency;
}
/**
* Tax of the item. Only supported when the `payment_method` is set to `paypal`.
*
* @param string|double $tax
*
*
* @return $this
*/
public function setTax($tax)
@@ -142,7 +182,7 @@ class Item extends PayPalModel
}
/**
* tax of the item.
* Tax of the item. Only supported when the `payment_method` is set to `paypal`.
*
* @return string
*/
@@ -151,52 +191,6 @@ class Item extends PayPalModel
return $this->tax;
}
/**
* 3-letter Currency Code
*
* @param string $currency
*
* @return $this
*/
public function setCurrency($currency)
{
$this->currency = $currency;
return $this;
}
/**
* 3-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
*
* @return $this
*/
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;
}
/**
* URL linking to item information. Available to payer in transaction history.
*
@@ -226,7 +220,7 @@ class Item extends PayPalModel
* Valid Values: ["DIGITAL", "PHYSICAL"]
*
* @param string $category
*
*
* @return $this
*/
public function setCategory($category)
@@ -248,8 +242,9 @@ class Item extends PayPalModel
/**
* Weight of the item.
*
* @deprecated Not publicly available
* @param \PayPal\Api\Measurement $weight
*
*
* @return $this
*/
public function setWeight($weight)
@@ -261,6 +256,7 @@ class Item extends PayPalModel
/**
* Weight of the item.
*
* @deprecated Not publicly available
* @return \PayPal\Api\Measurement
*/
public function getWeight()
@@ -271,8 +267,9 @@ class Item extends PayPalModel
/**
* Length of the item.
*
* @deprecated Not publicly available
* @param \PayPal\Api\Measurement $length
*
*
* @return $this
*/
public function setLength($length)
@@ -284,6 +281,7 @@ class Item extends PayPalModel
/**
* Length of the item.
*
* @deprecated Not publicly available
* @return \PayPal\Api\Measurement
*/
public function getLength()
@@ -294,8 +292,9 @@ class Item extends PayPalModel
/**
* Height of the item.
*
* @deprecated Not publicly available
* @param \PayPal\Api\Measurement $height
*
*
* @return $this
*/
public function setHeight($height)
@@ -307,6 +306,7 @@ class Item extends PayPalModel
/**
* Height of the item.
*
* @deprecated Not publicly available
* @return \PayPal\Api\Measurement
*/
public function getHeight()
@@ -317,8 +317,9 @@ class Item extends PayPalModel
/**
* Width of the item.
*
* @deprecated Not publicly available
* @param \PayPal\Api\Measurement $width
*
*
* @return $this
*/
public function setWidth($width)
@@ -330,6 +331,7 @@ class Item extends PayPalModel
/**
* Width of the item.
*
* @deprecated Not publicly available
* @return \PayPal\Api\Measurement
*/
public function getWidth()
@@ -340,8 +342,9 @@ class Item extends PayPalModel
/**
* Set of optional data used for PayPal risk determination.
*
* @deprecated Not publicly available
* @param \PayPal\Api\NameValuePair[] $supplementary_data
*
*
* @return $this
*/
public function setSupplementaryData($supplementary_data)
@@ -353,6 +356,7 @@ class Item extends PayPalModel
/**
* Set of optional data used for PayPal risk determination.
*
* @deprecated Not publicly available
* @return \PayPal\Api\NameValuePair[]
*/
public function getSupplementaryData()
@@ -363,6 +367,7 @@ class Item extends PayPalModel
/**
* Append SupplementaryData to the list.
*
* @deprecated Not publicly available
* @param \PayPal\Api\NameValuePair $nameValuePair
* @return $this
*/
@@ -380,6 +385,7 @@ class Item extends PayPalModel
/**
* Remove SupplementaryData from the list.
*
* @deprecated Not publicly available
* @param \PayPal\Api\NameValuePair $nameValuePair
* @return $this
*/
@@ -393,8 +399,9 @@ class Item extends PayPalModel
/**
* Set of optional data used for PayPal post-transaction notifications.
*
* @deprecated Not publicly available
* @param \PayPal\Api\NameValuePair[] $postback_data
*
*
* @return $this
*/
public function setPostbackData($postback_data)
@@ -406,6 +413,7 @@ class Item extends PayPalModel
/**
* Set of optional data used for PayPal post-transaction notifications.
*
* @deprecated Not publicly available
* @return \PayPal\Api\NameValuePair[]
*/
public function getPostbackData()
@@ -416,6 +424,7 @@ class Item extends PayPalModel
/**
* Append PostbackData to the list.
*
* @deprecated Not publicly available
* @param \PayPal\Api\NameValuePair $nameValuePair
* @return $this
*/
@@ -433,6 +442,7 @@ class Item extends PayPalModel
/**
* Remove PostbackData from the list.
*
* @deprecated Not publicly available
* @param \PayPal\Api\NameValuePair $nameValuePair
* @return $this
*/