Class: ZoomUs::PhoneBlockedList

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ PhoneBlockedList

Returns a new instance of PhoneBlockedList.



19
20
21
# File 'lib/zoom_us/phone_blocked_list.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_blocked_list.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#add_anumber_to_blocked_list(opts = {}) ⇒ InlineResponse20125

Create a Blocked List A Zoom account owner or a user with admin privilege can block phone numbers for phone users in an account. Blocked numbers can be inbound (numbers will be blocked from calling in) and outbound (phone users in your account won’t be able to dial those numbers). Blocked callers will hear a generic message stating that the person they are calling is not available.
Use this API to create a blocked list and add a number to that blocked list.
Prerequisites: * Pro or higher account plan with Zoom phone license
Scope: ‘phone:write:admin`

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :body (Body76)

Returns:

  • (InlineResponse20125)


27
28
29
30
# File 'lib/zoom_us/phone_blocked_list.rb', line 27

def add_anumber_to_blocked_list(opts = {})
  data, _status_code, _headers = add_anumber_to_blocked_list_with_http_info(opts)
  data
end

#add_anumber_to_blocked_list_with_http_info(opts = {}) ⇒ Array<(InlineResponse20125, Fixnum, Hash)>

Create a Blocked List A Zoom account owner or a user with admin privilege can block phone numbers for phone users in an account. Blocked numbers can be inbound (numbers will be blocked from calling in) and outbound (phone users in your account won&#39;t be able to dial those numbers). Blocked callers will hear a generic message stating that the person they are calling is not available.&lt;br&gt;Use this API to create a blocked list and add a number to that blocked list.&lt;br&gt; Prerequisites: * Pro or higher account plan with Zoom phone license&lt;br&gt; Scope: &#x60;phone:write:admin&#x60;&lt;br&gt;

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :body (Body76)

Returns:

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

    InlineResponse20125 data, response status code and response headers



37
38
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
# File 'lib/zoom_us/phone_blocked_list.rb', line 37

def add_anumber_to_blocked_list_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhoneBlockedListApi.add_anumber_to_blocked_list ...'
  end
  # resource path
  local_var_path = '/phone/blocked_list'

  # 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 => 'InlineResponse20125')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PhoneBlockedListApi#add_anumber_to_blocked_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_a_blocked_list(blocked_list_id, opts = {}) ⇒ Object

Delete a Blocked List A Zoom account owner or a user with admin privilege can block phone numbers for phone users in an account. Blocked numbers can be inbound (numbers will be blocked from calling in) and outbound (phone users in your account won’t be able to dial those numbers).
Use this API to delete a blocked list and therefore removing the associated number from the blocked list. The number will be unblocked after the deletion.
Prerequisites: * Pro or higher account plan with Zoom phone license
Scope: ‘phone:write:admin`

Parameters:

  • blocked_list_id

    Unique Identifier of the blocked list. This can be retrieved from the List Blocked List API.

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

    the optional parameters

Returns:

  • (Object)


77
78
79
80
# File 'lib/zoom_us/phone_blocked_list.rb', line 77

def delete_a_blocked_list(blocked_list_id, opts = {})
  data, _status_code, _headers = delete_a_blocked_list_with_http_info(blocked_list_id, opts)
  data
end

#delete_a_blocked_list_with_http_info(blocked_list_id, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Delete a Blocked List A Zoom account owner or a user with admin privilege can block phone numbers for phone users in an account. Blocked numbers can be inbound (numbers will be blocked from calling in) and outbound (phone users in your account won&#39;t be able to dial those numbers). &lt;br&gt;Use this API to delete a blocked list and therefore removing the associated number from the blocked list. The number will be unblocked after the deletion.&lt;br&gt; Prerequisites: * Pro or higher account plan with Zoom phone license&lt;br&gt; Scope: &#x60;phone:write:admin&#x60;&lt;br&gt;

Parameters:

  • blocked_list_id

    Unique Identifier of the blocked list. This can be retrieved from the List Blocked List API.

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



