ups-ruby 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +22 -0
  3. data/.hound.yml +2 -0
  4. data/.rubocop.yml +1064 -0
  5. data/.travis.yml +10 -0
  6. data/Gemfile +10 -0
  7. data/Gemfile.lock +46 -0
  8. data/LICENSE.txt +14 -0
  9. data/README.md +78 -0
  10. data/Rakefile +17 -0
  11. data/lib/ups-ruby.rb +2 -0
  12. data/lib/ups.rb +33 -0
  13. data/lib/ups/builders/address_builder.rb +135 -0
  14. data/lib/ups/builders/builder_base.rb +216 -0
  15. data/lib/ups/builders/organisation_builder.rb +74 -0
  16. data/lib/ups/builders/rate_builder.rb +21 -0
  17. data/lib/ups/builders/ship_accept_builder.rb +30 -0
  18. data/lib/ups/builders/ship_confirm_builder.rb +103 -0
  19. data/lib/ups/builders/shipper_builder.rb +88 -0
  20. data/lib/ups/connection.rb +124 -0
  21. data/lib/ups/data.rb +50 -0
  22. data/lib/ups/data/canadian_states.rb +21 -0
  23. data/lib/ups/data/ie_counties.rb +10 -0
  24. data/lib/ups/data/ie_county_prefixes.rb +15 -0
  25. data/lib/ups/data/us_states.rb +59 -0
  26. data/lib/ups/exceptions.rb +7 -0
  27. data/lib/ups/packaging.rb +27 -0
  28. data/lib/ups/parsers/parser_base.rb +48 -0
  29. data/lib/ups/parsers/rates_parser.rb +60 -0
  30. data/lib/ups/parsers/ship_accept_parser.rb +52 -0
  31. data/lib/ups/parsers/ship_confirm_parser.rb +16 -0
  32. data/lib/ups/services.rb +21 -0
  33. data/lib/ups/version.rb +10 -0
  34. data/spec/spec_helper.rb +18 -0
  35. data/spec/stubs/rates_negotiated_success.xml +227 -0
  36. data/spec/stubs/rates_success.xml +196 -0
  37. data/spec/stubs/ship_accept_failure.xml +12 -0
  38. data/spec/stubs/ship_accept_success.xml +56 -0
  39. data/spec/stubs/ship_confirm_failure.xml +12 -0
  40. data/spec/stubs/ship_confirm_success.xml +50 -0
  41. data/spec/support/RateRequest.xsd +1 -0
  42. data/spec/support/ShipAcceptRequest.xsd +36 -0
  43. data/spec/support/ShipConfirmRequest.xsd +996 -0
  44. data/spec/support/schema_path.rb +5 -0
  45. data/spec/support/shipping_options.rb +48 -0
  46. data/spec/support/xsd_validator.rb +11 -0
  47. data/spec/ups/builders/address_builder_spec.rb +97 -0
  48. data/spec/ups/builders/rate_builder_spec.rb +20 -0
  49. data/spec/ups/builders/ship_accept_builder_spec.rb +16 -0
  50. data/spec/ups/builders/ship_confirm_builder_spec.rb +23 -0
  51. data/spec/ups/connection/rates_negotiated_spec.rb +69 -0
  52. data/spec/ups/connection/rates_standard_spec.rb +71 -0
  53. data/spec/ups/connection/ship_spec.rb +111 -0
  54. data/spec/ups/connection_spec.rb +20 -0
  55. data/ups.gemspec +24 -0
  56. metadata +166 -0
