Skip to content

Feature suggestions #2

@andrii-pukhalevych

Description

@andrii-pukhalevych

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions