No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
This PHP package is automatically generated by the Swagger Codegen project:
- API version:
- Package version: 1.0.8
- Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen
PHP 5.5 and later
To install the bindings via Composer, add the following to composer.json:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/abantecart/ups-rating.git"
}
],
"require": {
"abantecart/ups-rating": "*@dev"
}
}
Then run composer install
Download the files and include autoload.php:
require_once('/path/to/Rating/vendor/autoload.php');To run the unit tests:
composer install
./vendor/bin/phpunit
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: oauth2
$config = UPS\Rating\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new UPS\Rating\Request\DefaultApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \UPS\Rating\Rating\RATERequestWrapper(); // \UPS\Rating\Rating\RATERequestWrapper | Generate sample code for popular API requests by selecting an example below. To view a full sample request and response, first click "Authorize" and enter your application credentials, then populate the required parameters above and click "Try it out".
$deprecated_version = "deprecated_version_example"; // string | Indicates Rate API to display the new release features in Rate API response based on Rate release. See the New section for the latest Rate release. Valid values: - v1 - v1601 - v1607 - 1701 - 1707 - v2108 - v2205
$requestoption = "requestoption_example"; // string | Valid Values: - Rate = The server rates (The default Request option is Rate if a Request Option is not provided). - Shop = The server validates the shipment, and returns rates for all UPS products from the ShipFrom to the ShipTo addresses. - Ratetimeintransit = The server rates with transit time information - Shoptimeintransit = The server validates the shipment, and returns rates and transit times for all UPS products from the ShipFrom to the ShipTo addresses. Rate is the only valid request option for UPS Ground Freight Pricing requests.
$trans_id = "trans_id_example"; // string | An identifier unique to the request. Length 32
$transaction_src = "testing"; // string | An identifier of the client/source application that is making the request.Length 512
$additionalinfo = "additionalinfo_example"; // string | Valid Values: timeintransit = The server rates with transit time information combined with requestoption in URL.Rate is the only valid request option for Ground Freight Pricing requests. Length 15
try {
$result = $apiInstance->deprecatedRate($body, $deprecated_version, $requestoption, $trans_id, $transaction_src, $additionalinfo);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->deprecatedRate: ', $e->getMessage(), PHP_EOL;
}
// Configure OAuth2 access token for authorization: oauth2
$config = UPS\Rating\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new UPS\Rating\Request\DefaultApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \UPS\Rating\Rating\RATERequestWrapper(); // \UPS\Rating\Rating\RATERequestWrapper | Generate sample code for popular API requests by selecting an example below. To view a full sample request and response, first click "Authorize" and enter your application credentials, then populate the required parameters above and click "Try it out".
$version = "version_example"; // string | Indicates Rate API to display the new release features in Rate API response based on Rate release. See the New section for the latest Rate release. Valid values: - v2403
$requestoption = "requestoption_example"; // string | Valid Values: - Rate = The server rates (The default Request option is Rate if a Request Option is not provided). - Shop = The server validates the shipment, and returns rates for all UPS products from the ShipFrom to the ShipTo addresses. - Ratetimeintransit = The server rates with transit time information - Shoptimeintransit = The server validates the shipment, and returns rates and transit times for all UPS products from the ShipFrom to the ShipTo addresses. Rate is the only valid request option for UPS Ground Freight Pricing requests.
$trans_id = "trans_id_example"; // string | An identifier unique to the request. Length 32
$transaction_src = "testing"; // string | An identifier of the client/source application that is making the request.Length 512
$additionalinfo = "additionalinfo_example"; // string | Valid Values: timeintransit = The server rates with transit time information combined with requestoption in URL.Rate is the only valid request option for Ground Freight Pricing requests. Length 15
try {
$result = $apiInstance->rate($body, $version, $requestoption, $trans_id, $transaction_src, $additionalinfo);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->rate: ', $e->getMessage(), PHP_EOL;
}
?>All URIs are relative to https://wwwcie.ups.com/api
| Class | Method | HTTP request | Description |
|---|---|---|---|
| DefaultApi | deprecatedRate | POST /rating/{deprecatedVersion}/{requestoption} | Rating |
| DefaultApi | rate | POST /rating/{version}/{requestoption} | Rating |
- AccessorialCode
- AccessorialDescription
- AdjustedHeightUnitOfMeasurement
- AlertDetailElementLevelInformation
- AlternateDeliveryAddressAddress
- AlternateDeliveryAddressName
- BillReceiverAddress
- BillThirdPartyAddress
- BillingWeightUnitOfMeasurement
- CODCODAmount
- CommodityNMFC
- CommonErrorResponse
- DeliveryTimeInformationPickup
- DeliveryTimeInformationReturnContractServices
- DimWeightUnitOfMeasurement
- DimensionsUnitOfMeasurement
- DryIceDryIceWeight
- DryIceWeightUnitOfMeasurement
- ElementLevelInformationElementIdentifier
- ErrorMessage
- ErrorResponse
- EstimatedArrivalArrival
- EstimatedArrivalPickup
- FRSPaymentInformationAddress
- FRSPaymentInformationType
- FRSShipmentDataFreightDensityRate
- FRSShipmentDataHandlingUnits
- FRSShipmentDataTransportationCharges
- FreightDensityInfoAdjustedHeight
- FreightDensityInfoHandlingUnits
- FreightShipmentInformationFreightDensityInfo
- HandlingUnitsAdjustedHeight
- HandlingUnitsDimensions
- HandlingUnitsType
- HandlingUnitsUnitOfMeasurement
- HazMatHazMatChemicalRecord
- InsuranceBasicFlexibleParcelIndicator
- InsuranceExtendedFlexibleParcelIndicator
- InsuranceTimeInTransitFlexibleParcelIndicator
- NegotiatedChargesItemizedCharges
- NegotiatedRateChargesItemizedCharges
- NegotiatedRateChargesTaxCharges
- NegotiatedRateChargesTotalCharge
- NegotiatedRateChargesTotalChargesWithTaxes
- PackageCommodity
- PackageDimWeight
- PackageDimensions
- PackagePackageServiceOptions
- PackagePackageWeight
- PackagePackagingType
- PackageServiceOptionsAccessPointCOD
- PackageServiceOptionsCOD
- PackageServiceOptionsDeclaredValue
- PackageServiceOptionsDeliveryConfirmation
- PackageServiceOptionsDryIce
- PackageServiceOptionsHazMat
- PackageServiceOptionsInsurance
- PackageServiceOptionsShipperDeclaredValue
- PackageSimpleRate
- PackageUPSPremier
- PackageWeightUnitOfMeasurement
- PaymentDetailsShipmentCharge
- RATERequestWrapper
- RATEResponseWrapper
- RateRequest
- RateRequestCustomerClassification
- RateRequestPickupType
- RateRequestRequest
- RateRequestShipment
- RateResponse
- RateResponseRatedShipment
- RateResponseResponse
- RatedPackageAccessorial
- RatedPackageBaseServiceCharge
- RatedPackageBillingWeight
- RatedPackageBillingWeightUnitOfMeasurement
- RatedPackageItemizedCharges
- RatedPackageNegotiatedCharges
- RatedPackageRateModifier
- RatedPackageServiceOptionsCharges
- RatedPackageSimpleRate
- RatedPackageTotalCharges
- RatedPackageTransportationCharges
- RatedPackageWeight
- RatedShipmentBaseServiceCharge
- RatedShipmentBillingWeight
- RatedShipmentDisclaimer
- RatedShipmentFRSShipmentData
- RatedShipmentItemizedCharges
- RatedShipmentNegotiatedRateCharges
- RatedShipmentRatedPackage
- RatedShipmentRatedShipmentAlert
- RatedShipmentService
- RatedShipmentServiceOptionsCharges
- RatedShipmentTaxCharges
- RatedShipmentTimeInTransit
- RatedShipmentTotalCharges
- RatedShipmentTotalChargesWithTaxes
- RatedShipmentTransportationCharges
- RequestTransactionReference
- ResponseAlert
- ResponseAlertDetail
- ResponseResponseStatus
- ResponseTransactionReference
- ServiceSummaryEstimatedArrival
- ServiceSummaryService
- ShipFromAddress
- ShipToAddress
- ShipmentAlternateDeliveryAddress
- ShipmentChargeBillReceiver
- ShipmentChargeBillShipper
- ShipmentChargeBillThirdParty
- ShipmentDeliveryTimeInformation
- ShipmentDocumentsOnlyIndicator
- ShipmentFRSPaymentInformation
- ShipmentFreightShipmentInformation
- ShipmentInvoiceLineTotal
- ShipmentNumOfPieces
- ShipmentPackage
- ShipmentPaymentDetails
- ShipmentPromotionalDiscountInformation
- ShipmentService
- ShipmentServiceOptionsAccessPointCOD
- ShipmentServiceOptionsCOD
- ShipmentServiceOptionsCODCODAmount
- ShipmentServiceOptionsDeliveryConfirmation
- ShipmentServiceOptionsDeliveryOptions
- ShipmentServiceOptionsImportControl
- ShipmentServiceOptionsPickupOptions
- ShipmentServiceOptionsRestrictedArticles
- ShipmentServiceOptionsReturnService
- ShipmentShipFrom
- ShipmentShipTo
- ShipmentShipmentIndicationType
- ShipmentShipmentRatingOptions
- ShipmentShipmentServiceOptions
- ShipmentShipmentTotalWeight
- ShipmentShipper
- ShipmentTotalWeightUnitOfMeasurement
- ShipperAddress
- TimeInTransitServiceSummary
- TotalChargeCurrencyCode
- TotalChargeMonetaryValue
- TransportationChargesDiscountAmount
- TransportationChargesGrossCharge
- TransportationChargesNetCharge
- Type: OAuth
- Flow: application
- Authorization URL:
- Scopes: