Sha256: ffef0d7ba9195a5272642e939da2b2b83f877710c94306daa191a81319e616a2
Contents?: true
Size: 1.26 KB
Versions: 108
Compression:
Stored size: 1.26 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.dig(:id) and !params.dig(:id).is_a?(Integer) raise MissingParameterError.new("Parameter missing: id") unless params.dig(: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.dig(:id) and !params.dig(:id).is_a?(Integer) raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id) response, _options = Api.send_request("/action_webhook_failures/#{params[:id]}/retry", :post, params, options) response.data end end end
Version data entries
108 entries across 108 versions & 1 rubygems