Class: Plivo::Resources::PhoneNumberComplianceLinkInterface

Inherits:
Base::ResourceInterface show all
Defined in:
lib/plivo/resources/phone_number_compliance.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) ⇒ PhoneNumberComplianceLinkInterface

Returns a new instance of PhoneNumberComplianceLinkInterface.



219
220
221
222
223
224
# File 'lib/plivo/resources/phone_number_compliance.rb', line 219

def initialize(client, resource_list_json = nil)
  @_name = 'PhoneNumber/Compliance/Link'
  @_resource_type = PhoneNumberCompliance
  @_identifier_string = 'compliance_id'
  super
end

Instance Method Details

#create(numbers) ⇒ Response

Link numbers to compliance applications

Parameters:

  • numbers (Array)
    • list of hashes with ‘number’ and ‘compliance_application_id’

Returns:

  • (Response)


230
231
232
233
234
# File 'lib/plivo/resources/phone_number_compliance.rb', line 230

def create(numbers)
  valid_param?(:numbers, numbers, Array, true)
  params = { numbers: numbers }
  perform_create(params)
end