forked from LiveCarta/PayPal-PHP-SDK
updating stubs to have fluent setters and retaining deprecated methods
This commit is contained in:
@@ -6,9 +6,9 @@ use PayPal\Rest\Call;
|
||||
use PayPal\Rest\ApiContext;
|
||||
|
||||
class Payment extends \PPModel implements IResource {
|
||||
|
||||
|
||||
private static $credential;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @deprected. Pass ApiContext to create/get methods instead
|
||||
@@ -16,15 +16,16 @@ class Payment extends \PPModel implements IResource {
|
||||
public static function setCredential($credential) {
|
||||
self::$credential = $credential;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Identifier of the payment resource created.
|
||||
* @param string $id
|
||||
*/
|
||||
public function setId($id) {
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Identifier of the payment resource created.
|
||||
* @return string
|
||||
@@ -32,15 +33,17 @@ class Payment extends \PPModel implements IResource {
|
||||
public function getId() {
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Time the resource was created.
|
||||
* @param string $create_time
|
||||
*/
|
||||
public function setCreateTime($create_time) {
|
||||
$this->create_time = $create_time;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Time the resource was created.
|
||||
* @return string
|
||||
@@ -48,15 +51,30 @@ class Payment extends \PPModel implements IResource {
|
||||
public function getCreateTime() {
|
||||
return $this->create_time;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deprecated method
|
||||
*/
|
||||
public function setCreate_time($create_time) {
|
||||
$this->create_time = $create_time;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Deprecated method
|
||||
*/
|
||||
public function getCreate_time() {
|
||||
return $this->create_time;
|
||||
}
|
||||
|
||||
/**
|
||||
* Time the resource was last updated.
|
||||
* @param string $update_time
|
||||
*/
|
||||
public function setUpdateTime($update_time) {
|
||||
$this->update_time = $update_time;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Time the resource was last updated.
|
||||
* @return string
|
||||
@@ -64,15 +82,30 @@ class Payment extends \PPModel implements IResource {
|
||||
public function getUpdateTime() {
|
||||
return $this->update_time;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deprecated method
|
||||
*/
|
||||
public function setUpdate_time($update_time) {
|
||||
$this->update_time = $update_time;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Deprecated method
|
||||
*/
|
||||
public function getUpdate_time() {
|
||||
return $this->update_time;
|
||||
}
|
||||
|
||||
/**
|
||||
* Intent of the payment - Sale or Authorization or Order.
|
||||
* @param string $intent
|
||||
*/
|
||||
public function setIntent($intent) {
|
||||
$this->intent = $intent;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Intent of the payment - Sale or Authorization or Order.
|
||||
* @return string
|
||||
@@ -80,15 +113,17 @@ class Payment extends \PPModel implements IResource {
|
||||
public function getIntent() {
|
||||
return $this->intent;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Source of the funds for this payment represented by a PayPal account or a direct credit card.
|
||||
* @param PayPal\Api\Payer $payer
|
||||
*/
|
||||
public function setPayer($payer) {
|
||||
$this->payer = $payer;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Source of the funds for this payment represented by a PayPal account or a direct credit card.
|
||||
* @return PayPal\Api\Payer
|
||||
@@ -96,7 +131,8 @@ class Payment extends \PPModel implements IResource {
|
||||
public function getPayer() {
|
||||
return $this->payer;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* A payment can have more than one transaction, with each transaction establishing a contract between the payer and a payee
|
||||
* @array
|
||||
@@ -104,8 +140,9 @@ class Payment extends \PPModel implements IResource {
|
||||
*/
|
||||
public function setTransactions($transactions) {
|
||||
$this->transactions = $transactions;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* A payment can have more than one transaction, with each transaction establishing a contract between the payer and a payee
|
||||
* @return PayPal\Api\Transaction
|
||||
@@ -113,15 +150,17 @@ class Payment extends \PPModel implements IResource {
|
||||
public function getTransactions() {
|
||||
return $this->transactions;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* state of the payment
|
||||
* @param string $state
|
||||
*/
|
||||
public function setState($state) {
|
||||
$this->state = $state;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* state of the payment
|
||||
* @return string
|
||||
@@ -129,15 +168,17 @@ class Payment extends \PPModel implements IResource {
|
||||
public function getState() {
|
||||
return $this->state;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Redirect urls required only when using payment_method as PayPal - the only settings supported are return and cancel urls.
|
||||
* @param PayPal\Api\RedirectUrls $redirect_urls
|
||||
*/
|
||||
public function setRedirectUrls($redirect_urls) {
|
||||
$this->redirect_urls = $redirect_urls;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Redirect urls required only when using payment_method as PayPal - the only settings supported are return and cancel urls.
|
||||
* @return PayPal\Api\RedirectUrls
|
||||
@@ -145,7 +186,21 @@ class Payment extends \PPModel implements IResource {
|
||||
public function getRedirectUrls() {
|
||||
return $this->redirect_urls;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deprecated method
|
||||
*/
|
||||
public function setRedirect_urls($redirect_urls) {
|
||||
$this->redirect_urls = $redirect_urls;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Deprecated method
|
||||
*/
|
||||
public function getRedirect_urls() {
|
||||
return $this->redirect_urls;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @array
|
||||
@@ -153,8 +208,9 @@ class Payment extends \PPModel implements IResource {
|
||||
*/
|
||||
public function setLinks($links) {
|
||||
$this->links = $links;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return PayPal\Api\Links
|
||||
@@ -162,7 +218,8 @@ class Payment extends \PPModel implements IResource {
|
||||
public function getLinks() {
|
||||
return $this->links;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function create($apiContext = null) {
|
||||
$payLoad = $this->toJSON();
|
||||
|
||||
Reference in New Issue
Block a user