Class: SpreeAdyen::WebhookPayloadPresenter
- Inherits:
-
Object
- Object
- SpreeAdyen::WebhookPayloadPresenter
- Defined in:
- app/presenters/spree_adyen/webhook_payload_presenter.rb
Constant Summary collapse
- DEFAULT_PARAMS =
{ active: true, communicationFormat: 'json', type: 'standard' }.freeze
Instance Method Summary collapse
-
#initialize(url) ⇒ WebhookPayloadPresenter
constructor
A new instance of WebhookPayloadPresenter.
- #to_h ⇒ Object
Constructor Details
#initialize(url) ⇒ WebhookPayloadPresenter
Returns a new instance of WebhookPayloadPresenter.
9 10 11 |
# File 'app/presenters/spree_adyen/webhook_payload_presenter.rb', line 9 def initialize(url) @url = url end |
Instance Method Details
#to_h ⇒ Object
13 14 15 16 17 18 |
# File 'app/presenters/spree_adyen/webhook_payload_presenter.rb', line 13 def to_h { url: url, description: description }.merge!(DEFAULT_PARAMS) end |