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

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

Closed
chris-skilltech opened this issue Jan 17, 2022 · 2 comments
Labels

Comments

@chris-skilltech
Copy link

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.

@CoolGoose
Copy link
Contributor

hi @chris-skilltech , can you please checkout latest master and let me know if #186 fixes your issue?

@CoolGoose CoolGoose added the bug label Jan 19, 2022
@chris-skilltech
Copy link
Author

Hi @CoolGoose, that works wonderfully thank you. Apologies for the delayed response.

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

No branches or pull requests

2 participants