dhl-bcs 0.2.0 → 0.3.0

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: '08009611f405006ad59d2fac8990162898692cab2f7e02f4f7840327b64204fe'
4
- data.tar.gz: 31e0b88042b710331d0b96a177ef42977c656b165d319ccf309cc87b81ed69eb
3
+ metadata.gz: de9c80a9486c4d7c02e9c2f08bce20e4519297b65a7e56e45292b6d81da1b7d1
4
+ data.tar.gz: df4f7998310675845b3033b38f4e4e82985361491b84a827cb3a21c841ecadd7
5
5
  SHA512:
6
- metadata.gz: 349f7a9c8cc4675ad17b9703eaf09894982ba97882f5159081f6b6184570226ee2a491720c4bc716d1fd600f2389d17a971e72c7041dc1d30ef0e85d31f390ae
7
- data.tar.gz: c4060bd137c262e0ab29fff8eb45e93a93ba843fd1bd7ceccbd12b27231c226f53c81621e1c6c33fac8be1d88c7982bd20f2b06b54dce9912721a9ba3b14efa0
6
+ metadata.gz: 6df55ab919ded0e7388011f21dccce2f19a2c27eba6f641e5f34b325b8f33046281be1131bcdebf3586a64396b4b9e6198c45e77fa498660800f9ea29766b70d
7
+ data.tar.gz: 42e880a8ea72c3c7cedeadc5fa1292831e5ae24b021aa66b208e62efadbe017c61504d64286bdea044a36340a54ac67fcb4aff7329f49a726af7cac3784b4b88
@@ -102,16 +102,18 @@ module Dhl::Bcs::V2
102
102
 
103
103
  protected
104
104
 
105
- def build_shipment_orders(shipments, label_response_type: 'URL')
105
+ def build_shipment_orders(shipments, label_response_type: 'URL', print_only_if_codeable: false)
106
106
  raise Dhl::Bcs::DataError, 'No more than 30 shipments allowed per request!' if shipments.size > 30
107
107
  {
108
108
  'ShipmentOrder' =>
109
109
  shipments.map.with_index(1) do |shipment, index|
110
- {
110
+ h = {
111
111
  'sequenceNumber' => format('%02i', index.to_s),
112
112
  'Shipment' => shipment.to_soap_hash(@ekp, @participation_number),
113
- 'LabelResponseType' => label_response_type.to_s.upcase
113
+ 'LabelResponseType' => label_response_type.to_s.upcase,
114
114
  }
115
+ h['PrintOnlyIfCodeable/'] = {'@active': 1} if print_only_if_codeable
116
+ h
115
117
  end
116
118
  }
117
119
  end
@@ -1,5 +1,5 @@
1
1
  module Dhl
2
2
  module Bcs
3
- VERSION = "0.2.0"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dhl-bcs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christoph Wagner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-28 00:00:00.000000000 Z
11
+ date: 2018-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: savon