ups 0.0.1 → 0.0.2
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/README.md +3 -3
- data/lib/ups/shipping.rb +1 -1
- data/lib/ups/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31c3c330095fb77264cc9f1d7b63060d72862cc51c76ff0dd71e561319d50477
|
4
|
+
data.tar.gz: bc9d453d32e0d1e4a1a0829629e753dea696166d164ca4eadc6740138bf9c1e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1385e2e5bb4142356857948230f60ee54243003361becb9a85badc8a819d923d981c78004e2a5d42e2074909371ba8aab199e63aee1ceb3c4e92ebfe5b14eee8
|
7
|
+
data.tar.gz: 1a2ebcc5cde6664a6214b24abe58c4fe16d32d48a3c35cd00fdbd0084ec0409b0d362e0f8b13978085f487f21e3ec643c374b2c9ece299825019c0c5759eb967
|
data/README.md
CHANGED
@@ -68,7 +68,7 @@ rating_service = Ups::Rating.new(Ups.client)
|
|
68
68
|
rates = rating_service.get_rates(rate_request)
|
69
69
|
|
70
70
|
rates.each do |rate|
|
71
|
-
puts "#{rate[:service_name]}: $#{rate[:
|
71
|
+
puts "#{rate[:service_name]}: $#{rate[:total]} #{rate[:currency]}"
|
72
72
|
end
|
73
73
|
```
|
74
74
|
|
@@ -90,8 +90,8 @@ shipping_service = Ups::Shipping.new(Ups.client)
|
|
90
90
|
result = shipping_service.create_shipment(ship_request)
|
91
91
|
|
92
92
|
puts "Tracking Number: #{result[:tracking_number]}"
|
93
|
-
puts "Total Cost: $#{result[:
|
94
|
-
puts "Label
|
93
|
+
puts "Total Cost: $#{result[:total]} #{result[:currency]}"
|
94
|
+
puts "Label: #{result[:label]}"
|
95
95
|
```
|
96
96
|
|
97
97
|
## Service Codes
|
data/lib/ups/shipping.rb
CHANGED
@@ -118,7 +118,7 @@ module Ups
|
|
118
118
|
tracking_number: results['ShipmentIdentificationNumber'],
|
119
119
|
label: results['PackageResults'][0]['ShippingLabel']['GraphicImage'],
|
120
120
|
extension: results['PackageResults'][0]['ShippingLabel']['ImageFormat']['Code'],
|
121
|
-
|
121
|
+
total: results['ShipmentCharges']['TotalCharges']['MonetaryValue'].to_f,
|
122
122
|
currency: results['ShipmentCharges']['TotalCharges']['CurrencyCode'],
|
123
123
|
data: response.as_json(except: ["GraphicImage", "HTMLImage"]),
|
124
124
|
alerts: response['ShipmentResponse']['Response']['Alert']&.map{|s| s['Description'] }
|
data/lib/ups/version.rb
CHANGED