Class: Arafa::SendResult

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/arafa/send_result.rb

Overview

Normalized outcome of a provider #send call. Wraps the per-recipient success/failure detail returned by both AT and Wasiliana into one shape, since a single HTTP 200 response (AT bulk SMS/airtime) can carry a mix of successful and failed recipients that must be surfaced individually rather than collapsed into one overall success flag.

Defined Under Namespace

Classes: Recipient

Instance Method Summary collapse

Instance Method Details

#message_idObject



33
34
35
# File 'lib/arafa/send_result.rb', line 33

def message_id
  recipients.first&.message_id
end

#success?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/arafa/send_result.rb', line 29

def success?
  recipients.all?(&:success)
end