Method: Klarna::Checkout::Order#refund

Defined in:
lib/klarna/checkout/order.rb

#refund(amount: nil, description: nil) ⇒ Object

Refunds the order through Klarna API



96
97
98
99
100
# File 'lib/klarna/checkout/order.rb', line 96

def refund(amount: nil, description: nil)
  raise Klarna::Checkout::Errors::OrderRefundError.new(@status, 'refund_not_allowed') unless @status == 'CAPTURED'

  refund_order(amount: amount, description: description)
end