forked from LiveCarta/PayPal-PHP-SDK
Enabled EC Parameters support
- Updated Api to enabled EC Parameters - Updated Tests - Updated Logging Manager - Added a feature to do validation on accessors.
This commit is contained in:
@@ -8,33 +8,40 @@ use PayPal\Rest\ApiContext;
|
||||
/**
|
||||
* Class Order
|
||||
*
|
||||
* @property string id
|
||||
* @property string createTime
|
||||
* @property string updateTime
|
||||
* @property string state
|
||||
* An order transaction.
|
||||
*
|
||||
* @package PayPal\Api
|
||||
*
|
||||
* @property string id
|
||||
* @property string purchase_unit_reference_id
|
||||
* @property string create_time
|
||||
* @property string update_time
|
||||
* @property \PayPal\Api\Amount amount
|
||||
* @property string parentPayment
|
||||
* @property \PayPal\Api\Links links
|
||||
* @property string reasonCode
|
||||
* @property string payment_mode
|
||||
* @property string state
|
||||
* @property string reason_code
|
||||
* @property string protection_eligibility
|
||||
* @property string protection_eligibility_type
|
||||
* @property \PayPal\Api\Links links
|
||||
*/
|
||||
class Order extends PPModel
|
||||
{
|
||||
/**
|
||||
* Set the identifier of the order transaction.
|
||||
* Identifier of the order transaction.
|
||||
*
|
||||
*
|
||||
* @param string $id
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setId($id)
|
||||
{
|
||||
$this->id = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the identifier of the order transaction.
|
||||
* Identifier of the order transaction.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -44,21 +51,70 @@ class Order extends PPModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the time the resource was created.
|
||||
* Identifier to the purchase unit associated with this object
|
||||
*
|
||||
*
|
||||
* @param string $purchase_unit_reference_id
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPurchaseUnitReferenceId($purchase_unit_reference_id)
|
||||
{
|
||||
$this->purchase_unit_reference_id = $purchase_unit_reference_id;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Identifier to the purchase unit associated with this object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPurchaseUnitReferenceId()
|
||||
{
|
||||
return $this->purchase_unit_reference_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Identifier to the purchase unit associated with this object
|
||||
*
|
||||
* @deprecated Instead use setPurchaseUnitReferenceId
|
||||
*
|
||||
* @param string $purchase_unit_reference_id
|
||||
* @return $this
|
||||
*/
|
||||
public function setPurchase_unit_reference_id($purchase_unit_reference_id)
|
||||
{
|
||||
$this->purchase_unit_reference_id = $purchase_unit_reference_id;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Identifier to the purchase unit associated with this object
|
||||
* @deprecated Instead use getPurchaseUnitReferenceId
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPurchase_unit_reference_id()
|
||||
{
|
||||
return $this->purchase_unit_reference_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Time the resource was created in UTC ISO8601 format.
|
||||
*
|
||||
*
|
||||
* @param string $create_time
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setCreateTime($create_time)
|
||||
{
|
||||
$this->create_time = $create_time;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the time the resource was created.
|
||||
* Time the resource was created in UTC ISO8601 format.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -68,21 +124,46 @@ class Order extends PPModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the time the resource was last updated.
|
||||
* Time the resource was created in UTC ISO8601 format.
|
||||
*
|
||||
* @deprecated Instead use setCreateTime
|
||||
*
|
||||
* @param string $create_time
|
||||
* @return $this
|
||||
*/
|
||||
public function setCreate_time($create_time)
|
||||
{
|
||||
$this->create_time = $create_time;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Time the resource was created in UTC ISO8601 format.
|
||||
* @deprecated Instead use getCreateTime
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCreate_time()
|
||||
{
|
||||
return $this->create_time;
|
||||
}
|
||||
|
||||
/**
|
||||
* Time the resource was last updated in UTC ISO8601 format.
|
||||
*
|
||||
*
|
||||
* @param string $update_time
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setUpdateTime($update_time)
|
||||
{
|
||||
$this->update_time = $update_time;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the time the resource was last updated.
|
||||
* Time the resource was last updated in UTC ISO8601 format.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -92,49 +173,46 @@ class Order extends PPModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the state of the order transaction.
|
||||
* Time the resource was last updated in UTC ISO8601 format.
|
||||
*
|
||||
* Allowed values are: `PENDING`, `COMPLETED`, `REFUNDED` or `PARTIALLY_REFUNDED`.
|
||||
*
|
||||
* @param string $state
|
||||
* @deprecated Instead use setUpdateTime
|
||||
*
|
||||
* @param string $update_time
|
||||
* @return $this
|
||||
*/
|
||||
public function setState($state)
|
||||
public function setUpdate_time($update_time)
|
||||
{
|
||||
$this->state = $state;
|
||||
|
||||
$this->update_time = $update_time;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the state of the order transaction.
|
||||
*
|
||||
* Allowed values are: `PENDING`, `COMPLETED`, `REFUNDED` or `PARTIALLY_REFUNDED`.
|
||||
* Time the resource was last updated in UTC ISO8601 format.
|
||||
* @deprecated Instead use getUpdateTime
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getState()
|
||||
public function getUpdate_time()
|
||||
{
|
||||
return $this->state;
|
||||
return $this->update_time;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the amount being collected.
|
||||
* Amount being collected.
|
||||
*
|
||||
*
|
||||
* @param \PayPal\Api\Amount $amount
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAmount($amount)
|
||||
{
|
||||
$this->amount = $amount;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the amount being collected.
|
||||
* Amount being collected.
|
||||
*
|
||||
* @return \PayPal\Api\Amount
|
||||
*/
|
||||
@@ -144,83 +222,94 @@ class Order extends PPModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Set ID of the payment resource on which this transaction is based.
|
||||
*
|
||||
* @param string $parent_payment
|
||||
* specifies payment mode of the transaction
|
||||
* Valid Values: ["INSTANT_TRANSFER", "MANUAL_BANK_TRANSFER", "DELAYED_TRANSFER", "ECHECK"]
|
||||
*
|
||||
* @param string $payment_mode
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setParentPayment($parent_payment)
|
||||
public function setPaymentMode($payment_mode)
|
||||
{
|
||||
$this->parent_payment = $parent_payment;
|
||||
|
||||
$this->payment_mode = $payment_mode;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get ID of the payment resource on which this transaction is based.
|
||||
* specifies payment mode of the transaction
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getParentPayment()
|
||||
public function getPaymentMode()
|
||||
{
|
||||
return $this->parent_payment;
|
||||
return $this->payment_mode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Links
|
||||
* specifies payment mode of the transaction
|
||||
*
|
||||
* @param \PayPal\Api\Links $links
|
||||
* @deprecated Instead use setPaymentMode
|
||||
*
|
||||
* @param string $payment_mode
|
||||
* @return $this
|
||||
*/
|
||||
public function setLinks($links)
|
||||
public function setPayment_mode($payment_mode)
|
||||
{
|
||||
$this->links = $links;
|
||||
|
||||
$this->payment_mode = $payment_mode;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Links
|
||||
* specifies payment mode of the transaction
|
||||
* @deprecated Instead use getPaymentMode
|
||||
*
|
||||
* @return \PayPal\Api\Links
|
||||
* @return string
|
||||
*/
|
||||
public function getLinks()
|
||||
public function getPayment_mode()
|
||||
{
|
||||
return $this->links;
|
||||
return $this->payment_mode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reason code for the transaction state being Pending or Reversed. Assigned in response.
|
||||
* State of the order transaction.
|
||||
* Valid Values: ["PENDING", "COMPLETED", "REFUNDED", "PARTIALLY_REFUNDED"]
|
||||
*
|
||||
* Allowed values: `CHARGEBACK`, `GUARANTEE`, `BUYER_COMPLAINT`, `REFUND`,
|
||||
* `UNCONFIRMED_SHIPPING_ADDRESS`,
|
||||
* `ECHECK`, `INTERNATIONAL_WITHDRAWAL`,
|
||||
* `RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION`, `PAYMENT_REVIEW`,
|
||||
* `REGULATORY_REVIEW`, `UNILATERAL`, or `VERIFICATION_REQUIRED`
|
||||
* (`ORDER` can also be set in the response).
|
||||
* @param string $state
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setState($state)
|
||||
{
|
||||
$this->state = $state;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* State of the order transaction.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getState()
|
||||
{
|
||||
return $this->state;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reason code for the transaction state being Pending or Reversed.
|
||||
* Valid Values: ["CHARGEBACK", "GUARANTEE", "BUYER_COMPLAINT", "REFUND", "UNCONFIRMED_SHIPPING_ADDRESS", "ECHECK", "INTERNATIONAL_WITHDRAWAL", "RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION", "PAYMENT_REVIEW", "REGULATORY_REVIEW", "UNILATERAL", "VERIFICATION_REQUIRED"]
|
||||
*
|
||||
* @param string $reason_code
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setReasonCode($reason_code)
|
||||
{
|
||||
$this->reason_code = $reason_code;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reason code for the transaction state being Pending or Reversed. Assigned in response.
|
||||
*
|
||||
* Allowed values: `CHARGEBACK`, `GUARANTEE`, `BUYER_COMPLAINT`, `REFUND`,
|
||||
* `UNCONFIRMED_SHIPPING_ADDRESS`,
|
||||
* `ECHECK`, `INTERNATIONAL_WITHDRAWAL`,
|
||||
* `RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION`, `PAYMENT_REVIEW`,
|
||||
* `REGULATORY_REVIEW`, `UNILATERAL`, or `VERIFICATION_REQUIRED`
|
||||
* (`ORDER` can also be set in the response).
|
||||
* Reason code for the transaction state being Pending or Reversed.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -228,4 +317,152 @@ class Order extends PPModel
|
||||
{
|
||||
return $this->reason_code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reason code for the transaction state being Pending or Reversed.
|
||||
*
|
||||
* @deprecated Instead use setReasonCode
|
||||
*
|
||||
* @param string $reason_code
|
||||
* @return $this
|
||||
*/
|
||||
public function setReason_code($reason_code)
|
||||
{
|
||||
$this->reason_code = $reason_code;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reason code for the transaction state being Pending or Reversed.
|
||||
* @deprecated Instead use getReasonCode
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getReason_code()
|
||||
{
|
||||
return $this->reason_code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Protection Eligibility of the Payer
|
||||
* Valid Values: ["ELIGIBLE", "PARTIALLY_ELIGIBLE", "INELIGIBLE"]
|
||||
*
|
||||
* @param string $protection_eligibility
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setProtectionEligibility($protection_eligibility)
|
||||
{
|
||||
$this->{"protection-eligibility"} = $protection_eligibility;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Protection Eligibility of the Payer
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getProtectionEligibility()
|
||||
{
|
||||
return $this->{"protection-eligibility"};
|
||||
}
|
||||
|
||||
/**
|
||||
* Protection Eligibility of the Payer
|
||||
*
|
||||
* @deprecated Instead use setProtectionEligibility
|
||||
*
|
||||
* @param string $protection-eligibility
|
||||
* @return $this
|
||||
*/
|
||||
public function setProtection_eligibility($protection_eligibility)
|
||||
{
|
||||
$this->{"protection-eligibility"} = $protection_eligibility;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Protection Eligibility of the Payer
|
||||
* @deprecated Instead use getProtectionEligibility
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getProtection_eligibility()
|
||||
{
|
||||
return $this->{"protection-eligibility"};
|
||||
}
|
||||
|
||||
/**
|
||||
* Protection Eligibility Type of the Payer
|
||||
* Valid Values: ["ELIGIBLE", "ITEM_NOT_RECEIVED_ELIGIBLE", "INELIGIBLE", "UNAUTHORIZED_PAYMENT_ELIGIBLE"]
|
||||
*
|
||||
* @param string $protection_eligibility_type
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setProtectionEligibilityType($protection_eligibility_type)
|
||||
{
|
||||
$this->{"protection-eligibility_type"} = $protection_eligibility_type;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Protection Eligibility Type of the Payer
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getProtectionEligibilityType()
|
||||
{
|
||||
return $this->{"protection-eligibility_type"};
|
||||
}
|
||||
|
||||
/**
|
||||
* Protection Eligibility Type of the Payer
|
||||
*
|
||||
* @deprecated Instead use setProtectionEligibilityType
|
||||
*
|
||||
* @param string $protection-eligibility_type
|
||||
* @return $this
|
||||
*/
|
||||
public function setProtection_eligibility_type($protection_eligibility_type)
|
||||
{
|
||||
$this->{"protection-eligibility_type"} = $protection_eligibility_type;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Protection Eligibility Type of the Payer
|
||||
* @deprecated Instead use getProtectionEligibilityType
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getProtection_eligibility_type()
|
||||
{
|
||||
return $this->{"protection-eligibility_type"};
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets Links
|
||||
*
|
||||
*
|
||||
* @param \PayPal\Api\Links $links
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setLinks($links)
|
||||
{
|
||||
$this->links = $links;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets Links
|
||||
*
|
||||
* @return \PayPal\Api\Links[]
|
||||
*/
|
||||
public function getLinks()
|
||||
{
|
||||
return $this->links;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user