lib/losant_rest/webhook.rb in losant_rest-1.0.1 vs lib/losant_rest/webhook.rb in losant_rest-1.0.2
- old
+ new
@@ -10,10 +10,11 @@
# Deletes a webhook
#
# Parameters:
# * {string} applicationId - ID associated with the application
# * {string} webhookId - ID associated with the webhook
+ # * {string} losantdomain - Domain scope of request (rarely needed)
# * {boolean} _actions - Return resource actions in response
# * {boolean} _links - Return resource link in response
# * {boolean} _embedded - Return embedded resources in response
#
# Responses:
@@ -29,10 +30,11 @@
body = nil
raise ArgumentError.new("applicationId is required") unless params.has_key?(:applicationId)
raise ArgumentError.new("webhookId is required") unless params.has_key?(:webhookId)
+ headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
query_params[:_links] = params[:_links] if params.has_key?(:_links)
query_params[:_embedded] = params[:_embedded] if params.has_key?(:_embedded)
path = "/applications/#{params[:applicationId]}/webhooks/#{params[:webhookId]}"
@@ -48,10 +50,11 @@
# Retrieves information on a webhook
#
# Parameters:
# * {string} applicationId - ID associated with the application
# * {string} webhookId - ID associated with the webhook
+ # * {string} losantdomain - Domain scope of request (rarely needed)
# * {boolean} _actions - Return resource actions in response
# * {boolean} _links - Return resource link in response
# * {boolean} _embedded - Return embedded resources in response
#
# Responses:
@@ -67,10 +70,11 @@
body = nil
raise ArgumentError.new("applicationId is required") unless params.has_key?(:applicationId)
raise ArgumentError.new("webhookId is required") unless params.has_key?(:webhookId)
+ headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
query_params[:_links] = params[:_links] if params.has_key?(:_links)
query_params[:_embedded] = params[:_embedded] if params.has_key?(:_embedded)
path = "/applications/#{params[:applicationId]}/webhooks/#{params[:webhookId]}"
@@ -87,10 +91,11 @@
#
# Parameters:
# * {string} applicationId - ID associated with the application
# * {string} webhookId - ID associated with the webhook
# * {hash} webhook - Object containing new properties of the webhook (https://api.losant.com/#/definitions/webhookPatch)
+ # * {string} losantdomain - Domain scope of request (rarely needed)
# * {boolean} _actions - Return resource actions in response
# * {boolean} _links - Return resource link in response
# * {boolean} _embedded - Return embedded resources in response
#
# Responses:
@@ -108,9 +113,10 @@
raise ArgumentError.new("applicationId is required") unless params.has_key?(:applicationId)
raise ArgumentError.new("webhookId is required") unless params.has_key?(:webhookId)
raise ArgumentError.new("webhook is required") unless params.has_key?(:webhook)
body = params[:webhook] if params.has_key?(:webhook)
+ headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
query_params[:_links] = params[:_links] if params.has_key?(:_links)
query_params[:_embedded] = params[:_embedded] if params.has_key?(:_embedded)
path = "/applications/#{params[:applicationId]}/webhooks/#{params[:webhookId]}"