class Workarea::Klarna::Gateway::CaptureRequest
Public Class Methods
new(tender, amount)
click to toggle source
# File lib/workarea/klarna/gateway/capture_request.rb, line 5 def initialize(tender, amount) @tender = tender @payment = tender.payment @amount = amount @path = "/ordermanagement/v1/orders/#{tender.order_id}/captures" @method = 'post' @summary = I18n.t( 'workarea.klarna.gateway.request.capture', amount: @amount.format ) end
Public Instance Methods
body()
click to toggle source
# File lib/workarea/klarna/gateway/capture_request.rb, line 18 def body { captured_amount: @amount.cents } end