Class: ZoomUs::PhoneSite

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ PhoneSite

Returns a new instance of PhoneSite.



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

def api_client
  @api_client
end

Instance Method Details

#create_phone_site(opts = {}) ⇒ InlineResponse204

Create a Phone Site Sites allow you to organize Zoom Phone users in your organization. Use this API to create a [Site](support.zoom.us/hc/en-us/articles/360020809672).
Prerequisites:
* Multiple Sites must be [enabled](support.zoom.us/hc/en-us/articles/360020809672-Managing-Multiple-Sites#h_05c88e35-1593-491f-b1a8-b7139a75dc15). * Pro or a higher account with Zoom Phone enabled. Scope: ‘phone:write:admin`

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :body (Body3)

Returns:

  • (InlineResponse204)


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

def create_phone_site(opts = {})
  data, _status_code, _headers = create_phone_site_with_http_info(opts)
  data
end

#create_phone_site_with_http_info(opts = {}) ⇒ Array<(InlineResponse204, Fixnum, Hash)>

Create a Phone Site Sites allow you to organize Zoom Phone users in your organization. Use this API to create a [Site](support.zoom.us/hc/en-us/articles/360020809672).&lt;br&gt; Prerequisites:&lt;br&gt; * Multiple Sites must be [enabled](support.zoom.us/hc/en-us/articles/360020809672-Managing-Multiple-Sites#h_05c88e35-1593-491f-b1a8-b7139a75dc15). * Pro or a higher account with Zoom Phone enabled. Scope: &#x60;phone:write:admin&#x60;&lt;br&gt;

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :body (Body3)

Returns:

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

    InlineResponse204 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_site.rb', line 37

def create_phone_site_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhoneSiteApi.create_phone_site ...'
  end
  # resource path
  local_var_path = '/phone/sites'

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

#delete_phone_site(site_id, transfer_site_id, opts = {}) ⇒ Object

Delete a Phone Site Sites allow you to organize Zoom Phone users in your organization. Use this API to delete a specific [site](support.zoom.us/hc/en-us/articles/360020809672) in a Zoom account. To delete a site, in the query parameter, you must provide the Site ID of another site where the assets of current site (users, numbers and phones) can be transferred to. You cannot use this API to delete the main site. Prerequisites:
* Account must have a Pro or a higher plan with Zoom Phone license. * [Multiple Sites](support.zoom.us/hc/en-us/articles/360020809672-Managing-Multiple-Sites) must be enabled.
Scope: ‘phone:write:admin`

Parameters:

  • site_id

    Unique Identifier of the Site.

  • transfer_site_id

    The Site ID of another site where the assets of the current site (users, numbers and phones) can be transferred to.

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

    the optional parameters

Returns:

  • (Object)


78
79
80
81
# File 'lib/zoom_us/phone_site.rb', line 78

def delete_phone_site(site_id, transfer_site_id, opts = {})
  data, _status_code, _headers = delete_phone_site_with_http_info(site_id, transfer_site_id, opts)
  data
end

#delete_phone_site_with_http_info(site_id, transfer_site_id, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Delete a Phone Site Sites allow you to organize Zoom Phone users in your organization. Use this API to delete a specific [site](support.zoom.us/hc/en-us/articles/360020809672) in a Zoom account. To delete a site, in the query parameter, you must provide the Site ID of another site where the assets of current site (users, numbers and phones) can be transferred to. You cannot use this API to delete the main site. Prerequisites: &lt;br&gt; * Account must have a Pro or a higher plan with Zoom Phone license. * [Multiple Sites](support.zoom.us/hc/en-us/articles/360020809672-Managing-Multiple-Sites) must be enabled.&lt;br&gt; Scope: &#x60;phone:write:admin&#x60; &lt;br&gt;

Parameters:

  • site_id

    Unique Identifier of the Site.

  • transfer_site_id

    The Site ID of another site where the assets of the current site (users, numbers and phones) can be transferred to.

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



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
126
127
128
129
130
131
132
# File 'lib/zoom_us/phone_site.rb', line 89

def delete_phone_site_with_http_info(site_id, transfer_site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhoneSiteApi.delete_phone_site ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling PhoneSiteApi.delete_phone_site"
  end
  # verify the required parameter 'transfer_site_id' is set
  if @api_client.config.client_side_validation && transfer_site_id.nil?
    fail ArgumentError, "Missing the required parameter 'transfer_site_id' when calling PhoneSiteApi.delete_phone_site"
  end
  # resource path
  local_var_path = '/phone/sites/{siteId}'.sub('{' + 'siteId' + '}', site_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'transfer_site_id'] = transfer_site_id

  # 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: PhoneSiteApi#delete_phone_site\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_a_site(site_id, opts = {}) ⇒ InlineResponse2004

Get Phone Site Details Sites allow you to organize Zoom Phone users in your organization. Use this API to get information about a specific [site](support.zoom.us/hc/en-us/articles/360020809672). Prerequisites:
* Account must have a Pro or a higher plan with Zoom Phone license. * Multiple Sites must be [enabled](support.zoom.us/hc/en-us/articles/360020809672-Managing-Multiple-Sites#h_05c88e35-1593-491f-b1a8-b7139a75dc15).
Scope: ‘phone:read:admin`

Parameters:

  • site_id

    Unique Identifier of the Site.

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

    the optional parameters

Returns:

  • (InlineResponse2004)


138
139
140
141
# File 'lib/zoom_us/phone_site.rb', line 138

def get_a_site(site_id, opts = {})
  data, _status_code, _headers = get_a_site_with_http_info(site_id, opts)
  data
end

#get_a_site_with_http_info(site_id, opts = {}) ⇒ Array<(InlineResponse2004, Fixnum, Hash)>

Get Phone Site Details Sites allow you to organize Zoom Phone users in your organization. Use this API to get information about a specific [site](support.zoom.us/hc/en-us/articles/360020809672). Prerequisites: &lt;br&gt; * Account must have a Pro or a higher plan with Zoom Phone license. * Multiple Sites must be [enabled](support.zoom.us/hc/en-us/articles/360020809672-Managing-Multiple-Sites#h_05c88e35-1593-491f-b1a8-b7139a75dc15).&lt;br&gt; Scope: &#x60;phone:read:admin&#x60;&lt;br&gt;

Parameters:

  • site_id

    Unique Identifier of the Site.

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

    the optional parameters

Returns:

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

    InlineResponse2004 data, response status code and response headers



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
180
181
182
183
184
185
186
# File 'lib/zoom_us/phone_site.rb', line 148

def get_a_site_with_http_info(site_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhoneSiteApi.get_a_site ...'
  end
  # verify the required parameter 'site_id' is set
  if @api_client.config.client_side_validation && site_id.nil?
    fail ArgumentError, "Missing the required parameter 'site_id' when calling PhoneSiteApi.get_a_site"
  end
  # resource path
  local_var_path = '/phone/sites/{siteId}'.sub('{' + 'siteId' + '}', site_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 => 'InlineResponse2004')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PhoneSiteApi#get_a_site\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_phone_sites(opts = {}) ⇒ InlineResponse2003

List Phone Sites Sites allow you to organize Zoom Phone users in your organization. Use this API to list all the [sites](support.zoom.us/hc/en-us/articles/360020809672) that have been created for an account.
Prerequisites:
* Multiple Sites must be [enabled](support.zoom.us/hc/en-us/articles/360020809672-Managing-Multiple-Sites#h_05c88e35-1593-491f-b1a8-b7139a75dc15). * Pro or a higher account with Zoom Phone enabled. Scope: ‘phone:read:admin`

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

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

  • :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.

Returns:

  • (InlineResponse2003)


193
194
195
196
# File 'lib/zoom_us/phone_site.rb', line 193

def list_phone_sites(opts = {})
  data, _status_code, _headers = list_phone_sites_with_http_info(opts)
  data
end

#list_phone_sites_with_http_info(opts = {}) ⇒ Array<(InlineResponse2003, Fixnum, Hash)>

List Phone Sites Sites allow you to organize Zoom Phone users in your organization. Use this API to list all the [sites](support.zoom.us/hc/en-us/articles/360020809672) that have been created for an account.&lt;br&gt; Prerequisites:&lt;br&gt; * Multiple Sites must be [enabled](support.zoom.us/hc/en-us/articles/360020809672-Managing-Multiple-Sites#h_05c88e35-1593-491f-b1a8-b7139a75dc15). * Pro or a higher account with Zoom Phone enabled. Scope: &#x60;phone:read:admin&#x60;&lt;br&gt;

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of records returned within a single API call.

  • :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.

Returns:

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

    InlineResponse2003 data, response status code and response headers



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
238
239
240
241
242
243
244
# File 'lib/zoom_us/phone_site.rb', line 204

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

  # resource path
  local_var_path = '/phone/sites'

  # query parameters
  query_params = {}
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'next_page_token'] = opts[:'next_page_token'] if !opts[:'next_page_token'].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 => 'InlineResponse2003')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PhoneSiteApi#list_phone_sites\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_site_details(site_id, opts = {}) ⇒ Object

Update Phone Site Details Sites allow you to organize Zoom Phone users in your organization. Use this API to update information about a specific [site](support.zoom.us/hc/en-us/articles/360020809672). Prerequisites:
* Account must have a Pro or a higher plan with Zoom Phone license. * Scope: ‘phone:write:admin`

Parameters:

  • site_id

    Unique Identifier of the Site.

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

    the optional parameters

Options Hash (opts):

  • :body (Body4)

Returns:

  • (Object)


251
252
253
254
# File 'lib/zoom_us/phone_site.rb', line 251

def update_site_details(site_id, opts = {})
  data, _status_code, _headers = update_site_details_with_http_info(site_id, opts)
  data
end

#update_site_details_with_http_info(site_id, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Update Phone Site Details Sites allow you to organize Zoom Phone users in your organization. Use this API to update information about a specific [site](support.zoom.us/hc/en-us/articles/360020809672). Prerequisites: &lt;br&gt; * Account must have a Pro or a higher plan with Zoom Phone license. * Scope: &#x60;phone:write:admin&#x60;&lt;br&gt;

Parameters:

  • site_id

    Unique Identifier of the Site.

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

    the optional parameters

Options Hash (opts):

  • :body (Body4)

Returns:

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

    Object data, response status code and response headers



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
294
295
296
297
298
299
300
# File 'lib/zoom_us/phone_site.rb', line 262

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