Skip to content

antibodies-online/ups-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

antibodies-online/ups-api

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

Installation & Usage

Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
    }
  ],
  "require": {
    "GIT_USER_ID/GIT_REPO_ID": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/antibodies-online/ups-api/vendor/autoload.php');

Getting Started

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 = AntibodiesOnline\UpsApi\Shipping\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new AntibodiesOnline\UpsApi\Shipping\Api\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
);
$version = 'v1'; // string | When UPS introduces new elements in the  response that are not associated with new  request elements, Subversion is used. This  ensures backward compatibility.  v1  original features of the application. No  support for CODTurn-inPage, HighValueReport  or InternationalForms features returned in the  response v1701  includes support for CODTurn-inPage  features returned in the response. V1903  Length 5
$labelrecovery_request_wrapper = {"LabelRecoveryRequest":{"LabelDelivery":{"LabelLinkIndicator":"","ResendEmailIndicator":""},"LabelSpecification":{"HTTPUserAgent":"Mozilla/4.5","LabelImageFormat":{"Code":"ZPL"},"LabelStockSize":{"Height":"6","Width":"4"}},"Request":{"RequestOption":"Non_Validate","SubVersion":"1903","TransactionReference":{"CustomerContext":""}},"TrackingNumber":"1Z12345E8791315509","Translate":{"Code":"01","DialectCode":"US","LanguageCode":"eng"}}}; // \AntibodiesOnline\UpsApi\Shipping\Model\LABELRECOVERYRequestWrapper | 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

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

API Endpoints

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

Class Method HTTP request Description
DefaultApi labelRecovery POST /labels/{version}/recovery Label Recovery
DefaultApi shipment POST /shipments/{version}/ship Shipment
DefaultApi voidShipment DELETE /shipments/{version}/void/cancel/{shipmentidentificationnumber} Void Shipment

Models

Authorization

Authentication schemes defined for the API:

oauth2

  • Type: OAuth
  • Flow: application
  • Authorization URL: ``
  • Scopes: N/A

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: ``
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages