Class: Plivo::Resources::ApplicationInterface

Inherits:
Base::ResourceInterface show all
Defined in:
lib/plivo/resources/applications.rb

Constant Summary

Constants included from Utils

Utils::TYPE_WHITELIST

Instance Method Summary collapse

Methods included from Utils

GetSortedQueryParamString?, compute_signatureV3?, expected_type?, expected_value?, generate_url?, getMapFromQueryString?, is_one_among_string_url?, multi_valid_param?, raise_invalid_request, valid_account?, valid_date_format?, valid_mainaccount?, valid_multiple_destination_integers?, valid_multiple_destination_nos?, valid_param?, valid_range?, valid_signature?, valid_signatureV3?, valid_subaccount?, valid_url?

Constructor Details

#initialize(client, resource_list_json = nil) ⇒ ApplicationInterface

Returns a new instance of ApplicationInterface.



109
110
111
112
113
114
115
# File 'lib/plivo/resources/applications.rb', line 109

def initialize(client, resource_list_json = nil)
  @_name = 'Application'
  @_resource_type = Application
  @_identifier_string = 'app_id'
  super
  @_is_voice_request = true
end

Instance Method Details

#create(app_name, options = nil) ⇒ Application

Returns Application.

Parameters:

  • app_name (String)
  • options (Hash) (defaults to: nil)

Options Hash (options):

  • :answer_url (String)
    • The URL invoked by Plivo when a call executes this application.

  • :answer_method (String)
    • The method used to call the answer_url. Defaults to POST.

  • :hangup_url (String)
    • The URL that will be notified by Plivo when the call hangs up. Defaults to answer_url.

  • :hangup_method (String)
    • The method used to call the hangup_url. Defaults to POST.

  • :fallback_answer_url (String)
    • Invoked by Plivo only if answer_url is unavailable or the XML response is invalid. Should contain a XML response.

  • :fallback_method (String)
    • The method used to call the fallback_answer_url. Defaults to POST.

  • :message_url (String)
    • The URL that will be notified by Plivo when an inbound message is received. Defaults not set.

  • :message_method (String)
    • The method used to call the message_url. Defaults to POST.

  • :default_number_app (Boolean)
    • If set to true, this parameter ensures that newly created numbers, which don’t have an app_id, point to this application.

  • :default_endpoint_app (Boolean)
    • If set to true, this parameter ensures that newly created endpoints, which don’t have an app_id, point to this application.

  • :subaccount (String)
    • Id of the subaccount, in case only subaccount applications are needed.

  • :log_incoming_messages (Boolean)
    • If set to true, this parameter ensures that incoming messages are logged.

  • :public_uri (Boolean)
    • If set to true, this parameter enables public_uri.

Returns:



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
138
139
140
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
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
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
# File 'lib/plivo/resources/applications.rb', line 108

