Class: SpreeAdyen::WebhookPayloadPresenter

Inherits:
Object
  • Object
show all
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

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_hObject



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