Class: MessageBird::Voice::Base

Inherits:
Base
  • Object
show all
Defined in:
lib/messagebird/voice/base.rb

Direct Known Subclasses

CallLeg, CallLegRecording, Transcription, Webhook

Instance Method Summary collapse

Methods inherited from Base

#map_hash_elements_to_self, #value_to_time

Constructor Details

#initialize(json) ⇒ Base

Returns a new instance of Base.



6
7
8
9
10
# File 'lib/messagebird/voice/base.rb', line 6

def initialize(json)
  params = json.include?('data') ? json['data'].first : json
  super(params)
  handle_links(json['_links'])
end

Instance Method Details

intentional empty method, objects may not want to deal with _links



13
# File 'lib/messagebird/voice/base.rb', line 13

def handle_links(json) end