class ApplicationInterface < Base::ResourceInterface
  def initialize(client, resource_list_json = nil)
    @_name = 'Application'
    @_resource_type = Application
    @_identifier_string = 'app_id'
    super
    @_is_voice_request = true
  end

  # @param [String] app_id
  # @return [Application] Application
  def get(app_id)
    valid_param?(:app_id, app_id, [String, Symbol], true)
    perform_get(app_id)
  end

  # @param [String] app_name
  # @param [Hash] options
  # @option options [String] :answer_url - The URL invoked by Plivo when a call executes this application.
  # @option options [String] :answer_method - The method used to call the answer_url. Defaults to POST.
  # @option options [String] :hangup_url - The URL that will be notified by Plivo when the call hangs up. Defaults to answer_url.
  # @option options [String] :hangup_method - The method used to call the hangup_url. Defaults to POST.
  # @option options [String] :fallback_answer_url - Invoked by Plivo only if answer_url is unavailable or the XML response is invalid. Should contain a XML response.
  # @option options [String] :fallback_method - The method used to call the fallback_answer_url. Defaults to POST.
  # @option options [String] :message_url - The URL that will be notified by Plivo when an inbound message is received. Defaults not set.
  # @option options [String] :message_method - The method used to call the message_url. Defaults to POST.
  # @option options [Boolean] :default_number_app - If set to true, this parameter ensures that newly created numbers, which don't have an app_id, point to this application.
  # @option options [Boolean] :default_endpoint_app - If set to true, this parameter ensures that newly created endpoints, which don't have an app_id, point to this application.
  # @option options [String] :subaccount - Id of the subaccount, in case only subaccount applications are needed.
  # @option options [Boolean] :log_incoming_messages - If set to true, this parameter ensures that incoming messages are logged.
  # @option options [Boolean] :public_uri - If set to true, this parameter enables public_uri.
  # @return [Application] Application
  def create(app_name, options = nil)
    valid_param?(:app_name, app_name, [String, Symbol], true)
    valid_param?(:options, options, Hash, true) unless options.nil?

    params = {
      app_name: app_name
    }

    return perform_create(params) if options.nil?

    %i[answer_url hangup_url fallback_answer_url message_url subaccount]
      .each do |param|
      if options.key?(param) &&
         valid_param?(param, options[param], [String, Symbol], true)
        params[param] = options[param]
      end
    end

    %i[answer_method hangup_method fallback_method message_method]
      .each do |param|
      if options.key?(param) &&
         valid_param?(param, options[param], [String, Symbol], true, %w[GET POST])
        params[param] = options[param]
      end
    end

    %i[default_number_app default_endpoint_app log_incoming_messages public_uri].each do |param|
      if options.key?(param) &&
         valid_param?(param, options[param], [TrueClass, FalseClass], true)
        params[param] = options[param]
      end
    end

    perform_create(params)
  end

  ##
  # Lists all applications
  # @param [Hash] options
  # @option options [String] :subaccount
  # @option options [Int] :offset
  # @option options [Int] :limit
  # @return [Hash]
  def list(options = nil)
    return perform_list if options.nil?

    params = {}

    if options.key?(:subaccount) &&
       valid_param?(:subaccount, options[:subaccount], [String, Symbol], true)
      params[:subaccount] = options[:subaccount]
    end

    %i[offset limit].each do |param|
      if options.key?(param) && valid_param?(param, options[param],
                                             [Integer, Integer], true)
        params[param] = options[param]
      end
    end

    if options.key?(:limit) && (options[:limit] > 20 || options[:limit] <= 0)
      raise_invalid_request('The maximum number of results that can be '\
      "fetched is 20. limit can't be more than 20 or less than 1")
    end

    if options.key?(:offset) && options[:offset] < 0
      raise_invalid_request("Offset can't be negative")
    end

    perform_list(params)
  end

  def each
    offset = 0
    loop do
      app_list = list(offset: offset)
      app_list[:objects].each { |app| yield app }
      offset += 20
      return unless app_list.length == 20
    end
  end

  ##
  # Modify an application
  # @param [String] app_id
  # @param [Hash] options
  # @option options [String] :answer_url - The URL invoked by Plivo when a call executes this application.
  # @option options [String] :answer_method - The method used to call the answer_url. Defaults to POST.
  # @option options [String] :hangup_url - The URL that will be notified by Plivo when the call hangs up. Defaults to answer_url.
  # @option options [String] :hangup_method - The method used to call the hangup_url. Defaults to POST.
  # @option options [String] :fallback_answer_url - Invoked by Plivo only if answer_url is unavailable or the XML response is invalid. Should contain a XML response.
  # @option options [String] :fallback_method - The method used to call the fallback_answer_url. Defaults to POST.
  # @option options [String] :message_url - The URL that will be notified by Plivo when an inbound message is received. Defaults not set.
  # @option options [String] :message_method - The method used to call the message_url. Defaults to POST.
  # @option options [Boolean] :default_number_app - If set to true, this parameter ensures that newly created numbers, which don't have an app_id, point to this application.
  # @option options [Boolean] :default_endpoint_app - If set to true, this parameter ensures that newly created endpoints, which don't have an app_id, point to this application.
  # @option options [String] :subaccount - Id of the subaccount, in case only subaccount applications are needed.
  # @option options [Boolean] :log_incoming_messages - If set to true, this parameter ensures that incoming messages are logged.
  # @return [Application] Application
  def update(app_id, options = nil)
    valid_param?(:app_id, app_id, [String, Symbol], true)
    Application.new(@_client,
                    resource_id: app_id).update(options)
  end

  ##
  # Delete an application
  # @param [String] app_id
  # @param [Hash] options
  # @option options [Boolean] :cascade - delete associated endpoints
  # @option options [String] :new_endpoint_application - Link associated endpoints to this app
  def delete(app_id, options = nil)
    valid_param?(:app_id, app_id, [String, Symbol], true)
    Application.new(@_client,
                    resource_id: app_id).delete(options)
  end
