ups-ruby 0.9.4 → 0.9.5
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 +4 -4
- data/Gemfile.lock +4 -4
- data/lib/ups/builders/builder_base.rb +12 -0
- data/lib/ups/version.rb +1 -1
- data/spec/ups/builders/rate_builder_spec.rb +1 -0
- data/spec/ups/builders/ship_confirm_builder_spec.rb +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8587263870ddba28145b0a81018a0d23555bc8a0
|
4
|
+
data.tar.gz: cb8c70a842dff1404707c87099c880feb6112dd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d03a42d3ca7a68d6fd342ddfe7fcb7b27a8d3c0ccc31ce6e03e21286c8bd36f3e2ec66e8d09373c88e18636b69760cb199d2543d82d942b4b904ffa6f1c35c3e
|
7
|
+
data.tar.gz: 83c2cf21eafd317dba696adf13d2fbbee43ddb1d41b74724ce41333cee5c42c10b0dca387f77011796413c47a79ffed0b9b908c2d73b1174e5b17cbeeb44402d
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ups-ruby (0.9.
|
4
|
+
ups-ruby (0.9.5)
|
5
5
|
excon (~> 0.45, >= 0.45.3)
|
6
6
|
insensitive_hash (~> 0.3.3)
|
7
7
|
levenshtein-ffi (~> 1.1)
|
@@ -13,7 +13,7 @@ GEM
|
|
13
13
|
codeclimate-test-reporter (1.0.5)
|
14
14
|
simplecov
|
15
15
|
docile (1.1.5)
|
16
|
-
excon (0.
|
16
|
+
excon (0.58.0)
|
17
17
|
ffi (1.9.18)
|
18
18
|
insensitive_hash (0.3.3)
|
19
19
|
json (1.8.3)
|
@@ -23,7 +23,7 @@ GEM
|
|
23
23
|
minitest (5.7.0)
|
24
24
|
nokogiri (1.6.6.2)
|
25
25
|
mini_portile (~> 0.6.0)
|
26
|
-
ox (2.
|
26
|
+
ox (2.6.0)
|
27
27
|
rake (12.0.0)
|
28
28
|
simplecov (0.10.0)
|
29
29
|
docile (~> 1.1.0)
|
@@ -43,4 +43,4 @@ DEPENDENCIES
|
|
43
43
|
ups-ruby!
|
44
44
|
|
45
45
|
BUNDLED WITH
|
46
|
-
1.15.
|
46
|
+
1.15.4
|
@@ -56,6 +56,14 @@ module UPS
|
|
56
56
|
access_request << element_with_value('Password', password)
|
57
57
|
end
|
58
58
|
|
59
|
+
# Adds an InsuranceCharges section to the XML document being built
|
60
|
+
#
|
61
|
+
# @param [String] value The MonetaryValue of the InsuranceCharge
|
62
|
+
# @return [void]
|
63
|
+
def add_insurance_charge(value)
|
64
|
+
shipment_root << insurance_charge(value)
|
65
|
+
end
|
66
|
+
|
59
67
|
# Adds a Request section to the XML document being built
|
60
68
|
#
|
61
69
|
# @param [String] action The UPS API Action requested
|
@@ -221,6 +229,10 @@ module UPS
|
|
221
229
|
multi_valued(name, Code: code, Description: description)
|
222
230
|
end
|
223
231
|
|
232
|
+
def insurance_charge(value)
|
233
|
+
multi_valued('InsuranceCharges', MonetaryValue: value)
|
234
|
+
end
|
235
|
+
|
224
236
|
def multi_valued(name, params)
|
225
237
|
Element.new(name).tap do |e|
|
226
238
|
params.each { |key, value| e << element_with_value(key, value) }
|
data/lib/ups/version.rb
CHANGED
@@ -15,6 +15,7 @@ class UPS::Builders::TestShipConfirmBuilder < Minitest::Test
|
|
15
15
|
builder.add_international_invoice invoice_form
|
16
16
|
builder.add_description 'Los Pollo Hermanos'
|
17
17
|
builder.add_reference_number reference_number
|
18
|
+
builder.add_insurance_charge '5.00'
|
18
19
|
end
|
19
20
|
end
|
20
21
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ups-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Veeqo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ox
|
@@ -161,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
161
|
version: 1.3.6
|
162
162
|
requirements: []
|
163
163
|
rubyforge_project:
|
164
|
-
rubygems_version: 2.
|
164
|
+
rubygems_version: 2.4.5.2
|
165
165
|
signing_key:
|
166
166
|
specification_version: 4
|
167
167
|
summary: UPS
|