click_and_send 0.0.5 → 0.0.6
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/lib/click_and_send/version.rb +1 -1
- data/spec/fixtures/config.example.yml +1 -1
- data/spec/support/factories.rb +15 -12
- metadata +4 -4
@@ -2,4 +2,4 @@
|
|
2
2
|
:account_number: 1234567
|
3
3
|
:api_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
4
4
|
:user_name: acme
|
5
|
-
:wsdl: https://
|
5
|
+
:wsdl: https://auspostuat3-staging.oss.neopost-id.com/modules/oss/api/ship/wsdl?sz_Client=AustraliaPost
|
data/spec/support/factories.rb
CHANGED
@@ -54,18 +54,19 @@ module ClickAndSend
|
|
54
54
|
Faker::Address.city
|
55
55
|
end
|
56
56
|
|
57
|
+
def contents_item_attributes
|
58
|
+
ActiveSupport::OrderedHash.new.tap do |hash|
|
59
|
+
hash['Description'] = "stuff"
|
60
|
+
hash['Quantity'] = 1
|
61
|
+
hash['Value'] = '100.00' # Float Format 9999.99 AUD
|
62
|
+
hash['Weight'] = '0.500' # Float Format 999.999 Kg
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
57
66
|
def customs_data_attributes
|
58
67
|
ActiveSupport::OrderedHash.new.tap do |hash|
|
59
68
|
hash['CustomsData'] = ActiveSupport::OrderedHash.new.tap do |hash|
|
60
|
-
# 'CustomsItemType' => '',
|
61
|
-
# 'CustomsQuantity' => '',
|
62
|
-
# 'ExportDeclarationNumber' => '',
|
63
|
-
# 'ReasonForExport' => '',
|
64
69
|
hash['NameOfPersonLodging'] = name
|
65
|
-
# 'HSTariffNumber' => '',
|
66
|
-
# 'CountryOfOrigin' => '',
|
67
|
-
# 'NonDeliverySenderInstructions' => '',
|
68
|
-
# 'ReturnFollowingAddress' => '',
|
69
70
|
end
|
70
71
|
end
|
71
72
|
end
|
@@ -84,13 +85,15 @@ module ClickAndSend
|
|
84
85
|
|
85
86
|
def item_details_attributes
|
86
87
|
ActiveSupport::OrderedHash.new.tap do |hash|
|
87
|
-
hash['PackagingType' ] = 'M'
|
88
|
+
hash['PackagingType' ] = 'M' # Merchandise
|
88
89
|
hash['Dimensions' ] = dimensions
|
89
|
-
hash['ItemWeight' ] = '0.500'
|
90
|
-
hash['ExtraCover' ] = 0
|
91
|
-
hash['ExtraCoverAmountOrDeclaredValue' ] = '100.00'
|
90
|
+
hash['ItemWeight' ] = '0.500' # Float Format 999.999 Kg
|
91
|
+
hash['ExtraCover' ] = 0 # Boolean
|
92
92
|
hash['ItemDescriptionOrDescriptionOfGoods'] = "stuff"
|
93
93
|
hash['InternationalItemDetails' ] = customs_data_attributes
|
94
|
+
hash['HasCommercialValue' ] = 0 # Boolean
|
95
|
+
hash['CategoryOfItem' ] = 31
|
96
|
+
hash['ContentsItem' ] = contents_item_attributes
|
94
97
|
end
|
95
98
|
end
|
96
99
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: click_and_send
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
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-09-
|
12
|
+
date: 2012-09-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -175,7 +175,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
175
175
|
version: '0'
|
176
176
|
segments:
|
177
177
|
- 0
|
178
|
-
hash:
|
178
|
+
hash: 1946765259710927809
|
179
179
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
180
180
|
none: false
|
181
181
|
requirements:
|
@@ -184,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
184
184
|
version: '0'
|
185
185
|
segments:
|
186
186
|
- 0
|
187
|
-
hash:
|
187
|
+
hash: 1946765259710927809
|
188
188
|
requirements: []
|
189
189
|
rubyforge_project:
|
190
190
|
rubygems_version: 1.8.24
|