forked from LiveCarta/PayPal-PHP-SDK
- Removed Deprecated Getter Setters from all Model Classes - All Camelcase getters and setters are removed. Please use first letter uppercase syntax - E.g. instead of using get_notify_url(), use getNotifyUrl() instead
294 lines
6.1 KiB
PHP
294 lines
6.1 KiB
PHP
<?php
|
|
|
|
namespace PayPal\Api;
|
|
|
|
use PayPal\Common\PayPalModel;
|
|
use PayPal\Rest\ApiContext;
|
|
|
|
/**
|
|
* Class Order
|
|
*
|
|
* 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 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 PayPalModel
|
|
{
|
|
/**
|
|
* Identifier of the order transaction.
|
|
*
|
|
*
|
|
* @param string $id
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function setId($id)
|
|
{
|
|
$this->id = $id;
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Identifier of the order transaction.
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getId()
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
/**
|
|
* 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;
|
|
}
|
|
|
|
/**
|
|
* 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;
|
|
}
|
|
|
|
/**
|
|
* Time the resource was created in UTC ISO8601 format.
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getCreateTime()
|
|
{
|
|
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;
|
|
}
|
|
|
|
/**
|
|
* Time the resource was last updated in UTC ISO8601 format.
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getUpdateTime()
|
|
{
|
|
return $this->update_time;
|
|
}
|
|
|
|
/**
|
|
* Amount being collected.
|
|
*
|
|
*
|
|
* @param \PayPal\Api\Amount $amount
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function setAmount($amount)
|
|
{
|
|
$this->amount = $amount;
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Amount being collected.
|
|
*
|
|
* @return \PayPal\Api\Amount
|
|
*/
|
|
public function getAmount()
|
|
{
|
|
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"]
|
|
*
|
|
* @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.
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getReasonCode()
|
|
{
|
|
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 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"};
|
|
}
|
|
|
|
/**
|
|
* 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;
|
|
}
|
|
|
|
}
|