end

#delete(app_id, options = nil) ⇒ Object

Delete an application

Parameters:

  • app_id (String)
  • options (Hash) (defaults to: nil)

Options Hash (options):

  • :cascade (Boolean)
    • delete associated endpoints

  • :new_endpoint_application (String)
    • Link associated endpoints to this app



251
252
253
254
255
# File 'lib/plivo/resources/applications.rb', line 251

def delete(app_id, options = nil)
  valid_param?(:app_id, app_id, [String, Symbol], true)
  Application.new(@_client,
                  resource_id: app_id).delete(options)
end

#eachObject



212
213
214
215
216
217
218
219
220
# File 'lib/plivo/resources/applications.rb', line 212

def each
  offset = 0
  loop do
    app_list = list(offset: offset)
    app_list[:objects].each { |app| yield app }
    offset += 20
    return unless app_list.length == 20
  end
end

#get(app_id) ⇒ Application

Returns Application.

Parameters:

  • app_id (String)

Returns:



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
138
139
140
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
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
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
# File 'lib/plivo/resources/applications.rb', line 108

class ApplicationInterface < Base::ResourceInterface
  def initialize(client, resource_list_json = nil)
    @_name = 'Application'
    @_resource_type = Application
    @_identifier_string = 'app_id'
    super
    @_is_voice_request = true
  end

  # @param [String] app_id
  # @return [Application] Application
  def get(app_id)
    valid_param?(:app_id, app_id, [String, Symbol], true)
    perform_get(app_id)
  end

  # @param [String] app_name
  # @param [Hash] options
  # @option options [String] :answer_url - The URL invoked by Plivo when a call executes this application.
  # @option options [String] :answer_method - The method used to call the answer_url. Defaults to POST.
  # @option options [String] :hangup_url - The URL that will be notified by Plivo when the call hangs up. Defaults to answer_url.
  # @option options [String] :hangup_method - The method used to call the hangup_url. Defaults to POST.
  # @option options [String] :fallback_answer_url - Invoked by Plivo only if answer_url is unavailable or the XML response is invalid. Should contain a XML response.
  # @option options [String] :fallback_method - The method used to call the fallback_answer_url. Defaults to POST.
  # @option options [String] :message_url - The URL that will be notified by Plivo when an inbound message is received. Defaults not set.
  # @option options [String] :message_method - The method used to call the message_url. Defaults to POST.
  # @option options [Boolean] :default_number_app - If set to true, this parameter ensures that newly created numbers, which don't have an app_id, point to this application.
  # @option options [Boolean] :default_endpoint_app - If set to true, this parameter ensures that newly created endpoints, which don't have an app_id, point to this application.
  # @option options [String] :subaccount - Id of the subaccount, in case only subaccount applications are needed.
  # @option options [Boolean] :log_incoming_messages - If set to true, this parameter ensures that incoming messages are logged.
  # @option options [Boolean] :public_uri - If set to true, this parameter enables public_uri.
  # @return [Application] Application
  def create(app_name, options = nil)
    valid_param?(:app_name, app_name, [String, Symbol], true)
    valid_param?(:options, options, Hash, true) unless options.nil?

    params = {
      app_name: app_name
    }

    return perform_create(params) if options.nil?

    %i[answer_url hangup_url fallback_answer_url message_url subaccount]
      .each do |param|
      if options.key?(param) &&
         valid_param?(param, options[param], [String, Symbol], true)
        params[param] = options[param]
      end
    end

    %i[answer_method hangup_method fallback_method message_method]
      .each do |param|
      if options.key?(param) &&
         valid_param?(param, options[param], [String, Symbol], true, %w[GET POST])
        params[param] = options[param]
      end
    end

    %i[default_number_app default_endpoint_app log_incoming_messages public_uri].each do |param|
      if options.key?(param) &&
         valid_param?(param, options[param], [TrueClass, FalseClass], true)
        params[param] = options[param]
      end
    end

    perform_create(params)
  end

  ##
  # Lists all applications
  # @param [Hash] options
  # @option options [String] :subaccount
  # @option options [Int] :offset
  # @option options [Int] :limit
  # @return [Hash]
  def list(options = nil)
    return perform_list if options.nil?

    params = {}

    if options.key?(:subaccount) &&
       valid_param?(:subaccount, options[:subaccount], [String, Symbol], true)
      params[:subaccount] = options[:subaccount]
    end

    %i[offset limit].each do |param|
      if options.key?(param) && valid_param?(param, options[param],
                                             [Integer, Integer], true)
        params[param] = options[param]
      end
    end

    if options.key?(:limit) && (options[:limit] > 20 || options[:limit] <= 0)
      raise_invalid_request('The maximum number of results that can be '\
      "fetched is 20. limit can't be more than 20 or less than 1")
    end

    if options.key?(:offset) && options[:offset] < 0
      raise_invalid_request("Offset can't be negative")
    end

    perform_list(params)
  end

  def each
    offset = 0
    loop do
      app_list = list(offset: offset)
      app_list[:objects].each { |app| yield app }
      offset += 20
      return unless app_list.length == 20
    end
  end

  ##
  # Modify an application
  # @param [String] app_id
  # @param [Hash] options
  # @option options [String] :answer_url - The URL invoked by Plivo when a call executes this application.
  # @option options [String] :answer_method - The method used to call the answer_url. Defaults to POST.
  # @option options [String] :hangup_url - The URL that will be notified by Plivo when the call hangs up. Defaults to answer_url.
  # @option options [String] :hangup_method - The method used to call the hangup_url. Defaults to POST.
  # @option options [String] :fallback_answer_url - Invoked by Plivo only if answer_url is unavailable or the XML response is invalid. Should contain a XML response.
  # @option options [String] :fallback_method - The method used to call the fallback_answer_url. Defaults to POST.
  # @option options [String] :message_url - The URL that will be notified by Plivo when an inbound message is received. Defaults not set.
  # @option options [String] :message_method - The method used to call the message_url. Defaults to POST.
  # @option options [Boolean] :default_number_app - If set to true, this parameter ensures that newly created numbers, which don't have an app_id, point to this application.
  # @option options [Boolean] :default_endpoint_app - If set to true, this parameter ensures that newly created endpoints, which don't have an app_id, point to this application.
  # @option options [String] :subaccount - Id of the subaccount, in case only subaccount applications are needed.
  # @option options [Boolean] :log_incoming_messages - If set to true, this parameter ensures that incoming messages are logged.
  # @return [Application] Application
  def update(app_id, options = nil)
    valid_param?(:app_id, app_id, [String, Symbol], true)
    Application.new(@_client,
                    resource_id: app_id).update(options)
  end

  ##
  # Delete an application
  # @param [String] app_id
  # @param [Hash] options
  # @option options [Boolean] :cascade - delete associated endpoints
  # @option options [String] :new_endpoint_application - Link associated endpoints to this app
  def delete(app_id, options = nil)
    valid_param?(:app_id, app_id, [String, Symbol], true)
    Application.new(@_client,
                    resource_id: app_id).delete(options)
  end
