Class: Klarna::Order
Instance Method Summary collapse
-
#acknowledge(order_id) ⇒ Object
HTTP REQUEST POST /ordermanagement/v1/orders/order_id/acknowledge.
- #cancel(order_id) ⇒ Object
- #capture(order_id, data) ⇒ Object
-
#extend(order_id) ⇒ Object
HTTP REQUEST POST /ordermanagement/v1/orders/order_id/extend-authorization-time.
- #get(order_id) ⇒ Object
-
#release(order_id) ⇒ Object
HTTP REQUEST POST /ordermanagement/v1/orders/order_id/release-remaining-authorization.
Methods inherited from Client
Constructor Details
This class inherits a constructor from Klarna::Client
Instance Method Details
#acknowledge(order_id) ⇒ Object
HTTP REQUEST POST /ordermanagement/v1/orders/order_id/acknowledge
41 42 43 |
# File 'lib/klarna/order.rb', line 41 def acknowledge(order_id) do_request(:post, "/ordermanagement/v1/orders/#{order_id}/acknowledge") end |
#cancel(order_id) ⇒ Object
9 10 11 |
# File 'lib/klarna/order.rb', line 9 def cancel(order_id) do_request(:post, "/ordermanagement/v1/orders/#{order_id}/cancel") end |
#capture(order_id, data) ⇒ Object
13 14 15 16 17 |
# File 'lib/klarna/order.rb', line 13 def capture(order_id, data) do_request(:post, "/ordermanagement/v1/orders/#{order_id}/captures") do |request| request.body = data.to_json end end |
#extend(order_id) ⇒ Object
HTTP REQUEST POST /ordermanagement/v1/orders/order_id/extend-authorization-time
25 26 27 |
# File 'lib/klarna/order.rb', line 25 def extend(order_id) do_request(:post, "/ordermanagement/v1/orders/#{order_id}/extend-authorization-time") end |
#get(order_id) ⇒ Object
5 6 7 |
# File 'lib/klarna/order.rb', line 5 def get(order_id) do_request(:get, "/ordermanagement/v1/orders/#{order_id}") end |
#release(order_id) ⇒ Object
HTTP REQUEST POST /ordermanagement/v1/orders/order_id/release-remaining-authorization
33 34 35 |
# File 'lib/klarna/order.rb', line 33 def release(order_id) do_request(:post, "/ordermanagement/v1/orders/#{order_id}/release-remaining-authorization") end |