Sha256: 936a31994b5b1c49ce4b50f2270a30c023a832825318c46ab75c6cec4f7b0cbe

Contents?: true

Size: 710 Bytes

Versions: 2

Compression:

Stored size: 710 Bytes

Contents

module SmsBroker
  module Client
    module Response
      module OpenMarket

        class MessageStatusSuccess < MessageStatusSuccess
          attr_reader :location, :request_id

          def initialize(open_market_response)
            super :open_market, open_market_response, serialize(open_market_response)

          end

          private

          def serialize(response)
            {
              message_id: response.ticket_id,
              to: response.destination,
              delivery_date: response.delivery_date,
              status_code: response.message_status_code,
              status: response.message_status
            }
          end

        end
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sms_broker-1.0.8 lib/sms_broker/client/response/open_market/message_status_success.rb
sms_broker-1.0.7 lib/sms_broker/client/response/open_market/message_status_success.rb