end

#list(options = nil) ⇒ Hash

Lists all applications

Parameters:

  • options (Hash) (defaults to: nil)

Options Hash (options):

  • :subaccount (String)
  • :offset (Int)
  • :limit (Int)

Returns:

  • (Hash)


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
138
139
140
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
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
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
# File 'lib/plivo/resources/applications.rb', line 108

class ApplicationInterface < Base::ResourceInterface
  def initialize(client, resource_list_json = nil)
    @_name = 'Application'
    @_resource_type = Application
    @_identifier_string = 'app_id'
    super
    @_is_voice_request = true
  end

  # @param [String] app_id
  # @return [Application] Application
  def get(app_id)
    valid_param?(:app_id, app_id, [String, Symbol], true)
    perform_get(app_id)
  end

  # @param [String] app_name
  # @param [Hash] options
  # @option options [String] :answer_url - The URL invoked by Plivo when a call executes this application.
  # @option options [String] :answer_method - The method used to call the answer_url. Defaults to POST.
  # @option options [String] :hangup_url - The URL that will be notified by Plivo when the call hangs up. Defaults to answer_url.
  # @option options [String] :hangup_method - The method used to call the hangup_url. Defaults to POST.
  # @option options [String] :fallback_answer_url - Invoked by Plivo only if answer_url is unavailable or the XML response is invalid. Should contain a XML response.
  # @option options [String] :fallback_method - The method used to call the fallback_answer_url. Defaults to POST.
  # @option options [String] :message_url - The URL that will be notified by Plivo when an inbound message is received. Defaults not set.
  # @option options [String] :message_method - The method used to call the message_url. Defaults to POST.
  # @option options [Boolean] :default_number_app - If set to true, this parameter ensures that newly created numbers, which don't have an app_id, point to this application.
  # @option options [Boolean] :default_endpoint_app - If set to true, this parameter ensures that newly created endpoints, which don't have an app_id, point to this application.
  # @option options [String] :subaccount - Id of the subaccount, in case only subaccount applications are needed.
  # @option options [Boolean] :log_incoming_messages - If set to true, this parameter ensures that incoming messages are logged.
  # @option options [Boolean] :public_uri - If set to true, this parameter enables public_uri.
  # @return [Application] Application
  def create(app_name, options = nil)
    valid_param?(:app_name, app_name, [String, Symbol], true)
    valid_param?(:options, options, Hash, true) unless options.nil?

    params = {
      app_name: app_name
    }

    return perform_create(params) if options.nil?

    %i[answer_url hangup_url fallback_answer_url message_url subaccount]
      .each do |param|
      if options.key?(param) &&
         valid_param?(param, options[param], [String, Symbol], true)
        params[param] = options[param]
      end
    end

    %i[answer_method hangup_method fallback_method message_method]
      .each do |param|
      if options.key?(param) &&
         valid_param?(param, options[param], [String, Symbol], true, %w[GET POST])
        params[param] = options[param]
      end
    end

    %i[default_number_app default_endpoint_app log_incoming_messages public_uri].each do |param|
      if options.key?(param) &&
         valid_param?(param, options[param], [TrueClass, FalseClass], true)
        params[param] = options[param]
      end
    end

    perform_create(params)
  end

  ##
  # Lists all applications
  # @param [Hash] options
  # @option options [String] :subaccount
  # @option options [Int] :offset
  # @option options [Int] :limit
  # @return [Hash]
  def list(options = nil)
    return perform_list if options.nil?

    params = {}

    if options.key?(:subaccount) &&
       valid_param?(:subaccount, options[:subaccount], [String, Symbol], true)
      params[:subaccount] = options[:subaccount]
    end

    %i[offset limit].each do |param|
      if options.key?(param) && valid_param?(param, options[param],
                                             [Integer, Integer], true)
        params[param] = options[param]
      end
    end

    if options.key?(:limit) && (options[:limit] > 20 || options[:limit] <= 0)
      raise_invalid_request('The maximum number of results that can be '\
      "fetched is 20. limit can't be more than 20 or less than 1")
    end

    if options.key?(:offset) && options[:offset] < 0
      raise_invalid_request("Offset can't be negative")
    end

    perform_list(params)
  end

  def each
    offset = 0
    loop do
      app_list = list(offset: offset)
      app_list[:objects].each { |app| yield app }
      offset += 20
      return unless app_list.length == 20
    end
  end

  ##
  # Modify an application
  # @param [String] app_id
  # @param [Hash] options
  # @option options [String] :answer_url - The URL invoked by Plivo when a call executes this application.
  # @option options [String] :answer_method - The method used to call the answer_url. Defaults to POST.
  # @option options [String] :hangup_url - The URL that will be notified by Plivo when the call hangs up. Defaults to answer_url.
  # @option options [String] :hangup_method - The method used to call the hangup_url. Defaults to POST.
  # @option options [String] :fallback_answer_url - Invoked by Plivo only if answer_url is unavailable or the XML response is invalid. Should contain a XML response.
  # @option options [String] :fallback_method - The method used to call the fallback_answer_url. Defaults to POST.
  # @option options [String] :message_url - The URL that will be notified by Plivo when an inbound message is received. Defaults not set.
  # @option options [String] :message_method - The method used to call the message_url. Defaults to POST.
  # @option options [Boolean] :default_number_app - If set to true, this parameter ensures that newly created numbers, which don't have an app_id, point to this application.
  # @option options [Boolean] :default_endpoint_app - If set to true, this parameter ensures that newly created endpoints, which don't have an app_id, point to this application.
  # @option options [String] :subaccount - Id of the subaccount, in case only subaccount applications are needed.
  # @option options [Boolean] :log_incoming_messages - If set to true, this parameter ensures that incoming messages are logged.
  # @return [Application] Application
  def update(app_id, options = nil)
    valid_param?(:app_id, app_id, [String, Symbol], true)
    Application.new(@_client,
                    resource_id: app_id).update(options)
  end

  ##
  # Delete an application
  # @param [String] app_id
  # @param [Hash] options
  # @option options [Boolean] :cascade - delete associated endpoints
  # @option options [String] :new_endpoint_application - Link associated endpoints to this app
  def delete(app_id, options = nil)
    valid_param?(:app_id, app_id, [String, Symbol], true)
    Application.new(@_client,
                    resource_id: app_id).delete(options)
  end
