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: 7608c70f08d733b5da90794c417ad5bc0b70a85ec6250fe8803f97359e5d6f6a
4
- data.tar.gz: d3ff069bfa00e8bba8e8ff3c5a286bd52d837062d8abaa08c0230c497346c439
3
+ metadata.gz: f7da22f8d6fc40becb3da5d39d703d7ad4f3c459b26c15f0332fdd6b6b2ad423
4
+ data.tar.gz: 6d06c92a47f4f45f6e14afd763e05db9086fb09ce464d5aea14a7fd3bc7c165c
5
5
  SHA512:
6
- metadata.gz: 140ef76ea1c80c5ecc8acc17e8553d725a648d005fd460e3b866224ac934c328637da2597c98f6bae5982a9bb0fcb6778fe78f6a646adfe485fa9659edb4f647
7
- data.tar.gz: 601497d3f3e14b71ddd8efeadae6f9830d51d0ecb318e9a4d9b7b5329bc1f0f1be288aeefc9723a38252a0f1c0f8f877f2369d3d3b8fe6e8f18d7ba990f3b7cb
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: Workarea.config.shipping_rates[0].keys[0],
181
- sub_name: Workarea.config.shipping_rates[0].values[0],
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),
@@ -1,5 +1,5 @@
1
1
  module Valken
2
2
  module Shipping
3
- VERSION = '1.1.5'
3
+ VERSION = '1.1.6'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: valken-shipping
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.5
4
+ version: 1.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - sushmitha02