Class: ZoomUs::PhoneAutoReceptionists

Inherits:
Object
  • Object
show all
Defined in:
lib/zoom_us/phone_auto_receptionists.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ PhoneAutoReceptionists

Returns a new instance of PhoneAutoReceptionists.



19
20
21
# File 'lib/zoom_us/phone_auto_receptionists.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/zoom_us/phone_auto_receptionists.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#assign_phone_numbers_auto_receptionist(auto_receptionist_id, opts = {}) ⇒ Object

Assign Phone Numbers Assign available phone numbers to an [auto receptionist](support.zoom.us/hc/en-us/articles/360021121312-Managing-Auto-Receptionists-and-Interactive-Voice-Response-IVR-). The available numbers can be retrieved using the List Phone Numbers API with ‘type` query parameter set to "unassigned". Prerequisites: * Pro or higher account plan with Zoom Phone License * Account owner or admin permissions
Scopes: `phone:write:admin`

Parameters:

Options Hash (opts):

  • :body (Body73)

Returns:

  • (Object)


28
29
30
31
# File 'lib/zoom_us/phone_auto_receptionists.rb', line 28

def assign_phone_numbers_auto_receptionist(auto_receptionist_id, opts = {})
  data, _status_code, _headers = assign_phone_numbers_auto_receptionist_with_http_info(auto_receptionist_id, opts)
  data
end

#assign_phone_numbers_auto_receptionist_with_http_info(auto_receptionist_id, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Assign Phone Numbers Assign available phone numbers to an [auto receptionist](support.zoom.us/hc/en-us/articles/360021121312-Managing-Auto-Receptionists-and-Interactive-Voice-Response-IVR-). The available numbers can be retrieved using the List Phone Numbers API with &#x60;type&#x60; query parameter set to &quot;unassigned&quot;. Prerequisites: * Pro or higher account plan with Zoom Phone License * Account owner or admin permissions&lt;br&gt; Scopes: &#x60;phone:write:admin&#x60;&lt;br&gt;

Parameters:

Options Hash (opts):

  • :body (Body73)

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/zoom_us/phone_auto_receptionists.rb', line 39

def assign_phone_numbers_auto_receptionist_with_http_info(auto_receptionist_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhoneAutoReceptionistsApi.assign_phone_numbers_auto_receptionist ...'
  end
  # verify the required parameter 'auto_receptionist_id' is set
  if @api_client.config.client_side_validation && auto_receptionist_id.nil?
    fail ArgumentError, "Missing the required parameter 'auto_receptionist_id' when calling PhoneAutoReceptionistsApi.assign_phone_numbers_auto_receptionist"
  end
  # resource path
  local_var_path = '/phone/auto_receptionists/{autoReceptionistId}/phone_numbers'.sub('{' + 'autoReceptionistId' + '}', auto_receptionist_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'body'])
  auth_names = ['OAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PhoneAutoReceptionistsApi#assign_phone_numbers_auto_receptionist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#unassign_a_phone_num_auto_receptionist(auto_receptionist_id, phone_number_id, opts = {}) ⇒ Object

Unassign a Phone Number Unassign a specific phone number that was previously assigned to an [auto receptionist](support.zoom.us/hc/en-us/articles/360021121312-Managing-Auto-Receptionists-and-Interactive-Voice-Response-IVR-). Prerequisites: * Pro or higher account plan with Zoom Phone License * Account owner or admin permissions
Scopes: ‘phone:write:admin`

Parameters:

  • auto_receptionist_id

    Unique identifier of the auto receptionist. This can be retrieved from the List Phone Sites API.

  • phone_number_id

    Unique Identifier of the phone number or provide the actual phone number in e164 format (example: +19995550123).

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


84
85
86
87
# File 'lib/zoom_us/phone_auto_receptionists.rb', line 84

def unassign_a_phone_num_auto_receptionist(auto_receptionist_id, phone_number_id, opts = {})
  data, _status_code, _headers = unassign_a_phone_num_auto_receptionist_with_http_info(auto_receptionist_id, phone_number_id, opts)
  data
end

#unassign_a_phone_num_auto_receptionist_with_http_info(auto_receptionist_id, phone_number_id, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Unassign a Phone Number Unassign a specific phone number that was previously assigned to an [auto receptionist](support.zoom.us/hc/en-us/articles/360021121312-Managing-Auto-Receptionists-and-Interactive-Voice-Response-IVR-). Prerequisites: * Pro or higher account plan with Zoom Phone License * Account owner or admin permissions&lt;br&gt; Scopes: &#x60;phone:write:admin&#x60;&lt;br&gt;

Parameters:

  • auto_receptionist_id

    Unique identifier of the auto receptionist. This can be retrieved from the List Phone Sites API.

  • phone_number_id

    Unique Identifier of the phone number or provide the actual phone number in e164 format (example: +19995550123).

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/zoom_us/phone_auto_receptionists.rb', line 95

