dhl-intraship 0.0.7
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.
- data/.gitignore +19 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +91 -0
- data/Rakefile +2 -0
- data/dhl-intraship.gemspec +21 -0
- data/lib/dhl-intraship.rb +5 -0
- data/lib/dhl-intraship/address.rb +78 -0
- data/lib/dhl-intraship/api.rb +104 -0
- data/lib/dhl-intraship/product_code.rb +18 -0
- data/lib/dhl-intraship/shipment.rb +57 -0
- data/lib/dhl-intraship/version.rb +5 -0
- data/spec/dhl-intraship/address_spec.rb +16 -0
- data/spec/dhl-intraship/create_shipment_dd_spec.rb +60 -0
- data/spec/spec_helper.rb +8 -0
- metadata +111 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2012 Team Europe
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
# Dhl::Intraship
|
2
|
+
|
3
|
+
This is a simple gem to wrap the DHL Intraship SOAP Api. Note that currently only the simplest usecase is implemented:
|
4
|
+
Sending a national day definite package without any extra services.
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Add this line to your application's Gemfile:
|
9
|
+
|
10
|
+
gem 'dhl-intraship'
|
11
|
+
|
12
|
+
And then execute:
|
13
|
+
|
14
|
+
$ bundle
|
15
|
+
|
16
|
+
Or install it yourself as:
|
17
|
+
|
18
|
+
$ gem install dhl-intraship
|
19
|
+
|
20
|
+
## Usage
|
21
|
+
|
22
|
+
Initialize a new API object using
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
api = Dhl::Infraship::API.new(config, options)
|
26
|
+
```
|
27
|
+
|
28
|
+
Config is the following hash:
|
29
|
+
|
30
|
+
```ruby
|
31
|
+
config = {user: 'your Intraship API user name', #mandatory
|
32
|
+
signature: 'Your Intraship API user password', #mandatory
|
33
|
+
ekp: 'Your DHL EKP (first part of your DHL Account number)', #mandatory
|
34
|
+
procedure_id: 'The prodedureId (second part of your DHL Account number)', #optional, defaults to '01'
|
35
|
+
partner_id: 'The partnerId (=attendance, third part of your DHL Account number)' #optional, defaults to '01'
|
36
|
+
}
|
37
|
+
```
|
38
|
+
|
39
|
+
Options is an optional parameter and can contain the following parameters:
|
40
|
+
|
41
|
+
```ruby
|
42
|
+
options = {test: true, # If test is set, all API calls go against the Intraship test system
|
43
|
+
label_response_type: :xml} # If it's set to XML the createShipment-Calls return the label data as XML instead of the PDF-Link
|
44
|
+
```
|
45
|
+
|
46
|
+
To send a shipment to DHL you need to create it first:
|
47
|
+
|
48
|
+
```ruby
|
49
|
+
sender_address = Dhl::Intraship::Address.new(company: 'Team Europe Ventures',
|
50
|
+
street: 'Mohrenstraße',
|
51
|
+
house_number: '60',
|
52
|
+
zip: '10117',
|
53
|
+
city: 'Berlin',
|
54
|
+
country_code: 'DE',
|
55
|
+
email: 'info@teameurope.net')
|
56
|
+
|
57
|
+
receiver_address = Dhl::Intraship::Address.new(firstname: 'John',
|
58
|
+
lastname: 'Doe',
|
59
|
+
street: 'Mainstreet',
|
60
|
+
house_number: '10',
|
61
|
+
street_additional: 'Appartment 2a',
|
62
|
+
zip: '90210',
|
63
|
+
city: 'Springfield',
|
64
|
+
country_code: 'DE',
|
65
|
+
email: 'john.doe@example.com')
|
66
|
+
|
67
|
+
# Note that the weight parameter is in kg and the length/height/width in cm
|
68
|
+
shipment = Dhl::Intraship::Shipment.new(sender_address: sender_address,
|
69
|
+
receiver_address: receiver_address,
|
70
|
+
shipment_date: Date.today,
|
71
|
+
weight: 2,
|
72
|
+
length: 30,
|
73
|
+
height:15,
|
74
|
+
width: 25)
|
75
|
+
```
|
76
|
+
|
77
|
+
Note that the actual api-call takes an array of shipments
|
78
|
+
|
79
|
+
```ruby
|
80
|
+
result = api.createShipmentDD([shipment])
|
81
|
+
```
|
82
|
+
|
83
|
+
The result contains the "shipment_number", as well as the "label_url" (or the "xml_label" when it was specified as repsonse type)
|
84
|
+
|
85
|
+
## Contributing
|
86
|
+
|
87
|
+
1. Fork it
|
88
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
89
|
+
3. Commit your changes (`git commit -am 'Added some feature'`)
|
90
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
91
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/dhl-intraship/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Alexander Kops"]
|
6
|
+
gem.email = ["a.kops@teameurope.net"]
|
7
|
+
gem.description = %q{A simple gem to access the DHL Intraship API}
|
8
|
+
gem.summary = %q{This wraps the DHL Intraship SOAP Interface for creating shipments}
|
9
|
+
gem.homepage = "https://github.com/teameurope/dhl-intraship"
|
10
|
+
|
11
|
+
gem.add_dependency "savon", "~> 0.9.9"
|
12
|
+
gem.add_development_dependency "rspec", "~> 2.9"
|
13
|
+
gem.add_development_dependency "savon_spec", "~> 0.1.6"
|
14
|
+
|
15
|
+
gem.files = `git ls-files`.split($\)
|
16
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
|
+
gem.name = "dhl-intraship"
|
19
|
+
gem.require_paths = ["lib"]
|
20
|
+
gem.version = Dhl::Intraship::VERSION
|
21
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
module Dhl
|
2
|
+
module Intraship
|
3
|
+
class Address
|
4
|
+
attr_accessor :company, :salutation, :firstname, :lastname, :street, :house_number, :street_additional,
|
5
|
+
:zip, :city, :country_code, :email
|
6
|
+
|
7
|
+
def initialize(attributes = {})
|
8
|
+
attributes.each do |key, value|
|
9
|
+
setter = :"#{key.to_s}="
|
10
|
+
if self.respond_to?(setter)
|
11
|
+
self.send(setter, value)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def company?
|
17
|
+
!self.company.blank?
|
18
|
+
end
|
19
|
+
|
20
|
+
def country_code=(country_code)
|
21
|
+
raise "Country code must be an ISO-3166 two digit code" unless country_code.length == 2
|
22
|
+
@country_code = country_code
|
23
|
+
end
|
24
|
+
|
25
|
+
# Note: DHL rejects valid email addresses containing the + sign
|
26
|
+
def email=(email)
|
27
|
+
split = email.split('@')
|
28
|
+
local_part = split[0]
|
29
|
+
if local_part.include?('+')
|
30
|
+
local_part = local_part.split('+')[0]
|
31
|
+
end
|
32
|
+
|
33
|
+
@email = "#{local_part}@#{split[1]}"
|
34
|
+
end
|
35
|
+
|
36
|
+
def append_to_xml(xml)
|
37
|
+
xml.Company do |xml|
|
38
|
+
if company?
|
39
|
+
xml.cis(:Company) do |xml|
|
40
|
+
xml.cis(:name1, company)
|
41
|
+
if !street_additional.blank?
|
42
|
+
xml.cis(:name2, street_additional)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
else
|
46
|
+
xml.cis(:Person) do |xml|
|
47
|
+
xml.cis(:salutation, salutation)
|
48
|
+
xml.cis(:firstname, firstname)
|
49
|
+
xml.cis(:lastname, lastname)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
xml.Address do |xml|
|
54
|
+
xml.cis(:streetName, street)
|
55
|
+
xml.cis(:streetNumber, house_number)
|
56
|
+
xml.cis(:careOfName, street_additional) unless street_additional.nil?
|
57
|
+
xml.cis(:Zip) do |xml|
|
58
|
+
if country_code == 'DE'
|
59
|
+
xml.cis(:germany, zip)
|
60
|
+
elsif ['GB','UK'].include?(country_code)
|
61
|
+
xml.cis(:england, zip)
|
62
|
+
else
|
63
|
+
xml.cis(:other, zip)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
xml.cis(:city, city)
|
67
|
+
xml.cis(:Origin) do |xml|
|
68
|
+
xml.cis(:countryISOCode, country_code)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
xml.Communication do |xml|
|
72
|
+
xml.cis(:email, self.email)
|
73
|
+
xml.cis(:contactPerson, "#{firstname} #{lastname}")
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,104 @@
|
|
1
|
+
require 'savon'
|
2
|
+
|
3
|
+
module Dhl
|
4
|
+
module Intraship
|
5
|
+
class API
|
6
|
+
|
7
|
+
DEFAULT_NAMESPACES = {
|
8
|
+
"xmlns:soapenv" => "http://schemas.xmlsoap.org/soap/envelope/",
|
9
|
+
"xmlns:de" => "http://de.ws.intraship",
|
10
|
+
"xmlns:is" => "http://dhl.de/webservice/is_base_de",
|
11
|
+
"xmlns:cis" => "http://dhl.de/webservice/cisbase"}
|
12
|
+
|
13
|
+
INTRASHIP_WSDL = ""
|
14
|
+
INTRASHIP_ENDPOINT = ""
|
15
|
+
INTRASHIP_TEST_WSDL = "http://test-intraship.dhl.com/ws/1_0/ISService/DE.wsdl"
|
16
|
+
INTRASHIP_TEST_ENDPOINT = "http://test-intraship.dhl.com/ws/1_0/de/ISService"
|
17
|
+
|
18
|
+
def initialize(config, options = {})
|
19
|
+
raise "User must be specified" if config[:user].nil?
|
20
|
+
raise "Signature (password) must be specified" if config[:signature].nil?
|
21
|
+
raise "EKP (first part of the DHL account number) must be specified" if config[:ekp].nil?
|
22
|
+
|
23
|
+
if options[:test]
|
24
|
+
wsdl_url = INTRASHIP_TEST_WSDL
|
25
|
+
endpoint = INTRASHIP_TEST_ENDPOINT
|
26
|
+
else
|
27
|
+
wsdl_url = INTRASHIP_WSDL
|
28
|
+
endpoint = INTRASHIP_ENDPOINT
|
29
|
+
end
|
30
|
+
|
31
|
+
@user = config[:user]
|
32
|
+
@signature = config[:signature]
|
33
|
+
@ekp = config[:ekp]
|
34
|
+
@procedure_id = config[:procedure_id] || '01'
|
35
|
+
@partner_id = config[:partner_id] || '01'
|
36
|
+
|
37
|
+
@options = options
|
38
|
+
@client = ::Savon::Client.new do
|
39
|
+
wsdl.document = wsdl_url
|
40
|
+
wsdl.endpoint = endpoint
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def createShipmentDD(shipments)
|
45
|
+
begin
|
46
|
+
# For some reason the class instance variables are not accessible inside of the request block
|
47
|
+
user = @user
|
48
|
+
signature = @signature
|
49
|
+
ekp = @ekp
|
50
|
+
procedure_id = @procedure_id
|
51
|
+
partner_id = @partner_id
|
52
|
+
|
53
|
+
returnXML = @config && @config[:label_response_type] && @config[:label_response_type] == :xml;
|
54
|
+
result = @client.request "de:CreateShipmentDDRequest" do
|
55
|
+
soap.xml do |xml|
|
56
|
+
xml.soapenv(:Envelope, DEFAULT_NAMESPACES) do |xml|
|
57
|
+
xml.soapenv(:Header) do |xml|
|
58
|
+
xml.cis(:Authentification) do |xml|
|
59
|
+
xml.cis(:user, user)
|
60
|
+
xml.cis(:signature, signature)
|
61
|
+
xml.cis(:accountNumber, "#{ekp}|#{procedure_id}|#{partner_id}")
|
62
|
+
xml.cis(:type, '0')
|
63
|
+
end
|
64
|
+
end
|
65
|
+
xml.soapenv(:Body) do |xml|
|
66
|
+
xml.de(:"CreateShipmentDDRequest") do |xml|
|
67
|
+
xml.cis(:Version) do |xml|
|
68
|
+
xml.cis(:majorRelease, '1')
|
69
|
+
xml.cis(:minorRelease, '0')
|
70
|
+
end
|
71
|
+
xml.ShipmentOrder do |xml|
|
72
|
+
xml.SequenceNumber('1')
|
73
|
+
shipments.each do |shipment|
|
74
|
+
shipment.append_to_xml(ekp, partner_id, xml)
|
75
|
+
xml.LabelResponseType('XML') if returnXML
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
r = result.to_hash[:create_shipment_response]
|
84
|
+
if r[:status][:status_code] == '0'
|
85
|
+
shipment_number = r[:creation_state][:shipment_number][:shipment_number]
|
86
|
+
|
87
|
+
if returnXML
|
88
|
+
xml_label = r[:creation_state][:xmllabel]
|
89
|
+
{shipment_number: shipment_number, xml_label: xml_label}
|
90
|
+
else
|
91
|
+
label_url = r[:creation_state][:labelurl]
|
92
|
+
{shipment_number: shipment_number, label_url: label_url}
|
93
|
+
end
|
94
|
+
|
95
|
+
else
|
96
|
+
raise "Intraship call failed with code #{r[:status][:status_code]}: #{r[:status][:status_message]}"
|
97
|
+
end
|
98
|
+
rescue Savon::Error => error
|
99
|
+
raise error
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Dhl
|
2
|
+
module Intraship
|
3
|
+
class ProductCode
|
4
|
+
# Day definite product codes
|
5
|
+
DHL_PACKAGE = 'EPN'
|
6
|
+
WORLD_PACKAGE = 'BPI'
|
7
|
+
DHL_EURO_PACKAGE = 'EPI'
|
8
|
+
DHL_EURO_PLUS = 'EUP'
|
9
|
+
|
10
|
+
# Time definite product codes
|
11
|
+
DOMESTIC_EXPRESS = 'DXM'
|
12
|
+
STARTDAY_EXPRESS = 'TDK'
|
13
|
+
DHL_EXPRESS_WORLDWIDE = 'WPX'
|
14
|
+
|
15
|
+
VALID_PRODUCT_CODES = [DHL_PACKAGE, WORLD_PACKAGE, DHL_EURO_PACKAGE, DHL_EURO_PLUS, DOMESTIC_EXPRESS, STARTDAY_EXPRESS, DHL_EXPRESS_WORLDWIDE]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
require "dhl-intraship/product_code"
|
2
|
+
|
3
|
+
module Dhl
|
4
|
+
module Intraship
|
5
|
+
class Shipment
|
6
|
+
PACKAGE_TYPE = 'PK'
|
7
|
+
|
8
|
+
attr_accessor :sender_address, :receiver_address, :shipment_date, :weight, :length, :height, :width, :product_code
|
9
|
+
|
10
|
+
def initialize(attributes = {})
|
11
|
+
self.product_code = ProductCode::DHL_PACKAGE
|
12
|
+
attributes.each do |key, value|
|
13
|
+
setter = :"#{key.to_s}="
|
14
|
+
if self.respond_to?(setter)
|
15
|
+
self.send(setter, value)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def product_code=(product_code)
|
21
|
+
raise "No valid product code #{product_code}" unless ProductCode::VALID_PRODUCT_CODES.include?(product_code)
|
22
|
+
@product_code = product_code
|
23
|
+
end
|
24
|
+
|
25
|
+
def append_to_xml(ekp, partner_id, xml)
|
26
|
+
raise "Shipment date must be set!" if shipment_date.nil?
|
27
|
+
raise "Sender address must be set!" if sender_address.nil?
|
28
|
+
raise "Receiver address must be set!" if sender_address.nil?
|
29
|
+
xml.Shipment do |xml|
|
30
|
+
xml.ShipmentDetails do |xml|
|
31
|
+
xml.ProductCode(product_code)
|
32
|
+
xml.ShipmentDate(shipment_date.strftime("%Y-%m-%d"))
|
33
|
+
xml.cis(:EKP, ekp)
|
34
|
+
xml.Attendance do |xml|
|
35
|
+
xml.cis(:partnerID, partner_id)
|
36
|
+
end
|
37
|
+
xml.ShipmentItem do |xml|
|
38
|
+
xml.WeightInKG(weight)
|
39
|
+
xml.LengthInCM(length) unless length.nil?
|
40
|
+
xml.WidthInCM(width) unless width.nil?
|
41
|
+
xml.HeightInCM(height) unless height.nil?
|
42
|
+
xml.PackageType(PACKAGE_TYPE)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
# Shipper information
|
46
|
+
xml.Shipper do |xml|
|
47
|
+
sender_address.append_to_xml(xml)
|
48
|
+
end
|
49
|
+
# Receiver information
|
50
|
+
xml.Receiver do |xml|
|
51
|
+
receiver_address.append_to_xml(xml)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Dhl
|
4
|
+
module Intraship
|
5
|
+
|
6
|
+
describe Address do
|
7
|
+
before{@address = Address.new}
|
8
|
+
|
9
|
+
it "should remove the part after a + from the email address" do
|
10
|
+
@address.email = "test+part@teameurope.net"
|
11
|
+
@address.email.should == "test@teameurope.net"
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Dhl
|
4
|
+
module Intraship
|
5
|
+
|
6
|
+
TEST_RESPONSE = <<EOS
|
7
|
+
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
|
8
|
+
<soapenv:Body>
|
9
|
+
<ns2:CreateShipmentResponse xmlns:ns2="http://de.ws.intraship">
|
10
|
+
<Version xmlns="http://dhl.de/webservice/cisbase">
|
11
|
+
<majorRelease>1</majorRelease>
|
12
|
+
<minorRelease>0</minorRelease>
|
13
|
+
<build>11</build>
|
14
|
+
</Version>
|
15
|
+
<status>
|
16
|
+
<StatusCode>0</StatusCode>
|
17
|
+
<StatusMessage>ok</StatusMessage>
|
18
|
+
</status>
|
19
|
+
<CreationState>
|
20
|
+
<StatusCode>0</StatusCode>
|
21
|
+
<StatusMessage>ok</StatusMessage>
|
22
|
+
<SequenceNumber>1</SequenceNumber>
|
23
|
+
<ShipmentNumber>
|
24
|
+
<ns1:shipmentNumber xmlns:ns1="http://dhl.de/webservice/cisbase">00340433836000191469</ns1:shipmentNumber>
|
25
|
+
</ShipmentNumber>
|
26
|
+
<PieceInformation>
|
27
|
+
<PieceNumber>
|
28
|
+
<ns1:licensePlate xmlns:ns1="http://dhl.de/webservice/cisbase">00340433836000191469</ns1:licensePlate>
|
29
|
+
</PieceNumber>
|
30
|
+
</PieceInformation>
|
31
|
+
<Labelurl>http://test-intraship.dhl.com:80/cartridge.55/WSPrint?code=2DF3501616A182E9328C91C83B00509C4A611A39324EAA66</Labelurl>
|
32
|
+
</CreationState>
|
33
|
+
</ns2:CreateShipmentResponse>
|
34
|
+
</soapenv:Body>
|
35
|
+
</soapenv:Envelope>
|
36
|
+
EOS
|
37
|
+
|
38
|
+
describe API do
|
39
|
+
before(:each) do
|
40
|
+
config = {user: 'user', signature: 'signature', ekp: 'ekp12345'}
|
41
|
+
options = {test: true}
|
42
|
+
@api = API.new(config, options)
|
43
|
+
end
|
44
|
+
|
45
|
+
it "should create an API call" do
|
46
|
+
savon.expects("de:CreateShipmentDDRequest" ).returns( code: 200, headers: {},body: TEST_RESPONSE )
|
47
|
+
|
48
|
+
shipment = Shipment.new(shipment_date: Date.today + 1)
|
49
|
+
|
50
|
+
sender = Address.new
|
51
|
+
receiver = Address.new
|
52
|
+
shipment.receiver_address=receiver
|
53
|
+
shipment.sender_address=sender
|
54
|
+
|
55
|
+
@api.createShipmentDD([shipment]).should_not be_nil
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
60
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,111 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: dhl-intraship
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.7
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Alexander Kops
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-04-20 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: savon
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 0.9.9
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.9.9
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rspec
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '2.9'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '2.9'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: savon_spec
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 0.1.6
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.1.6
|
62
|
+
description: A simple gem to access the DHL Intraship API
|
63
|
+
email:
|
64
|
+
- a.kops@teameurope.net
|
65
|
+
executables: []
|
66
|
+
extensions: []
|
67
|
+
extra_rdoc_files: []
|
68
|
+
files:
|
69
|
+
- .gitignore
|
70
|
+
- Gemfile
|
71
|
+
- LICENSE
|
72
|
+
- README.md
|
73
|
+
- Rakefile
|
74
|
+
- dhl-intraship.gemspec
|
75
|
+
- lib/dhl-intraship.rb
|
76
|
+
- lib/dhl-intraship/address.rb
|
77
|
+
- lib/dhl-intraship/api.rb
|
78
|
+
- lib/dhl-intraship/product_code.rb
|
79
|
+
- lib/dhl-intraship/shipment.rb
|
80
|
+
- lib/dhl-intraship/version.rb
|
81
|
+
- spec/dhl-intraship/address_spec.rb
|
82
|
+
- spec/dhl-intraship/create_shipment_dd_spec.rb
|
83
|
+
- spec/spec_helper.rb
|
84
|
+
homepage: https://github.com/teameurope/dhl-intraship
|
85
|
+
licenses: []
|
86
|
+
post_install_message:
|
87
|
+
rdoc_options: []
|
88
|
+
require_paths:
|
89
|
+
- lib
|
90
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
91
|
+
none: false
|
92
|
+
requirements:
|
93
|
+
- - ! '>='
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
96
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
requirements: []
|
103
|
+
rubyforge_project:
|
104
|
+
rubygems_version: 1.8.23
|
105
|
+
signing_key:
|
106
|
+
specification_version: 3
|
107
|
+
summary: This wraps the DHL Intraship SOAP Interface for creating shipments
|
108
|
+
test_files:
|
109
|
+
- spec/dhl-intraship/address_spec.rb
|
110
|
+
- spec/dhl-intraship/create_shipment_dd_spec.rb
|
111
|
+
- spec/spec_helper.rb
|