forked from LiveCarta/PayPal-PHP-SDK
Updated Invoicing APIs
- Updated Model objects. - Updated Samples. - Updated Tests.
This commit is contained in:
@@ -17,11 +17,12 @@ use PayPal\Common\PayPalModel;
|
||||
* @property string date
|
||||
* @property string method
|
||||
* @property string note
|
||||
* @property \PayPal\Api\Currency amount
|
||||
*/
|
||||
class PaymentDetail extends PayPalModel
|
||||
{
|
||||
/**
|
||||
* PayPal payment detail indicating whether payment was made in an invoicing flow via PayPal or externally. In the case of the mark-as-paid API, payment type is EXTERNAL and this is what is now supported. The PAYPAL value is provided for backward compatibility.
|
||||
* The PayPal payment detail. Indicates whether payment was made in an invoicing flow through PayPal or externally. In the case of the mark-as-paid API, the supported payment type is `EXTERNAL`. For backward compatibility, the `PAYPAL` payment type is still supported.
|
||||
* Valid Values: ["PAYPAL", "EXTERNAL"]
|
||||
*
|
||||
* @param string $type
|
||||
@@ -35,7 +36,7 @@ class PaymentDetail extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* PayPal payment detail indicating whether payment was made in an invoicing flow via PayPal or externally. In the case of the mark-as-paid API, payment type is EXTERNAL and this is what is now supported. The PAYPAL value is provided for backward compatibility.
|
||||
* The PayPal payment detail. Indicates whether payment was made in an invoicing flow through PayPal or externally. In the case of the mark-as-paid API, the supported payment type is `EXTERNAL`. For backward compatibility, the `PAYPAL` payment type is still supported.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -45,7 +46,7 @@ class PaymentDetail extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* PayPal payment transaction id. Mandatory field in case the type value is PAYPAL.
|
||||
* The PayPal payment transaction ID. Required with the `PAYPAL` payment type.
|
||||
*
|
||||
* @param string $transaction_id
|
||||
*
|
||||
@@ -58,7 +59,7 @@ class PaymentDetail extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* PayPal payment transaction id. Mandatory field in case the type value is PAYPAL.
|
||||
* The PayPal payment transaction ID. Required with the `PAYPAL` payment type.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -92,7 +93,7 @@ class PaymentDetail extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Date when the invoice was paid. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
|
||||
* The date when the invoice was paid. The date format is *yyyy*-*MM*-*dd* *z* as defined in [Internet Date/Time Format](http://tools.ietf.org/html/rfc3339#section-5.6).
|
||||
*
|
||||
* @param string $date
|
||||
*
|
||||
@@ -105,7 +106,7 @@ class PaymentDetail extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Date when the invoice was paid. Date format yyyy-MM-dd z, as defined in [ISO8601](http://tools.ietf.org/html/rfc3339#section-5.6).
|
||||
* The date when the invoice was paid. The date format is *yyyy*-*MM*-*dd* *z* as defined in [Internet Date/Time Format](http://tools.ietf.org/html/rfc3339#section-5.6).
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -115,7 +116,7 @@ class PaymentDetail extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Payment mode or method. This field is mandatory if the value of the type field is EXTERNAL.
|
||||
* The payment mode or method. Required with the `EXTERNAL` payment type.
|
||||
* Valid Values: ["BANK_TRANSFER", "CASH", "CHECK", "CREDIT_CARD", "DEBIT_CARD", "PAYPAL", "WIRE_TRANSFER", "OTHER"]
|
||||
*
|
||||
* @param string $method
|
||||
@@ -129,7 +130,7 @@ class PaymentDetail extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Payment mode or method. This field is mandatory if the value of the type field is EXTERNAL.
|
||||
* The payment mode or method. Required with the `EXTERNAL` payment type.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -139,7 +140,7 @@ class PaymentDetail extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Optional note associated with the payment.
|
||||
* Optional. A note associated with the payment.
|
||||
*
|
||||
* @param string $note
|
||||
*
|
||||
@@ -152,7 +153,7 @@ class PaymentDetail extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Optional note associated with the payment.
|
||||
* Optional. A note associated with the payment.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -161,4 +162,27 @@ class PaymentDetail extends PayPalModel
|
||||
return $this->note;
|
||||
}
|
||||
|
||||
/**
|
||||
* The amount to record as payment against invoice. If you omit this parameter, the total invoice amount is recorded as payment.
|
||||
*
|
||||
* @param \PayPal\Api\Currency $amount
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAmount($amount)
|
||||
{
|
||||
$this->amount = $amount;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The amount to record as payment against invoice. If you omit this parameter, the total invoice amount is recorded as payment.
|
||||
*
|
||||
* @return \PayPal\Api\Currency
|
||||
*/
|
||||
public function getAmount()
|
||||
{
|
||||
return $this->amount;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user