Class: WebHook
- Inherits:
-
Base
show all
- Defined in:
- lib/blocksdk_ruby/webhook.rb
Instance Attribute Summary
Attributes inherited from Base
#api_token
Instance Method Summary
collapse
Methods inherited from Base
#getHashType, #getUsage, #initialize, #listPrice, #request
Constructor Details
This class inherits a constructor from Base
Instance Method Details
#create(request = {}) ⇒ Object
5
6
7
|
# File 'lib/blocksdk_ruby/webhook.rb', line 5
def create(request={})
return request("POST","/hook",{"callback"=>request['callback'],"category"=>request['category'],"address"=>request['address']})
end
|
#delete(request = {}) ⇒ Object
19
20
21
|
# File 'lib/blocksdk_ruby/webhook.rb', line 19
def delete(request={})
return request("POST","/hook/" + (request['hook_id']).to_s + "/delete")
end
|
#get(request = {}) ⇒ Object
15
16
17
|
# File 'lib/blocksdk_ruby/webhook.rb', line 15
def get(request={})
return request("GET","/hook/" + (request['hook_id']).to_s)
end
|
#getResponse(request = {}) ⇒ Object
29
30
31
32
33
|
# File 'lib/blocksdk_ruby/webhook.rb', line 29
def getResponse(request={})
request["offset"].to_s.empty? ? request['offset'] = 0 : request["offset"]
request["limit"].to_s.empty? ? request['limit'] = 10 : request["limit"]
return request("GET","/hook/" + (request['hook_id']).to_s + "/response",{"offset"=>request['offset'],"limit"=>request['limit']})
end
|
#list(request = {}) ⇒ Object
9
10
11
12
13
|
# File 'lib/blocksdk_ruby/webhook.rb', line 9
def list(request = {})
request["offset"].to_s.empty? ? request['offset'] = 0 : request["offset"]
request["limit"].to_s.empty? ? request['limit'] = 10 : request["limit"]
return request("GET","/hook",{"offset"=>request['offset'],"limit"=>request['limit']})
end
|
#listResponse(request = {}) ⇒ Object
23
24
25
26
27
|
# File 'lib/blocksdk_ruby/webhook.rb', line 23
def listResponse(request = {})
request["offset"].to_s.empty? ? request['offset'] = 0 : request["offset"]
request["limit"].to_s.empty? ? request['limit'] = 10 : request["limit"]
return request("GET","/hook/response",{"offset"=>request['offset'],"limit"=>request['limit']})
end
|