Class: Sms77::Resources::Lookup

Inherits:
Sms77::Resource show all
Defined in:
lib/sms77/resources/lookup.rb

Constant Summary

Constants inherited from Sms77::Resource

Sms77::Resource::BASE_PATH

Instance Attribute Summary

Attributes inherited from Sms77::Resource

#api_key, #builder, #conn, #endpoint, #http_methods, #request_methods, #sent_with

Instance Method Summary collapse

Methods inherited from Sms77::Resource

get_endpoint, get_http_methods, #initialize

Constructor Details

This class inherits a constructor from Sms77::Resource

Instance Method Details

#cnam(params) ⇒ Hash, Array

Perform a caller name lookup read more: www.sms77.io/en/docs/gateway/http-api/cnam-lookup/

Parameters:

  • params (Hash)

Returns:

  • (Hash, Array)


20
21
22
# File 'lib/sms77/resources/lookup.rb', line 20

def cnam(params)
  request(params.merge({ :type => Sms77::Lookup::Type::CNAM }))
end

#format(params) ⇒ String, Hash

Retrieve phone number formats read more: www.sms77.io/en/docs/gateway/http-api/nummernformat-lookup/

Parameters:

  • params (Hash)

Returns:

  • (String, Hash)


28
29
30
# File 'lib/sms77/resources/lookup.rb', line 28

def format(params)
  request(params.merge({ :type => Sms77::Lookup::Type::FORMAT }))
end

#hlr(params) ⇒ Hash, Array

Perform a home location register lookup read more: www.sms77.io/en/docs/gateway/http-api/hlr-lookup/

Parameters:

  • params (Hash)

Returns:

  • (Hash, Array)


36
37
38
# File 'lib/sms77/resources/lookup.rb', line 36

def hlr(params)
  request(params.merge({ :type => Sms77::Lookup::Type::HLR }))
end

#mnp(params) ⇒ Hash, Array

Perform a mobile number portability lookup read more: www.sms77.io/en/docs/gateway/http-api/mnp-lookup/

Parameters:

  • params (Hash)

Returns:

  • (Hash, Array)


44
45
46
# File 'lib/sms77/resources/lookup.rb', line 44

def mnp(params)
  request(params.merge({ :type => Sms77::Lookup::Type::MNP }))
end