Module: Klarna::Checkout::Operations::Capture
- Included in:
- Klarna::Checkout::Order
- Defined in:
- lib/klarna/checkout/operations/capture.rb
Instance Method Summary collapse
Instance Method Details
#capture_order(amount = nil) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/klarna/checkout/operations/capture.rb', line 7 def capture_order(amount = nil) response = execute_capture_request(amount) unless response.status == 201 raise Klarna::Checkout::Errors::OrderCaptureError.new(@status, 'capture_not_allowed') end @status = 'CAPTURED' response end |