workarea-klarna 1.0.0.beta2 → 1.0.0

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
  SHA256:
3
- metadata.gz: 6841a7473e3e7298fc8a4cc26544a61f93b4631b8bcc62e5631d94e7757b7751
4
- data.tar.gz: 87bc257f83535b11edca9b84d92e6f224c19faafd5545fa365670db9a2e3ff9f
3
+ metadata.gz: 7b329672c7677a15dd2c837beac7585af2d605687b4b08d330e334227d687006
4
+ data.tar.gz: 5bf7f652fbe885802606eb15307c4660eb78c50012e1e05032e1ad7c0e856373
5
5
  SHA512:
6
- metadata.gz: 99c77dc7ab625edf169e108dca137f69c4c2d7d8eaab730ea4b8831bc33bcc9ec5930b0c37f478dc38076363ee6cb3bb2b86dfdfa192c9d1e563f58f94f02ad1
7
- data.tar.gz: fb073131ab19afd532b9a661d86ae2b5005cffde5eb64d0b8322ed464b03e110be500bd3b829ddd7f5cc7012a13db3e19d6dd97788344e60361b44dc3211c1a7
6
+ metadata.gz: 0271d39ec81381a10988b829b408f3fb9bf870c0654262b843329d0262365c4f3dc0f3133b57ceffaedfb1a8ab2fd907acc7869d533ca78527a7d9a518e9fbda
7
+ data.tar.gz: f77a15b2f8f09f748f04d2bd32259c4721af1382060b682a2266e73b280578c22308e1223d26baf98bfe9028942eca19654211dbce11fefc318bc189093510c7
@@ -1,3 +1,23 @@
1
+ Workarea Klarna 1.0.0 (2020-10-14)
2
+ --------------------------------------------------------------------------------
3
+
4
+ * bump version
5
+
6
+
7
+ Matt Duffy
8
+
9
+ * Add image url to order item lines
10
+
11
+
12
+ Matt Duffy
13
+
14
+ * Fix gift card line for klarna order request
15
+
16
+
17
+ Matt Duffy
18
+
19
+
20
+
1
21
  Workarea Klarna 1.0.0.beta2 (2020-09-22)
2
22
  --------------------------------------------------------------------------------
3
23
 
@@ -113,6 +113,10 @@ module Workarea
113
113
  host: Workarea.config.host,
114
114
  id: view_model.product.slug
115
115
  ),
116
+ image_url: ProductPrimaryImageUrl.new(
117
+ view_model.catalog_product,
118
+ :medium_thumb
119
+ ).url,
116
120
  product_identifiers: { category_path: breadcrumbs&.join(' > ') }.compact
117
121
  }
118
122
  end
@@ -211,18 +215,18 @@ module Workarea
211
215
  end
212
216
 
213
217
  def gift_card_line
214
- amount = gift_cards.sum(&:amount)
218
+ amount = gift_cards.sum(&:amount) || 0.to_m
215
219
 
216
- return unless amount.to_i.positive?
220
+ return unless amount.positive?
217
221
 
218
222
  {
219
223
  name: 'Gift Card',
220
224
  type: 'gift_card',
221
225
  quantity: 1,
222
- unit_price: -1 * amount,
226
+ unit_price: -1 * amount.cents,
223
227
  tax_rate: 0,
224
228
  total_tax_amount: 0,
225
- total_amount: -1 * amount
229
+ total_amount: -1 * amount.cents
226
230
  }
227
231
  end
228
232
 
@@ -1,5 +1,5 @@
1
1
  module Workarea
2
2
  module Klarna
3
- VERSION = "1.0.0.beta2".freeze
3
+ VERSION = "1.0.0".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workarea-klarna
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Duffy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-22 00:00:00.000000000 Z
11
+ date: 2020-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: workarea
@@ -166,9 +166,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
166
166
  version: '0'
167
167
  required_rubygems_version: !ruby/object:Gem::Requirement
168
168
  requirements:
169
- - - ">"
169
+ - - ">="
170
170
  - !ruby/object:Gem::Version
171
- version: 1.3.1
171
+ version: '0'
172
172
  requirements: []
173
173
  rubygems_version: 3.0.3
174
174
  signing_key: