shipcloud 0.10.0 → 0.11.0

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: 5f3bf2ce4eed19aeb58efbeb8f94eec7e530564c8a576ef027a7c6d86f6e0317
4
- data.tar.gz: e8c7ee9e7f832462d45889310890b38919d0edbde40c06d6c6837aafe0fc4d56
3
+ metadata.gz: c02bb6ec8a1171602ea41180a0bb4609240459c2408aab0c81b177f83a50212a
4
+ data.tar.gz: 2d61e2c834ef542ffc4b42129cf387970b4679054de7297cf7b2e46dfee8a5e6
5
5
  SHA512:
6
- metadata.gz: e488aa7992b5fd65a6b267d29e9b638d3256f453b16236e99195a85dd17fd5437ca5c03ec81a2ad0332ae593f8fb816da889d3dddcffbe7807fcdec2336c178c
7
- data.tar.gz: 840df4369680ec64f38cbaeb5e5df4c223f641d7b1145a74fafba5f8ee40e6b6713d99599dd881781550690482a50debe1535c2edde3342d8ec9af3c8e7c35d0
6
+ metadata.gz: 59672a57bb6cc357b53ee612ca7c3845eb21f1e9557a42d93682a9e8ffc939da950b167db1b42229ac60cef400deaf49ad5e0fb5332f1c05695dff5d149f0cfb
7
+ data.tar.gz: 1543d7e8832c8228b19e69c2ad9f6840fb14c79fb8d85afb5a73c6785684356927e7f135b1a23ab048adcf835b8ea2a746380162f953a585b49c00d83fd0cb82
@@ -1 +1 @@
1
- 2.6.3
1
+ 2.6.6
@@ -1,3 +1,18 @@
1
+ ## [0.11.0] - 2020-07-28
2
+ ### Added
3
+ - Support shipments with pickup requests as required for [TNT](https://developers.shipcloud.io/carriers/tnt.html).
4
+ - Add attr_accessor for `email` to class `Shipcloud::Address` to be able to access the email attribute at the address object.
5
+
6
+ ### Changed
7
+
8
+ ### Deprecated
9
+
10
+ ### Removed
11
+
12
+ ### Fixed
13
+
14
+ ### Security
15
+
1
16
  ## [Unreleased]
2
17
  ### Added
3
18
 
@@ -3,7 +3,7 @@ module Shipcloud
3
3
  include Shipcloud::Operations::Update
4
4
  include Shipcloud::Operations::All
5
5
 
6
- attr_accessor :company, :first_name, :last_name, :care_of, :street,
6
+ attr_accessor :company, :first_name, :last_name, :care_of, :street, :email,
7
7
  :street_no, :zip_code, :city, :state, :country, :phone
8
8
  attr_reader :id
9
9
 
@@ -6,7 +6,7 @@ module Shipcloud
6
6
 
7
7
  attr_accessor :from, :to, :carrier, :package, :reference_number, :metadata
8
8
  attr_reader :id, :created_at, :carrier_tracking_no, :tracking_url, :label_url,
9
- :packages, :price, :customs_declaration
9
+ :packages, :price, :customs_declaration, :pickup
10
10
 
11
11
  def self.index_response_root
12
12
  "#{class_name.downcase}s"
@@ -1,3 +1,3 @@
1
1
  module Shipcloud
2
- VERSION = "0.10.0".freeze
2
+ VERSION = "0.11.0".freeze
3
3
  end
@@ -13,7 +13,8 @@ describe Shipcloud::Address do
13
13
  city: 'Hamburg',
14
14
  state: 'Hamburg',
15
15
  country: 'DE',
16
- phone: '040/123456789'
16
+ phone: '040/123456789',
17
+ email: 'max@mustermail.com',
17
18
  }
18
19
 
19
20
  describe '#initialize' do
@@ -30,6 +31,7 @@ describe Shipcloud::Address do
30
31
  expect(address.state).to eq 'Hamburg'
31
32
  expect(address.country).to eq 'DE'
32
33
  expect(address.phone).to eq '040/123456789'
34
+ expect(address.email).to eq 'max@mustermail.com'
33
35
  end
34
36
  end
35
37
 
@@ -19,6 +19,22 @@ describe Shipcloud::Shipment do
19
19
  width: 20,
20
20
  height: 20
21
21
  },
22
+ pickup: {
23
+ pickup_time: {
24
+ earliest: "2015-09-15T09:00:00+02:00",
25
+ latest: "2015-09-15T18:00:00+02:00"
26
+ },
27
+ pickup_address: {
28
+ company: "Sender Ltd.",
29
+ first_name: "Jane",
30
+ last_name: "Doe",
31
+ street: "Musterstraße",
32
+ street_no: "42",
33
+ zip_code: "54321",
34
+ city: "Musterstadt",
35
+ country: "DE"
36
+ },
37
+ },
22
38
  metadata: {
23
39
  product: {
24
40
  name: "foo"
@@ -56,6 +72,17 @@ describe Shipcloud::Shipment do
56
72
  expect(shipment.package[:width]).to eq 20
57
73
  expect(shipment.package[:height]).to eq 20
58
74
 
75
+ expect(shipment.pickup[:pickup_time][:earliest]).to eq "2015-09-15T09:00:00+02:00"
76
+ expect(shipment.pickup[:pickup_time][:latest]).to eq "2015-09-15T18:00:00+02:00"
77
+ expect(shipment.pickup[:pickup_address][:company]).to eq "Sender Ltd."
78
+ expect(shipment.pickup[:pickup_address][:first_name]).to eq "Jane"
79
+ expect(shipment.pickup[:pickup_address][:last_name]).to eq "Doe"
80
+ expect(shipment.pickup[:pickup_address][:street]).to eq "Musterstraße"
81
+ expect(shipment.pickup[:pickup_address][:street_no]).to eq "42"
82
+ expect(shipment.pickup[:pickup_address][:zip_code]).to eq "54321"
83
+ expect(shipment.pickup[:pickup_address][:city]).to eq "Musterstadt"
84
+ expect(shipment.pickup[:pickup_address][:country]).to eq "DE"
85
+
59
86
  expect(shipment.customs_declaration[:id]).to eq "123456"
60
87
  expect(shipment.customs_declaration[:contents_type]).to eq "commercial_goods"
61
88
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shipcloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - sthollmann
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-07 00:00:00.000000000 Z
11
+ date: 2020-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -181,7 +181,7 @@ homepage: https://github.com/shipcloud/shipcloud-ruby
181
181
  licenses:
182
182
  - MIT
183
183
  metadata: {}
184
- post_install_message:
184
+ post_install_message:
185
185
  rdoc_options: []
186
186
  require_paths:
187
187
  - lib
@@ -197,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
197
197
  version: '0'
198
198
  requirements: []
199
199
  rubygems_version: 3.0.3
200
- signing_key:
200
+ signing_key:
201
201
  specification_version: 4
202
202
  summary: A wrapper for the shipcloud API
203
203
  test_files: