Interface ShipEngineService

    • Method Detail

      • getEstimate

        EstimateResponse getEstimate​(com.broadleafcommerce.shipping.domain.FulfillmentPricingRequest fulfillmentPricingRequest)
        Get rate estimates from all carriers for the given FulfillmentPricingRequest. Estimates can be retrieved with less information than is required for a rate quote.
        Parameters:
        fulfillmentPricingRequest - Provides addresses and items for a shipment.
        Returns:
        An EstimateResponse with estimated Rates
      • getRates

        RatesResponse getRates​(com.broadleafcommerce.shipping.domain.FulfillmentPricingRequest fulfillmentPricingRequest)
        Get all available rates for the given FulfillmentPricingRequest.
        Parameters:
        fulfillmentPricingRequest - Provides addresses and items for a shipment.
        Returns:
        A RatesResponse with a list of Rates.
      • purchaseLabel

        LabelResponse purchaseLabel​(com.broadleafcommerce.order.client.domain.OrderFulfillment orderFulfillment,
                                    @Nullable
                                    com.broadleafcommerce.order.common.domain.Address fromAddress)
        Purchase a label with an OrderFulfillment. The FulfillmentOption should be set on the OrderFulfillment.
        Parameters:
        orderFulfillment - Provides addresses and items for a shipment.
        fromAddress - The address that the package will be sent from. If not provided, will use the default address configured with properties. See ShipEngineProperties.DefaultFromAddress.
        Returns:
        A LabelResponse with a URL to download the shipping label.
      • purchaseLabelFromRate

        LabelResponse purchaseLabelFromRate​(String rateId)
        Purchase a label from a previously quoted Rate.
        Parameters:
        rateId - The ShipEngine rate id.
        Returns:
        A LabelResponse with a URL to download the shipping label.
      • getCarriers

        List<String> getCarriers()
        Get a list of Carrier that are configured in the ShipEngine account.
        Returns:
        A list of Carriers that are configured in the ShipEngine dashboard.
      • retrieveRate

        Rate retrieveRate​(String rateId)
        Retrieve an existing Rate.
        Parameters:
        rateId - The ShipEngine rate id.
        Returns:
        The Rate associated with the given rateId.
      • retrieveLabel

        LabelResponse retrieveLabel​(String labelId)
        Retrieve an existing shipping label. This method does not purchase labels.
        Parameters:
        labelId - The ShipEngine label id.
        Returns:
        A LabelResponse with a URL to download the shipping label.