87
88
89
90
91
92
93
94
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
# File 'lib/zoom_us/phone_blocked_list.rb', line 87

def delete_a_blocked_list_with_http_info(blocked_list_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhoneBlockedListApi.delete_a_blocked_list ...'
  end
  # verify the required parameter 'blocked_list_id' is set
  if @api_client.config.client_side_validation && blocked_list_id.nil?
    fail ArgumentError, "Missing the required parameter 'blocked_list_id' when calling PhoneBlockedListApi.delete_a_blocked_list"
  end
  # resource path
  local_var_path = '/phone/blocked_list/{blockedListId}'.sub('{' + 'blockedListId' + '}', blocked_list_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: PhoneBlockedListApi#delete_a_blocked_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_a_blocked_list(blocked_list_id, opts = {}) ⇒ InlineResponse20098

Get Blocked List Details A Zoom account owner or a user with admin privilege can block phone numbers for phone users in an account. Blocked numbers can be inbound (numbers will be blocked from calling in) and outbound (phone users in your account won’t be able to dial those numbers). Blocked callers will hear a generic message stating that the person they are calling is not available.
Use this API to get information about a specific blocked list.
Prerequisites: * Pro or higher account plan with Zoom phone license
Scope: ‘phone:read:admin`

Parameters:

  • blocked_list_id

    Unique Identifier of the blocked list.

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

    the optional parameters

Returns:

  • (InlineResponse20098)


131
132
133
134
# File 'lib/zoom_us/phone_blocked_list.rb', line 131

def get_a_blocked_list(blocked_list_id, opts = {})
  data, _status_code, _headers = get_a_blocked_list_with_http_info(blocked_list_id, opts)
  data
end

#get_a_blocked_list_with_http_info(blocked_list_id, opts = {}) ⇒ Array<(InlineResponse20098, Fixnum, Hash)>

Get Blocked List Details A Zoom account owner or a user with admin privilege can block phone numbers for phone users in an account. Blocked numbers can be inbound (numbers will be blocked from calling in) and outbound (phone users in your account won&#39;t be able to dial those numbers). Blocked callers will hear a generic message stating that the person they are calling is not available.&lt;br&gt;Use this API to get information about a specific blocked list.&lt;br&gt; Prerequisites: * Pro or higher account plan with Zoom phone license&lt;br&gt; Scope: &#x60;phone:read:admin&#x60;&lt;br&gt;

Parameters:

  • blocked_list_id

    Unique Identifier of the blocked list.

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

    the optional parameters

Returns:

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

    InlineResponse20098 data, response status code and response headers



141
142
143
144
145
146
147
148
149
150
151
152
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
# File 'lib/zoom_us/phone_blocked_list.rb', line 141

def get_a_blocked_list_with_http_info(blocked_list_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhoneBlockedListApi.get_a_blocked_list ...'
  end
  # verify the required parameter 'blocked_list_id' is set
  if @api_client.config.client_side_validation && blocked_list_id.nil?
    fail ArgumentError, "Missing the required parameter 'blocked_list_id' when calling PhoneBlockedListApi.get_a_blocked_list"
  end
  # resource path
  local_var_path = '/phone/blocked_list/{blockedListId}'.sub('{' + 'blockedListId' + '}', blocked_list_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(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse20098')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PhoneBlockedListApi#get_a_blocked_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_blocked_list(opts = {}) ⇒ InlineResponse20097

List Blocked Lists A Zoom account owner or a user with admin privilege can block phone numbers for phone users in an account. Blocked numbers can be inbound (numbers will be blocked from calling in) and outbound (phone users in your account won’t be able to dial those numbers). Blocked callers will hear a generic message stating that the person they are calling is not available.
Use this API to list all the blocked lists in an acccount.
Prerequisites: * Pro or higher account plan with Zoom phone license
Scope: ‘phone:read:admin`

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :next_page_token (String)

    The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes.

  • :page_size (Integer)

    The total number of records returned from a single API call. (default to 30)

Returns:

  • (InlineResponse20097)


186
187
188
189
# File 'lib/zoom_us/phone_blocked_list.rb', line 186

def list_blocked_list(opts = {})
  data, _status_code, _headers = list_blocked_list_with_http_info(opts)
  data
end

#list_blocked_list_with_http_info(opts = {}) ⇒ Array<(InlineResponse20097, Fixnum, Hash)>

List Blocked Lists A Zoom account owner or a user with admin privilege can block phone numbers for phone users in an account. Blocked numbers can be inbound (numbers will be blocked from calling in) and outbound (phone users in your account won&#39;t be able to dial those numbers). Blocked callers will hear a generic message stating that the person they are calling is not available.&lt;br&gt;Use this API to list all the blocked lists in an acccount.&lt;br&gt; Prerequisites: * Pro or higher account plan with Zoom phone license&lt;br&gt; Scope: &#x60;phone:read:admin&#x60;&lt;br&gt;

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :next_page_token (String)

    The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes.

  • :page_size (Integer)

    The total number of records returned from a single API call.

Returns:

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

    InlineResponse20097 data, response status code and response headers



197
198
199
200
201
202
203
204
205
206
207
208
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
# File 'lib/zoom_us/phone_blocked_list.rb', line 197

def list_blocked_list_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhoneBlockedListApi.list_blocked_list ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling PhoneBlockedListApi.list_blocked_list, must be smaller than or equal to 100.'
  end

  # resource path
  local_var_path = '/phone/blocked_list'

  # query parameters
  query_params = {}
  query_params[:'next_page_token'] = opts[:'next_page_token'] if !opts[:'next_page_token'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?

  # 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(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse20097')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PhoneBlockedListApi#list_blocked_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_blocked_list(blocked_list_id, opts = {}) ⇒ Object

Update a Blocked List A Zoom account owner or a user with admin privilege can block phone numbers for phone users in an account. Blocked numbers can be inbound (numbers will be blocked from calling in) and outbound (phone users in your account won’t be able to dial those numbers). Blocked callers will hear a generic message stating that the person they are calling is not available.
Use this API to update information on the blocked list.
Prerequisites: * Pro or higher account plan with Zoom phone license
Scope: ‘phone:write:admin`

Parameters:

  • blocked_list_id

    Unique Identifier for the blocked list.

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

    the optional parameters

Options Hash (opts):

  • :body (Body77)

Returns:

  • (Object)


244
245
246
247
# File 'lib/zoom_us/phone_blocked_list.rb', line 244

def update_blocked_list(blocked_list_id, opts = {})
  data, _status_code, _headers = update_blocked_list_with_http_info(blocked_list_id, opts)
  data
end

#update_blocked_list_with_http_info(blocked_list_id, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Update a Blocked List A Zoom account owner or a user with admin privilege can block phone numbers for phone users in an account. Blocked numbers can be inbound (numbers will be blocked from calling in) and outbound (phone users in your account won&#39;t be able to dial those numbers). Blocked callers will hear a generic message stating that the person they are calling is not available.&lt;br&gt;Use this API to update information on the blocked list.&lt;br&gt; Prerequisites: * Pro or higher account plan with Zoom phone license&lt;br&gt; Scope: &#x60;phone:write:admin&#x60;&lt;br&gt;

Parameters:

  • blocked_list_id

    Unique Identifier for the blocked list.

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

    the optional parameters

Options Hash (opts):

  • :body (Body77)

Returns:

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

    Object data, response status code and response headers



255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
# File 'lib/zoom_us/phone_blocked_list.rb', line 255

def update_blocked_list_with_http_info(blocked_list_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhoneBlockedListApi.update_blocked_list ...'
  end
  # verify the required parameter 'blocked_list_id' is set
  if @api_client.config.client_side_validation && blocked_list_id.nil?
    fail ArgumentError, "Missing the required parameter 'blocked_list_id' when calling PhoneBlockedListApi.update_blocked_list"
  end
  # resource path
  local_var_path = '/phone/blocked_list/{blockedListId}'.sub('{' + 'blockedListId' + '}', blocked_list_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: PhoneBlockedListApi#update_blocked_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end