Class: Fedex::Shipment

Inherits:
Object
  • Object
show all
Defined in:
lib/fedex/shipment.rb

Direct Known Subclasses

Request::Label

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Shipment

In order to use Fedex rates API you must first apply for a developer(and later production keys), Visit Fedex Developer Center for more information about how to obtain your keys. return a Fedex::Shipment object


25
26
27
# File 'lib/fedex/shipment.rb', line 25

def initialize(options={})
  @credentials = Credentials.new(options)
end

Instance Method Details

#delete(options = {}) ⇒ Object


87
88
89
# File 'lib/fedex/shipment.rb', line 87

def delete(options = {})
  Request::Delete.new(@credentials, options).process_request
end

#document(options = {}) ⇒ Object


82
83
84
# File 'lib/fedex/shipment.rb', line 82

def document(options = {})
  Request::Document.new(@credentials, options).process_request
end

#ground_close(options = {}) ⇒ Object


93
94
95
# File 'lib/fedex/shipment.rb', line 93

def ground_close(options = {})
  Request::GroundClose.new(@credentials, options).process_request
end

#label(options = {}) ⇒ Object


35
36
37
# File 'lib/fedex/shipment.rb', line 35

def label(options = {})
  Request::Label.new(@credentials, options).process_request
end

#pickup(options = {}) ⇒ Object


65
66
67
# File 'lib/fedex/shipment.rb', line 65

def pickup(options = {})
  Request::Pickup.new(@credentials, options).process_request
end

#pickup_availability(options = {}) ⇒ Object


102
103
104
# File 'lib/fedex/shipment.rb', line 102

def pickup_availability(options = {})
  Request::PickupAvailability.new(@credentials, options).process_request
end

#rate(options = {}) ⇒ Object


43
44
45
# File 'lib/fedex/shipment.rb', line 43

def rate(options = {})
  Request::Rate.new(@credentials, options).process_request
end

#service_availability(options = {}) ⇒ Object

param [Hash] origin, A hash containing origin information param [Hash] destination, A hash containing destination information param [date] ship_date, A string containing ship date in YYYY-MM-DD format param [String] carrier_code, A string containing carrier code


110
111
112
# File 'lib/fedex/shipment.rb', line 110

def service_availability(options = {})
  Request::ServiceAvailability.new(@credentials, options).process_request
end

#ship(options = {}) ⇒ Object


56
57
58
# File 'lib/fedex/shipment.rb', line 56

def ship(options = {})
  Request::Shipment.new(@credentials, options).process_request
end

#track(options = {}) ⇒ Object


71
72
73
# File 'lib/fedex/shipment.rb', line 71

def track(options = {})
  Request::TrackingInformation.new(@credentials, options).process_request
end

#validate_address(options = {}) ⇒ Object


48
49
50
# File 'lib/fedex/shipment.rb', line 48

def validate_address(options = {})
  Request::Address.new(@credentials, options).process_request
end