Class: Plivo::Resources::LookupInterface
- Inherits:
-
Base::ResourceInterface
- Object
- Base::ResourceInterface
- Plivo::Resources::LookupInterface
- Defined in:
- lib/plivo/resources/lookup.rb
Constant Summary
Constants included from Utils
Instance Method Summary collapse
-
#get(number, type = "carrier") ⇒ LookupResponse
Lookup a number.
-
#initialize(client, resource_list_json = nil) ⇒ LookupInterface
constructor
A new instance of LookupInterface.
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) ⇒ LookupInterface
Returns a new instance of LookupInterface.
61 62 63 64 65 66 67 |
# File 'lib/plivo/resources/lookup.rb', line 61 def initialize(client, resource_list_json = nil) @_resource_type = LookupResponse @_identifier_string = "phone_number" super # Override _resource_uri only after calling super @_resource_uri = "/v1/Number/" end |
Instance Method Details
#get(number, type = "carrier") ⇒ LookupResponse
Lookup a number
73 74 75 76 |
# File 'lib/plivo/resources/lookup.rb', line 73 def get(number, type = "carrier") valid_param?(:number, number, [String, Symbol], true) perform_get(number, { "type" => type }) end |