getSettingsById method

  1. @override
Future<SmsSettingsV1?> getSettingsById(
  1. String? correlationId,
  2. String recipientId
)
override

Gets a sms settings by recipient id.

  • correlationId (optional) transaction id to trace execution through call chain.
  • recipientId a recipient id of settings to be retrieved. Return Future that receives sms settings or error.

Implementation

@override
Future<SmsSettingsV1?> getSettingsById(
    String? correlationId, String recipientId) async {
  var result = await callCommand(
      'get_settings_by_id', correlationId, {'recipient_id': recipientId});
  if (result == null) return null;
  var item = SmsSettingsV1();
  item.fromJson(json.decode(result));
  return item;
}