end

#update(app_id, options = nil) ⇒ Application

Modify an application

Parameters:

  • app_id (String)
  • options (Hash) (defaults to: nil)

Options Hash (options):

  • :answer_url (String)
    • The URL invoked by Plivo when a call executes this application.

  • :answer_method (String)
    • The method used to call the answer_url. Defaults to POST.

  • :hangup_url (String)
    • The URL that will be notified by Plivo when the call hangs up. Defaults to answer_url.

  • :hangup_method (String)
    • The method used to call the hangup_url. Defaults to POST.

  • :fallback_answer_url (String)
    • Invoked by Plivo only if answer_url is unavailable or the XML response is invalid. Should contain a XML response.

  • :fallback_method (String)
    • The method used to call the fallback_answer_url. Defaults to POST.

  • :message_url (String)
    • The URL that will be notified by Plivo when an inbound message is received. Defaults not set.

  • :message_method (String)
    • The method used to call the message_url. Defaults to POST.

  • :default_number_app (Boolean)
    • If set to true, this parameter ensures that newly created numbers, which don’t have an app_id, point to this application.

  • :default_endpoint_app (Boolean)
    • If set to true, this parameter ensures that newly created endpoints, which don’t have an app_id, point to this application.

  • :subaccount (String)
    • Id of the subaccount, in case only subaccount applications are needed.

  • :log_incoming_messages (Boolean)
    • If set to true, this parameter ensures that incoming messages are logged.

Returns:



239
240
241
242
243
# File 'lib/plivo/resources/applications.rb', line 239

def update(app_id, options = nil)
  valid_param?(:app_id, app_id, [String, Symbol], true)
  Application.new(@_client,
                  resource_id: app_id).update(options)
end