# DangerousGoods
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-dangerous-goods.git"
    }
  ],
  "require": {
    "abantecart/ups-dangerous-goods": "*@dev"
  }
}
```

Then run `composer install`

### Manual Installation

Download the files and include `autoload.php`:

```php
    require_once('/path/to/DangerousGoods/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\DangerousGoods\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new UPS\DangerousGoods\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\DangerousGoods\DangerousGoods\DANGEROUSGOODSUTILITYAPCRequestWrapper(); // \UPS\DangerousGoods\DangerousGoods\DANGEROUSGOODSUTILITYAPCRequestWrapper | 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".
$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
$version = "version_example"; // string | API version  Valid values: - v2

try {
    $result = $apiInstance->acceptanceAuditPreCheck($body, $trans_id, $transaction_src, $version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->acceptanceAuditPreCheck: ', $e->getMessage(), PHP_EOL;
}

// Configure OAuth2 access token for authorization: oauth2
$config = UPS\DangerousGoods\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new UPS\DangerousGoods\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\DangerousGoods\DangerousGoods\DANGEROUSGOODSUTILITYRequestWrapper(); // \UPS\DangerousGoods\DangerousGoods\DANGEROUSGOODSUTILITYRequestWrapper | 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".
$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
$version = "version_example"; // string | Version of the API.  Valid values: - v2403

try {
    $result = $apiInstance->chemicalReferenceData($body, $trans_id, $transaction_src, $version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->chemicalReferenceData: ', $e->getMessage(), PHP_EOL;
}

// Configure OAuth2 access token for authorization: oauth2
$config = UPS\DangerousGoods\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new UPS\DangerousGoods\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\DangerousGoods\DangerousGoods\DANGEROUSGOODSUTILITYAPCRequestWrapper(); // \UPS\DangerousGoods\DangerousGoods\DANGEROUSGOODSUTILITYAPCRequestWrapper | 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".
$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
$deprecated_version = "deprecated_version_example"; // string | API version  Valid values: - v1

try {
    $result = $apiInstance->deprecatedAcceptanceAuditPreCheck($body, $trans_id, $transaction_src, $deprecated_version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->deprecatedAcceptanceAuditPreCheck: ', $e->getMessage(), PHP_EOL;
}

// Configure OAuth2 access token for authorization: oauth2
$config = UPS\DangerousGoods\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new UPS\DangerousGoods\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\DangerousGoods\DangerousGoods\DANGEROUSGOODSUTILITYRequestWrapper(); // \UPS\DangerousGoods\DangerousGoods\DANGEROUSGOODSUTILITYRequestWrapper | 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".
$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
$deprecated_version = "deprecated_version_example"; // string | Version of the API.  Valid values: - v1 - v1801.

try {
    $result = $apiInstance->deprecatedChemicalReferenceData($body, $trans_id, $transaction_src, $deprecated_version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->deprecatedChemicalReferenceData: ', $e->getMessage(), PHP_EOL;
}
?>
```

## Documentation for API Endpoints

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

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DefaultApi* | [**acceptanceAuditPreCheck**](docs/Api/DefaultApi.md#acceptanceauditprecheck) | **POST** /dangerousgoods/{version}/acceptanceauditprecheck | Acceptance Audit Pre-check
*DefaultApi* | [**chemicalReferenceData**](docs/Api/DefaultApi.md#chemicalreferencedata) | **POST** /dangerousgoods/{version}/chemicalreferencedata | Chemical Reference Data
*DefaultApi* | [**deprecatedAcceptanceAuditPreCheck**](docs/Api/DefaultApi.md#deprecatedacceptanceauditprecheck) | **POST** /dangerousgoods/{deprecatedVersion}/acceptanceauditprecheck | Acceptance Audit Pre-check
*DefaultApi* | [**deprecatedChemicalReferenceData**](docs/Api/DefaultApi.md#deprecatedchemicalreferencedata) | **POST** /dangerousgoods/{deprecatedVersion}/chemicalreferencedata | Chemical Reference Data

## Documentation For Models

 - [AcceptanceAuditPreCheckRequest](docs/Model/AcceptanceAuditPreCheckRequest.md)
 - [AcceptanceAuditPreCheckRequestRequest](docs/Model/AcceptanceAuditPreCheckRequestRequest.md)
 - [AcceptanceAuditPreCheckRequestShipment](docs/Model/AcceptanceAuditPreCheckRequestShipment.md)
 - [AcceptanceAuditPreCheckResponse](docs/Model/AcceptanceAuditPreCheckResponse.md)
 - [AcceptanceAuditPreCheckResponsePackageResults](docs/Model/AcceptanceAuditPreCheckResponsePackageResults.md)
 - [AcceptanceAuditPreCheckResponseResponse](docs/Model/AcceptanceAuditPreCheckResponseResponse.md)
 - [AcceptanceAuditPreCheckResponseService](docs/Model/AcceptanceAuditPreCheckResponseService.md)
 - [AlertDetailElementLevelInformation](docs/Model/AlertDetailElementLevelInformation.md)
 - [ChemicalDataChemicalDetail](docs/Model/ChemicalDataChemicalDetail.md)
 - [ChemicalDataPackageQuantityLimitDetail](docs/Model/ChemicalDataPackageQuantityLimitDetail.md)
 - [ChemicalDataProperShippingNameDetail](docs/Model/ChemicalDataProperShippingNameDetail.md)
 - [ChemicalReferenceDataRequest](docs/Model/ChemicalReferenceDataRequest.md)
 - [ChemicalReferenceDataRequestRequest](docs/Model/ChemicalReferenceDataRequestRequest.md)
 - [ChemicalReferenceDataResponse](docs/Model/ChemicalReferenceDataResponse.md)
 - [ChemicalReferenceDataResponseChemicalData](docs/Model/ChemicalReferenceDataResponseChemicalData.md)
 - [ChemicalReferenceDataResponseResponse](docs/Model/ChemicalReferenceDataResponseResponse.md)
 - [CommonErrorResponse](docs/Model/CommonErrorResponse.md)
 - [DANGEROUSGOODSUTILITYAPCRequestWrapper](docs/Model/DANGEROUSGOODSUTILITYAPCRequestWrapper.md)
 - [DANGEROUSGOODSUTILITYAPCResponseWrapper](docs/Model/DANGEROUSGOODSUTILITYAPCResponseWrapper.md)
 - [DANGEROUSGOODSUTILITYRequestWrapper](docs/Model/DANGEROUSGOODSUTILITYRequestWrapper.md)
 - [DANGEROUSGOODSUTILITYResponseWrapper](docs/Model/DANGEROUSGOODSUTILITYResponseWrapper.md)
 - [ElementLevelInformationElementIdentifier](docs/Model/ElementLevelInformationElementIdentifier.md)
 - [ErrorMessage](docs/Model/ErrorMessage.md)
 - [ErrorResponse](docs/Model/ErrorResponse.md)
 - [PackageChemicalRecord](docs/Model/PackageChemicalRecord.md)
 - [PackagePackageWeight](docs/Model/PackagePackageWeight.md)
 - [PackageResultsChemicalRecordResults](docs/Model/PackageResultsChemicalRecordResults.md)
 - [PackageWeightUnitOfMeasurement](docs/Model/PackageWeightUnitOfMeasurement.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)
 - [ShipmentPackage](docs/Model/ShipmentPackage.md)
 - [ShipmentService](docs/Model/ShipmentService.md)
 - [ShipmentShipFromAddress](docs/Model/ShipmentShipFromAddress.md)
 - [ShipmentShipToAddress](docs/Model/ShipmentShipToAddress.md)

## Documentation For Authorization


## oauth2

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


## Author



