Class: FedexShip::Shipment
- Inherits:
-
Object
- Object
- FedexShip::Shipment
- Defined in:
- lib/fedex_ship/shipment.rb
Direct Known Subclasses
Instance Method Summary collapse
- #delete(options = {}) ⇒ Object
- #document(options = {}) ⇒ Object
- #ground_close(options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ Shipment
constructor
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.
- #label(options = {}) ⇒ Object
- #pickup(options = {}) ⇒ Object
- #pickup_availability(options = {}) ⇒ Object
- #rate(options = {}) ⇒ Object
-
#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.
- #ship(options = {}) ⇒ Object
- #track(options = {}) ⇒ Object
- #validate_address(options = {}) ⇒ Object
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 FedexShip::Shipment object
25 26 27 |
# File 'lib/fedex_ship/shipment.rb', line 25 def initialize(={}) @credentials = Credentials.new() end |
Instance Method Details
#delete(options = {}) ⇒ Object
87 88 89 |
# File 'lib/fedex_ship/shipment.rb', line 87 def delete( = {}) Request::Delete.new(@credentials, ).process_request end |
#document(options = {}) ⇒ Object
82 83 84 |
# File 'lib/fedex_ship/shipment.rb', line 82 def document( = {}) Request::Document.new(@credentials, ).process_request end |
#ground_close(options = {}) ⇒ Object
93 94 95 |
# File 'lib/fedex_ship/shipment.rb', line 93 def ground_close( = {}) Request::GroundClose.new(@credentials, ).process_request end |
#label(options = {}) ⇒ Object
35 36 37 |
# File 'lib/fedex_ship/shipment.rb', line 35 def label( = {}) Request::Label.new(@credentials, ).process_request end |
#pickup(options = {}) ⇒ Object
65 66 67 |
# File 'lib/fedex_ship/shipment.rb', line 65 def pickup( = {}) Request::Pickup.new(@credentials, ).process_request end |
#pickup_availability(options = {}) ⇒ Object
102 103 104 |
# File 'lib/fedex_ship/shipment.rb', line 102 def pickup_availability( = {}) Request::PickupAvailability.new(@credentials, ).process_request end |
#rate(options = {}) ⇒ Object
43 44 45 |
# File 'lib/fedex_ship/shipment.rb', line 43 def rate( = {}) Request::Rate.new(@credentials, ).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_ship/shipment.rb', line 110 def service_availability( = {}) Request::ServiceAvailability.new(@credentials, ).process_request end |
#ship(options = {}) ⇒ Object
56 57 58 |
# File 'lib/fedex_ship/shipment.rb', line 56 def ship( = {}) Request::Shipment.new(@credentials, ).process_request end |
#track(options = {}) ⇒ Object
71 72 73 |
# File 'lib/fedex_ship/shipment.rb', line 71 def track( = {}) Request::TrackingInformation.new(@credentials, ).process_request end |
#validate_address(options = {}) ⇒ Object
48 49 50 |
# File 'lib/fedex_ship/shipment.rb', line 48 def validate_address( = {}) Request::Address.new(@credentials, ).process_request end |