Sha256: b8aef735c2c749a7ff81b95875e42678764f1efab5439d7e3da241ab55fb757c
Contents?: true
Size: 1.24 KB
Versions: 206
Compression:
Stored size: 1.24 KB
Contents
# frozen_string_literal: true module Files class ActionWebhookFailure attr_reader :options, :attributes def initialize(attributes = {}, options = {}) @attributes = attributes || {} @options = options || {} end # retry Action Webhook Failure def retry(params = {}) params ||= {} params[:id] = @attributes[:id] raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id] raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer) raise MissingParameterError.new("Parameter missing: id") unless params[:id] Api.send_request("/action_webhook_failures/#{@attributes[:id]}/retry", :post, params, @options) end # retry Action Webhook Failure def self.retry(id, params = {}, options = {}) params ||= {} params[:id] = id raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer) raise MissingParameterError.new("Parameter missing: id") unless params[:id] response, _options = Api.send_request("/action_webhook_failures/#{params[:id]}/retry", :post, params, options) response.data end end end
Version data entries
206 entries across 206 versions & 1 rubygems