Class: Desiru::Jobs::WebhookResult
- Inherits:
-
Object
- Object
- Desiru::Jobs::WebhookResult
- Defined in:
- lib/desiru/jobs/webhook_notifier.rb
Overview
Result of a webhook notification
Instance Attribute Summary collapse
-
#attempts ⇒ Object
readonly
Returns the value of attribute attempts.
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
-
#success ⇒ Object
readonly
Returns the value of attribute success.
Instance Method Summary collapse
- #failed? ⇒ Boolean
-
#initialize(success:, status_code: nil, body: nil, headers: nil, error: nil, attempts: 1) ⇒ WebhookResult
constructor
A new instance of WebhookResult.
- #success? ⇒ Boolean
Constructor Details
#initialize(success:, status_code: nil, body: nil, headers: nil, error: nil, attempts: 1) ⇒ WebhookResult
Returns a new instance of WebhookResult.
106 107 108 109 110 111 112 113 |
# File 'lib/desiru/jobs/webhook_notifier.rb', line 106 def initialize(success:, status_code: nil, body: nil, headers: nil, error: nil, attempts: 1) @success = success @status_code = status_code @body = body @headers = headers @error = error @attempts = attempts end |
Instance Attribute Details
#attempts ⇒ Object (readonly)
Returns the value of attribute attempts.
104 105 106 |
# File 'lib/desiru/jobs/webhook_notifier.rb', line 104 def attempts @attempts end |
#body ⇒ Object (readonly)
Returns the value of attribute body.
104 105 106 |
# File 'lib/desiru/jobs/webhook_notifier.rb', line 104 def body @body end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
104 105 106 |
# File 'lib/desiru/jobs/webhook_notifier.rb', line 104 def error @error end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
104 105 106 |
# File 'lib/desiru/jobs/webhook_notifier.rb', line 104 def headers @headers end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
104 105 106 |
# File 'lib/desiru/jobs/webhook_notifier.rb', line 104 def status_code @status_code end |
#success ⇒ Object (readonly)
Returns the value of attribute success.
104 105 106 |
# File 'lib/desiru/jobs/webhook_notifier.rb', line 104 def success @success end |
Instance Method Details
#failed? ⇒ Boolean
119 120 121 |
# File 'lib/desiru/jobs/webhook_notifier.rb', line 119 def failed? !@success end |
#success? ⇒ Boolean
115 116 117 |
# File 'lib/desiru/jobs/webhook_notifier.rb', line 115 def success? @success end |