Class: ZoomUs::SIPPhone

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ SIPPhone

Returns a new instance of SIPPhone.



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

def api_client
  @api_client
end

Instance Method Details

#create_sip_phone(opts = {}) ⇒ nil

Create SIP Phone Zoom’s Phone System Integration (PSI), also referred as SIP phones, enables an organization to leverage the Zoom client to complete a softphone registration to supported premise based PBX system. End users will have the ability to have softphone functionality within a single client while maintaining a comparable interface to Zoom Phone. Use this API to enable a user to use SIP phone.
Prerequisites: * Currently only supported on Cisco and Avaya PBX systems. * The account owner or account admin must first enable SIP Phone Integration by contacting the [Sales](zoom.us/contactsales) team.
Scope: ‘sip_phone:write:admin`

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :body (Body)

Returns:

  • (nil)


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

def create_sip_phone(opts = {})
  create_sip_phone_with_http_info(opts)
  nil
end

#create_sip_phone_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Create SIP Phone Zoom’s Phone System Integration (PSI), also referred as SIP phones, enables an organization to leverage the Zoom client to complete a softphone registration to supported premise based PBX system. End users will have the ability to have softphone functionality within a single client while maintaining a comparable interface to Zoom Phone. Use this API to enable a user to use SIP phone.&lt;br&gt;&lt;br&gt; Prerequisites: * Currently only supported on Cisco and Avaya PBX systems. * The account owner or account admin must first enable SIP Phone Integration by contacting the [Sales](zoom.us/contactsales) team.&lt;br&gt; Scope: &#x60;sip_phone:write:admin&#x60; &lt;br&gt;

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :body (Body)

Returns:

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

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

def create_sip_phone_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SIPPhone.create_sip_phone ...'
  end
  # resource path
  local_var_path = '/sip_phones'

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

#delete_sip_phone(phone_id, opts = {}) ⇒ nil

Delete SIP Phone Zoom’s Phone System Integration (PSI), also referred as SIP phones, enables an organization to leverage the Zoom client to complete a softphone registration to supported premise based PBX system. End users will have the ability to have softphone functionality within a single client while maintaining a comparable interface to Zoom Phone. Use this API to delete a specific SIP phone on a Zoom account.
Prerequisites: * Currently only supported on Cisco and Avaya PBX systems. * User must enable SIP Phone Integration by contacting the [Sales](zoom.us/contactsales) team.
Scope: ‘sip_phone:read:admin`

Parameters:

  • phone_id

    Unique Identifier of the SIP Phone. It can be retrieved from the List SIP Phones API.

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

    the optional parameters

Returns:

  • (nil)


76
77
78
79
# File 'lib/zoom_us/sip_phone.rb', line 76

def delete_sip_phone(phone_id, opts = {})
  delete_sip_phone_with_http_info(phone_id, opts)
  nil
end

#delete_sip_phone_with_http_info(phone_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete SIP Phone Zoom’s Phone System Integration (PSI), also referred as SIP phones, enables an organization to leverage the Zoom client to complete a softphone registration to supported premise based PBX system. End users will have the ability to have softphone functionality within a single client while maintaining a comparable interface to Zoom Phone. Use this API to delete a specific SIP phone on a Zoom account.&lt;br&gt;&lt;br&gt; Prerequisites: * Currently only supported on Cisco and Avaya PBX systems. * User must enable SIP Phone Integration by contacting the [Sales](zoom.us/contactsales) team.&lt;br&gt; Scope: &#x60;sip_phone:read:admin&#x60; &lt;br&gt;

Parameters:

  • phone_id

    Unique Identifier of the SIP Phone. It can be retrieved from the List SIP Phones API.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



86
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
# File 'lib/zoom_us/sip_phone.rb', line 86

