Auto bill flag enable/disable auto_bill_enabled

This commit is contained in:
David Bomba 2020-10-07 17:33:16 +11:00
parent d4e2a0071a
commit c41fb6e00f

View File

@ -91,16 +91,27 @@ class UpdateRecurringInvoiceRequest extends Request
$this->replace($input);
}
private function setAutoBillFlag($auto_bill)
/**
* if($auto_bill == '')
* off / optin / optout will reset the status of this field to off to allow
* the client to choose whether to auto_bill or not.
*
* @param enum $auto_bill off/always/optin/optout
*
* @return bool
*/
private function setAutoBillFlag($auto_bill) :bool
{
if($auto_bill == 'always')
return true;
if($auto_bill == 'off')
return false;
//todo do we need to handle optin / optout here?
// if($auto_bill == '')
// off / optin / optout will reset the status of this field to off to allow
// the client to choose whether to auto_bill or not.
return false;
}
}