dhl_ecommerce 0.1.1 → 0.1.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: 909dda3080ed349bc16b20e01eb55c8f46072e3f0622d61485c90910a29cfbb5
4
- data.tar.gz: 9ae4497926dc08d1b6cfa0e91fe0ce0c7274fc42e0e89055fdec24ed449b71cd
3
+ metadata.gz: 5a009866147e68c360e557ea25811c802976e787ceae01eb97f494c1bb2b5160
4
+ data.tar.gz: 165632cdf36ceb238b894ec27f6611d7f04062fd90e5ecb9924abc7963ffe422
5
5
  SHA512:
6
- metadata.gz: 0e1353f59dd5dc895150170f7d7602f7c87d2ead6ee66a2780693cf60c64abf845521bef595931172ee0f3098e6faf4a1fcc0a61dbf2b2cebea381cfcc785235
7
- data.tar.gz: db16b5d8995a8b639069e7a0d38afdc09c1ff9f8af8d7eab207d8d3304405b42f7f3762496a4406a8588d6655e604718a6075f116c7ad1e18e74d21682f07f0b
6
+ metadata.gz: c0b90b2c57727062eb23e64286ee3a68f1553692df7309fbf20acf2182f0058cb128671661e9cbba7f9d4517d1045fdf204b428de4e3ba5a8607b0c9a6683b3d
7
+ data.tar.gz: 55afd62160228a17acf41f163cbff827cd6e3cd2578c7012ef254afa9d1594253535ede05df47224aa7dd81fcc8504d79f710540c01bb7ae4c5b709b36b5f309
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dhl_ecommerce (0.1.0)
4
+ dhl_ecommerce (0.1.2)
5
5
  httparty
6
6
 
7
7
  GEM
@@ -10,18 +10,18 @@ GEM
10
10
  awesome_print (1.8.0)
11
11
  coderay (1.1.2)
12
12
  diff-lcs (1.3)
13
- httparty (0.17.1)
13
+ httparty (0.18.1)
14
14
  mime-types (~> 3.0)
15
15
  multi_xml (>= 0.5.2)
16
16
  method_source (0.9.2)
17
- mime-types (3.3)
17
+ mime-types (3.3.1)
18
18
  mime-types-data (~> 3.2015)
19
- mime-types-data (3.2019.1009)
19
+ mime-types-data (3.2021.0225)
20
20
  multi_xml (0.6.0)
21
21
  pry (0.12.2)
22
22
  coderay (~> 1.1.0)
23
23
  method_source (~> 0.9.0)
24
- rake (10.5.0)
24
+ rake (13.0.1)
25
25
  rspec (3.9.0)
26
26
  rspec-core (~> 3.9.0)
27
27
  rspec-expectations (~> 3.9.0)
@@ -44,8 +44,8 @@ DEPENDENCIES
44
44
  bundler (~> 2.0)
45
45
  dhl_ecommerce!
46
46
  pry
47
- rake (~> 10.0)
47
+ rake (~> 13.0)
48
48
  rspec (~> 3.0)
49
49
 
50
50
  BUNDLED WITH
51
- 2.0.2
51
+ 2.1.4
data/README.md CHANGED
@@ -1,43 +1,9 @@
1
1
  # DhlEcommerce
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/dhl_ecommerce`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ Request wrapper for DHL eCommerce Asia API
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ # VERSIONS
6
6
 
7
- ## Installation
7
+ ## 0.1.2
8
8
 
9
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem 'dhl_ecommerce'
13
- ```
14
-
15
- And then execute:
16
-
17
- $ bundle
18
-
19
- Or install it yourself as:
20
-
21
- $ gem install dhl_ecommerce
22
-
23
- ## Usage
24
-
25
- TODO: Write usage instructions here
26
-
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
-
33
- ## Contributing
34
-
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/dhl_ecommerce. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
-
37
- ## License
38
-
39
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
40
-
41
- ## Code of Conduct
42
-
43
- Everyone interacting in the DhlEcommerce project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/dhl_ecommerce/blob/master/CODE_OF_CONDUCT.md).
9
+ Add Destroy shipments endpoint
@@ -30,6 +30,6 @@ Gem::Specification.new do |spec|
30
30
  spec.add_development_dependency 'awesome_print'
31
31
  spec.add_development_dependency 'bundler', '~> 2.0'
32
32
  spec.add_development_dependency 'pry'
33
- spec.add_development_dependency 'rake', '~> 10.0'
33
+ spec.add_development_dependency 'rake', '~> 13.0'
34
34
  spec.add_development_dependency 'rspec', '~> 3.0'
35
35
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DhlEcommerce
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
 
6
6
  SANDBOX_BASE_URL = 'https://sandbox.dhlecommerce.asia'
7
7
  PRODUCTION_BASE_URL = 'https://api.dhlecommerce.asia'
@@ -34,6 +34,22 @@ module DhlEcommerce
34
34
  }
35
35
  post('/rest/v3/Tracking/', params)
36
36
  end
37
+
38
+ def destroy_shipment(options = {})
39
+ params = {
40
+ deleteShipmentReq: {
41
+ hdr: {
42
+ messageType: 'DELETESHIPMENT',
43
+ messageDateTime: DateTime.now.to_s,
44
+ accessToken: @access_token,
45
+ messageVersion: '1.0',
46
+ messageLanguage: 'en'
47
+ },
48
+ bd: options
49
+ }
50
+ }
51
+ post('/rest/v2/Label/Delete', params)
52
+ end
37
53
  end
38
54
  end
39
55
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dhl_ecommerce
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Sivoglaz
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-01-15 00:00:00.000000000 Z
11
+ date: 2021-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '10.0'
75
+ version: '13.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '10.0'
82
+ version: '13.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
140
  requirements: []
141
- rubygems_version: 3.0.6
141
+ rubygems_version: 3.1.4
142
142
  signing_key:
143
143
  specification_version: 4
144
144
  summary: Unofficial DhlEcommerce API Ruby SDK