Sha256: ca8ddd05a88cc0a12f8c833ddb6dd78fb609cfa7a392d9c9e07c760856512f01
Contents?: true
Size: 724 Bytes
Versions: 5
Compression:
Stored size: 724 Bytes
Contents
module SmsBroker module Client module Response class NexmoVoiceSuccess < VoiceSuccess def initialize(nexmo_response) super :nexmo, nexmo_response, serialize(nexmo_response) end private def serialize(response) { call_id: response['call_id'], to: response['to'], raw: response_to_hash(response) } end def response_to_hash(response) attributes = %w( call_id to status error_text ) {}.tap do |hash| attributes.each do |attr| hash[attr.to_sym] = response[attr] end end end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems