Class: Plivo::Resources::ComplianceDocumentTypesInterface
- Inherits:
-
Base::ResourceInterface
- Object
- Base::ResourceInterface
- Plivo::Resources::ComplianceDocumentTypesInterface
- Defined in:
- lib/plivo/resources/regulatory_compliance.rb
Constant Summary
Constants included from Utils
Instance Method Summary collapse
-
#get(document_type_id) ⇒ ComplianceDocumentType
Get a ComplianceDocumentType.
-
#initialize(client, resource_list_json = nil) ⇒ ComplianceDocumentTypesInterface
constructor
A new instance of ComplianceDocumentTypesInterface.
-
#list(options = nil) ⇒ Hash
List all ComplianceDocumentTypes.
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) ⇒ ComplianceDocumentTypesInterface
Returns a new instance of ComplianceDocumentTypesInterface.
170 171 172 173 174 175 |
# 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 |
Instance Method Details
#get(document_type_id) ⇒ ComplianceDocumentType
Get a ComplianceDocumentType
180 181 182 183 |
# 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 |
#list(options = nil) ⇒ Hash
List all ComplianceDocumentTypes
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/plivo/resources/regulatory_compliance.rb', line 190 def list( = nil) return perform_list if .nil? valid_param?(:options, , Hash, false) params = {} %i[offset limit].each do |param| if .key?(param) && valid_param?(param, [param], [Integer], false) params[param] = [param] end end raise_invalid_request("Offset can't be negative") if .key?(:offset) && [:offset] < 0 if .key?(:limit) && ([:limit] > 20 || [: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 |