Class: Plivo::Resources::MultiPartyCallMember

Inherits:
Base::SecondaryResource show all
Defined in:
lib/plivo/resources/multipartycalls.rb

Constant Summary

Constants included from Utils

Utils::TYPE_WHITELIST

Instance Attribute Summary

Attributes inherited from Base::SecondaryResource

#secondary_id

Attributes inherited from Base::Resource

#id

Instance Method Summary collapse

Methods inherited from Base::SecondaryResource

#configure_secondary_options, #configure_secondary_resource_uri, #secondary_parse_and_set

Methods included from Utils

GetSortedQueryParamString?, compute_signatureV3?, expected_type?, expected_value?, generate_url?, getMapFromQueryString?, is_one_among_string_url?, multi_valid_param?, raise_invalid_request, valid_account?, valid_date_format?, valid_mainaccount?, valid_multiple_destination_integers?, valid_multiple_destination_nos?, valid_param?, valid_range?, valid_signature?, valid_signatureV3?, valid_subaccount?, valid_url?

Constructor Details

#initialize(client, options = nil) ⇒ MultiPartyCallMember

Returns a new instance of MultiPartyCallMember.



340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
# File 'lib/plivo/resources/multipartycalls.rb', line 340

def initialize(client, options = nil)
  @_name = 'MultiPartyCall'
  @_identifier_string = 'mpc_uuid'
  @_secondary_name = 'Member'
  @_secondary_identifier_string = 'member_id'
  super
  @_is_voice_request = true
  if options.key? :multi_party_prefix
    @id = options[:multi_party_prefix] + '_' + @id
  elsif @id.split('_').size > 1
    nil
  else
    @id = 'uuid_' + @id
  end
  configure_secondary_resource_uri
end

Instance Method Details

#start_play_audio(url) ⇒ Object



357
358
359
360
361
362
# File 'lib/plivo/resources/multipartycalls.rb', line 357

def start_play_audio(url)
  valid_url?(:url, url, true)
  params = {}
  params[:url] = url unless url.nil?
  perform_action_apiresponse('Play', 'POST', params, true)
end

#stop_play_audioObject



364
365
366
# File 'lib/plivo/resources/multipartycalls.rb', line 364

def stop_play_audio
  perform_action_apiresponse('Play', 'DELETE')
end