Sha256: 1f55f7512dcbfa051281d1d29b52ceef18e469e512c570975e8da568c8ad20fa

Contents?: true

Size: 664 Bytes

Versions: 9

Compression:

Stored size: 664 Bytes

Contents

# frozen_string_literal: true
module ThinkFeelDoEngine
  module Reports
    # Collects relevant/unsubscribed SMS errors
    class SmsDeliveryErrorRecord
      def self.columns
        %w( body error_message phone_number created_at )
      end

      def self.all
        SmsDeliveryError
          .all
          .map do |sms_delivery_error|
            {
              body: sms_delivery_error.body,
              error_message: sms_delivery_error.error_message,
              phone_number: sms_delivery_error.phone_number,
              created_at: sms_delivery_error.created_at.iso8601
            }
          end
          .flatten
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
think_feel_do_engine-3.22.9 app/models/think_feel_do_engine/reports/sms_delivery_error_record.rb
think_feel_do_engine-3.22.8 app/models/think_feel_do_engine/reports/sms_delivery_error_record.rb
think_feel_do_engine-3.22.7 app/models/think_feel_do_engine/reports/sms_delivery_error_record.rb
think_feel_do_engine-3.22.6 app/models/think_feel_do_engine/reports/sms_delivery_error_record.rb
think_feel_do_engine-3.22.5 app/models/think_feel_do_engine/reports/sms_delivery_error_record.rb
think_feel_do_engine-3.22.4 app/models/think_feel_do_engine/reports/sms_delivery_error_record.rb
think_feel_do_engine-3.22.2 app/models/think_feel_do_engine/reports/sms_delivery_error_record.rb
think_feel_do_engine-3.22.1 app/models/think_feel_do_engine/reports/sms_delivery_error_record.rb
think_feel_do_engine-3.22.0 app/models/think_feel_do_engine/reports/sms_delivery_error_record.rb