friendly_shipping 0.7.1 → 0.7.2

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: 748717bbd3258962363ac3c25a9159cbcf384c91d8f5a356a1c405441bec7bac
4
- data.tar.gz: cf66d120169edd0bdc1608a27c0a015da599ca7800e813245cb1af9b2ce7992d
3
+ metadata.gz: 11feea7117aee582e6cf2fd45e1d3957b84ac4eb99e7746f69a72ec03813a098
4
+ data.tar.gz: 9528284726091701e148ce72644cb0fef51317224bee1bcb4115be966d35913f
5
5
  SHA512:
6
- metadata.gz: f5b2fe10990482d30af429f31bbb48acfafa3dec81adf728a18a29d3de20bafaf329d00c73bb8899ab21469b7068a67bdb848067980d4deee559cdd1cbe511bb
7
- data.tar.gz: 483efd68ebd20f3554baa8a239d1372a3fea8805cbcd203e84f7ec2401fd135627c452c2002147b474635806748dffd926ead4f40030ce583fb8a01c6d60ef3a
6
+ metadata.gz: f079e4e7bbc7f8352933936c35efa22648706b1e83b3b0d050f506453cac1628bd2628f407b3f9d1ebab9e97471761bee9d5f918b034b107a0ec67333774e6e7
7
+ data.tar.gz: 44c1225326a3a0a51716f1ace18488f2890b1790229b8ffe1422087d28473f804b15d9a39d0b3c923f5e1d9e94cabd41ddd4bc20475bf967cfd883760bf00aa0
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.2] - 2023-01-24
8
+ - ShipEngine Service: Allow sending a label image ID when creating labels (#152)
9
+
7
10
  ## [0.7.1] - 2023-01-20
8
11
  - ShipEngine Service: Include package dimensions even if package code given
9
12
 
@@ -10,22 +10,26 @@ module FriendlyShipping
10
10
  # @attribute label_format [Symbol] The format for the label. Possible Values: :png, :zpl and :pdf. Default :pdf
11
11
  # @attribute label_download_type [Symbol] Whether to download directly (`:inline`) or
12
12
  # obtain a URL to the label (`:url`). Default :url
13
+ # @attribute label_image_id [String] Identifier for image uploaded to ShipEngine. Default: nil
13
14
  # @attribute package_options [Enumberable<LabelPackageOptions>] Package options for the packages in the shipment
14
15
  #
15
16
  class LabelOptions < FriendlyShipping::ShipmentOptions
16
17
  attr_reader :shipping_method,
18
+ :label_download_type,
17
19
  :label_format,
18
- :label_download_type
20
+ :label_image_id
19
21
 
20
22
  def initialize(
21
23
  shipping_method:,
22
- label_format: :pdf,
23
24
  label_download_type: :url,
25
+ label_format: :pdf,
26
+ label_image_id: nil,
24
27
  **kwargs
25
28
  )
26
29
  @shipping_method = shipping_method
27
- @label_format = label_format
28
30
  @label_download_type = label_download_type
31
+ @label_format = label_format
32
+ @label_image_id = label_image_id
29
33
  super(**kwargs.merge(package_options_class: LabelPackageOptions))
30
34
  end
31
35
  end
@@ -25,6 +25,10 @@ module FriendlyShipping
25
25
  shipment_hash[:test_label] = true
26
26
  end
27
27
 
28
+ if options.label_image_id
29
+ shipment_hash[:label_image_id] = options.label_image_id
30
+ end
31
+
28
32
  shipment_hash
29
33
  end
30
34
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FriendlyShipping
4
- VERSION = "0.7.1"
4
+ VERSION = "0.7.2"
5
5
  end
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.1
4
+ version: 0.7.2
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-20 00:00:00.000000000 Z
11
+ date: 2023-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-monads