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

@@ -7,29 +7,22 @@ use PayPal\Common\PayPalModel;
/**
* Class ItemList
*
* List of items being paid for.
* Items and related shipping address within a transaction.
*
* @package PayPal\Api
*
* @property \PayPal\Api\Item[] items
* @property \PayPal\Api\Item[] items
* @property \PayPal\Api\ShippingAddress shipping_address
* @property string shipping_method
* @property string shipping_method
* @property string shipping_phone_number
*/
class ItemList extends PayPalModel
{
/**
* Is this list empty?
*/
public function isEmpty()
{
return empty($this->items);
}
/**
* List of items.
*
* @param \PayPal\Api\Item[] $items
*
*
* @return $this
*/
public function setItems($items)
@@ -79,10 +72,10 @@ class ItemList extends PayPalModel
}
/**
* Shipping address.
* Shipping address, if different than the payer address.
*
* @param \PayPal\Api\ShippingAddress $shipping_address
*
*
* @return $this
*/
public function setShippingAddress($shipping_address)
@@ -92,7 +85,7 @@ class ItemList extends PayPalModel
}
/**
* Shipping address.
* Shipping address, if different than the payer address.
*
* @return \PayPal\Api\ShippingAddress
*/
@@ -105,7 +98,7 @@ class ItemList extends PayPalModel
* Shipping method used for this payment like USPSParcel etc.
*
* @param string $shipping_method
*
*
* @return $this
*/
public function setShippingMethod($shipping_method)
@@ -124,4 +117,27 @@ class ItemList extends PayPalModel
return $this->shipping_method;
}
/**
* Allows merchant's to share payers contact number with PayPal for the current payment. Final contact number of payer associated with the transaction might be same as shipping_phone_number or different based on Payers action on PayPal. The phone number must be represented in its canonical international format, as defined by the E.164 numbering plan
*
* @param string $shipping_phone_number
*
* @return $this
*/
public function setShippingPhoneNumber($shipping_phone_number)
{
$this->shipping_phone_number = $shipping_phone_number;
return $this;
}
/**
* Allows merchant's to share payers contact number with PayPal for the current payment. Final contact number of payer associated with the transaction might be same as shipping_phone_number or different based on Payers action on PayPal. The phone number must be represented in its canonical international format, as defined by the E.164 numbering plan
*
* @return string
*/
public function getShippingPhoneNumber()
{
return $this->shipping_phone_number;
}
}