valken-shipping 1.1.5 → 1.1.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7da22f8d6fc40becb3da5d39d703d7ad4f3c459b26c15f0332fdd6b6b2ad423
|
4
|
+
data.tar.gz: 6d06c92a47f4f45f6e14afd763e05db9086fb09ce464d5aea14a7fd3bc7c165c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3917e7fcd9e3e4c88ea4ca1a293dde0d980a6192ff815c33647cae783425596ddac4b6bd817e858d8ca3c501dfd7d6a6fec928598fd48c2ca0f37be9c9e88991
|
7
|
+
data.tar.gz: da3fd915a5cd8a84d25d8b8a6b6a5c861c3642e4cfca688da40cf71f649bd09c87a6a7d65f88ba892b2ea30e5f29ee7c86aa92942bf11da50e6bcb176abaf9c4
|
@@ -167,18 +167,19 @@ module Workarea
|
|
167
167
|
selected_rates = rates.select {|rate| rate.delivery_date.present? && rate.delivery_date == date}
|
168
168
|
cheap_rate = selected_rates.sort_by(&:price).first
|
169
169
|
description = "#{cheap_rate.delivery_date.strftime('%A, %B %d, %Y')}"
|
170
|
-
shipping_option = create_shipping_options(cheap_rate, service_code[index], description)
|
170
|
+
shipping_option = create_shipping_options(cheap_rate, service_code[index], description, Workarea.config.shipping_rates[index])
|
171
171
|
filtered_rates.push(shipping_option)
|
172
172
|
end
|
173
173
|
filtered_rates
|
174
174
|
end
|
175
175
|
|
176
176
|
# creating a ShippingOption
|
177
|
-
def create_shipping_options(rate, rate_label = nil, description = nil)
|
177
|
+
def create_shipping_options(rate, rate_label = nil, description = nil, sub_name)
|
178
|
+
byebug
|
178
179
|
ShippingOption.new(
|
179
180
|
carrier: rate.carrier,
|
180
|
-
name:
|
181
|
-
sub_name:
|
181
|
+
name: rate_label.keys.join || rate.service_name,
|
182
|
+
sub_name: sub_name.values.join,
|
182
183
|
service_code: rate.service_code,
|
183
184
|
description: description,
|
184
185
|
price: Money.new(rate.price, rate.currency),
|