Gateway plugin balance query

Created on 10 September 2016, over 8 years ago
Updated 1 March 2025, about 1 month ago

From #2725247: Review gateway plugins , sort out what to do with \Drupal\sms\Plugin\SmsGatewayPluginInterface::balance(). It is not used by SMS Framework nor does it have test coverage.

Change name from balance() to getBalance() (similar to getDeliveryReports()) or getCreditsBalance() (preferred, similar to new reports). The 'get' prefix implies we need an external request, and should be used sparingly.

Make signature return float|NULL. NULL if unknown.

Add an annotation to gateway which determines whether the gateway supports balance inquiries.

Where can we use the balance system in SMS framework?

  • Informational: In gateway list?, status page?
  • Can we take action in any way based on known balance, or is it just informational?
  • A more intelligent SMS routing system can use this information to shortlist gateways that are available. (from #3)
  • A notification system can use this to inform the administrator that the available credits is running out (from #3)
📌 Task
Status

Closed: outdated

Version

1.0

Component

Core Framework

Created by

🇦🇺Australia dpi Perth, Australia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024