Class: Sendly::WebhookTestResult
- Inherits:
-
Object
- Object
- Sendly::WebhookTestResult
- Defined in:
- lib/sendly/types.rb
Overview
Result of testing a webhook
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#response_time_ms ⇒ Object
readonly
Returns the value of attribute response_time_ms.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
-
#success ⇒ Object
readonly
Returns the value of attribute success.
Instance Method Summary collapse
-
#initialize(data) ⇒ WebhookTestResult
constructor
A new instance of WebhookTestResult.
- #success? ⇒ Boolean
Constructor Details
#initialize(data) ⇒ WebhookTestResult
Returns a new instance of WebhookTestResult.
360 361 362 363 364 365 |
# File 'lib/sendly/types.rb', line 360 def initialize(data) @success = data["success"] @status_code = data["status_code"] || data["statusCode"] @response_time_ms = data["response_time_ms"] || data["responseTimeMs"] @error = data["error"] end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
358 359 360 |
# File 'lib/sendly/types.rb', line 358 def error @error end |
#response_time_ms ⇒ Object (readonly)
Returns the value of attribute response_time_ms.
358 359 360 |
# File 'lib/sendly/types.rb', line 358 def response_time_ms @response_time_ms end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
358 359 360 |
# File 'lib/sendly/types.rb', line 358 def status_code @status_code end |
#success ⇒ Object (readonly)
Returns the value of attribute success.
358 359 360 |
# File 'lib/sendly/types.rb', line 358 def success @success end |
Instance Method Details
#success? ⇒ Boolean
367 368 369 |
# File 'lib/sendly/types.rb', line 367 def success? success end |