Class: Klarna::Refund

Inherits:
Client
  • Object
show all
Defined in:
lib/klarna/refund.rb

Instance Method Summary collapse

Methods inherited from Client

#initialize

Constructor Details

This class inherits a constructor from Klarna::Client

Instance Method Details

#create(order_id, data) ⇒ Object

HTTP REQUEST POST /ordermanagement/v1/orders/order_id/refunds



13
14
15
16
17
# File 'lib/klarna/refund.rb', line 13

def create(order_id, data)
  do_request(:post, "/ordermanagement/v1/orders/#{order_id}/refunds") do |request|
    request.body = data.to_json
  end
end

#get(order_id, refund_id) ⇒ Object

HTTP REQUEST GET /ordermanagement/v1/orders/order_id/refunds/refund_id



23
24
25
# File 'lib/klarna/refund.rb', line 23

def get(order_id, refund_id)
  do_request(:get, "/ordermanagement/v1/orders/#{order_id}/refunds/#{refund_id}")
end