Class: IqSMS::Response::SendSms

Inherits:
IqSMS::Response show all
Defined in:
lib/iqsms/response/send_sms.rb

Direct Known Subclasses

Status

Instance Attribute Summary collapse

Attributes inherited from IqSMS::Response

#hash, #original_response, #status

Instance Method Summary collapse

Constructor Details

#initialize(original_response) ⇒ SendSms

Returns a new instance of SendSms.



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/iqsms/response/send_sms.rb', line 6

def initialize(original_response)
  super

  @statuses = Array(@hash[:messages]).map do |hash_message|
    MessageStatus.new(
      status: hash_message[:status],
      client_id: hash_message[:client_id],
      smsc_id: hash_message[:smsc_id]
    )
  end
end

Instance Attribute Details

#statusesObject (readonly)

Returns the value of attribute statuses.



4
5
6
# File 'lib/iqsms/response/send_sms.rb', line 4

def statuses
  @statuses
end