friendly_shipping 0.7.2 → 0.7.3
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c32d3c28aea8a8cc0367288ea92fd4c1f29c5e18eb680a82f273e3f4319d14e
|
4
|
+
data.tar.gz: 6618acc12ea1a92156dbfd2864a812d4c44cebd2b4f4c05b13d3d19d20d6fc62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef98ea7a648d25aba9d2d2df3d4d624a5c6413f1008d6bd9e2aff3520779aee02c24163242152698cdacf91a9c9b75a1686f950a53b1eb1aa406f6882c2864fe
|
7
|
+
data.tar.gz: 6e6d8669b5fa64c18cbf89a215e642042f1bcc31f35900a9836782bd80ca307e6bdeafdf36b8a946e0d3da3068338b1db69133827af0ec59cd2f538cb1c74492
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## [0.7.3] - 2023-01-24
|
8
|
+
- UPS Service: Record USPS tracking code (#153)
|
9
|
+
|
7
10
|
## [0.7.2] - 2023-01-24
|
8
11
|
- ShipEngine Service: Allow sending a label image ID when creating labels (#152)
|
9
12
|
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module FriendlyShipping
|
4
|
+
module Services
|
5
|
+
class Ups
|
6
|
+
class Label < FriendlyShipping::Label
|
7
|
+
attr_reader :usps_tracking_number
|
8
|
+
|
9
|
+
# @param [String] usps_tracking_number The label's usps tracking number. Limited to SUREPOST
|
10
|
+
def initialize(
|
11
|
+
usps_tracking_number: nil,
|
12
|
+
**params
|
13
|
+
)
|
14
|
+
@usps_tracking_number = usps_tracking_number
|
15
|
+
super(**params)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -36,8 +36,9 @@ module FriendlyShipping
|
|
36
36
|
cost_breakdown = build_cost_breakdown(package)
|
37
37
|
package_cost = cost_breakdown.values.any? ? cost_breakdown.values.sum : nil
|
38
38
|
encoded_label_data = package.at('LabelImage/GraphicImage')&.text
|
39
|
-
FriendlyShipping::Label.new(
|
39
|
+
FriendlyShipping::Services::Ups::Label.new(
|
40
40
|
tracking_number: package.at('TrackingNumber').text,
|
41
|
+
usps_tracking_number: package.at('USPSPICNumber')&.text,
|
41
42
|
label_data: encoded_label_data ? Base64.decode64(encoded_label_data) : nil,
|
42
43
|
label_format: package.at('LabelImage/LabelImageFormat/Code')&.text,
|
43
44
|
cost: package_cost,
|
@@ -19,6 +19,7 @@ require 'friendly_shipping/services/ups/parse_shipment_accept_response'
|
|
19
19
|
require 'friendly_shipping/services/ups/parse_time_in_transit_response'
|
20
20
|
require 'friendly_shipping/services/ups/parse_void_shipment_response'
|
21
21
|
require 'friendly_shipping/services/ups/shipping_methods'
|
22
|
+
require 'friendly_shipping/services/ups/label'
|
22
23
|
require 'friendly_shipping/services/ups/label_options'
|
23
24
|
require 'friendly_shipping/services/ups/rate_estimate_options'
|
24
25
|
require 'friendly_shipping/services/ups/timing_options'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: friendly_shipping
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Meyerhoff
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01-
|
11
|
+
date: 2023-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-monads
|
@@ -296,6 +296,7 @@ files:
|
|
296
296
|
- lib/friendly_shipping/services/ship_engine/serialize_label_shipment.rb
|
297
297
|
- lib/friendly_shipping/services/ship_engine/serialize_rate_estimate_request.rb
|
298
298
|
- lib/friendly_shipping/services/ups.rb
|
299
|
+
- lib/friendly_shipping/services/ups/label.rb
|
299
300
|
- lib/friendly_shipping/services/ups/label_billing_options.rb
|
300
301
|
- lib/friendly_shipping/services/ups/label_item_options.rb
|
301
302
|
- lib/friendly_shipping/services/ups/label_options.rb
|