forked from LiveCarta/PayPal-PHP-SDK
Enabled Billing Plans and Agreements APIs
- Added API Classes, Samples, and Tests - Updated Functional Tests - Updated Documentation with new SDK Name - Updated Few Samples to use newer nicer result page
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
namespace PayPal\Api;
|
||||
|
||||
use PayPal\Common\PPModel;
|
||||
use PayPal\Rest\ApiContext;
|
||||
|
||||
/**
|
||||
* Class CreditCardList
|
||||
@@ -12,7 +11,7 @@ use PayPal\Rest\ApiContext;
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
* @property \PayPal\Api\CreditCard credit_cards
|
||||
* @property \PayPal\Api\CreditCard[] credit_cards
|
||||
* @property int count
|
||||
* @property string next_id
|
||||
*/
|
||||
@@ -20,9 +19,8 @@ class CreditCardList extends PPModel
|
||||
{
|
||||
/**
|
||||
* A list of credit card resources
|
||||
*
|
||||
*
|
||||
* @param \PayPal\Api\CreditCard $credit_cards
|
||||
* @param \PayPal\Api\CreditCard[] $credit_cards
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@@ -42,6 +40,36 @@ class CreditCardList extends PPModel
|
||||
return $this->{"credit-cards"};
|
||||
}
|
||||
|
||||
/**
|
||||
* Append CreditCards to the list.
|
||||
*
|
||||
* @param \PayPal\Api\CreditCard $creditCard
|
||||
* @return $this
|
||||
*/
|
||||
public function addCreditCard($creditCard)
|
||||
{
|
||||
if (!$this->getCreditCards()) {
|
||||
return $this->setCreditCards(array($creditCard));
|
||||
} else {
|
||||
return $this->setCreditCards(
|
||||
array_merge($this->getCreditCards(), array($creditCard))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove CreditCards from the list.
|
||||
*
|
||||
* @param \PayPal\Api\CreditCard $creditCard
|
||||
* @return $this
|
||||
*/
|
||||
public function removeCreditCard($creditCard)
|
||||
{
|
||||
return $this->setCreditCards(
|
||||
array_diff($this->getCreditCards(), array($creditCard))
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* A list of credit card resources
|
||||
*
|
||||
@@ -69,7 +97,6 @@ class CreditCardList extends PPModel
|
||||
|
||||
/**
|
||||
* Number of items returned in each range of results. Note that the last results range could have fewer items than the requested number of items.
|
||||
*
|
||||
*
|
||||
* @param int $count
|
||||
*
|
||||
@@ -93,7 +120,6 @@ class CreditCardList extends PPModel
|
||||
|
||||
/**
|
||||
* Identifier of the next element to get the next range of results.
|
||||
*
|
||||
*
|
||||
* @param string $next_id
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user