Class: Fuik::TestHelpers::WebhookEventDouble
- Inherits:
-
Object
- Object
- Fuik::TestHelpers::WebhookEventDouble
- Defined in:
- lib/fuik/test_helpers.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#event_id ⇒ Object
readonly
Returns the value of attribute event_id.
-
#event_type ⇒ Object
readonly
Returns the value of attribute event_type.
-
#provider ⇒ Object
readonly
Returns the value of attribute provider.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #failed!(error) ⇒ Object
-
#initialize(provider, event_id, event_type, payload) ⇒ WebhookEventDouble
constructor
A new instance of WebhookEventDouble.
- #payload ⇒ Object
- #processed! ⇒ Object
Constructor Details
#initialize(provider, event_id, event_type, payload) ⇒ WebhookEventDouble
Returns a new instance of WebhookEventDouble.
12 13 14 15 16 17 |
# File 'lib/fuik/test_helpers.rb', line 12 def initialize(provider, event_id, event_type, payload) @provider = provider @event_id = event_id @event_type = event_type @payload = payload end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
10 11 12 |
# File 'lib/fuik/test_helpers.rb', line 10 def error @error end |
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
10 11 12 |
# File 'lib/fuik/test_helpers.rb', line 10 def event_id @event_id end |
#event_type ⇒ Object (readonly)
Returns the value of attribute event_type.
10 11 12 |
# File 'lib/fuik/test_helpers.rb', line 10 def event_type @event_type end |
#provider ⇒ Object (readonly)
Returns the value of attribute provider.
10 11 12 |
# File 'lib/fuik/test_helpers.rb', line 10 def provider @provider end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
10 11 12 |
# File 'lib/fuik/test_helpers.rb', line 10 def status @status end |
Instance Method Details
#failed!(error) ⇒ Object
27 28 29 30 |
# File 'lib/fuik/test_helpers.rb', line 27 def failed!(error) @status = "failed" @error = error.to_s end |
#payload ⇒ Object
19 20 21 |
# File 'lib/fuik/test_helpers.rb', line 19 def payload @payload.is_a?(Hash) ? @payload : {} end |
#processed! ⇒ Object
23 24 25 |
# File 'lib/fuik/test_helpers.rb', line 23 def processed! @status = "processed" end |