Class: FlexOps::Resources::UpsCarrier
- Inherits:
-
Object
- Object
- FlexOps::Resources::UpsCarrier
- Defined in:
- lib/flexops/resources/carriers.rb
Constant Summary collapse
- PROXY =
"/api/ApiProxy"
Instance Method Summary collapse
- #cancel_pickup ⇒ Object
- #create_freight_shipment(body) ⇒ Object
- #create_label(body) ⇒ Object
- #create_pickup(body) ⇒ Object
- #get_freight_rate(body) ⇒ Object
- #get_landed_cost(body) ⇒ Object
- #get_rates(body) ⇒ Object
- #get_transit_times(body) ⇒ Object
-
#initialize(http) ⇒ UpsCarrier
constructor
A new instance of UpsCarrier.
- #search_locations(body) ⇒ Object
- #track(params) ⇒ Object
- #upload_document(body) ⇒ Object
- #validate_address(body) ⇒ Object
Constructor Details
#initialize(http) ⇒ UpsCarrier
Returns a new instance of UpsCarrier.
56 57 58 |
# File 'lib/flexops/resources/carriers.rb', line 56 def initialize(http) @http = http end |
Instance Method Details
#cancel_pickup ⇒ Object
65 |
# File 'lib/flexops/resources/carriers.rb', line 65 def cancel_pickup = @http.delete("#{PROXY}/api/v2/ShippingLabel/deleteUpsPickup") |
#create_freight_shipment(body) ⇒ Object
70 |
# File 'lib/flexops/resources/carriers.rb', line 70 def create_freight_shipment(body) = @http.post("#{PROXY}/api/v2/ShippingLabel/postUpsCreateFreightShipment", body: body) |
#create_label(body) ⇒ Object
62 |
# File 'lib/flexops/resources/carriers.rb', line 62 def create_label(body) = @http.post("#{PROXY}/api/v2/ShippingLabel/generateNewUpsShipLabel", body: body) |
#create_pickup(body) ⇒ Object
64 |
# File 'lib/flexops/resources/carriers.rb', line 64 def create_pickup(body) = @http.post("#{PROXY}/api/v2/ShippingLabel/postUpsCreatePickup", body: body) |
#get_freight_rate(body) ⇒ Object
71 |
# File 'lib/flexops/resources/carriers.rb', line 71 def get_freight_rate(body) = @http.post("#{PROXY}/api/v2/ShippingLabel/postUpsGetFreightRate", body: body) |
#get_landed_cost(body) ⇒ Object
67 |
# File 'lib/flexops/resources/carriers.rb', line 67 def get_landed_cost(body) = @http.post("#{PROXY}/api/v2/ShippingLabel/postUpsGetLandedCostQuote", body: body) |
#get_rates(body) ⇒ Object
61 |
# File 'lib/flexops/resources/carriers.rb', line 61 def get_rates(body) = @http.post("#{PROXY}/api/v2/ShippingLabel/postUpsRateCheck", body: body) |
#get_transit_times(body) ⇒ Object
66 |
# File 'lib/flexops/resources/carriers.rb', line 66 def get_transit_times(body) = @http.post("#{PROXY}/api/v2/ShippingLabel/postUpsGetTransitTimes", body: body) |
#search_locations(body) ⇒ Object
68 |
# File 'lib/flexops/resources/carriers.rb', line 68 def search_locations(body) = @http.post("#{PROXY}/api/v2/ShippingLabel/postUpsSearchLocations", body: body) |
#track(params) ⇒ Object
63 |
# File 'lib/flexops/resources/carriers.rb', line 63 def track(params) = @http.get("#{PROXY}/api/v2/ShippingLabel/getSingleUpsTrackingDetail", query: params) |
#upload_document(body) ⇒ Object
69 |
# File 'lib/flexops/resources/carriers.rb', line 69 def upload_document(body) = @http.post("#{PROXY}/api/v2/ShippingLabel/postUpsUploadPaperlessDocument", body: body) |
#validate_address(body) ⇒ Object
60 |
# File 'lib/flexops/resources/carriers.rb', line 60 def validate_address(body) = @http.post("#{PROXY}/api/v2/ShippingLabel/postUpsVerifyAddress", body: body) |