temando 0.1.1 → 0.1.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.
data/README.md CHANGED
@@ -31,7 +31,7 @@ Temando authentication details should be set before calling any methods :
31
31
 
32
32
  Example:
33
33
 
34
- ``ruby
34
+ ```ruby
35
35
  request = Temando::Request.new
36
36
 
37
37
  # Add the items to be shipped
@@ -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
@@ -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, :carrier_id
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
@@ -1,3 +1,3 @@
1
1
  module Temando
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -13,6 +13,7 @@
13
13
  <anythings>
14
14
  <anything>
15
15
  <class>General Goods</class>
16
+ <packagingOptimisation>N</packagingOptimisation>
16
17
  <subclass>Household Goods</subclass>
17
18
  <packaging>Parcel</packaging>
18
19
  <qualifierFreightGeneralFragile>N</qualifierFreightGeneralFragile>
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 = "http://github.com/reInteractive/temando"
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.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-10-17 00:00:00.000000000 Z
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: http://github.com/reInteractive/temando
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.19
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