# Rating
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: 
- Package version: 1.0.8
- Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen

## Requirements

PHP 5.5 and later

## Installation & Usage
### Composer

To install the bindings via [Composer](http://getcomposer.org/), 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`

### Manual Installation

Download the files and include `autoload.php`:

```php
    require_once('/path/to/Rating/vendor/autoload.php');
```

## Tests

To run the unit tests:

```
composer install
./vendor/bin/phpunit
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```php
<?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;
}
?>
```

## Documentation for API Endpoints

All URIs are relative to *https://wwwcie.ups.com/api*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DefaultApi* | [**deprecatedRate**](docs/Api/DefaultApi.md#deprecatedrate) | **POST** /rating/{deprecatedVersion}/{requestoption} | Rating
*DefaultApi* | [**rate**](docs/Api/DefaultApi.md#rate) | **POST** /rating/{version}/{requestoption} | Rating

## Documentation For Models

 - [AccessorialCode](docs/Model/AccessorialCode.md)
 - [AccessorialDescription](docs/Model/AccessorialDescription.md)
 - [AdjustedHeightUnitOfMeasurement](docs/Model/AdjustedHeightUnitOfMeasurement.md)
 - [AlertDetailElementLevelInformation](docs/Model/AlertDetailElementLevelInformation.md)
 - [AlternateDeliveryAddressAddress](docs/Model/AlternateDeliveryAddressAddress.md)
 - [AlternateDeliveryAddressName](docs/Model/AlternateDeliveryAddressName.md)
 - [BillReceiverAddress](docs/Model/BillReceiverAddress.md)
 - [BillThirdPartyAddress](docs/Model/BillThirdPartyAddress.md)
 - [BillingWeightUnitOfMeasurement](docs/Model/BillingWeightUnitOfMeasurement.md)
 - [CODCODAmount](docs/Model/CODCODAmount.md)
 - [CommodityNMFC](docs/Model/CommodityNMFC.md)
 - [CommonErrorResponse](docs/Model/CommonErrorResponse.md)
 - [DeliveryTimeInformationPickup](docs/Model/DeliveryTimeInformationPickup.md)
 - [DeliveryTimeInformationReturnContractServices](docs/Model/DeliveryTimeInformationReturnContractServices.md)
 - [DimWeightUnitOfMeasurement](docs/Model/DimWeightUnitOfMeasurement.md)
 - [DimensionsUnitOfMeasurement](docs/Model/DimensionsUnitOfMeasurement.md)
 - [DryIceDryIceWeight](docs/Model/DryIceDryIceWeight.md)
 - [DryIceWeightUnitOfMeasurement](docs/Model/DryIceWeightUnitOfMeasurement.md)
 - [ElementLevelInformationElementIdentifier](docs/Model/ElementLevelInformationElementIdentifier.md)
 - [ErrorMessage](docs/Model/ErrorMessage.md)
 - [ErrorResponse](docs/Model/ErrorResponse.md)
 - [EstimatedArrivalArrival](docs/Model/EstimatedArrivalArrival.md)
 - [EstimatedArrivalPickup](docs/Model/EstimatedArrivalPickup.md)
 - [FRSPaymentInformationAddress](docs/Model/FRSPaymentInformationAddress.md)
 - [FRSPaymentInformationType](docs/Model/FRSPaymentInformationType.md)
 - [FRSShipmentDataFreightDensityRate](docs/Model/FRSShipmentDataFreightDensityRate.md)
 - [FRSShipmentDataHandlingUnits](docs/Model/FRSShipmentDataHandlingUnits.md)
 - [FRSShipmentDataTransportationCharges](docs/Model/FRSShipmentDataTransportationCharges.md)
 - [FreightDensityInfoAdjustedHeight](docs/Model/FreightDensityInfoAdjustedHeight.md)
 - [FreightDensityInfoHandlingUnits](docs/Model/FreightDensityInfoHandlingUnits.md)
 - [FreightShipmentInformationFreightDensityInfo](docs/Model/FreightShipmentInformationFreightDensityInfo.md)
 - [HandlingUnitsAdjustedHeight](docs/Model/HandlingUnitsAdjustedHeight.md)
 - [HandlingUnitsDimensions](docs/Model/HandlingUnitsDimensions.md)
 - [HandlingUnitsType](docs/Model/HandlingUnitsType.md)
 - [HandlingUnitsUnitOfMeasurement](docs/Model/HandlingUnitsUnitOfMeasurement.md)
 - [HazMatHazMatChemicalRecord](docs/Model/HazMatHazMatChemicalRecord.md)
 - [InsuranceBasicFlexibleParcelIndicator](docs/Model/InsuranceBasicFlexibleParcelIndicator.md)
 - [InsuranceExtendedFlexibleParcelIndicator](docs/Model/InsuranceExtendedFlexibleParcelIndicator.md)
 - [InsuranceTimeInTransitFlexibleParcelIndicator](docs/Model/InsuranceTimeInTransitFlexibleParcelIndicator.md)
 - [NegotiatedChargesItemizedCharges](docs/Model/NegotiatedChargesItemizedCharges.md)
 - [NegotiatedRateChargesItemizedCharges](docs/Model/NegotiatedRateChargesItemizedCharges.md)
 - [NegotiatedRateChargesTaxCharges](docs/Model/NegotiatedRateChargesTaxCharges.md)
 - [NegotiatedRateChargesTotalCharge](docs/Model/NegotiatedRateChargesTotalCharge.md)
 - [NegotiatedRateChargesTotalChargesWithTaxes](docs/Model/NegotiatedRateChargesTotalChargesWithTaxes.md)
 - [PackageCommodity](docs/Model/PackageCommodity.md)
 - [PackageDimWeight](docs/Model/PackageDimWeight.md)
 - [PackageDimensions](docs/Model/PackageDimensions.md)
 - [PackagePackageServiceOptions](docs/Model/PackagePackageServiceOptions.md)
 - [PackagePackageWeight](docs/Model/PackagePackageWeight.md)
 - [PackagePackagingType](docs/Model/PackagePackagingType.md)
 - [PackageServiceOptionsAccessPointCOD](docs/Model/PackageServiceOptionsAccessPointCOD.md)
 - [PackageServiceOptionsCOD](docs/Model/PackageServiceOptionsCOD.md)
 - [PackageServiceOptionsDeclaredValue](docs/Model/PackageServiceOptionsDeclaredValue.md)
 - [PackageServiceOptionsDeliveryConfirmation](docs/Model/PackageServiceOptionsDeliveryConfirmation.md)
 - [PackageServiceOptionsDryIce](docs/Model/PackageServiceOptionsDryIce.md)
 - [PackageServiceOptionsHazMat](docs/Model/PackageServiceOptionsHazMat.md)
 - [PackageServiceOptionsInsurance](docs/Model/PackageServiceOptionsInsurance.md)
 - [PackageServiceOptionsShipperDeclaredValue](docs/Model/PackageServiceOptionsShipperDeclaredValue.md)
 - [PackageSimpleRate](docs/Model/PackageSimpleRate.md)
 - [PackageUPSPremier](docs/Model/PackageUPSPremier.md)
 - [PackageWeightUnitOfMeasurement](docs/Model/PackageWeightUnitOfMeasurement.md)
 - [PaymentDetailsShipmentCharge](docs/Model/PaymentDetailsShipmentCharge.md)
 - [RATERequestWrapper](docs/Model/RATERequestWrapper.md)
 - [RATEResponseWrapper](docs/Model/RATEResponseWrapper.md)
 - [RateRequest](docs/Model/RateRequest.md)
 - [RateRequestCustomerClassification](docs/Model/RateRequestCustomerClassification.md)
 - [RateRequestPickupType](docs/Model/RateRequestPickupType.md)
 - [RateRequestRequest](docs/Model/RateRequestRequest.md)
 - [RateRequestShipment](docs/Model/RateRequestShipment.md)
 - [RateResponse](docs/Model/RateResponse.md)
 - [RateResponseRatedShipment](docs/Model/RateResponseRatedShipment.md)
 - [RateResponseResponse](docs/Model/RateResponseResponse.md)
 - [RatedPackageAccessorial](docs/Model/RatedPackageAccessorial.md)
 - [RatedPackageBaseServiceCharge](docs/Model/RatedPackageBaseServiceCharge.md)
 - [RatedPackageBillingWeight](docs/Model/RatedPackageBillingWeight.md)
 - [RatedPackageBillingWeightUnitOfMeasurement](docs/Model/RatedPackageBillingWeightUnitOfMeasurement.md)
 - [RatedPackageItemizedCharges](docs/Model/RatedPackageItemizedCharges.md)
 - [RatedPackageNegotiatedCharges](docs/Model/RatedPackageNegotiatedCharges.md)
 - [RatedPackageRateModifier](docs/Model/RatedPackageRateModifier.md)
 - [RatedPackageServiceOptionsCharges](docs/Model/RatedPackageServiceOptionsCharges.md)
 - [RatedPackageSimpleRate](docs/Model/RatedPackageSimpleRate.md)
 - [RatedPackageTotalCharges](docs/Model/RatedPackageTotalCharges.md)
 - [RatedPackageTransportationCharges](docs/Model/RatedPackageTransportationCharges.md)
 - [RatedPackageWeight](docs/Model/RatedPackageWeight.md)
 - [RatedShipmentBaseServiceCharge](docs/Model/RatedShipmentBaseServiceCharge.md)
 - [RatedShipmentBillingWeight](docs/Model/RatedShipmentBillingWeight.md)
 - [RatedShipmentDisclaimer](docs/Model/RatedShipmentDisclaimer.md)
 - [RatedShipmentFRSShipmentData](docs/Model/RatedShipmentFRSShipmentData.md)
 - [RatedShipmentItemizedCharges](docs/Model/RatedShipmentItemizedCharges.md)
 - [RatedShipmentNegotiatedRateCharges](docs/Model/RatedShipmentNegotiatedRateCharges.md)
 - [RatedShipmentRatedPackage](docs/Model/RatedShipmentRatedPackage.md)
 - [RatedShipmentRatedShipmentAlert](docs/Model/RatedShipmentRatedShipmentAlert.md)
 - [RatedShipmentService](docs/Model/RatedShipmentService.md)
 - [RatedShipmentServiceOptionsCharges](docs/Model/RatedShipmentServiceOptionsCharges.md)
 - [RatedShipmentTaxCharges](docs/Model/RatedShipmentTaxCharges.md)
 - [RatedShipmentTimeInTransit](docs/Model/RatedShipmentTimeInTransit.md)
 - [RatedShipmentTotalCharges](docs/Model/RatedShipmentTotalCharges.md)
 - [RatedShipmentTotalChargesWithTaxes](docs/Model/RatedShipmentTotalChargesWithTaxes.md)
 - [RatedShipmentTransportationCharges](docs/Model/RatedShipmentTransportationCharges.md)
 - [RequestTransactionReference](docs/Model/RequestTransactionReference.md)
 - [ResponseAlert](docs/Model/ResponseAlert.md)
 - [ResponseAlertDetail](docs/Model/ResponseAlertDetail.md)
 - [ResponseResponseStatus](docs/Model/ResponseResponseStatus.md)
 - [ResponseTransactionReference](docs/Model/ResponseTransactionReference.md)
 - [ServiceSummaryEstimatedArrival](docs/Model/ServiceSummaryEstimatedArrival.md)
 - [ServiceSummaryService](docs/Model/ServiceSummaryService.md)
 - [ShipFromAddress](docs/Model/ShipFromAddress.md)
 - [ShipToAddress](docs/Model/ShipToAddress.md)
 - [ShipmentAlternateDeliveryAddress](docs/Model/ShipmentAlternateDeliveryAddress.md)
 - [ShipmentChargeBillReceiver](docs/Model/ShipmentChargeBillReceiver.md)
 - [ShipmentChargeBillShipper](docs/Model/ShipmentChargeBillShipper.md)
 - [ShipmentChargeBillThirdParty](docs/Model/ShipmentChargeBillThirdParty.md)
 - [ShipmentDeliveryTimeInformation](docs/Model/ShipmentDeliveryTimeInformation.md)
 - [ShipmentDocumentsOnlyIndicator](docs/Model/ShipmentDocumentsOnlyIndicator.md)
 - [ShipmentFRSPaymentInformation](docs/Model/ShipmentFRSPaymentInformation.md)
 - [ShipmentFreightShipmentInformation](docs/Model/ShipmentFreightShipmentInformation.md)
 - [ShipmentInvoiceLineTotal](docs/Model/ShipmentInvoiceLineTotal.md)
 - [ShipmentNumOfPieces](docs/Model/ShipmentNumOfPieces.md)
 - [ShipmentPackage](docs/Model/ShipmentPackage.md)
 - [ShipmentPaymentDetails](docs/Model/ShipmentPaymentDetails.md)
 - [ShipmentPromotionalDiscountInformation](docs/Model/ShipmentPromotionalDiscountInformation.md)
 - [ShipmentService](docs/Model/ShipmentService.md)
 - [ShipmentServiceOptionsAccessPointCOD](docs/Model/ShipmentServiceOptionsAccessPointCOD.md)
 - [ShipmentServiceOptionsCOD](docs/Model/ShipmentServiceOptionsCOD.md)
 - [ShipmentServiceOptionsCODCODAmount](docs/Model/ShipmentServiceOptionsCODCODAmount.md)
 - [ShipmentServiceOptionsDeliveryConfirmation](docs/Model/ShipmentServiceOptionsDeliveryConfirmation.md)
 - [ShipmentServiceOptionsDeliveryOptions](docs/Model/ShipmentServiceOptionsDeliveryOptions.md)
 - [ShipmentServiceOptionsImportControl](docs/Model/ShipmentServiceOptionsImportControl.md)
 - [ShipmentServiceOptionsPickupOptions](docs/Model/ShipmentServiceOptionsPickupOptions.md)
 - [ShipmentServiceOptionsRestrictedArticles](docs/Model/ShipmentServiceOptionsRestrictedArticles.md)
 - [ShipmentServiceOptionsReturnService](docs/Model/ShipmentServiceOptionsReturnService.md)
 - [ShipmentShipFrom](docs/Model/ShipmentShipFrom.md)
 - [ShipmentShipTo](docs/Model/ShipmentShipTo.md)
 - [ShipmentShipmentIndicationType](docs/Model/ShipmentShipmentIndicationType.md)
 - [ShipmentShipmentRatingOptions](docs/Model/ShipmentShipmentRatingOptions.md)
 - [ShipmentShipmentServiceOptions](docs/Model/ShipmentShipmentServiceOptions.md)
 - [ShipmentShipmentTotalWeight](docs/Model/ShipmentShipmentTotalWeight.md)
 - [ShipmentShipper](docs/Model/ShipmentShipper.md)
 - [ShipmentTotalWeightUnitOfMeasurement](docs/Model/ShipmentTotalWeightUnitOfMeasurement.md)
 - [ShipperAddress](docs/Model/ShipperAddress.md)
 - [TimeInTransitServiceSummary](docs/Model/TimeInTransitServiceSummary.md)
 - [TotalChargeCurrencyCode](docs/Model/TotalChargeCurrencyCode.md)
 - [TotalChargeMonetaryValue](docs/Model/TotalChargeMonetaryValue.md)
 - [TransportationChargesDiscountAmount](docs/Model/TransportationChargesDiscountAmount.md)
 - [TransportationChargesGrossCharge](docs/Model/TransportationChargesGrossCharge.md)
 - [TransportationChargesNetCharge](docs/Model/TransportationChargesNetCharge.md)

## Documentation For Authorization


## oauth2

- **Type**: OAuth
- **Flow**: application
- **Authorization URL**: 
- **Scopes**: 


## Author



