klarna-xmlrpc 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.travis.yml +13 -0
- data/Gemfile +14 -0
- data/Guardfile +16 -0
- data/MIT-LICENSE +20 -0
- data/README.textile +139 -0
- data/Rakefile +22 -0
- data/TODO +30 -0
- data/examples/Gemfile +8 -0
- data/examples/config/initializer.rb +15 -0
- data/examples/console.rb +71 -0
- data/examples/public/images/klarna.png +0 -0
- data/examples/public/images/ruby.png +0 -0
- data/examples/views/_address.haml +22 -0
- data/examples/views/_articles.haml +21 -0
- data/examples/views/checkout_page_example.haml +2 -0
- data/examples/views/essential/add_transaction/_form.haml +32 -0
- data/examples/views/essential/add_transaction/result.haml +7 -0
- data/examples/views/essential/calculate_monthly_cost/_form.haml +16 -0
- data/examples/views/essential/calculate_monthly_cost/result.haml +7 -0
- data/examples/views/essential/get_addresses/_form.haml +9 -0
- data/examples/views/essential/get_addresses/result.haml +8 -0
- data/examples/views/index.haml +296 -0
- data/examples/views/layout.haml +48 -0
- data/examples/views/payment_terms_example.haml +102 -0
- data/examples/views/product_page_example.haml +2 -0
- data/examples/views/reservation/activate_reservation/_form.haml +54 -0
- data/examples/views/reservation/activate_reservation/result.haml +7 -0
- data/examples/views/reservation/cancel_reservation/_form.haml +8 -0
- data/examples/views/reservation/cancel_reservation/result.haml +7 -0
- data/examples/views/reservation/change_reservation/_form.haml +10 -0
- data/examples/views/reservation/change_reservation/result.haml +7 -0
- data/examples/views/reservation/reserve_amount/_form.haml +58 -0
- data/examples/views/reservation/reserve_amount/result.haml +7 -0
- data/examples/views/reservation/reserve_ocr_numbers/_form.haml +8 -0
- data/examples/views/reservation/reserve_ocr_numbers/result.haml +7 -0
- data/examples/views/reservation/split_reservation/_form.haml +14 -0
- data/examples/views/reservation/split_reservation/result.haml +7 -0
- data/examples/views/special/get_pclasses/_form.haml +8 -0
- data/examples/views/special/get_pclasses/result.haml +7 -0
- data/examples/views/special/invoice_address/_form.haml +8 -0
- data/examples/views/special/invoice_address/result.haml +7 -0
- data/examples/views/special/invoice_amount/_form.haml +8 -0
- data/examples/views/special/invoice_amount/result.haml +7 -0
- data/examples/views/special/is_invoice_paid/_form.haml +8 -0
- data/examples/views/special/is_invoice_paid/result.haml +7 -0
- data/examples/views/special/update_charge_amount/_form.haml +15 -0
- data/examples/views/special/update_charge_amount/result.haml +7 -0
- data/examples/views/special/update_goods_quantity/_form.haml +17 -0
- data/examples/views/special/update_goods_quantity/result.haml +7 -0
- data/examples/views/special/update_order_number/_form.haml +10 -0
- data/examples/views/special/update_order_number/result.haml +7 -0
- data/examples/views/useful/activate_invoice/_form.haml +9 -0
- data/examples/views/useful/activate_invoice/result.haml +7 -0
- data/examples/views/useful/credit_invoice/_form.haml +11 -0
- data/examples/views/useful/credit_invoice/result.haml +7 -0
- data/examples/views/useful/delete_invoice/_form.haml +9 -0
- data/examples/views/useful/delete_invoice/result.haml +7 -0
- data/examples/views/useful/email_invoice/_form.haml +9 -0
- data/examples/views/useful/email_invoice/result.haml +7 -0
- data/examples/views/useful/has_account/_form.haml +9 -0
- data/examples/views/useful/has_account/result.haml +7 -0
- data/examples/views/useful/return_amount/_form.haml +15 -0
- data/examples/views/useful/return_amount/result.haml +7 -0
- data/examples/views/useful/send_invoice/_form.haml +9 -0
- data/examples/views/useful/send_invoice/result.haml +7 -0
- data/examples/web.rb +349 -0
- data/klarna.gemspec +34 -0
- data/lib/klarna.rb +171 -0
- data/lib/klarna/api.rb +187 -0
- data/lib/klarna/api/client.rb +126 -0
- data/lib/klarna/api/constants.rb +647 -0
- data/lib/klarna/api/errors.rb +154 -0
- data/lib/klarna/api/methods.rb +16 -0
- data/lib/klarna/api/methods/cost_calculations.rb +134 -0
- data/lib/klarna/api/methods/invoicing.rb +304 -0
- data/lib/klarna/api/methods/reservation.rb +188 -0
- data/lib/klarna/api/methods/standard.rb +126 -0
- data/lib/klarna/version.rb +5 -0
- data/test/fixtures/api/companies.yml +97 -0
- data/test/fixtures/api/pclasses.yml +37 -0
- data/test/fixtures/api/persons.yml +144 -0
- data/test/fixtures/api/stores.yml +6 -0
- data/test/fixtures/klarna.yml +10 -0
- data/test/klarna/api/client_test.rb +288 -0
- data/test/klarna/api/errors_test.rb +34 -0
- data/test/klarna/api/methods/cost_calculations_test.rb +78 -0
- data/test/klarna/api/methods/invoicing_test.rb +409 -0
- data/test/klarna/api/methods/reservation_test.rb +66 -0
- data/test/klarna/api/methods/standard_test.rb +244 -0
- data/test/klarna/api_test.rb +184 -0
- data/test/klarna_test.rb +204 -0
- data/test/support/assertions_helper.rb +40 -0
- data/test/test_helper.rb +55 -0
- metadata +335 -0
data/test/klarna_test.rb
ADDED
@@ -0,0 +1,204 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'test_helper'
|
3
|
+
|
4
|
+
describe Klarna do
|
5
|
+
|
6
|
+
before do
|
7
|
+
Klarna.reset!
|
8
|
+
Klarna.store_config_file = File.join(File.dirname(__FILE__), 'fixtures', 'klarna.yml')
|
9
|
+
end
|
10
|
+
|
11
|
+
describe "Constants" do
|
12
|
+
|
13
|
+
describe 'VALID_COUNTRIES' do
|
14
|
+
it 'should be defined' do
|
15
|
+
assert defined?(Klarna::VALID_COUNTRIES)
|
16
|
+
end
|
17
|
+
|
18
|
+
# TODO: Add additional countries
|
19
|
+
it 'should have values: SE, NO, FI, DK' do
|
20
|
+
assert_equal [:SE, :NO, :FI, :DK], Klarna::VALID_COUNTRIES
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
describe 'DEFAULT_COUNTRY' do
|
25
|
+
it 'should be defined' do
|
26
|
+
assert defined?(Klarna::DEFAULT_COUNTRY)
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'should have value: SE' do
|
30
|
+
assert_equal :SE, Klarna::DEFAULT_COUNTRY
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
describe "Configuration" do
|
37
|
+
|
38
|
+
describe '.mode' do
|
39
|
+
it 'should be defined' do
|
40
|
+
assert_respond_to Klarna, :mode
|
41
|
+
end
|
42
|
+
|
43
|
+
it 'should have default setting: :test' do
|
44
|
+
assert_equal :test, Klarna.mode
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'should be configurable' do
|
48
|
+
swap Klarna, :mode => :production do
|
49
|
+
assert_equal :production, Klarna.mode
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
describe '.country' do
|
55
|
+
it 'should be defined' do
|
56
|
+
assert_respond_to Klarna, :country
|
57
|
+
end
|
58
|
+
|
59
|
+
it 'should have default setting: SE' do
|
60
|
+
assert_equal :SE, Klarna.country
|
61
|
+
end
|
62
|
+
|
63
|
+
it 'should be configurable' do
|
64
|
+
swap Klarna, :country => :NO do
|
65
|
+
assert_equal :NO, Klarna.country
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
describe '.store_id' do
|
71
|
+
it 'should be defined' do
|
72
|
+
assert_respond_to Klarna, :store_id
|
73
|
+
end
|
74
|
+
|
75
|
+
it 'should have default setting: nil' do
|
76
|
+
assert_equal nil, Klarna.store_id
|
77
|
+
end
|
78
|
+
|
79
|
+
it 'should be configurable' do
|
80
|
+
swap Klarna, :store_id => '123' do
|
81
|
+
assert_equal 123, Klarna.store_id
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
describe '.store_secret' do
|
87
|
+
it 'should be defined' do
|
88
|
+
assert_respond_to Klarna, :store_secret
|
89
|
+
end
|
90
|
+
|
91
|
+
it 'should have default setting: nil' do
|
92
|
+
assert_equal nil, Klarna.store_secret
|
93
|
+
end
|
94
|
+
|
95
|
+
it 'should be configurable' do
|
96
|
+
swap Klarna, :store_secret => 'ABC123' do
|
97
|
+
assert_equal 'ABC123', Klarna.store_secret
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
describe '.store_pclasses' do
|
103
|
+
it 'should be defined' do
|
104
|
+
assert_respond_to Klarna, :store_pclasses
|
105
|
+
end
|
106
|
+
|
107
|
+
it 'should have default setting: SE' do
|
108
|
+
assert_equal nil, Klarna.store_pclasses
|
109
|
+
end
|
110
|
+
|
111
|
+
# TODO:
|
112
|
+
# it 'should be configurable' do
|
113
|
+
# end
|
114
|
+
end
|
115
|
+
|
116
|
+
describe '.store_config_file' do
|
117
|
+
it 'should be defined' do
|
118
|
+
assert_respond_to Klarna, :mode
|
119
|
+
end
|
120
|
+
|
121
|
+
it 'should have default setting: nil' do
|
122
|
+
Klarna.reset!
|
123
|
+
assert_equal File.join(ENV['HOME'], '.klarna.yml'), Klarna.store_config_file
|
124
|
+
end
|
125
|
+
|
126
|
+
it 'should be configurable' do
|
127
|
+
swap Klarna, :store_config_file => '/path/to/a/file' do
|
128
|
+
assert_equal '/path/to/a/file', Klarna.store_config_file
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
describe '.logger' do
|
134
|
+
it 'should be defined' do
|
135
|
+
assert_respond_to Klarna, :logger
|
136
|
+
end
|
137
|
+
|
138
|
+
it 'should have default logger' do
|
139
|
+
assert_instance_of Logger, Klarna.logger
|
140
|
+
end
|
141
|
+
|
142
|
+
it 'should be configurable' do
|
143
|
+
custom_logger = ::Logger.new(::STDOUT)
|
144
|
+
swap Klarna, :logger => custom_logger do
|
145
|
+
assert_equal custom_logger, Klarna.logger
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
describe '.http_logging' do
|
151
|
+
it 'should be defined' do
|
152
|
+
assert_respond_to Klarna, :http_logging
|
153
|
+
end
|
154
|
+
|
155
|
+
it 'should have default setting: false' do
|
156
|
+
assert_equal false, Klarna.http_logging
|
157
|
+
end
|
158
|
+
|
159
|
+
it 'should be configurable' do
|
160
|
+
swap Klarna, :http_logging => true do
|
161
|
+
assert_equal true, Klarna.http_logging
|
162
|
+
end
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
end
|
167
|
+
|
168
|
+
describe "Helpers" do
|
169
|
+
|
170
|
+
describe '.setup' do
|
171
|
+
it 'should be defined' do
|
172
|
+
assert_respond_to Klarna, :setup
|
173
|
+
end
|
174
|
+
|
175
|
+
it 'should be possible to change settings in a block' do
|
176
|
+
Klarna.http_logging = false
|
177
|
+
assert_equal false, Klarna.http_logging
|
178
|
+
|
179
|
+
Klarna.setup do |c|
|
180
|
+
c.http_logging = true
|
181
|
+
end
|
182
|
+
assert_equal true, Klarna.http_logging
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
describe '.log' do
|
187
|
+
it 'should be defined' do
|
188
|
+
assert_respond_to Klarna, :log
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
describe '.load_credentials_from_file' do
|
193
|
+
it 'should be defined' do
|
194
|
+
assert_respond_to Klarna, :load_credentials_from_file
|
195
|
+
end
|
196
|
+
|
197
|
+
it 'should load settings from a external YAML config file' do
|
198
|
+
# TODO: Test loading settings from fixtures/klarna.yml
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
end
|
203
|
+
|
204
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'active_support/test_case'
|
3
|
+
|
4
|
+
module Klarna
|
5
|
+
module AssertionsHelper
|
6
|
+
def assert_not(assertion)
|
7
|
+
assert !assertion
|
8
|
+
end
|
9
|
+
|
10
|
+
def assert_blank(assertion)
|
11
|
+
assert assertion.blank?
|
12
|
+
end
|
13
|
+
|
14
|
+
def assert_not_blank(assertion)
|
15
|
+
assert !assertion.blank?
|
16
|
+
end
|
17
|
+
alias :assert_present :assert_not_blank
|
18
|
+
|
19
|
+
# Execute the block setting the given values and restoring old values after
|
20
|
+
# the block is executed.
|
21
|
+
def swap(object, new_values)
|
22
|
+
old_values = {}
|
23
|
+
new_values.each do |key, value|
|
24
|
+
old_values[key] = object.send key
|
25
|
+
object.send :"#{key}=", value
|
26
|
+
end
|
27
|
+
yield
|
28
|
+
ensure
|
29
|
+
old_values.each do |key, value|
|
30
|
+
object.send :"#{key}=", value
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def expose_protected_methods_in(*args)
|
35
|
+
args.each do |klass|
|
36
|
+
klass.send(:public, *[klass.protected_instance_methods, klass.private_instance_methods].flatten)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.unshift File.dirname(__FILE__)
|
3
|
+
|
4
|
+
require 'mocha' # REVIEW: Had to place this before MiniTest - if placed after ~100 failing specs. :S
|
5
|
+
require 'minitest/unit'
|
6
|
+
require 'minitest/spec'
|
7
|
+
require 'minitest/pride'
|
8
|
+
require 'minitest/autorun'
|
9
|
+
|
10
|
+
require 'klarna'
|
11
|
+
|
12
|
+
Dir[File.join(File.dirname(__FILE__), *%w[support ** *.rb]).to_s].each { |f| require f }
|
13
|
+
|
14
|
+
MiniTest::Unit::TestCase.class_eval do
|
15
|
+
include Klarna::AssertionsHelper
|
16
|
+
end
|
17
|
+
|
18
|
+
# For now Travis CI don't support multiple ENV-variables per testrun, so need this.
|
19
|
+
KLARNA_ESTORE_ID, KLARNA_ESTORE_SECRET = ENV['KLARNA_ESTORE'].to_s.split(',')
|
20
|
+
|
21
|
+
VALID_STORE_ID = ENV['KLARNA_ESTORE_ID'].presence || KLARNA_ESTORE_ID
|
22
|
+
VALID_STORE_SECRET = ENV['KLARNA_ESTORE_SECRET'].presence || KLARNA_ESTORE_SECRET
|
23
|
+
VALID_COUNTRY = :SE
|
24
|
+
|
25
|
+
Klarna.store_config_file = File.join(File.dirname(__FILE__), 'fixtures', 'klarna.yml')
|
26
|
+
|
27
|
+
FIXTURES_FILES = {
|
28
|
+
:persons => File.join(File.dirname(__FILE__), 'fixtures', 'api', 'persons.yml'),
|
29
|
+
:companies => File.join(File.dirname(__FILE__), 'fixtures', 'api', 'companies.yml'),
|
30
|
+
:stores => File.join(File.dirname(__FILE__), 'fixtures', 'api', 'stores.yml')
|
31
|
+
}
|
32
|
+
|
33
|
+
@@fixtures = {}
|
34
|
+
FIXTURES_FILES.each do |fixture_key, fixture_file_path|
|
35
|
+
@@fixtures[fixture_key] = File.open(fixture_file_path) { |file| YAML.load(file).with_indifferent_access }
|
36
|
+
end
|
37
|
+
@@fixtures = @@fixtures.with_indifferent_access
|
38
|
+
|
39
|
+
def fixture(model)
|
40
|
+
@@fixtures[model]
|
41
|
+
end
|
42
|
+
|
43
|
+
def valid_credentials!
|
44
|
+
Klarna.setup do |c|
|
45
|
+
c.store_id = VALID_STORE_ID.to_i
|
46
|
+
c.store_secret = VALID_STORE_SECRET
|
47
|
+
c.country = VALID_COUNTRY
|
48
|
+
c.mode = ENV['KLARNA_MODE'].presence || :test
|
49
|
+
c.http_logging = (ENV['KLARNA_DEBUG'].to_s =~ /(true|1)/) || false
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def digest(*args)
|
54
|
+
Klarna::API::Client.digest(*args)
|
55
|
+
end
|
metadata
ADDED
@@ -0,0 +1,335 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: klarna-xmlrpc
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jonas Grimfelt
|
8
|
+
- Serg Tyatin
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2014-08-05 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: activesupport
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ">="
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '0'
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: i18n
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: bundler
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ">="
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: rake
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: rdoc
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: minitest
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
type: :development
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
98
|
+
- !ruby/object:Gem::Dependency
|
99
|
+
name: mocha
|
100
|
+
requirement: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
type: :development
|
106
|
+
prerelease: false
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
name: guard
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
type: :development
|
120
|
+
prerelease: false
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: guard-bundler
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - ">="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0'
|
133
|
+
type: :development
|
134
|
+
prerelease: false
|
135
|
+
version_requirements: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - ">="
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '0'
|
140
|
+
- !ruby/object:Gem::Dependency
|
141
|
+
name: guard-minitest
|
142
|
+
requirement: !ruby/object:Gem::Requirement
|
143
|
+
requirements:
|
144
|
+
- - ">="
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '0'
|
147
|
+
type: :development
|
148
|
+
prerelease: false
|
149
|
+
version_requirements: !ruby/object:Gem::Requirement
|
150
|
+
requirements:
|
151
|
+
- - ">="
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: '0'
|
154
|
+
- !ruby/object:Gem::Dependency
|
155
|
+
name: sinatra
|
156
|
+
requirement: !ruby/object:Gem::Requirement
|
157
|
+
requirements:
|
158
|
+
- - ">="
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
version: '0'
|
161
|
+
type: :development
|
162
|
+
prerelease: false
|
163
|
+
version_requirements: !ruby/object:Gem::Requirement
|
164
|
+
requirements:
|
165
|
+
- - ">="
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: '0'
|
168
|
+
- !ruby/object:Gem::Dependency
|
169
|
+
name: sinatra-mapping
|
170
|
+
requirement: !ruby/object:Gem::Requirement
|
171
|
+
requirements:
|
172
|
+
- - ">="
|
173
|
+
- !ruby/object:Gem::Version
|
174
|
+
version: '0'
|
175
|
+
type: :development
|
176
|
+
prerelease: false
|
177
|
+
version_requirements: !ruby/object:Gem::Requirement
|
178
|
+
requirements:
|
179
|
+
- - ">="
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
version: '0'
|
182
|
+
- !ruby/object:Gem::Dependency
|
183
|
+
name: haml
|
184
|
+
requirement: !ruby/object:Gem::Requirement
|
185
|
+
requirements:
|
186
|
+
- - ">="
|
187
|
+
- !ruby/object:Gem::Version
|
188
|
+
version: '0'
|
189
|
+
type: :development
|
190
|
+
prerelease: false
|
191
|
+
version_requirements: !ruby/object:Gem::Requirement
|
192
|
+
requirements:
|
193
|
+
- - ">="
|
194
|
+
- !ruby/object:Gem::Version
|
195
|
+
version: '0'
|
196
|
+
description: A Ruby wrapper for Klarna/Kreditor XML-RPC API.
|
197
|
+
email:
|
198
|
+
- jonas@merchii.com
|
199
|
+
executables: []
|
200
|
+
extensions: []
|
201
|
+
extra_rdoc_files: []
|
202
|
+
files:
|
203
|
+
- ".gitignore"
|
204
|
+
- ".travis.yml"
|
205
|
+
- Gemfile
|
206
|
+
- Guardfile
|
207
|
+
- MIT-LICENSE
|
208
|
+
- README.textile
|
209
|
+
- Rakefile
|
210
|
+
- TODO
|
211
|
+
- examples/Gemfile
|
212
|
+
- examples/config/initializer.rb
|
213
|
+
- examples/console.rb
|
214
|
+
- examples/public/images/klarna.png
|
215
|
+
- examples/public/images/ruby.png
|
216
|
+
- examples/views/_address.haml
|
217
|
+
- examples/views/_articles.haml
|
218
|
+
- examples/views/checkout_page_example.haml
|
219
|
+
- examples/views/essential/add_transaction/_form.haml
|
220
|
+
- examples/views/essential/add_transaction/result.haml
|
221
|
+
- examples/views/essential/calculate_monthly_cost/_form.haml
|
222
|
+
- examples/views/essential/calculate_monthly_cost/result.haml
|
223
|
+
- examples/views/essential/get_addresses/_form.haml
|
224
|
+
- examples/views/essential/get_addresses/result.haml
|
225
|
+
- examples/views/index.haml
|
226
|
+
- examples/views/layout.haml
|
227
|
+
- examples/views/payment_terms_example.haml
|
228
|
+
- examples/views/product_page_example.haml
|
229
|
+
- examples/views/reservation/activate_reservation/_form.haml
|
230
|
+
- examples/views/reservation/activate_reservation/result.haml
|
231
|
+
- examples/views/reservation/cancel_reservation/_form.haml
|
232
|
+
- examples/views/reservation/cancel_reservation/result.haml
|
233
|
+
- examples/views/reservation/change_reservation/_form.haml
|
234
|
+
- examples/views/reservation/change_reservation/result.haml
|
235
|
+
- examples/views/reservation/reserve_amount/_form.haml
|
236
|
+
- examples/views/reservation/reserve_amount/result.haml
|
237
|
+
- examples/views/reservation/reserve_ocr_numbers/_form.haml
|
238
|
+
- examples/views/reservation/reserve_ocr_numbers/result.haml
|
239
|
+
- examples/views/reservation/split_reservation/_form.haml
|
240
|
+
- examples/views/reservation/split_reservation/result.haml
|
241
|
+
- examples/views/special/get_pclasses/_form.haml
|
242
|
+
- examples/views/special/get_pclasses/result.haml
|
243
|
+
- examples/views/special/invoice_address/_form.haml
|
244
|
+
- examples/views/special/invoice_address/result.haml
|
245
|
+
- examples/views/special/invoice_amount/_form.haml
|
246
|
+
- examples/views/special/invoice_amount/result.haml
|
247
|
+
- examples/views/special/is_invoice_paid/_form.haml
|
248
|
+
- examples/views/special/is_invoice_paid/result.haml
|
249
|
+
- examples/views/special/update_charge_amount/_form.haml
|
250
|
+
- examples/views/special/update_charge_amount/result.haml
|
251
|
+
- examples/views/special/update_goods_quantity/_form.haml
|
252
|
+
- examples/views/special/update_goods_quantity/result.haml
|
253
|
+
- examples/views/special/update_order_number/_form.haml
|
254
|
+
- examples/views/special/update_order_number/result.haml
|
255
|
+
- examples/views/useful/activate_invoice/_form.haml
|
256
|
+
- examples/views/useful/activate_invoice/result.haml
|
257
|
+
- examples/views/useful/credit_invoice/_form.haml
|
258
|
+
- examples/views/useful/credit_invoice/result.haml
|
259
|
+
- examples/views/useful/delete_invoice/_form.haml
|
260
|
+
- examples/views/useful/delete_invoice/result.haml
|
261
|
+
- examples/views/useful/email_invoice/_form.haml
|
262
|
+
- examples/views/useful/email_invoice/result.haml
|
263
|
+
- examples/views/useful/has_account/_form.haml
|
264
|
+
- examples/views/useful/has_account/result.haml
|
265
|
+
- examples/views/useful/return_amount/_form.haml
|
266
|
+
- examples/views/useful/return_amount/result.haml
|
267
|
+
- examples/views/useful/send_invoice/_form.haml
|
268
|
+
- examples/views/useful/send_invoice/result.haml
|
269
|
+
- examples/web.rb
|
270
|
+
- klarna.gemspec
|
271
|
+
- lib/klarna.rb
|
272
|
+
- lib/klarna/api.rb
|
273
|
+
- lib/klarna/api/client.rb
|
274
|
+
- lib/klarna/api/constants.rb
|
275
|
+
- lib/klarna/api/errors.rb
|
276
|
+
- lib/klarna/api/methods.rb
|
277
|
+
- lib/klarna/api/methods/cost_calculations.rb
|
278
|
+
- lib/klarna/api/methods/invoicing.rb
|
279
|
+
- lib/klarna/api/methods/reservation.rb
|
280
|
+
- lib/klarna/api/methods/standard.rb
|
281
|
+
- lib/klarna/version.rb
|
282
|
+
- test/fixtures/api/companies.yml
|
283
|
+
- test/fixtures/api/pclasses.yml
|
284
|
+
- test/fixtures/api/persons.yml
|
285
|
+
- test/fixtures/api/stores.yml
|
286
|
+
- test/fixtures/klarna.yml
|
287
|
+
- test/klarna/api/client_test.rb
|
288
|
+
- test/klarna/api/errors_test.rb
|
289
|
+
- test/klarna/api/methods/cost_calculations_test.rb
|
290
|
+
- test/klarna/api/methods/invoicing_test.rb
|
291
|
+
- test/klarna/api/methods/reservation_test.rb
|
292
|
+
- test/klarna/api/methods/standard_test.rb
|
293
|
+
- test/klarna/api_test.rb
|
294
|
+
- test/klarna_test.rb
|
295
|
+
- test/support/assertions_helper.rb
|
296
|
+
- test/test_helper.rb
|
297
|
+
homepage: http://github.com/2rba/klarna-ruby
|
298
|
+
licenses: []
|
299
|
+
metadata: {}
|
300
|
+
post_install_message:
|
301
|
+
rdoc_options: []
|
302
|
+
require_paths:
|
303
|
+
- lib
|
304
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
305
|
+
requirements:
|
306
|
+
- - ">="
|
307
|
+
- !ruby/object:Gem::Version
|
308
|
+
version: '0'
|
309
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
310
|
+
requirements:
|
311
|
+
- - ">="
|
312
|
+
- !ruby/object:Gem::Version
|
313
|
+
version: '0'
|
314
|
+
requirements: []
|
315
|
+
rubyforge_project:
|
316
|
+
rubygems_version: 2.4.1
|
317
|
+
signing_key:
|
318
|
+
specification_version: 4
|
319
|
+
summary: A Ruby wrapper for Klarna/Kreditor XML-RPC API.
|
320
|
+
test_files:
|
321
|
+
- test/fixtures/api/companies.yml
|
322
|
+
- test/fixtures/api/pclasses.yml
|
323
|
+
- test/fixtures/api/persons.yml
|
324
|
+
- test/fixtures/api/stores.yml
|
325
|
+
- test/fixtures/klarna.yml
|
326
|
+
- test/klarna/api/client_test.rb
|
327
|
+
- test/klarna/api/errors_test.rb
|
328
|
+
- test/klarna/api/methods/cost_calculations_test.rb
|
329
|
+
- test/klarna/api/methods/invoicing_test.rb
|
330
|
+
- test/klarna/api/methods/reservation_test.rb
|
331
|
+
- test/klarna/api/methods/standard_test.rb
|
332
|
+
- test/klarna/api_test.rb
|
333
|
+
- test/klarna_test.rb
|
334
|
+
- test/support/assertions_helper.rb
|
335
|
+
- test/test_helper.rb
|