Class: SmsRu::Events::SmsStatus

Inherits:
Object
  • Object
show all
Includes:
DeliveryStatus
Defined in:
lib/sms_ru/events.rb

Overview

A delivery-status notification (record type “sms_status”).

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from DeliveryStatus

#delivered?, #failed?, #pending?

Instance Attribute Details

#created_atTime? (readonly)

Returns when SMS.ru created the status.

Returns:

  • (Time, nil)

    when SMS.ru created the status



17
18
19
20
21
22
# File 'lib/sms_ru/events.rb', line 17

class SmsStatus < Data.define(:id, :status_code, :created_at, :raw)
  include DeliveryStatus

  # @return [String] the wire record type
  def type = "sms_status"
end

#idString (readonly)

Returns the message id.

Returns:

  • (String)

    the message id



17
18
19
20
21
22
# File 'lib/sms_ru/events.rb', line 17

class SmsStatus < Data.define(:id, :status_code, :created_at, :raw)
  include DeliveryStatus

  # @return [String] the wire record type
  def type = "sms_status"
end

#rawArray<String> (readonly)

Returns every line of the original record.

Returns:

  • (Array<String>)

    every line of the original record



17
18
19
20
21
22
# File 'lib/sms_ru/events.rb', line 17

class SmsStatus < Data.define(:id, :status_code, :created_at, :raw)
  include DeliveryStatus

  # @return [String] the wire record type
  def type = "sms_status"
end

#status_codeInteger? (readonly)

Returns the delivery status code (per /sms/status).

Returns:

  • (Integer, nil)

    the delivery status code (per /sms/status)



17
18
19
20
21
22
# File 'lib/sms_ru/events.rb', line 17

class SmsStatus < Data.define(:id, :status_code, :created_at, :raw)
  include DeliveryStatus

  # @return [String] the wire record type
  def type = "sms_status"
end

Instance Method Details

#typeString

Returns the wire record type.

Returns:

  • (String)

    the wire record type



21
# File 'lib/sms_ru/events.rb', line 21

def type = "sms_status"