Class: SimpleShipping::Fedex::Client

Inherits:
Abstract::Client show all
Defined in:
lib/simple_shipping/fedex/client.rb

Overview

Required credentials:

  • key

  • password

  • account_number

  • meter_number

Usage

client = SimpleShipping::Fedex::Client.new(:key            => "KEY",
                                           :password       => "PASSWORD",
                                           :account_number => "ACCOUNT NUMBER",
                                           :METER_NUMBER   => "METER NUMBER")
client.request(shipper, recipient, package) # => #<SimpleShipping::Fedex::Response ...>

Instance Method Summary collapse

Methods inherited from Abstract::Client

#initialize, set_production_address, set_required_credentials, set_testing_address, set_wsdl_document

Constructor Details

This class inherits a constructor from SimpleShipping::Abstract::Client

Instance Method Details

#ship_confirm_request(shipper, recipient, package, opts = {}) ⇒ Object

Send the shipment confirmation request.



29
30
31
# File 'lib/simple_shipping/fedex/client.rb', line 29

def ship_confirm_request(shipper, recipient, package, opts = {})
  fail "Not Implemented"
end

#shipment_request(shipper, recipient, package, opts = {}) ⇒ Object

Send the shipment request to FedEx.



22
23
24
25
26
# File 'lib/simple_shipping/fedex/client.rb', line 22

def shipment_request(shipper, recipient, package, opts = {})
  shipment = create_shipment(shipper, recipient, package, opts)
  request = ShipmentRequest.new(@credentials, shipment)
  execute(request)
end