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

Version Path
files.com-1.0.495 lib/files.com/models/action_webhook_failure.rb
files.com-1.0.494 lib/files.com/models/action_webhook_failure.rb
files.com-1.0.493 lib/files.com/models/action_webhook_failure.rb
files.com-1.0.492 lib/files.com/models/action_webhook_failure.rb
files.com-1.0.491 lib/files.com/models/action_webhook_failure.rb
files.com-1.0.490 lib/files.com/models/action_webhook_failure.rb
files.com-1.0.489 lib/files.com/models/action_webhook_failure.rb
files.com-1.0.488 lib/files.com/models/action_webhook_failure.rb
files.com-1.0.487 lib/files.com/models/action_webhook_failure.rb
files.com-1.0.486 lib/files.com/models/action_webhook_failure.rb
files.com-1.0.485 lib/files.com/models/action_webhook_failure.rb
files.com-1.0.484 lib/files.com/models/action_webhook_failure.rb
files.com-1.0.483 lib/files.com/models/action_webhook_failure.rb
files.com-1.0.482 lib/files.com/models/action_webhook_failure.rb
files.com-1.0.481 lib/files.com/models/action_webhook_failure.rb
files.com-1.0.480 lib/files.com/models/action_webhook_failure.rb
files.com-1.0.479 lib/files.com/models/action_webhook_failure.rb
files.com-1.0.478 lib/files.com/models/action_webhook_failure.rb
files.com-1.0.477 lib/files.com/models/action_webhook_failure.rb
files.com-1.0.476 lib/files.com/models/action_webhook_failure.rb