Class: CheckoutSdk::Previous::Apm::KlarnaClient
- Inherits:
-
Client
- Object
- Client
- CheckoutSdk::Previous::Apm::KlarnaClient
show all
- Defined in:
- lib/checkout_sdk/apm/previous/klarna/klarna_client.rb
Instance Attribute Summary
Attributes inherited from Client
#api_client, #authorization_type, #configuration
Instance Method Summary
collapse
Constructor Details
#initialize(api_client, configuration) ⇒ KlarnaClient
Returns a new instance of KlarnaClient.
15
16
17
|
# File 'lib/checkout_sdk/apm/previous/klarna/klarna_client.rb', line 15
def initialize(api_client, configuration)
super api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY
end
|
Instance Method Details
#capture_payment(payment_id, order_capture_request) ⇒ Object
31
32
33
34
35
|
# File 'lib/checkout_sdk/apm/previous/klarna/klarna_client.rb', line 31
def capture_payment(payment_id, order_capture_request)
api_client.invoke_post(build_path(base_url, ORDERS, payment_id, CAPTURES),
sdk_authorization,
order_capture_request)
end
|
#create_credit_session(credit_session_request) ⇒ Object
20
21
22
|
# File 'lib/checkout_sdk/apm/previous/klarna/klarna_client.rb', line 20
def create_credit_session(credit_session_request)
api_client.invoke_post(build_path(base_url, CREDIT_SESSIONS), sdk_authorization, credit_session_request)
end
|
#get_credit_session(session_id) ⇒ Object
25
26
27
|
# File 'lib/checkout_sdk/apm/previous/klarna/klarna_client.rb', line 25
def get_credit_session(session_id)
api_client.invoke_get(build_path(base_url, CREDIT_SESSIONS, session_id), sdk_authorization)
end
|
#void_payment(payment_id, void_request) ⇒ Object
39
40
41
42
43
|
# File 'lib/checkout_sdk/apm/previous/klarna/klarna_client.rb', line 39
def void_payment(payment_id, void_request)
api_client.invoke_post(build_path(base_url, ORDERS, payment_id, VOIDS),
sdk_authorization,
void_request)
end
|