def delete_sip_phone_with_http_info(phone_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SIPPhone.delete_sip_phone ...'
  end
  # verify the required parameter 'phone_id' is set
  if @api_client.config.client_side_validation && phone_id.nil?
    fail ArgumentError, "Missing the required parameter 'phone_id' when calling SIPPhone.delete_sip_phone"
  end
  # resource path
  local_var_path = '/sip_phones/{phoneId}'.sub('{' + 'phoneId' + '}', phone_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)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SIPPhone#delete_sip_phone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_sip_phones(opts = {}) ⇒ InlineResponse2001

List SIP Phones Zoom’s Phone System Integration (PSI), also referred as SIP phones, enables an organization to leverage the Zoom client to complete a softphone registration to supported premise based PBX system. End users will have the ability to have softphone functionality within a single client while maintaining a comparable interface to Zoom Phone. Use this API to list SIP phones on an account.
Prerequisites: * Currently only supported on Cisco and Avaya PBX systems. * User must enable SIP Phone Integration by contacting the [Sales](zoom.us/contactsales) team.
Scope: ‘sip_phone:read:admin`

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_number (Integer)

    The current page number of returned records. (default to 1)

  • :search_key (String)

    User name or email address of a user. If this parameter is provided, only the SIP phone system integration enabled for that specific user will be returned. Otherwise, all SIP phones on an account will be returned.

  • :page_size (Integer)

    The number of records returned within a single API call.

Returns:

  • (InlineResponse2001)


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

def list_sip_phones(opts = {})
  data, _status_code, _headers = list_sip_phones_with_http_info(opts)
  data
end

#list_sip_phones_with_http_info(opts = {}) ⇒ Array<(InlineResponse2001, Fixnum, Hash)>

List SIP Phones Zoom’s Phone System Integration (PSI), also referred as SIP phones, enables an organization to leverage the Zoom client to complete a softphone registration to supported premise based PBX system. End users will have the ability to have softphone functionality within a single client while maintaining a comparable interface to Zoom Phone. Use this API to list SIP phones on an account.&lt;br&gt;&lt;br&gt; Prerequisites: * Currently only supported on Cisco and Avaya PBX systems. * User must enable SIP Phone Integration by contacting the [Sales](zoom.us/contactsales) team.&lt;br&gt; Scope: &#x60;sip_phone:read:admin&#x60;&lt;br&gt; &lt;br&gt;

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_number (Integer)

    The current page number of returned records.

  • :search_key (String)

    User name or email address of a user. If this parameter is provided, only the SIP phone system integration enabled for that specific user will be returned. Otherwise, all SIP phones on an account will be returned.

  • :page_size (Integer)

    The number of records returned within a single API call.

Returns:

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

    InlineResponse2001 data, response status code and response headers



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
180
# File 'lib/zoom_us/sip_phone.rb', line 143

def list_sip_phones_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SIPPhone.list_sip_phones ...'
  end
  # resource path
  local_var_path = '/sip_phones'

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

#update_sip_phone(phone_id, opts = {}) ⇒ nil

Update SIP Phone Zoom’s Phone System Integration (PSI), also referred as SIP phones, enables an organization to leverage the Zoom client to complete a softphone registration to supported premise based PBX system. End users will have the ability to have softphone functionality within a single client while maintaining a comparable interface to Zoom Phone. Use this API to update information of a specific SIP Phone on a Zoom account.
Prerequisites: * Currently only supported on Cisco and Avaya PBX systems. * The account owner or account admin must first enable SIP Phone Integration by contacting the [Sales](zoom.us/contactsales) team.
Scope: ‘sip_phone:write:admin`

Parameters:

  • phone_id

    Unique Identifier of the SIP Phone. This can be retrieved from the List SIP Phones API.

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

    the optional parameters

Options Hash (opts):

  • :body (Body1)

Returns:

  • (nil)


187
188
189
190
# File 'lib/zoom_us/sip_phone.rb', line 187

def update_sip_phone(phone_id, opts = {})
  update_sip_phone_with_http_info(phone_id, opts)
  nil
end

#update_sip_phone_with_http_info(phone_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update SIP Phone Zoom’s Phone System Integration (PSI), also referred as SIP phones, enables an organization to leverage the Zoom client to complete a softphone registration to supported premise based PBX system. End users will have the ability to have softphone functionality within a single client while maintaining a comparable interface to Zoom Phone. Use this API to update information of a specific SIP Phone on a Zoom account.&lt;br&gt;&lt;br&gt; Prerequisites: * Currently only supported on Cisco and Avaya PBX systems. * The account owner or account admin must first enable SIP Phone Integration by contacting the [Sales](zoom.us/contactsales) team.&lt;br&gt; Scope: &#x60;sip_phone:write:admin&#x60; &lt;br&gt;

Parameters:

  • phone_id

    Unique Identifier of the SIP Phone. This can be retrieved from the List SIP Phones API.

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

    the optional parameters

Options Hash (opts):

  • :body (Body1)

Returns:

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

    nil, response status code and response headers



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
# File 'lib/zoom_us/sip_phone.rb', line 198

def update_sip_phone_with_http_info(phone_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SIPPhone.update_sip_phone ...'
  end
  # verify the required parameter 'phone_id' is set
  if @api_client.config.client_side_validation && phone_id.nil?
    fail ArgumentError, "Missing the required parameter 'phone_id' when calling SIPPhone.update_sip_phone"
  end
  # resource path
  local_var_path = '/sip_phones/{phoneId}'.sub('{' + 'phoneId' + '}', phone_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)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SIPPhone#update_sip_phone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end