Skip to content

Need to update valid organisation classes #351

Closed
@IanSimpson

Description

@IanSimpson

This is a future bug - it's not a bug yet, but will become one on July 1 when IGNITE, GROW and COMPREHENSIVE organisation classes are launched.

Describe the bug
The Organisation class (like all models) checks all ENUM values on initialization, and throws an exception if an unknown value is encountered.

Presently the valid classes are:

    public function getClassAllowableValues()
    {
        return [
            self::MODEL_CLASS_DEMO,
            self::MODEL_CLASS_TRIAL,
            self::MODEL_CLASS_STARTER,
            self::MODEL_CLASS_STANDARD,
            self::MODEL_CLASS_PREMIUM,
            self::MODEL_CLASS_PREMIUM_20,
            self::MODEL_CLASS_PREMIUM_50,
            self::MODEL_CLASS_PREMIUM_100,
            self::MODEL_CLASS_LEDGER,
            self::MODEL_CLASS_GST_CASHBOOK,
            self::MODEL_CLASS_NON_GST_CASHBOOK,
            self::MODEL_CLASS_ULTIMATE,
            self::MODEL_CLASS_LITE,
        ];
    }

This excludes those three new classes. After July 1, loading any organisation of one of these new types will cause an exception, even if you're not looking at the class

To Reproduce
Steps to reproduce the behavior:

  1. Wait until July 1
  2. Try to load an organisation on the IGNITE, GROW or COMPREHENSIVE plan
  3. ...
  4. Do not profit

Expected behavior
That we can load things without exceptions.

Additional context
I previously raised an issue (#291) based around the exact same change 2 years ago. This was converted to a discussion (#309), and then has been ignored for 2 years.

At the time I noted this would happen again, and suggested a couple of possible workarounds:

  1. The SDK could be updated to issue a warning rather than throw an exception
  2. That the API Spec and the SDK are updated well before any updates to the product are put live

Both suggestions have been ignored, and once more, I find myself in a situation where I have three weeks to update, test and deploy on several applications, but no SDK update available.

Please address this urgently so I can start the update process next week and don't risk failures for clients in July.

You also need to just do better with this - two years since my original comment and we're being stitched up again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions