Class: Workarea::Klarna::Gateway::CancelRequest

Inherits:
Request
  • Object
show all
Defined in:
lib/workarea/klarna/gateway/cancel_request.rb

Instance Attribute Summary

Attributes inherited from Request

#method, #order, #path, #summary

Instance Method Summary collapse

Methods inherited from Request

#body, #continent, #continent_key, #password, #sesssion, #subdomain, #url, #username, #validate!

Constructor Details

#initialize(tender) ⇒ CancelRequest

Returns a new instance of CancelRequest.



5
6
7
8
9
10
11
12
# File 'lib/workarea/klarna/gateway/cancel_request.rb', line 5

def initialize(tender)
  @tender = tender
  @payment = tender.payment

  @path = "/ordermanagement/v1/orders/#{tender.order_id}/cancel"
  @method = 'post'
  @summary = I18n.t('workarea.klarna.gateway.request.cancel')
end