cancelAsn
Cancels an advanced shipping notice
Cancels an advanced shipping notice.
/asns/{internalId}/cancel
Usage and SDK Samples
curl -X POST\
\
\
-H "Accept: application/xml,application/json"\
"//hostname/warehousingwebservices/asns/{internalId}/cancel?fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WarehousingAsnsControllerApi;
import java.io.File;
import java.util.*;
public class WarehousingAsnsControllerApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: oauth2_client_credentials
OAuth oauth2_client_credentials = (OAuth) defaultClient.getAuthentication("oauth2_client_credentials");
oauth2_client_credentials.setAccessToken("YOUR ACCESS TOKEN");
// Configure OAuth2 access token for authorization: oauth2_password
OAuth oauth2_password = (OAuth) defaultClient.getAuthentication("oauth2_password");
oauth2_password.setAccessToken("YOUR ACCESS TOKEN");
WarehousingAsnsControllerApi apiInstance = new WarehousingAsnsControllerApi();
String internalId = internalId_example; // String | Internal Id for the advanced shipping notice to be cancelled
String fields = fields_example; // String | Fields mapping level
try {
apiInstance.cancelAsn(internalId, fields);
} catch (ApiException e) {
System.err.println("Exception when calling WarehousingAsnsControllerApi#cancelAsn");
e.printStackTrace();
}
}
}
import io.swagger.client.api.WarehousingAsnsControllerApi;
public class WarehousingAsnsControllerApiExample {
public static void main(String[] args) {
WarehousingAsnsControllerApi apiInstance = new WarehousingAsnsControllerApi();
String internalId = internalId_example; // String | Internal Id for the advanced shipping notice to be cancelled
String fields = fields_example; // String | Fields mapping level
try {
apiInstance.cancelAsn(internalId, fields);
} catch (ApiException e) {
System.err.println("Exception when calling WarehousingAsnsControllerApi#cancelAsn");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_client_credentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth2_password)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
String *internalId = internalId_example; // Internal Id for the advanced shipping notice to be cancelled
String *fields = fields_example; // Fields mapping level (optional) (default to DEFAULT)
WarehousingAsnsControllerApi *apiInstance = [[WarehousingAsnsControllerApi alloc] init];
// Cancels an advanced shipping notice
[apiInstance cancelAsnWith:internalId
fields:fields
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error: %@", error);
}
}];
var WarehousingWebservices = require('warehousing_webservices');
var defaultClient = WarehousingWebservices.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2_client_credentials
var oauth2_client_credentials = defaultClient.authentications['oauth2_client_credentials'];
oauth2_client_credentials.accessToken = "YOUR ACCESS TOKEN"
// Configure OAuth2 access token for authorization: oauth2_password
var oauth2_password = defaultClient.authentications['oauth2_password'];
oauth2_password.accessToken = "YOUR ACCESS TOKEN"
var api = new WarehousingWebservices.WarehousingAsnsControllerApi()
var internalId = internalId_example; // {{String}} Internal Id for the advanced shipping notice to be cancelled
var opts = {
'fields': fields_example // {{String}} Fields mapping level
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
api.cancelAsn(internalId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class cancelAsnExample
{
public void main()
{
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
// Configure OAuth2 access token for authorization: oauth2_password
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new WarehousingAsnsControllerApi();
var internalId = internalId_example; // String | Internal Id for the advanced shipping notice to be cancelled
var fields = fields_example; // String | Fields mapping level (optional) (default to DEFAULT)
try
{
// Cancels an advanced shipping notice
apiInstance.cancelAsn(internalId, fields);
}
catch (Exception e)
{
Debug.Print("Exception when calling WarehousingAsnsControllerApi.cancelAsn: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: oauth2_client_credentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: oauth2_password
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new Swagger\Client\ApiWarehousingAsnsControllerApi();
$internalId = internalId_example; // String | Internal Id for the advanced shipping notice to be cancelled
$fields = fields_example; // String | Fields mapping level
try {
$api_instance->cancelAsn($internalId, $fields);
} catch (Exception $e) {
echo 'Exception when calling WarehousingAsnsControllerApi->cancelAsn: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WarehousingAsnsControllerApi;
# Configure OAuth2 access token for authorization: oauth2_client_credentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: oauth2_password
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
my $api_instance = WWW::SwaggerClient::WarehousingAsnsControllerApi->new();
my $internalId = internalId_example; # String | Internal Id for the advanced shipping notice to be cancelled
my $fields = fields_example; # String | Fields mapping level
eval {
$api_instance->cancelAsn(internalId => $internalId, fields => $fields);
};
if ($@) {
warn "Exception when calling WarehousingAsnsControllerApi->cancelAsn: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: oauth2_client_credentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: oauth2_password
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = swagger_client.WarehousingAsnsControllerApi()
internalId = internalId_example # String | Internal Id for the advanced shipping notice to be cancelled
fields = fields_example # String | Fields mapping level (optional) (default to DEFAULT)
try:
# Cancels an advanced shipping notice
api_instance.cancel_asn(internalId, fields=fields)
except ApiException as e:
print("Exception when calling WarehousingAsnsControllerApi->cancelAsn: %s\n" % e)
Parameters
| Name | Description |
|---|---|
| internalId* |
String
Internal Id for the advanced shipping notice to be cancelled
Required
|
| Name | Description |
|---|---|
| fields |
String
Fields mapping level
|