Class: Plivo::Resources::TollfreeVerification
- Inherits:
-
Base::Resource
- Object
- Base::Resource
- Plivo::Resources::TollfreeVerification
- Defined in:
- lib/plivo/resources/tollfree_verification.rb
Constant Summary
Constants included from Utils
Instance Attribute Summary
Attributes inherited from Base::Resource
Instance Method Summary collapse
- #delete ⇒ Object
-
#initialize(client, options = nil) ⇒ TollfreeVerification
constructor
A new instance of TollfreeVerification.
- #to_s ⇒ Object
- #update(options = nil) ⇒ Object
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, options = nil) ⇒ TollfreeVerification
Returns a new instance of TollfreeVerification.
6 7 8 9 10 |
# File 'lib/plivo/resources/tollfree_verification.rb', line 6 def initialize(client, = nil) @_name = 'TollfreeVerification' @_identifier_string = 'tollfree_verification' super end |
Instance Method Details
#delete ⇒ Object
29 30 31 |
# File 'lib/plivo/resources/tollfree_verification.rb', line 29 def delete perform_delete end |
#to_s ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/plivo/resources/tollfree_verification.rb', line 33 def to_s { api_id: @api_id, uuid: @uuid, number: @number, created_at: @created_at, updated_at: @updated_at, callback_method: @callback_url, callback_url: @callback_url, extra_data: @extra_data, additional_information: @additional_information, terms_and_conditions_link: @terms_and_conditions_link, privacy_policy_link: @privacy_policy_link, optin_message: @optin_message, help_message: @help_message, message_sample: @message_sample, optin_image_url: @optin_image_url, optin_type: @optin_type, profile_uuid: @profile_uuid, rejection_reason: @rejection_reason, status: @status, usecase: @usecase, usecase_summary: @usecase_summary, volume: @volume }.delete_if { |key, value| value.nil? }.to_s end |
#update(options = nil) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/plivo/resources/tollfree_verification.rb', line 12 def update( = nil) return perform_update({}) if .nil? valid_param?(:options, , Hash, true) params = {} params_expected = %i[ usecase usecase_summary profile_uuid optin_type optin_image_url volume message_sample callback_method callback_url extra_data additional_information terms_and_conditions_link privacy_policy_link optin_message help_message ] params_expected.each do |param| if .key?(param) && valid_param?(param, [param], [String, Symbol], false) params[param] = [param] end end perform_update(params) end |