I need to access the next billing date for an agreement using the PayPal REST api via the php sdk.
I see inside
PayPal\Api\AgreementDetails;
We have
getNextBillingDate()
How do I access this?
I have:
...other code
use PayPal\Api\AgreementDetails;
$agreement_check = \PayPal\Api\Agreement::get($agreementID, $apiContext);
$renew_date = $agreement_check->getNextBillingDate();
I get the following error:
Fatal error: Call to undefined method PayPal\Api\Agreement::getNextBillingDate()
What is the correct way to access this?