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 Sale extends \PPModel implements IResource {
|
||||
|
||||
|
||||
private static $credential;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @deprected. Pass ApiContext to create/get methods instead
|
||||
@@ -16,15 +16,16 @@ class Sale extends \PPModel implements IResource {
|
||||
public static function setCredential($credential) {
|
||||
self::$credential = $credential;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Identifier of the authorization transaction.
|
||||
* @param string $id
|
||||
*/
|
||||
public function setId($id) {
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Identifier of the authorization transaction.
|
||||
* @return string
|
||||
@@ -32,15 +33,17 @@ class Sale 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 Sale 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 Sale 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Amount being collected.
|
||||
* @param PayPal\Api\Amount $amount
|
||||
*/
|
||||
public function setAmount($amount) {
|
||||
$this->amount = $amount;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Amount being collected.
|
||||
* @return PayPal\Api\Amount
|
||||
@@ -80,15 +113,17 @@ class Sale extends \PPModel implements IResource {
|
||||
public function getAmount() {
|
||||
return $this->amount;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* State of the sale transaction.
|
||||
* @param string $state
|
||||
*/
|
||||
public function setState($state) {
|
||||
$this->state = $state;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* State of the sale transaction.
|
||||
* @return string
|
||||
@@ -96,15 +131,17 @@ class Sale extends \PPModel implements IResource {
|
||||
public function getState() {
|
||||
return $this->state;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* ID of the Payment resource that this transaction is based on.
|
||||
* @param string $parent_payment
|
||||
*/
|
||||
public function setParentPayment($parent_payment) {
|
||||
$this->parent_payment = $parent_payment;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* ID of the Payment resource that this transaction is based on.
|
||||
* @return string
|
||||
@@ -112,7 +149,21 @@ class Sale extends \PPModel implements IResource {
|
||||
public function getParentPayment() {
|
||||
return $this->parent_payment;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deprecated method
|
||||
*/
|
||||
public function setParent_payment($parent_payment) {
|
||||
$this->parent_payment = $parent_payment;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Deprecated method
|
||||
*/
|
||||
public function getParent_payment() {
|
||||
return $this->parent_payment;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @array
|
||||
@@ -120,8 +171,9 @@ class Sale extends \PPModel implements IResource {
|
||||
*/
|
||||
public function setLinks($links) {
|
||||
$this->links = $links;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return PayPal\Api\Links
|
||||
@@ -129,7 +181,8 @@ class Sale extends \PPModel implements IResource {
|
||||
public function getLinks() {
|
||||
return $this->links;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static function get($saleId, $apiContext = null) {
|
||||
if (($saleId == null) || (strlen($saleId) <= 0)) {
|
||||
|
||||
Reference in New Issue
Block a user