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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8bbb686432266ab1abecf098744a453d0c1747eb51a40629335c6f7ce083475b
4
- data.tar.gz: fbe3f140f3c29831f21cc340fe272916d26efc9365183f01cdd6dceb8c06ea58
3
+ metadata.gz: 31c3c330095fb77264cc9f1d7b63060d72862cc51c76ff0dd71e561319d50477
4
+ data.tar.gz: bc9d453d32e0d1e4a1a0829629e753dea696166d164ca4eadc6740138bf9c1e9
5
5
  SHA512:
6
- metadata.gz: 791b16e26b54f1e9f0a02353d73d0a4b84c89f459461334d20292341e4ba707ab569a249e617cdc5eaa69f99964177b358ea2f13bd58295998f5627dec871292
7
- data.tar.gz: 8483e06fa271c7a514b0d073a9763011f960b7df38d08843ff9d2760dc5fa457b9d5286b429718e39a082ca0002f232a0f63aa72ee0fbbadb7ca847a55c00460
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[:total_cost]} #{rate[:currency]}"
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[:total_cost]} #{result[:currency]}"
94
- puts "Label URL: #{result[:label_url]}"
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
- cost: results['ShipmentCharges']['TotalCharges']['MonetaryValue'].to_f,
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
@@ -1,4 +1,4 @@
1
1
  module Ups
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ups
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - JD Warren