Class: SerwerSMS::Resources::Phones
- Inherits:
-
Object
- Object
- SerwerSMS::Resources::Phones
- Defined in:
- lib/serwersms/resources/phones.rb
Instance Method Summary collapse
-
#check(phone, id = nil) ⇒ Hash
Check phone via HLR.
-
#initialize(client) ⇒ Phones
constructor
A new instance of Phones.
-
#test(phone) ⇒ Hash
Validate phone number.
Constructor Details
#initialize(client) ⇒ Phones
Returns a new instance of Phones.
4 5 6 |
# File 'lib/serwersms/resources/phones.rb', line 4 def initialize(client) @client = client end |
Instance Method Details
#check(phone, id = nil) ⇒ Hash
Check phone via HLR
19 20 21 |
# File 'lib/serwersms/resources/phones.rb', line 19 def check(phone, id = nil) @client.call('phones/check', 'phone' => phone, 'id' => id) end |
#test(phone) ⇒ Hash
Validate phone number
28 29 30 |
# File 'lib/serwersms/resources/phones.rb', line 28 def test(phone) @client.call('phones/test', 'phone' => phone) end |