class Plivo::Resources::ComplianceDocumentTypesInterface
Public Class Methods
Source
# File lib/plivo/resources/regulatory_compliance.rb, line 170 def initialize(client, resource_list_json = nil) @_name = 'ComplianceDocumentType' @_resource_type = ComplianceDocumentType @_identifier_string = 'compliance_document_type' super end
Calls superclass method
Plivo::Base::ResourceInterface::new
Public Instance Methods
Source
# File lib/plivo/resources/regulatory_compliance.rb, line 180 def get(document_type_id) valid_param?(:document_type_id, document_type_id, [String, Symbol], true) perform_get(document_type_id) end
Get a ComplianceDocumentType
@param [String] document_type_id @return [ComplianceDocumentType] ComplianceDocumentType
Source
# File lib/plivo/resources/regulatory_compliance.rb, line 190 def list(options = nil) return perform_list if options.nil? valid_param?(:options, options, Hash, false) params = {} %i[offset limit].each do |param| if options.key?(param) && valid_param?(param, options[param], [Integer], false) params[param] = options[param] end end raise_invalid_request("Offset can't be negative") if options.key?(:offset) && options[:offset] < 0 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 perform_list(params) end
List all ComplianceDocumentTypes @option options [Int] :offset @option options [Int] :limit @return [Hash]