klarna-checkout 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 85f81bcdfc8b0b29935fa8a8c78588e1b6c6da64
|
|
4
|
+
data.tar.gz: 7c17e895833e3549824685a7a95ab7ae14216619
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 066f19e7711dda039ae7999b0332e5a59cad1b42d3eb39fd70c90a75b55fafa3e9f2a41dc4e9d6250fdf5cb29308ef88d8c9fb540f97abcd670481ae0d2750aa
|
|
7
|
+
data.tar.gz: 355445fd9799f09b86952da608b25c665b8d9d71109d617f4227989d6d7713ae87181d414da54470fa4a5d2118b21c3aada92833ad4b19d0731a3bbe3d4f4bd7
|
|
@@ -32,7 +32,8 @@ module Klarna
|
|
|
32
32
|
:locale => @locale,
|
|
33
33
|
:cart => @cart.as_json,
|
|
34
34
|
:gui => (@gui && @gui.as_json),
|
|
35
|
-
:merchant => @merchant.as_json
|
|
35
|
+
:merchant => @merchant.as_json,
|
|
36
|
+
:shipping_address => (@shipping_address && @shipping_address.as_json)
|
|
36
37
|
})
|
|
37
38
|
if id || json[:gui].nil?
|
|
38
39
|
json.delete(:gui)
|
|
@@ -180,6 +180,14 @@ describe Klarna::Checkout::Order do
|
|
|
180
180
|
checkout_uri: 'http://www.example.com/checkout',
|
|
181
181
|
confirmation_uri: 'http://www.example.com/confirmation_uri',
|
|
182
182
|
push_uri: 'http://www.example.com/push'
|
|
183
|
+
},
|
|
184
|
+
shipping_address: {
|
|
185
|
+
street_address: 'Example Street 1',
|
|
186
|
+
postal_code: '3045',
|
|
187
|
+
city: 'Drammen',
|
|
188
|
+
country: 'NO',
|
|
189
|
+
email: 'test@example.com',
|
|
190
|
+
phone: '99988777'
|
|
183
191
|
}
|
|
184
192
|
end
|
|
185
193
|
|
|
@@ -238,6 +246,17 @@ describe Klarna::Checkout::Order do
|
|
|
238
246
|
|
|
239
247
|
it_behaves_like "it's not included when order has ID"
|
|
240
248
|
end
|
|
249
|
+
|
|
250
|
+
describe "shipping_address" do
|
|
251
|
+
subject { json_hash[:shipping_address] }
|
|
252
|
+
|
|
253
|
+
its([:street_address]) { should eq 'Example Street 1' }
|
|
254
|
+
its([:postal_code]) { should eq '3045' }
|
|
255
|
+
its([:city]) { should eq 'Drammen' }
|
|
256
|
+
its([:country]) { should eq 'NO' }
|
|
257
|
+
its([:email]) { should eq 'test@example.com' }
|
|
258
|
+
its([:phone]) { should eq '99988777' }
|
|
259
|
+
end
|
|
241
260
|
end
|
|
242
261
|
|
|
243
262
|
describe "#to_json" do
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: klarna-checkout
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Theodor Tonum
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-03-
|
|
11
|
+
date: 2014-03-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|