Class: FlexOps::Resources::FedExCarrier

Inherits:
Object
  • Object
show all
Defined in:
lib/flexops/resources/carriers.rb

Constant Summary collapse

PROXY =
"/api/ApiProxy"

Instance Method Summary collapse

Constructor Details

#initialize(http) ⇒ FedExCarrier

Returns a new instance of FedExCarrier.



77
78
79
# File 'lib/flexops/resources/carriers.rb', line 77

def initialize(http)
  @http = http
end

Instance Method Details

#add_packages_to_open_shipment(body) ⇒ Object



100
# File 'lib/flexops/resources/carriers.rb', line 100

def add_packages_to_open_shipment(body) = @http.post("#{PROXY}/api/v3/OpenShip/postFedExAddPackagesToOpenShipment", body: body)

#cancel_pickup(body) ⇒ Object



92
# File 'lib/flexops/resources/carriers.rb', line 92

def cancel_pickup(body) = @http.put("#{PROXY}/api/v3/CarrierPickup/putFedExCancelCarrierPickupRequest", body: body)

#cancel_shipment(body) ⇒ Object



85
# File 'lib/flexops/resources/carriers.rb', line 85

def cancel_shipment(body) = @http.put("#{PROXY}/api/v3/Shipping/putFedExCancelShipment", body: body)

#confirm_open_shipment(body) ⇒ Object



101
# File 'lib/flexops/resources/carriers.rb', line 101

def confirm_open_shipment(body) = @http.post("#{PROXY}/api/v3/OpenShip/postFedExConfirmOpenShipment", body: body)

#create_freight_shipment(body) ⇒ Object



96
# File 'lib/flexops/resources/carriers.rb', line 96

def create_freight_shipment(body) = @http.post("#{PROXY}/api/v3/Freight/postFedExCreateFreightShipment", body: body)

#create_open_shipment(body) ⇒ Object



99
# File 'lib/flexops/resources/carriers.rb', line 99

def create_open_shipment(body) = @http.post("#{PROXY}/api/v3/OpenShip/postFedExCreateOpenShipment", body: body)

#create_pickup(body) ⇒ Object



91
# File 'lib/flexops/resources/carriers.rb', line 91

def create_pickup(body) = @http.post("#{PROXY}/api/v3/CarrierPickup/postFedExCreateCarrierPickupRequest", body: body)

#create_return_shipment(body) ⇒ Object



87
# File 'lib/flexops/resources/carriers.rb', line 87

def create_return_shipment(body) = @http.post("#{PROXY}/api/v3/Shipping/postFedExCreateNewReturnShipment", body: body)

#create_shipment(body) ⇒ Object



84
# File 'lib/flexops/resources/carriers.rb', line 84

def create_shipment(body) = @http.post("#{PROXY}/api/v3/Shipping/postFedExCreateNewShipment", body: body)

#get_freight_rate(body) ⇒ Object



95
# File 'lib/flexops/resources/carriers.rb', line 95

def get_freight_rate(body) = @http.post("#{PROXY}/api/v3/Freight/postFedExGetFreightRateQuote", body: body)

#get_rates(body) ⇒ Object



83
# File 'lib/flexops/resources/carriers.rb', line 83

def get_rates(body) = @http.post("#{PROXY}/api/v3/RateCalculator/postRetrieveFedExRateAndTransitTimesAsync", body: body)

#get_service_standards(body) ⇒ Object



94
# File 'lib/flexops/resources/carriers.rb', line 94

def get_service_standards(body) = @http.post("#{PROXY}/api/v3/ServiceStandards/postFedExRetrieveServicesAndTransitTimes", body: body)

#ground_close(body) ⇒ Object



97
# File 'lib/flexops/resources/carriers.rb', line 97

def ground_close(body) = @http.post("#{PROXY}/api/v3/GroundClose/postFedExCloseWithDocuments", body: body)

#register_tracking_notification(body) ⇒ Object



90
# File 'lib/flexops/resources/carriers.rb', line 90

def register_tracking_notification(body) = @http.post("#{PROXY}/api/v3/Tracking/postFedExRegisterForTrackingNotification", body: body)

#search_locations(body) ⇒ Object



93
# File 'lib/flexops/resources/carriers.rb', line 93

def search_locations(body) = @http.post("#{PROXY}/api/v3/LocationSearch/postFedExSearchValidLocations", body: body)

#track(body) ⇒ Object



88
# File 'lib/flexops/resources/carriers.rb', line 88

def track(body) = @http.post("#{PROXY}/api/v3/Tracking/postFedExRetrieveTrackingInfoByTrackingNumber", body: body)

#track_multi_piece(body) ⇒ Object



89
# File 'lib/flexops/resources/carriers.rb', line 89

def track_multi_piece(body) = @http.post("#{PROXY}/api/v3/Tracking/postFedExRetrieveTrackingInfoForMultiPieceShipment", body: body)

#upload_trade_documents(body) ⇒ Object



98
# File 'lib/flexops/resources/carriers.rb', line 98

def upload_trade_documents(body) = @http.post("#{PROXY}/api/v3/Trade/postFedExUploadTradeDocuments", body: body)

#validate_address(body) ⇒ Object



81
# File 'lib/flexops/resources/carriers.rb', line 81

def validate_address(body) = @http.post("#{PROXY}/api/v3/AddressValidation/postFedExValidateAndCorrectDomesticAddress", body: body)

#validate_postal_code(body) ⇒ Object



82
# File 'lib/flexops/resources/carriers.rb', line 82

def validate_postal_code(body) = @http.post("#{PROXY}/api/v3/AddressValidation/postFedExValidatePostalCode", body: body)

#validate_shipment(body) ⇒ Object



86
# File 'lib/flexops/resources/carriers.rb', line 86

def validate_shipment(body) = @http.post("#{PROXY}/api/v3/Shipping/postFedExValidateShipment", body: body)