Class: FancyHands::Call

Inherits:
Object
  • Object
show all
Defined in:
lib/fancyhands/v1/call.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Call

Returns a new instance of Call.



6
7
8
# File 'lib/fancyhands/v1/call.rb', line 6

def initialize(client)
  @client = client
end

Instance Method Details

#get(key = "", status = "", cursor = "") ⇒ Object



23
24
25
26
27
28
29
30
# File 'lib/fancyhands/v1/call.rb', line 23

def get(key="", status="", cursor="")
  data = {
    :key => key,
    :status => status,
    :cursor => cursor
  }
  return @client.request.get("call", data)
end

#post(phone = "", conversation = {}, title = "", _retry = "", retry_delay = "", retry_limit = "") ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/fancyhands/v1/call.rb', line 10

def post(phone="", conversation={}, title="", _retry="", retry_delay="", retry_limit="")
  data = {
    :phone => phone,
    :conversation => JSON.generate(conversation),
    :title => title,
    :retry => _retry,
    :retry_delay => retry_delay,
    :retry_limit => retry_limit,
  }
  return @client.request.post("call", data)
end