unforlogistics-api 0.9 → 0.10

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
  SHA1:
3
- metadata.gz: dc91e16580ba54a415efb91aa9d746004c87e861
4
- data.tar.gz: ecad1b3012ab93b36f47042f8ea87beae62f345e
3
+ metadata.gz: d500867f866ae27a9c15c2abb0f32465d301ddfb
4
+ data.tar.gz: ac74ae69d0213193f5fcb39b2ec1eee80cfcbf84
5
5
  SHA512:
6
- metadata.gz: 58b4430755b172013283868d12e2766a3a8e762500d14253c739d09476a45b8dade943a08e97a20077edcd706c7abea258a580ab02c85049de50ba74200e765a
7
- data.tar.gz: 3a5cbcefa472c0f96face2bc2e528d4ee112bdbaad067f357266d94812c83bd337679982112aa41fb2f06e36170573251b309a8e2f00d5215bf7079a6df24fd2
6
+ metadata.gz: e6b4ad3597ca766da67beb62d9a29220b40b917979e4d11f0e2fc38c1a97b51266734ff94fb050c22a70650fc1cfe8076231ce2182f5aafa2ba7e22416c1dc6b
7
+ data.tar.gz: 5c38750144cc19ee2bec79116ef66725629a929925c9b3d7292d399ea8ee039676bb54a5b25fa1c8046fb8fedaf2e107558911a5041da92abcbf1e1edb4f7537
data/CHANGELOG.md CHANGED
@@ -33,3 +33,7 @@
33
33
  ## v0.9
34
34
 
35
35
  * Improved responses
36
+
37
+ ## v0.10
38
+
39
+ * Added method to get shipment trips availability, fixed method to quote shipments.
@@ -16,6 +16,12 @@ module Unforlogistics
16
16
 
17
17
  get_persistance_response(response)
18
18
  end
19
+
20
+ def get_shipment_trips_availability(attrs={})
21
+ response = post_request('/shipment_trips/availability', attrs).body
22
+
23
+ response
24
+ end
19
25
  end
20
26
  end
21
27
  end
@@ -24,7 +24,19 @@ module Unforlogistics
24
24
  end
25
25
 
26
26
  def quote_shipment(attrs={})
27
- post_requests('/shipments/quote', attrs).body
27
+ response = post_requests('/shipments/quote', attrs)
28
+
29
+ if response.headers.warning.nil?
30
+ errors = []
31
+ else
32
+ errors = response.headers.warning
33
+ end
34
+
35
+ OpenStruct.new({
36
+ result: response.body,
37
+ valid: errors.empty?,
38
+ errors: errors
39
+ })
28
40
  end
29
41
  end
30
42
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unforlogistics-api
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.9'
4
+ version: '0.10'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matias Hick
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-19 00:00:00.000000000 Z
11
+ date: 2017-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -80,7 +80,7 @@ files:
80
80
  - lib/unforlogistics/core/shipment_vehicle_kinds.rb
81
81
  - lib/unforlogistics/core/shipment_zones.rb
82
82
  - lib/unforlogistics/core/shipments.rb
83
- homepage: https://github.com/unformattmh/unforlogistics_gem
83
+ homepage: https://github.com/lhconfort/unforlogistics_gem
84
84
  licenses:
85
85
  - MIT
86
86
  metadata: {}