Class: WavixApi::V1::Mydids::UpdateDestinations
- Inherits:
-
Object
- Object
- WavixApi::V1::Mydids::UpdateDestinations
- Includes:
- BaseMethods
- Defined in:
- lib/wavix_api/v1/mydids/update_destinations.rb
Constant Summary
Constants included from BaseMethods
BaseMethods::AVAILABLE_TRANSCRIPTION_LANGUAGES, BaseMethods::BASE_DATE_FORMAT, BaseMethods::DEFAULT_HEADERS, BaseMethods::IP_REGEXP, BaseMethods::LIST_OF_DIGITS_REGEXP, BaseMethods::ONLY_DIGITS_REGEXP, BaseMethods::ONLY_ID_SCHEMA, BaseMethods::ONLY_UUID_SCHEMA, BaseMethods::PAGINATION_SCHEMA
Instance Attribute Summary
Attributes included from BaseMethods
Class Method Summary collapse
Methods included from BaseMethods
#call, #delete, #download, #file_extention, #format_file, #get, #initialize, #patch, #post, #put, #raise_error, #stringify_dates!, #validate!, #validate_dates!
Class Method Details
.call(params = {}) ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/wavix_api/v1/mydids/update_destinations.rb', line 48 def call(params = {}) instance = new(params) instance.validate! if instance.params[:ids].nil? && instance.params[:dids].nil? instance.raise_error('Either dids or ids is required') end if !instance.params[:ids].nil? && !instance.params[:dids].nil? instance.raise_error('Either dids or ids is supported') end if instance.params[:destinations].nil? && instance.params[:sms_relay_url].nil? instance.raise_error( "Either 'destinations' or 'sms_relay_url' or both must be specified" ) end instance.post('v1/mydids/update-destinations') end |