Updated Payment APIs

- Updated SDK Models to latest Payment APIs
- Updated Unit Tests
This commit is contained in:
Jay Patel
2015-02-26 15:03:59 -06:00
parent 241d80cd17
commit 3e43f93f9b
93 changed files with 6079 additions and 1735 deletions

View File

@@ -13,15 +13,19 @@ use PayPal\Common\PayPalModel;
*
* @property string payment_method
* @property string status
* @property string account_type
* @property string account_age
* @property \PayPal\Api\FundingInstrument[] funding_instruments
* @property string funding_option_id
* @property \PayPal\Api\FundingOption funding_option
* @property \PayPal\Api\FundingOption related_funding_option
* @property \PayPal\Api\PayerInfo payer_info
*/
class Payer extends PayPalModel
{
/**
* Payment method being used - PayPal Wallet payment, Bank Direct Debit, or Direct Credit card.
* Valid Values: ["credit_card", "bank", "paypal"]
* Payment method being used - PayPal Wallet payment, Bank Direct Debit or Direct Credit card.
* Valid Values: ["credit_card", "bank", "paypal", "pay_upon_invoice", "carrier"]
*
* @param string $payment_method
*
@@ -34,7 +38,7 @@ class Payer extends PayPalModel
}
/**
* Payment method being used - PayPal Wallet payment, Bank Direct Debit, or Direct Credit card.
* Payment method being used - PayPal Wallet payment, Bank Direct Debit or Direct Credit card.
*
* @return string
*/
@@ -44,7 +48,7 @@ class Payer extends PayPalModel
}
/**
* Status of Payer PayPal Account.
* Status of payer's PayPal Account.
* Valid Values: ["VERIFIED", "UNVERIFIED"]
*
* @param string $status
@@ -58,7 +62,7 @@ class Payer extends PayPalModel
}
/**
* Status of Payer PayPal Account.
* Status of payer's PayPal Account.
*
* @return string
*/
@@ -68,7 +72,54 @@ class Payer extends PayPalModel
}
/**
* List of funding instruments from which the funds of the current payment come. Typically a credit card.
* Type of account relationship payer has with PayPal.
* Valid Values: ["BUSINESS", "PERSONAL", "PREMIER"]
*
* @param string $account_type
*
* @return $this
*/
public function setAccountType($account_type)
{
$this->account_type = $account_type;
return $this;
}
/**
* Type of account relationship payer has with PayPal.
*
* @return string
*/
public function getAccountType()
{
return $this->account_type;
}
/**
* Duration since the payer established account relationship with PayPal in days.
*
* @param string $account_age
*
* @return $this
*/
public function setAccountAge($account_age)
{
$this->account_age = $account_age;
return $this;
}
/**
* Duration since the payer established account relationship with PayPal in days.
*
* @return string
*/
public function getAccountAge()
{
return $this->account_age;
}
/**
* List of funding instruments to fund the payment.
*
* @param \PayPal\Api\FundingInstrument[] $funding_instruments
*
@@ -81,7 +132,7 @@ class Payer extends PayPalModel
}
/**
* List of funding instruments from which the funds of the current payment come. Typically a credit card.
* List of funding instruments to fund the payment.
*
* @return \PayPal\Api\FundingInstrument[]
*/
@@ -121,7 +172,7 @@ class Payer extends PayPalModel
}
/**
* Id of user selected funding option for the payment. 'OneOf' funding_instruments or funding_option_id to be present.
* Id of user selected funding option for the payment. 'OneOf' funding_instruments or funding_option_id to be present
*
* @param string $funding_option_id
*
@@ -134,7 +185,7 @@ class Payer extends PayPalModel
}
/**
* Id of user selected funding option for the payment. 'OneOf' funding_instruments or funding_option_id to be present.
* Id of user selected funding option for the payment. 'OneOf' funding_instruments or funding_option_id to be present
*
* @return string
*/
@@ -143,6 +194,52 @@ class Payer extends PayPalModel
return $this->funding_option_id;
}
/**
* Default funding option available for the payment
*
* @param \PayPal\Api\FundingOption $funding_option
*
* @return $this
*/
public function setFundingOption($funding_option)
{
$this->funding_option = $funding_option;
return $this;
}
/**
* Default funding option available for the payment
*
* @return \PayPal\Api\FundingOption
*/
public function getFundingOption()
{
return $this->funding_option;
}
/**
* Funding option related to default funding option.
*
* @param \PayPal\Api\FundingOption $related_funding_option
*
* @return $this
*/
public function setRelatedFundingOption($related_funding_option)
{
$this->related_funding_option = $related_funding_option;
return $this;
}
/**
* Funding option related to default funding option.
*
* @return \PayPal\Api\FundingOption
*/
public function getRelatedFundingOption()
{
return $this->related_funding_option;
}
/**
* Information related to the Payer.
*