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

@@ -3,9 +3,11 @@
namespace PayPal\Api;
use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\Capture;
use PayPal\Api\Authorization;
use PayPal\Rest\ApiContext;
use PayPal\Transport\PayPalRestCall;
use PayPal\Validation\ArgumentValidator;
/**
* Class Order
@@ -17,12 +19,14 @@ use PayPal\Validation\ArgumentValidator;
* @property string id
* @property string purchase_unit_reference_id
* @property \PayPal\Api\Amount amount
* @property string payment_mode
* @property string state
* @property string reason_code
* @property string pending_reason
* @property string protection_eligibility
* @property string protection_eligibility_type
* @property string parent_payment
* @property \PayPal\Api\FmfDetails fmf_details
* @property string create_time
* @property string update_time
*/
@@ -97,10 +101,33 @@ class Order extends PayPalResourceModel
return $this->amount;
}
/**
* specifies payment mode of the transaction
* Valid Values: ["INSTANT_TRANSFER", "MANUAL_BANK_TRANSFER", "DELAYED_TRANSFER", "ECHECK"]
*
* @param string $payment_mode
*
* @return $this
*/
public function setPaymentMode($payment_mode)
{
$this->payment_mode = $payment_mode;
return $this;
}
/**
* specifies payment mode of the transaction
*
* @return string
*/
public function getPaymentMode()
{
return $this->payment_mode;
}
/**
* State of the order transaction.
* Valid Values: ["pending", "completed", "refunded", "partially_refunded"]
* Valid Values: ["pending", "completed", "refunded", "partially_refunded", "voided"]
*
* @param string $state
*
@@ -221,7 +248,8 @@ class Order extends PayPalResourceModel
/**
* ID of the Payment resource that this transaction is based on.
*
* @param string $parent_payment
* @param string $parent_payment
*
* @return $this
*/
public function setParentPayment($parent_payment)
@@ -240,6 +268,28 @@ class Order extends PayPalResourceModel
return $this->parent_payment;
}
/**
* Fraud Management Filter (FMF) details applied for the payment that could result in accept/deny/pending action.
*
* @param \PayPal\Api\FmfDetails $fmf_details
*
* @return $this
*/
public function setFmfDetails($fmf_details)
{
$this->fmf_details = $fmf_details;
return $this;
}
/**
* Fraud Management Filter (FMF) details applied for the payment that could result in accept/deny/pending action.
*
* @return \PayPal\Api\FmfDetails
*/
public function getFmfDetails()
{
return $this->fmf_details;
}
/**
* Time the resource was created in UTC ISO8601 format.