Class: Files::ActionWebhookFailure
- Inherits:
-
Object
- Object
- Files::ActionWebhookFailure
- Defined in:
- lib/files.com/models/action_webhook_failure.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
-
.retry(id, params = {}, options = {}) ⇒ Object
retry Action Webhook Failure.
Instance Method Summary collapse
-
#initialize(attributes = {}, options = {}) ⇒ ActionWebhookFailure
constructor
A new instance of ActionWebhookFailure.
-
#retry(params = {}) ⇒ Object
retry Action Webhook Failure.
Constructor Details
#initialize(attributes = {}, options = {}) ⇒ ActionWebhookFailure
Returns a new instance of ActionWebhookFailure.
7 8 9 10 |
# File 'lib/files.com/models/action_webhook_failure.rb', line 7 def initialize(attributes = {}, = {}) @attributes = attributes || {} @options = || {} end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
5 6 7 |
# File 'lib/files.com/models/action_webhook_failure.rb', line 5 def attributes @attributes end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/files.com/models/action_webhook_failure.rb', line 5 def @options end |
Class Method Details
.retry(id, params = {}, options = {}) ⇒ Object
retry Action Webhook Failure
24 25 26 27 28 29 30 31 32 |
# File 'lib/files.com/models/action_webhook_failure.rb', line 24 def self.retry(id, params = {}, = {}) 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, = Api.send_request("/action_webhook_failures/#{params[:id]}/retry", :post, params, ) response.data end |
Instance Method Details
#retry(params = {}) ⇒ Object
retry Action Webhook Failure
13 14 15 16 17 18 19 20 21 |
# File 'lib/files.com/models/action_webhook_failure.rb', line 13 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 |