purolator_ruby 0.0.2 → 0.0.3
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 +4 -4
- data/lib/purolator_ruby/create_shipment_request.rb +3 -27
- data/lib/purolator_ruby/version.rb +1 -1
- data/purolator_ruby-0.0.2.gem +0 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7dce61f9b7496741021a3a781343fb67edb8c49
|
4
|
+
data.tar.gz: 4f55e808a5dc2bc5848b790e7600c7e3e61f38e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d524af4a1687a26ecf76ead648bb294008dd2a3416fd477876542496e9e7b057ae3fd7fa223ad3904510e45dd74842d1ad7c789856795dbc18b41c91a0ac9b8d
|
7
|
+
data.tar.gz: 5f78345ca3a98428d17370a3af33ea0589f84fef5f23b9eaef2ff756bf375bdd0a54e9348a8aae8148fc4662125c793a60838a925e1bcd0f00439dd1448968f2
|
@@ -1,29 +1,3 @@
|
|
1
|
-
class Hash
|
2
|
-
|
3
|
-
# Returns a new hash less the given keys.
|
4
|
-
def except(*less_keys)
|
5
|
-
hash = dup
|
6
|
-
less_keys.each{ |k| hash.delete(k) }
|
7
|
-
hash
|
8
|
-
end
|
9
|
-
|
10
|
-
# Replaces hash with new hash less the given keys.
|
11
|
-
# This returns the hash of keys removed.
|
12
|
-
#
|
13
|
-
# h = {:a=>1, :b=>2, :c=>3}
|
14
|
-
# h.except!(:a) #=> {:a=>1}
|
15
|
-
# h #=> {:b=>2,:c=>3}
|
16
|
-
#
|
17
|
-
# Returns a Hash of the removed pairs.
|
18
|
-
def except!(*rejected)
|
19
|
-
removed = {}
|
20
|
-
rejected.each{ |k| removed[k] = delete(k) }
|
21
|
-
removed
|
22
|
-
end
|
23
|
-
|
24
|
-
end
|
25
|
-
|
26
|
-
|
27
1
|
module PurolatorRuby
|
28
2
|
|
29
3
|
CreateShipmentResponse = Struct.new(:status, :shipment_pin, :payload, :errors)
|
@@ -34,7 +8,9 @@ module PurolatorRuby
|
|
34
8
|
|
35
9
|
def initialize(options)
|
36
10
|
@client = options.fetch(:client)
|
37
|
-
|
11
|
+
_opts = options.dup
|
12
|
+
_opts.delete(:client)
|
13
|
+
@payload_opts = _opts.merge(account_number: client.account_number, billing_number: client.billing_number)
|
38
14
|
end
|
39
15
|
|
40
16
|
def send!
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: purolator_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Boris Filipov
|
@@ -126,6 +126,7 @@ files:
|
|
126
126
|
- lib/purolator_ruby/create_shipment_request.rb
|
127
127
|
- lib/purolator_ruby/environment_credentials.rb
|
128
128
|
- lib/purolator_ruby/version.rb
|
129
|
+
- purolator_ruby-0.0.2.gem
|
129
130
|
- purolator_ruby.gemspec
|
130
131
|
- spec/.DS_Store
|
131
132
|
- spec/fixtures/ShippingService.wsdl
|