Skip to content

Recipient Class - Extend to include additional data i.e. messagePartCount #185

Closed
@chris-skilltech

Description

@chris-skilltech

We're currently building an integration using this API and have become a little stuck, hoping for any advice if there is a different way forward.

After calling the create method and receiving a response the recipients are looped over an created using the loadFromArray function in base however this only populates variables that are defined on the class. The Recipient class only contains the status and statusDatetime fields however the response returned from the API contains many more e.g. messagePartCount, messageLength, mccmnc, etc...

The general issue this causes is that you lack possibly useful information that the code throws away. In our specific case the messagePartCount is useful for determining specifically how many messages were used but I'm sure that many others may have other cases.

Is there any reason why the Recipient class could not simply be extended with all of the fields available? Or allow it to be extended by a custom instance (perhaps using a config file to determine which class to use as a recipient)? As I said the method of fixing is completely up for debate but any help would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions