Module: Klarna
- Defined in:
- lib/klarna.rb,
lib/klarna/order.rb,
lib/klarna/client.rb,
lib/klarna/credit.rb,
lib/klarna/refund.rb,
lib/klarna/capture.rb,
lib/klarna/version.rb,
lib/klarna/response.rb,
lib/klarna/configuration.rb
Defined Under Namespace
Classes: Capture, Client, Configuration, Credit, Order, Refund, Response
Constant Summary
collapse
- VERSION =
"0.9.1"
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.configuration ⇒ Object
15
16
17
|
# File 'lib/klarna.rb', line 15
def self.configuration
@configuration ||= Configuration.new
end
|
Class Method Details
.client(type = :order) ⇒ Object
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/klarna.rb', line 23
def self.client(type = :order)
case type
when :credit
Credit.new(configuration)
when :order
Order.new(configuration)
when :refund
Refund.new(configuration)
when :capture
Capture.new(configuration)
end
end
|
19
20
21
|
# File 'lib/klarna.rb', line 19
def self.configure
yield(configuration)
end
|