active_shipping 1.8.0 → 1.8.1
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e38b1f2643ba2b428af9627fe62638a4d4ced137
|
4
|
+
data.tar.gz: c42f3de2612e17488e8c2ed69991d84297dd8791
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0cb3a47d17bffddd2a54f8d82e569dd7caa95e9822a44361b33a26a96c903aaa2dda812748556dbc49bded142a45fe8fac58b2db731fd6b568a0fffb078d745
|
7
|
+
data.tar.gz: ac743371aa813bdbb2f880627b983a900d5fea53abb2a0c02787d014f1558bbd9eac929e01fa9e3bd03af34f9000547b2687757e707a2b10ef8420d92e039a19
|
@@ -66,13 +66,19 @@ module ActiveShipping
|
|
66
66
|
# @!attribute delivery_category
|
67
67
|
# The general classification of the delivery method
|
68
68
|
# @return [String]
|
69
|
+
#
|
70
|
+
# @!attribute shipment_options
|
71
|
+
# Additional priced options bundled with the given rate estimate with price in cents
|
72
|
+
# @return [Array<{ code: String, price: Integer }>]
|
73
|
+
#
|
69
74
|
class RateEstimate
|
70
75
|
attr_accessor :origin, :destination, :package_rates,
|
71
76
|
:carrier, :service_name, :service_code,
|
72
77
|
:shipping_date, :delivery_date, :delivery_range,
|
73
78
|
:currency, :negotiated_rate, :insurance_price,
|
74
79
|
:estimate_reference, :expires_at, :pickup_time,
|
75
|
-
:compare_price, :phone_required, :delivery_category
|
80
|
+
:compare_price, :phone_required, :delivery_category,
|
81
|
+
:shipment_options
|
76
82
|
|
77
83
|
def initialize(origin, destination, carrier, service_name, options = {})
|
78
84
|
self.origin, self.destination, self.carrier, self.service_name = origin, destination, carrier, service_name
|
@@ -95,6 +101,7 @@ module ActiveShipping
|
|
95
101
|
self.delivery_date = @delivery_range.last
|
96
102
|
self.insurance_price = options[:insurance_price]
|
97
103
|
self.delivery_category = options[:delivery_category]
|
104
|
+
self.shipment_options = options[:shipment_options] || []
|
98
105
|
end
|
99
106
|
|
100
107
|
# The total price of the shipments in cents.
|
@@ -53,6 +53,10 @@ class CanadaPostPwsRatingTest < Minitest::Test
|
|
53
53
|
assert_equal 'en-CA', @cp.language
|
54
54
|
end
|
55
55
|
|
56
|
+
def test_name_accessor
|
57
|
+
assert_equal 'Canada Post PWS', @cp.name
|
58
|
+
end
|
59
|
+
|
56
60
|
def test_find_rates
|
57
61
|
response = xml_fixture('canadapost_pws/rates_info')
|
58
62
|
expected_headers = {
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_shipping
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James MacAulay
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2016-07-
|
14
|
+
date: 2016-07-19 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: quantified
|
@@ -436,7 +436,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
436
436
|
version: '0'
|
437
437
|
requirements: []
|
438
438
|
rubyforge_project:
|
439
|
-
rubygems_version: 2.
|
439
|
+
rubygems_version: 2.5.1
|
440
440
|
signing_key:
|
441
441
|
specification_version: 4
|
442
442
|
summary: Simple shipping abstraction library
|