Class: Checkmobi::SDK::Api

Inherits:
Object
  • Object
show all
Defined in:
lib/checkmobi/api.rb

Instance Method Summary collapse

Constructor Details

#initialize(client = Checkmobi::SDK::Client.new) ⇒ Api

Returns a new instance of Api.



5
6
7
# File 'lib/checkmobi/api.rb', line 5

def initialize(client = Checkmobi::SDK::Client.new)
  @client = client
end

Instance Method Details

#account_detailsObject



9
10
11
# File 'lib/checkmobi/api.rb', line 9

def 
  @client.get '/my-account'
end

#call_details(id) ⇒ Object



49
50
51
# File 'lib/checkmobi/api.rb', line 49

def call_details(id)
  @client.get "/call/#{id}"
end

#check_number(params) ⇒ Object



25
26
27
# File 'lib/checkmobi/api.rb', line 25

def check_number(params)
  @client.post '/checknumber', params
end

#countriesObject



13
14
15
# File 'lib/checkmobi/api.rb', line 13

def countries
  @client.get '/countries'
end

#hang_up_call(id) ⇒ Object



53
54
55
# File 'lib/checkmobi/api.rb', line 53

def hang_up_call(id)
  @client.delete "/call/#{id}"
end

#place_call(params) ⇒ Object



45
46
47
# File 'lib/checkmobi/api.rb', line 45

def place_call(params)
  @client.post '/call', params
end

#prefixesObject



17
18
19
# File 'lib/checkmobi/api.rb', line 17

def prefixes
  @client.get '/prefixes'
end

#request_validation(params) ⇒ Object



29
30
31
# File 'lib/checkmobi/api.rb', line 29

def request_validation(params)
  @client.post '/validation/request', params
end

#send_sms(params) ⇒ Object



21
22
23
# File 'lib/checkmobi/api.rb', line 21

def send_sms(params)
  @client.post '/sms/send', params
end

#sms_details(id) ⇒ Object



41
42
43
# File 'lib/checkmobi/api.rb', line 41

def sms_details(id)
  @client.get "/sms/#{id}"
end

#validation_status(id) ⇒ Object



37
38
39
# File 'lib/checkmobi/api.rb', line 37

def validation_status(id)
  @client.get "/validation/status/#{id}"
end

#verify_pin(params) ⇒ Object



33
34
35
# File 'lib/checkmobi/api.rb', line 33

def verify_pin(params)
  @client.post '/validation/verify', params
end