@@ -0,0 +1,21 @@
1
+ require 'insensitive_hash'
2
+
3
+ module UPS
4
+ module Data
5
+ CANADIAN_STATES = {
6
+ 'British Columbia' => 'BC',
7
+ 'Ontario' => 'ON',
8
+ 'Newfoundland and Labrador' => 'NL',
9
+ 'Nova Scotia' => 'NS',
10
+ 'Prince Edward Island' => 'PE',
11
+ 'New Brunswick' => 'NB',
12
+ 'Quebec' => 'QC',
13
+ 'Manitoba' => 'MB',
14
+ 'Saskatchewan' => 'SK',
15
+ 'Alberta' => 'AB',
16
+ 'Northwest Territories' => 'NT',
17
+ 'Nunavut' => 'NU',
18
+ 'Yukon Territory' => 'YT'
19
+ }.insensitive
20
+ end
21
+ end
@@ -0,0 +1,10 @@
1
+ module UPS
2
+ module Data
3
+ IE_COUNTIES = %w(
4
+ Antrim Armagh Carlow Cavan Clare Cork Derry Donegal Down Dublin Fermanagh
5
+ Galway Kerry Kildare Kilkenny Laois Leitrim Limerick Longford Louth Mayo
6
+ Meath Monaghan Offaly Roscommon Sligo Tipperary Tyrone Waterford Westmeath
7
+ Wexford Wicklow
8
+ )
9
+ end
10
+ end
@@ -0,0 +1,15 @@
1
+ module UPS
2
+ module Data
3
+ IE_COUNTY_PREFIXES = [
4
+ 'County',
5
+ 'Cnty',
6
+ 'CC.',
7
+ 'CC',
8
+ 'Ct.',
9
+ 'Ct',
10
+ 'Co.',
11
+ 'Co',
12
+ 'C.'
13
+ ]
14
+ end
15
+ end
@@ -0,0 +1,59 @@
1
+ require 'insensitive_hash'
2
+
3
+ module UPS
4
+ module Data
5
+ US_STATES = {
6
+ 'Alabama' => 'AL',
7
+ 'Alaska' => 'AK',
8
+ 'Arizona' => 'AZ',
9
+ 'Arkansas' => 'AR',
10
+ 'California' => 'CA',
11
+ 'Colorado' => 'CO',
12
+ 'Connecticut' => 'CT',
13
+ 'Delaware' => 'DE',
14
+ 'District of Columbia' => 'DC',
15
+ 'Florida' => 'FL',
16
+ 'Georgia' => 'GA',
17
+ 'Hawaii' => 'HI',
18
+ 'Idaho' => 'ID',
19
+ 'Illinois' => 'IL',
20
+ 'Indiana' => 'IN',
21
+ 'Iowa' => 'IA',
22
+ 'Kansas' => 'KS',
23
+ 'Kentucky' => 'KY',
24
+ 'Louisiana' => 'LA',
25
+ 'Maine' => 'ME',
26
+ 'Maryland' => 'MD',
27
+ 'Massachusetts' => 'MA',
28
+ 'Michigan' => 'MI',
29
+ 'Minnesota' => 'MN',
30
+ 'Mississippi' => 'MS',
31
+ 'Missouri' => 'MO',
32
+ 'Montana' => 'MT',
33
+ 'Nebraska' => 'NE',
34
+ 'Nevada' => 'NV',
35
+ 'New Hampshire' => 'NH',
36
+ 'New Jersey' => 'NJ',
37
+ 'New Mexico' => 'NM',
38
+ 'New York' => 'NY',
39
+ 'North Carolina' => 'NC',
40
+ 'North Dakota' => 'ND',
41
+ 'Ohio' => 'OH',
42
+ 'Oklahoma' => 'OK',
43
+ 'Oregon' => 'OR',
44
+ 'Pennsylvania' => 'PA',
45
+ 'Rhode Island' => 'RI',
46
+ 'South Carolina' => 'SC',
47
+ 'South Dakota' => 'SD',
48
+ 'Tennessee' => 'TN',
49
+ 'Texas' => 'TX',
50
+ 'Utah' => 'UT',
51
+ 'Vermont' => 'VT',
52
+ 'Virginia' => 'VA',
53
+ 'Washington' => 'WA',
54
+ 'West Virginia' => 'WV',
55
+ 'Wisconsin' => 'WI',
56
+ 'Wyoming' => 'WY'
57
+ }.insensitive
58
+ end
59
+ end
@@ -0,0 +1,7 @@
1
+ module UPS
2
+ module Exceptions
3
+ class InvalidUrlException < StandardError; end
4
+ class InvalidAttributeError < StandardError; end
5
+ class AuthenticationRequiredException < StandardError; end
6
+ end
7
+ end
@@ -0,0 +1,27 @@
1
+ module UPS
2
+ PACKAGING = {
3
+ '01' => 'UPS Letter',
4
+ '02' => 'Customer Supplied Package',
5
+ '03' => 'Tube',
6
+ '04' => 'Pak',
7
+ '21' => 'UPS Express Box',
8
+ '24' => 'UPS 25kg box',
9
+ '25' => 'UPS 10kg box',
10
+ '30' => 'Pallet',
11
+ '2a' => 'Small Express Box',
12
+ '2b' => 'Medium Express Box',
13
+ '2c' => 'Large Express Box',
14
+ '56' => 'Flats',
15
+ '57' => 'Parcels',
16
+ '58' => 'BPM',
17
+ '59' => 'First Class',
18
+ '60' => 'Priority',
19
+ '61' => 'Machinables',
20
+ '62' => 'Irregulars',
21
+ '63' => 'Parcel Post',
22
+ '64' => 'BPM Parcel',
23
+ '65' => 'Media Mail',
24
+ '66' => 'BPM Flat',
25
+ '67' => 'Standard Flat'
26
+ }
27
+ end
@@ -0,0 +1,48 @@
1
+ require 'uri'
2
+ require 'ox'
3
+
4
+ module UPS
5
+ module Parsers
6
+ class ParserBase < ::Ox::Sax
7
+ attr_accessor :switches,
8
+ :status_code,
9
+ :status_description,
10
+ :error_description
11
+
12
+ def initialize
13
+ self.switches = {}
14
+ end
15
+
16
+ def start_element(name)
17
+ element_tracker_switch name, true
18
+ end
19
+
20
+ def end_element(name)
21
+ element_tracker_switch name, false
22
+ end
23
+
24
+ def value(value)
25
+ data = value.as_s
26
+ self.status_code = data if switch_active? :ResponseStatusCode
27
+
28
+ if switch_active?(:ResponseStatusDescription)
29
+ self.status_description = data
30
+ end
31
+
32
+ self.error_description = data if switch_active? :ErrorDescription
33
+ end
34
+
35
+ def element_tracker_switch(element, currently_in)
36
+ switches[element] = currently_in
37
+ end
38
+
39
+ def switch_active?(*elements)
40
+ elements.all? { |element| switches[element] == true }
41
+ end
42
+
43
+ def success?
44
+ ['1', 1].include? status_code
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,60 @@
1
+ module UPS
2
+ module Parsers
3
+ class RatesParser < ParserBase
4
+ attr_accessor :rated_shipments
5
+
6
+ def initialize
7
+ super
8
+ self.rated_shipments = []
9
+ @current_rate = {}
10
+ end
11
+
12
+ def start_element(name)
13
+ super
14
+ end
15
+
16
+ def end_element(name)
17
+ super
18
+ return unless name == :RatedShipment
19
+ rated_shipments << @current_rate.tap do |c|
20
+ if c.key? :negotiated_rate
21
+ c[:total] = c[:negotiated_rate]
22
+ c.delete :negotiated_rate
23
+ end
24
+ end
25
+ @current_rate = {}
26
+ end
27
+
28
+ def value(value)
29
+ super
30
+ if switch_active?(:RatedShipment, :Service, :Code)
31
+ parse_service_code value
32
+ elsif switch_active?(:RatedShipment, :TotalCharges)
33
+ parse_total_charges value
34
+ elsif switch_active?(:RatedShipment, :NegotiatedRates, :MonetaryValue)
35
+ parse_negotiated_rate value
36
+ elsif switch_active?(:RatedShipment, :RatedShipmentWarning)
37
+ parse_rated_shipment_warning value
38
+ end
39
+ end
40
+
41
+ def parse_negotiated_rate(value)
42
+ @current_rate[:negotiated_rate] = value.as_s
43
+ end
44
+
45
+ def parse_rated_shipment_warning(value)
46
+ @current_rate[:warnings] ||= []
47
+ @current_rate[:warnings] << value.as_s
48
+ end
49
+
50
+ def parse_service_code(value)
51
+ @current_rate[:service_code] = value.as_s
52
+ @current_rate[:service_name] = UPS::SERVICES[value.as_s]
53
+ end
54
+
55
+ def parse_total_charges(value)
56
+ @current_rate[:total] = value.as_s
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,52 @@
1
+ require 'base64'
2
+ require 'tempfile'
3
+
4
+ module UPS
5
+ module Parsers
6
+ class ShipAcceptParser < ParserBase
7
+ attr_accessor :graphic_image,
8
+ :graphic_extension,
9
+ :html_image,
10
+ :tracking_number
11
+
12
+ def value(value)
13
+ parse_graphic_image(value)
14
+ parse_html_image(value)
15
+ parse_tracking_number(value)
16
+ parse_graphic_extension(value)
17
+ super
18
+ end
19
+
20
+ def parse_graphic_image(value)
21
+ return unless switch_active?(:GraphicImage)
22
+ self.graphic_image = base64_to_file(value.as_s)
23
+ end
24
+
25
+ def parse_html_image(value)
26
+ return unless switch_active?(:HTMLImage)
27
+ self.html_image = base64_to_file(value.as_s)
28
+ end
29
+
30
+ def parse_tracking_number(value)
31
+ return unless switch_active?(:ShipmentIdentificationNumber)
32
+ self.tracking_number = value.as_s
33
+ end
34
+
35
+ def parse_graphic_extension(value)
36
+ return unless switch_active?(:LabelImageFormat, :Code)
37
+ self.graphic_extension = ".#{value.as_s.downcase}"
38
+ end
39
+
40
+ def base64_to_file(contents)
41
+ file_config = ['ups', graphic_extension]
42
+ Tempfile.new(file_config, nil, encoding: 'ascii-8bit').tap do |file|
43
+ begin
44
+ file.write Base64.decode64(contents)
45
+ ensure
46
+ file.rewind
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,16 @@
1
+ module UPS
2
+ module Parsers
3
+ class ShipConfirmParser < ParserBase
4
+ attr_accessor :identification_number, :shipment_digest
5
+
6
+ def value(value)
7
+ if switch_active?(:ShipmentIdentificationNumber)
8
+ self.identification_number = value.as_s
9
+ elsif switch_active?(:ShipmentDigest)
10
+ self.shipment_digest = value.as_s
11
+ end
12
+ super
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,21 @@
1
+ module UPS
2
+ SERVICES = {
3
+ '01' => 'Next Day Air',
4
+ '02' => '2nd Day Air',
5
+ '03' => 'Ground',
6
+ '07' => 'Express',
7
+ '08' => 'Expedited',
8
+ '11' => 'UPS Standard',
9
+ '12' => '3 Day Select',
10
+ '13' => 'Next Day Air Saver',
11
+ '14' => 'Next Day Air Early AM',
12
+ '54' => 'Express Plus',
13
+ '59' => '2nd Day Air A.M.',
14
+ '65' => 'UPS Saver',
15
+ '82' => 'UPS Today Standard',
16
+ '83' => 'UPS Today Dedicated Courier',
17
+ '84' => 'UPS Today Intercity',
18
+ '85' => 'UPS Today Express',
19
+ '86' => 'UPS Today Express Saver'
20
+ }
21
+ end
@@ -0,0 +1,10 @@
1
+ module UPS
2
+ module Version
3
+ MAJOR = 0
4
+ MINOR = 8
5
+ PATCH = 3
6
+ BUILD = nil
7
+
8
+ STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
9
+ end
10
+ end
@@ -0,0 +1,18 @@
1
+ require 'simplecov'
2
+ SimpleCov.start
3
+
4
+ path = File.expand_path('../../', __FILE__)
5
+ require "#{path}/lib/ups.rb"
6
+
7
+ # Set default env parameters to prevent CI failing on pull requests
8
+ ENV['UPS_LICENSE_NUMBER'] = '' unless ENV.key? 'UPS_LICENSE_NUMBER'
9
+ ENV['UPS_USER_ID'] = '' unless ENV.key? 'UPS_USER_ID'
10
+ ENV['UPS_PASSWORD'] = '' unless ENV.key? 'UPS_PASSWORD'
11
+ ENV['UPS_ACCOUNT_NUMBER'] = '' unless ENV.key? 'UPS_ACCOUNT_NUMBER'
12
+
13
+ require 'nokogiri'
14
+ require 'minitest/autorun'
15
+
16
+ require 'support/schema_path'
17
+ require 'support/shipping_options'
18
+ require 'support/xsd_validator'
@@ -0,0 +1,227 @@
1
+ <?xml version="1.0"?>
2
+ <RatingServiceSelectionResponse>
3
+ <Response>
4
+ <ResponseStatusCode>1</ResponseStatusCode>
5
+ <ResponseStatusDescription>Success</ResponseStatusDescription>
6
+ </Response>
7
+ <RatedShipment>
8
+ <Service>
9
+ <Code>11</Code>
10
+ </Service>
11
+ <RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning>
12
+ <BillingWeight>
13
+ <UnitOfMeasurement>
14
+ <Code>KGS</Code>
15
+ </UnitOfMeasurement>
16
+ <Weight>0.5</Weight>
17
+ </BillingWeight>
18
+ <TransportationCharges>
19
+ <CurrencyCode>GBP</CurrencyCode>
20
+ <MonetaryValue>25.03</MonetaryValue>
21
+ </TransportationCharges>
22
+ <ServiceOptionsCharges>
23
+ <CurrencyCode>GBP</CurrencyCode>
24
+ <MonetaryValue>0.00</MonetaryValue>
25
+ </ServiceOptionsCharges>
26
+ <TotalCharges>
27
+ <CurrencyCode>GBP</CurrencyCode>
28
+ <MonetaryValue>25.03</MonetaryValue>
29
+ </TotalCharges>
30
+ <GuaranteedDaysToDelivery/>
31
+ <ScheduledDeliveryTime/>
32
+ <RatedPackage>
33
+ <TransportationCharges>
34
+ <CurrencyCode/>
35
+ <MonetaryValue/>
36
+ </TransportationCharges>
37
+ <ServiceOptionsCharges>
38
+ <CurrencyCode/>
39
+ <MonetaryValue/>
40
+ </ServiceOptionsCharges>
41
+ <TotalCharges>
42
+ <CurrencyCode/>
43
+ <MonetaryValue/>
44
+ </TotalCharges>
45
+ <Weight>0.5</Weight>
46
+ <BillingWeight>
47
+ <UnitOfMeasurement>
48
+ <Code/>
49
+ </UnitOfMeasurement>
50
+ <Weight/>
51
+ </BillingWeight>
52
+ </RatedPackage>
53
+ <NegotiatedRates>
54
+ <NetSummaryCharges>
55
+ <GrandTotal>
56
+ <CurrencyCode>GBP</CurrencyCode>
57
+ <MonetaryValue>24.78</MonetaryValue>
58
+ </GrandTotal>
59
+ </NetSummaryCharges>
60
+ </NegotiatedRates>
61
+ </RatedShipment>
62
+ <RatedShipment>
63
+ <Service>
64
+ <Code>65</Code>
65
+ </Service>
66
+ <RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning>
67
+ <BillingWeight>
68
+ <UnitOfMeasurement>
69
+ <Code>KGS</Code>
70
+ </UnitOfMeasurement>
71
+ <Weight>0.5</Weight>
72
+ </BillingWeight>
73
+ <TransportationCharges>
74
+ <CurrencyCode>GBP</CurrencyCode>
75
+ <MonetaryValue>45.61</MonetaryValue>
76
+ </TransportationCharges>
77
+ <ServiceOptionsCharges>
78
+ <CurrencyCode>GBP</CurrencyCode>
79
+ <MonetaryValue>0.00</MonetaryValue>
80
+ </ServiceOptionsCharges>
81
+ <TotalCharges>
82
+ <CurrencyCode>GBP</CurrencyCode>
83
+ <MonetaryValue>45.61</MonetaryValue>
84
+ </TotalCharges>
85
+ <GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery>
86
+ <ScheduledDeliveryTime>12:00 Noon</ScheduledDeliveryTime>
87
+ <RatedPackage>
88
+ <TransportationCharges>
89
+ <CurrencyCode/>
90
+ <MonetaryValue/>
91
+ </TransportationCharges>
92
+ <ServiceOptionsCharges>
93
+ <CurrencyCode/>
94
+ <MonetaryValue/>
95
+ </ServiceOptionsCharges>
96
+ <TotalCharges>
97
+ <CurrencyCode/>
98
+ <MonetaryValue/>
99
+ </TotalCharges>
100
+ <Weight>0.5</Weight>
101
+ <BillingWeight>
102
+ <UnitOfMeasurement>
103
+ <Code/>
104
+ </UnitOfMeasurement>
105
+ <Weight/>
106
+ </BillingWeight>
107
+ </RatedPackage>
108
+ <NegotiatedRates>
109
+ <NetSummaryCharges>
110
+ <GrandTotal>
111
+ <CurrencyCode>GBP</CurrencyCode>
112
+ <MonetaryValue>45.15</MonetaryValue>
113
+ </GrandTotal>
114
+ </NetSummaryCharges>
115
+ </NegotiatedRates>
116
+ </RatedShipment>
117
+ <RatedShipment>
118
+ <Service>
119
+ <Code>54</Code>
120
+ </Service>
121
+ <RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning>
122
+ <BillingWeight>
123
+ <UnitOfMeasurement>
124
+ <Code>KGS</Code>
125
+ </UnitOfMeasurement>
126
+ <Weight>0.5</Weight>
127
+ </BillingWeight>
128
+ <TransportationCharges>
129
+ <CurrencyCode>GBP</CurrencyCode>
130
+ <MonetaryValue>81.71</MonetaryValue>
131
+ </TransportationCharges>
132
+ <ServiceOptionsCharges>
133
+ <CurrencyCode>GBP</CurrencyCode>
134
+ <MonetaryValue>0.00</MonetaryValue>
135
+ </ServiceOptionsCharges>
136
+ <TotalCharges>
137
+ <CurrencyCode>GBP</CurrencyCode>
138
+ <MonetaryValue>81.71</MonetaryValue>
139
+ </TotalCharges>
140
+ <GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery>
141
+ <ScheduledDeliveryTime>9:00 A.M.</ScheduledDeliveryTime>
142
+ <RatedPackage>
143
+ <TransportationCharges>
144
+ <CurrencyCode/>
145
+ <MonetaryValue/>
146
+ </TransportationCharges>
147
+ <ServiceOptionsCharges>
148
+ <CurrencyCode/>
149
+ <MonetaryValue/>
150
+ </ServiceOptionsCharges>
151
+ <TotalCharges>
152
+ <CurrencyCode/>
153
+ <MonetaryValue/>
154
+ </TotalCharges>
155
+ <Weight>0.5</Weight>
156
+ <BillingWeight>
157
+ <UnitOfMeasurement>
158
+ <Code/>
159
+ </UnitOfMeasurement>
160
+ <Weight/>
161
+ </BillingWeight>
162
+ </RatedPackage>
163
+ <NegotiatedRates>
164
+ <NetSummaryCharges>
165
+ <GrandTotal>
166
+ <CurrencyCode>GBP</CurrencyCode>
167
+ <MonetaryValue>80.89</MonetaryValue>
168
+ </GrandTotal>
169
+ </NetSummaryCharges>
170
+ </NegotiatedRates>
171
+ </RatedShipment>
172
+ <RatedShipment>
173
+ <Service>
174
+ <Code>07</Code>
175
+ </Service>
176
+ <RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning>
177
+ <BillingWeight>
178
+ <UnitOfMeasurement>
179
+ <Code>KGS</Code>
180
+ </UnitOfMeasurement>
181
+ <Weight>0.5</Weight>
182
+ </BillingWeight>
183
+ <TransportationCharges>
184
+ <CurrencyCode>GBP</CurrencyCode>
185
+ <MonetaryValue>47.56</MonetaryValue>
186
+ </TransportationCharges>
187
+ <ServiceOptionsCharges>
188
+ <CurrencyCode>GBP</CurrencyCode>
189
+ <MonetaryValue>0.00</MonetaryValue>
190
+ </ServiceOptionsCharges>
191
+ <TotalCharges>
192
+ <CurrencyCode>GBP</CurrencyCode>
193
+ <MonetaryValue>47.56</MonetaryValue>
194
+ </TotalCharges>
195
+ <GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery>
196
+ <ScheduledDeliveryTime>10:30 A.M.</ScheduledDeliveryTime>
197
+ <RatedPackage>
198
+ <TransportationCharges>
199
+ <CurrencyCode/>
200
+ <MonetaryValue/>
201
+ </TransportationCharges>
202
+ <ServiceOptionsCharges>
203
+ <CurrencyCode/>
204
+ <MonetaryValue/>
205
+ </ServiceOptionsCharges>
206
+ <TotalCharges>
207
+ <CurrencyCode/>
208
+ <MonetaryValue/>
209
+ </TotalCharges>
210
+ <Weight>0.5</Weight>
211
+ <BillingWeight>
212
+ <UnitOfMeasurement>
213
+ <Code/>
214
+ </UnitOfMeasurement>
215
+ <Weight/>
216
+ </BillingWeight>
217
+ </RatedPackage>
218
+ <NegotiatedRates>
219
+ <NetSummaryCharges>
220
+ <GrandTotal>
221
+ <CurrencyCode>GBP</CurrencyCode>
222
+ <MonetaryValue>47.08</MonetaryValue>
223
+ </GrandTotal>
224
+ </NetSummaryCharges>
225
+ </NegotiatedRates>
226
+ </RatedShipment>
227
+ </RatingServiceSelectionResponse>