Create a new instance of Plan object
Fill up the basic information that is required for the plan
The possible values for such setters are mentioned in the setter method documentation. Just open the class file. e.g. lib/PayPal/Api/PaymentDefinition.php and look for setFrequency method. You should be able to see the acceptable values in the comments.
Charge Models
ReturnURL and CancelURL are not required and used when creating billing agreement with payment_method as "credit_card". However, it is generally a good idea to set these values, in case you plan to create billing agreements which accepts "paypal" as payment_method. This will keep your plan compatible with both the possible scenarios on how it is being used in agreement.
For Sample Purposes Only.
Create Plan Sample
This sample code demonstrate how you can create a billing plan, as documented here at: https://developer.paypal.com/webapps/developer/docs/api/#create-a-plan API used: /v1/payments/billing-plans