def unassign_a_phone_num_auto_receptionist_with_http_info(auto_receptionist_id, phone_number_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhoneAutoReceptionistsApi.unassign_a_phone_num_auto_receptionist ...'
  end
  # verify the required parameter 'auto_receptionist_id' is set
  if @api_client.config.client_side_validation && auto_receptionist_id.nil?
    fail ArgumentError, "Missing the required parameter 'auto_receptionist_id' when calling PhoneAutoReceptionistsApi.unassign_a_phone_num_auto_receptionist"
  end
  # verify the required parameter 'phone_number_id' is set
  if @api_client.config.client_side_validation && phone_number_id.nil?
    fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling PhoneAutoReceptionistsApi.unassign_a_phone_num_auto_receptionist"
  end
  # resource path
  local_var_path = '/phone/auto_receptionists/{autoReceptionistId}/phone_numbers/{phoneNumberId}'.sub('{' + 'autoReceptionistId' + '}', auto_receptionist_id.to_s).sub('{' + 'phoneNumberId' + '}', phone_number_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PhoneAutoReceptionistsApi#unassign_a_phone_num_auto_receptionist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#unassign_all_phone_nums_auto_receptionist(auto_receptionist_id, opts = {}) ⇒ Object

Unassign all Phone Numbers Unassign all phone numbers that were previously assigned to an [auto receptionist](support.zoom.us/hc/en-us/articles/360021121312-Managing-Auto-Receptionists-and-Interactive-Voice-Response-IVR-). Prerequisites: * Pro or higher account plan with Zoom Phone License * Account owner or admin permissions
Scopes: ‘phone:write:admin`

Parameters:

  • auto_receptionist_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


143
144
145
146
# File 'lib/zoom_us/phone_auto_receptionists.rb', line 143

def unassign_all_phone_nums_auto_receptionist(auto_receptionist_id, opts = {})
  data, _status_code, _headers = unassign_all_phone_nums_auto_receptionist_with_http_info(auto_receptionist_id, opts)
  data
end

#unassign_all_phone_nums_auto_receptionist_with_http_info(auto_receptionist_id, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Unassign all Phone Numbers Unassign all phone numbers that were previously assigned to an [auto receptionist](support.zoom.us/hc/en-us/articles/360021121312-Managing-Auto-Receptionists-and-Interactive-Voice-Response-IVR-). Prerequisites: * Pro or higher account plan with Zoom Phone License * Account owner or admin permissions&lt;br&gt; Scopes: &#x60;phone:write:admin&#x60;&lt;br&gt;

Parameters:

  • auto_receptionist_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# File 'lib/zoom_us/phone_auto_receptionists.rb', line 153

def unassign_all_phone_nums_auto_receptionist_with_http_info(auto_receptionist_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhoneAutoReceptionistsApi.unassign_all_phone_nums_auto_receptionist ...'
  end
  # verify the required parameter 'auto_receptionist_id' is set
  if @api_client.config.client_side_validation && auto_receptionist_id.nil?
    fail ArgumentError, "Missing the required parameter 'auto_receptionist_id' when calling PhoneAutoReceptionistsApi.unassign_all_phone_nums_auto_receptionist"
  end
  # resource path
  local_var_path = '/phone/auto_receptionists/{autoReceptionistId}/phone_numbers'.sub('{' + 'autoReceptionistId' + '}', auto_receptionist_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PhoneAutoReceptionistsApi#unassign_all_phone_nums_auto_receptionist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_auto_receptionist(auto_receptionist_id, opts = {}) ⇒ Object

Update Auto Receptionist Details An auto receptionist answers calls with a personalized recording and routes calls to a phone user, call queue, common area phone, or voicemail. An auto receptionist can also be set up so that it routes calls to an interactive voice response (IVR) system to allow callers to select the routing options.
Use this API to [change information](support.zoom.us/hc/en-us/articles/360021121312-Managing-Auto-Receptionists-and-Interactive-Voice-Response-IVR-#h_1d5ffc56-6ba3-4ce5-9d86-4a1a1ee743f3) such as display name and extension number assigned to the main auto receptionist.
Prerequisites:
* Pro or higher account with Zoom Phone license.
Scopes: ‘phone:write:admin`

Parameters:

Options Hash (opts):

  • :body (Body72)

Returns:

  • (Object)


198
199
200
201
# File 'lib/zoom_us/phone_auto_receptionists.rb', line 198

def update_auto_receptionist(auto_receptionist_id, opts = {})
  data, _status_code, _headers = update_auto_receptionist_with_http_info(auto_receptionist_id, opts)
  data
end

#update_auto_receptionist_with_http_info(auto_receptionist_id, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Update Auto Receptionist Details An auto receptionist answers calls with a personalized recording and routes calls to a phone user, call queue, common area phone, or voicemail. An auto receptionist can also be set up so that it routes calls to an interactive voice response (IVR) system to allow callers to select the routing options.&lt;br&gt; Use this API to [change information](support.zoom.us/hc/en-us/articles/360021121312-Managing-Auto-Receptionists-and-Interactive-Voice-Response-IVR-#h_1d5ffc56-6ba3-4ce5-9d86-4a1a1ee743f3) such as display name and extension number assigned to the main auto receptionist.&lt;br&gt;&lt;br&gt; Prerequisites:&lt;br&gt; * Pro or higher account with Zoom Phone license.&lt;br&gt; Scopes: &#x60;phone:write:admin&#x60; &lt;br&gt;

Parameters:

Options Hash (opts):

  • :body (Body72)

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
# File 'lib/zoom_us/phone_auto_receptionists.rb', line 209

def update_auto_receptionist_with_http_info(auto_receptionist_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhoneAutoReceptionistsApi.update_auto_receptionist ...'
  end
  # verify the required parameter 'auto_receptionist_id' is set
  if @api_client.config.client_side_validation && auto_receptionist_id.nil?
    fail ArgumentError, "Missing the required parameter 'auto_receptionist_id' when calling PhoneAutoReceptionistsApi.update_auto_receptionist"
  end
  # resource path
  local_var_path = '/phone/auto_receptionists/{autoReceptionistId}'.sub('{' + 'autoReceptionistId' + '}', auto_receptionist_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'body'])
  auth_names = ['OAuth']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PhoneAutoReceptionistsApi#update_auto_receptionist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end