temando 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/lib/temando/api/entities/anything.rb +1 -0
- data/lib/temando/api/entities/quote.rb +4 -0
- data/lib/temando/item/base.rb +1 -1
- data/lib/temando/quote.rb +2 -1
- data/lib/temando/version.rb +1 -1
- data/spec/fixtures/xml/get_quotes_by_request/request.xml +1 -0
- data/temando.gemspec +1 -1
- metadata +4 -4
data/README.md
CHANGED
@@ -8,6 +8,7 @@ module Temando::Api
|
|
8
8
|
def build_xml(xml)
|
9
9
|
xml.anything do
|
10
10
|
xml.class_ @anything.shipping_class
|
11
|
+
xml.packagingOptimisation(@anything.packaging_optimization.presence || "N")
|
11
12
|
xml.subclass @anything.shipping_subclass
|
12
13
|
xml.packaging @anything.shipping_packaging
|
13
14
|
xml.qualifierFreightGeneralFragile(@anything.fragile ? 'Y' : 'N')
|
@@ -22,6 +22,10 @@ module Temando::Api
|
|
22
22
|
quote.guaranteed_eta = (hash['guaranteedEta'] == 'Y')
|
23
23
|
|
24
24
|
quote.carrier_id = hash['carrier']['id']
|
25
|
+
quote.carrier_name = hash['carrier']['companyName']
|
26
|
+
quote.carrier_phone = hash['carrier']['phone1']
|
27
|
+
|
28
|
+
quote.delivery_method = hash['deliveryMethod']
|
25
29
|
|
26
30
|
quote
|
27
31
|
end
|
data/lib/temando/item/base.rb
CHANGED
@@ -14,7 +14,7 @@ module Temando
|
|
14
14
|
|
15
15
|
include ActiveModel::Validations
|
16
16
|
|
17
|
-
attr_accessor :length, :width, :height, :weight, :quantity, :description
|
17
|
+
attr_accessor :length, :width, :height, :weight, :quantity, :description, :packaging_optimization
|
18
18
|
|
19
19
|
validates_numericality_of :length, :width, :height
|
20
20
|
validates_numericality_of :quantity, :greater_than => 0, :only_integer => true
|
data/lib/temando/quote.rb
CHANGED
@@ -2,6 +2,7 @@ module Temando
|
|
2
2
|
# A Quote is a representation of the shipping quote provided by one of
|
3
3
|
# Temando's suppliers.
|
4
4
|
class Quote
|
5
|
-
attr_accessor :total_price, :tax, :currency, :minimum_eta, :maximum_eta, :name, :base_price, :guaranteed_eta
|
5
|
+
attr_accessor :total_price, :tax, :currency, :minimum_eta, :maximum_eta, :name, :base_price, :guaranteed_eta
|
6
|
+
attr_accessor :carrier_id, :carrier_name, :carrier_phone, :delivery_method
|
6
7
|
end
|
7
8
|
end
|
data/lib/temando/version.rb
CHANGED
data/temando.gemspec
CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |gem|
|
|
6
6
|
gem.email = ["jason@reinteractive.net"]
|
7
7
|
gem.description = %q{Ruby API to Temando - an Australian transport fulfilment broker}
|
8
8
|
gem.summary = %q{Ruby API to Temando - an Australian transport fulfilment broker}
|
9
|
-
gem.homepage = "
|
9
|
+
gem.homepage = "https://github.com/reInteractive-open/temando"
|
10
10
|
|
11
11
|
gem.files = `git ls-files`.split($\)
|
12
12
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: temando
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-11-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|
@@ -152,7 +152,7 @@ files:
|
|
152
152
|
- spec/units/item/general_goods_spec.rb
|
153
153
|
- spec/units/request_spec.rb
|
154
154
|
- temando.gemspec
|
155
|
-
homepage:
|
155
|
+
homepage: https://github.com/reInteractive-open/temando
|
156
156
|
licenses: []
|
157
157
|
post_install_message:
|
158
158
|
rdoc_options: []
|
@@ -172,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
172
172
|
version: '0'
|
173
173
|
requirements: []
|
174
174
|
rubyforge_project:
|
175
|
-
rubygems_version: 1.8.
|
175
|
+
rubygems_version: 1.8.24
|
176
176
|
signing_key:
|
177
177
|
specification_version: 3
|
178
178
|
summary: Ruby API to Temando - an Australian transport fulfilment broker
|