Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature suggestions #2

Open
andrii-pukhalevych opened this issue Apr 1, 2021 · 0 comments
Open

Feature suggestions #2

andrii-pukhalevych opened this issue Apr 1, 2021 · 0 comments

Comments

@andrii-pukhalevych
Copy link

Hi. Thanks for great work for the fenerum Api.

I have some idea for v2:

  1. Rename all classes in /src/API to be plural (like Subscriptions instead of Subscription);
  2. Add entity classes to store data instead of arrays that will enable autocomplete etc.

So code will look like this:

$subscription = new Subscription();
$subscription->account = $localAccountCode;
$subscription->terms = $planTermId;
$subscription->collection_method = 'invoice';
$subscription->start_date = now()->endOfMonth()->toIso8601String();
$subscription->payment_terms = 14;

$fenerum->subscriptions()->createSubscription($subscription)

And it will be possible to write @return Subscription[] for Subscriptions::listSubscriptions() etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant