fex 0.0.5 → 0.0.6

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: 328af59c936973d25a2b0c4bc3435ca9098fb3e3
4
- data.tar.gz: 9ef9a9b8c177a4a3dfb2ed9f3db2dd995be1f46c
3
+ metadata.gz: 3f88855f621485a34b74710226be0e8c7d9bf539
4
+ data.tar.gz: 398fa86d03e20b902a4c300db7b4e66cd5dcd91a
5
5
  SHA512:
6
- metadata.gz: 62d132c91e6e419af7d4465f084cf361557d277c595c8b42a9286de8d4f424bbcd4cbf280449b0562535b9465a2fd5d46862d25ef145f40cececabac1fb0dc37
7
- data.tar.gz: b4d78ab71a661a30700f2efd16439339201de1c4d5d901828ae69b4612d23516ca25147f2b73aaffea6b1c283f1a0ab1d5537e777db86c39f0ff209cec0a8b36
6
+ metadata.gz: 645abd27f103781cddb8c00c00bc08f71a4a4eb79373afd6b42ff7130b928ba573f4d2299f014d2ac1ebf33d6fd2c67e88cc710efb1b08f741fab993d85c2fad
7
+ data.tar.gz: d82f977c7486238f6b0674230897255aaa14a0bca7a3bab8ec360d911f67a3612035f76c82143c92c067d44a2f7fb49bf98b2553b515257faed8672a7a9d0525
@@ -5,7 +5,7 @@ require "fex/ship_response"
5
5
  module Fex
6
6
  class ServiceFactory
7
7
 
8
- PRODUCTION_ENDPOINT = "https://ws.fedex.com:443/web-services/rate"
8
+ PRODUCTION_ENDPOINT = "https://ws.fedex.com:443/web-services"
9
9
 
10
10
  attr_reader :name, :mode, :client_options, :version, :defaults, :wsdl, :response
11
11
 
@@ -18,7 +18,7 @@
18
18
  :client:
19
19
  :env_namespace: soapenv
20
20
  :namespace_identifier: v13
21
- # :response: "ShipResponse"
21
+ :response: "ShipResponse"
22
22
  :version:
23
23
  :service_id: ship
24
24
  :major: 13
@@ -1,3 +1,3 @@
1
1
  module Fex
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -0,0 +1,94 @@
1
+ require 'spec_helper'
2
+
3
+ describe "Ship Service", :test_environment do
4
+
5
+ example "Print Return Label" do
6
+
7
+ client = Fex.client(credentials: credentials, mode: mode, client: { logger: logger })
8
+ service = client.service(:ship)
9
+
10
+ service.should have(7).operations
11
+
12
+ response = service.call(:process_shipment,
13
+ requested_shipment: {
14
+ ship_timestamp: Time.now.utc.iso8601(2),
15
+ dropoff_type: "STATION",
16
+ service_type: "PRIORITY_OVERNIGHT",
17
+ packaging_type: "YOUR_PACKAGING",
18
+ shipper: {
19
+ contact: {
20
+ contact_id: "SY32030",
21
+ person_name: "Sunil Yadav",
22
+ company_name: "Syntel Inc",
23
+ phone_number: "9545871684",
24
+ phone_extension: "020",
25
+ e_mail_address: "sunil_yadav3@syntelinc.com"
26
+ },
27
+ address: {
28
+ street_lines: [ "SHIPPER ADDRESS LINE 1", "SHIPPER ADDRESS LINE 2" ],
29
+ city: "COLORADO SPRINGS",
30
+ state_or_province_code: "CO",
31
+ postal_code: "80915",
32
+ urbanization_code: "CO",
33
+ country_code: "US",
34
+ residential: 0
35
+ }
36
+ },
37
+ recipient: {
38
+ contact: {
39
+ person_name: "Receipient",
40
+ company_name: "Receiver Org",
41
+ phone_number: "9982145555",
42
+ phone_extension: "011",
43
+ e_mail_address: "receiver@yahoo.com"
44
+ },
45
+ address: {
46
+ street_lines: [ "RECIPIENT ADDRESS LINE 1", "RECIPIENT ADDRESS LINE 2" ],
47
+ city: "DENVER",
48
+ state_or_province_code: "CO",
49
+ postal_code: "80204",
50
+ urbanization_code: "CO",
51
+ country_code: "US",
52
+ residential: 0
53
+ }
54
+ },
55
+ shipping_charges_payment: {
56
+ payment_type: "SENDER",
57
+ payor: {
58
+ responsible_party: {
59
+ account_number: credentials[:account_number],
60
+ contact: ""
61
+ }
62
+ }
63
+ },
64
+ special_services_requested: {
65
+ special_service_types: ["RETURN_SHIPMENT"],
66
+ return_shipment_detail: {
67
+ return_type: "PRINT_RETURN_LABEL"
68
+ },
69
+ },
70
+ label_specification: {
71
+ label_format_type: "COMMON2D",
72
+ image_type: "PNG",
73
+ label_stock_type: "PAPER_4X6"
74
+ },
75
+ rate_request_types: ["ACCOUNT"],
76
+ package_count: 1,
77
+ requested_package_line_items: [
78
+ {
79
+ sequence_number: 1,
80
+ group_number: 1,
81
+ group_package_count: 1,
82
+ weight: { units: "LB", value: "20.0" },
83
+ dimensions: { length: 12, width: 12, height: 12, units: "IN" },
84
+ physical_packaging: "BAG"
85
+ }
86
+ ]
87
+ }
88
+ )
89
+ response.severity.should eq "SUCCESS"
90
+ response.image.bytesize.should be_within(1024).of(10746)
91
+ response.total_net_charge.should be > BigDecimal.new("67")
92
+ end
93
+
94
+ end
@@ -18,9 +18,7 @@ describe "Track Service", :test_environment do
18
18
  },
19
19
  include_detailed_scans: true
20
20
  )
21
- # We have no tracking number to test, so just verify that we get the right error.
22
- response.severity.should eq "ERROR"
23
- response.message.should start_with "No information for the following shipments has been received by our system yet."
21
+ response.severity.should eq "SUCCESS"
24
22
  end
25
23
 
26
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - iain
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-13 00:00:00.000000000 Z
11
+ date: 2014-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: savon
@@ -91,6 +91,7 @@ files:
91
91
  - lib/fex/wsdl.rb
92
92
  - spec/integration/address_validation_spec.rb
93
93
  - spec/integration/pending_shipment_spec.rb
94
+ - spec/integration/print_return_label_spec.rb
94
95
  - spec/integration/rate_spec.rb
95
96
  - spec/integration/ship_spec.rb
96
97
  - spec/integration/track_spec.rb
@@ -136,6 +137,7 @@ summary: Small wrapper around Savon for using FedEx Web Services
136
137
  test_files:
137
138
  - spec/integration/address_validation_spec.rb
138
139
  - spec/integration/pending_shipment_spec.rb
140
+ - spec/integration/print_return_label_spec.rb
139
141
  - spec/integration/rate_spec.rb
140
142
  - spec/integration/ship_spec.rb
141
143
  - spec/integration/track_spec.rb