fedex 3.9.1 → 3.10.0
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 +1 -1
- data/lib/fedex/request/base.rb +8 -6
- data/lib/fedex/request/shipment.rb +20 -1
- data/lib/fedex/version.rb +1 -1
- metadata +2 -2
data/Readme.md
CHANGED
@@ -139,7 +139,7 @@ Fedex provides multiple total values; `total_net_charge` is the final amount you
|
|
139
139
|
@total_net_freight="32.1",
|
140
140
|
@rate_zone="51">
|
141
141
|
```
|
142
|
-
### ** Get a Transit time **
|
142
|
+
### ** Create a shipment and Get a Transit time(please note this will generate a shipment in your Fedex account if you are using production mode) **
|
143
143
|
```ruby
|
144
144
|
ship = fedex.ship(:shipper=>shipper,
|
145
145
|
:recipient => recipient,
|
data/lib/fedex/request/base.rb
CHANGED
@@ -230,14 +230,16 @@ module Fedex
|
|
230
230
|
}
|
231
231
|
end
|
232
232
|
add_customer_references(xml, package)
|
233
|
-
if package[:special_services_requested]
|
233
|
+
if package[:special_services_requested]
|
234
234
|
xml.SpecialServicesRequested{
|
235
|
-
if package[:special_services_requested][:special_service_types]
|
236
|
-
package[:special_services_requested][:special_service_types].
|
237
|
-
|
235
|
+
if package[:special_services_requested][:special_service_types]
|
236
|
+
if package[:special_services_requested][:special_service_types].is_a? Array
|
237
|
+
package[:special_services_requested][:special_service_types].each do |type|
|
238
|
+
xml.SpecialServiceTypes type
|
239
|
+
end
|
240
|
+
else
|
241
|
+
xml.SpecialServiceTypes package[:special_services_requested][:special_service_types]
|
238
242
|
end
|
239
|
-
else
|
240
|
-
xml.SpecialServiceTypes package[:special_services_requested][:special_service_types]
|
241
243
|
end
|
242
244
|
# Handle COD Options
|
243
245
|
if package[:special_services_requested][:cod_detail]
|
@@ -68,13 +68,32 @@ module Fedex
|
|
68
68
|
add_label_specification xml
|
69
69
|
end
|
70
70
|
|
71
|
-
|
71
|
+
# Add the label specification
|
72
72
|
def add_label_specification(xml)
|
73
73
|
xml.LabelSpecification {
|
74
74
|
xml.LabelFormatType @label_specification[:label_format_type]
|
75
75
|
xml.ImageType @label_specification[:image_type]
|
76
76
|
xml.LabelStockType @label_specification[:label_stock_type]
|
77
77
|
xml.CustomerSpecifiedDetail{ hash_to_xml(xml, @customer_specified_detail) } if @customer_specified_detail
|
78
|
+
|
79
|
+
if @label_specification[:printed_label_origin] && @label_specification[:printed_label_origin][:address]
|
80
|
+
xml.PrintedLabelOrigin {
|
81
|
+
xml.Contact {
|
82
|
+
xml.PersonName @label_specification[:printed_label_origin][:address][:name]
|
83
|
+
xml.CompanyName @label_specification[:printed_label_origin][:address][:company]
|
84
|
+
xml.PhoneNumber @label_specification[:printed_label_origin][:address][:phone_number]
|
85
|
+
}
|
86
|
+
xml.Address {
|
87
|
+
Array(@label_specification[:printed_label_origin][:address][:address]).each do |address_line|
|
88
|
+
xml.StreetLines address_line
|
89
|
+
end
|
90
|
+
xml.City @label_specification[:printed_label_origin][:address][:city]
|
91
|
+
xml.StateOrProvinceCode @label_specification[:printed_label_origin][:address][:state]
|
92
|
+
xml.PostalCode @label_specification[:printed_label_origin][:address][:postal_code]
|
93
|
+
xml.CountryCode @label_specification[:printed_label_origin][:address][:country_code]
|
94
|
+
}
|
95
|
+
}
|
96
|
+
end
|
78
97
|
}
|
79
98
|
end
|
80
99
|
|
data/lib/fedex/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fedex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.10.0
|
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:
|
12
|
+
date: 2016-01-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|