AS Server - API - PackageType

Default

packageTypeDelete

PackageType_Delete


/PackageType/{packageTypeID}

Usage and SDK Samples

curl -X DELETE \
 -H "Accept: application/json,text/json,application/xml,text/xml" \
 "https://api.dev.spenda.co/api/PackageType/{packageTypeID}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        Integer packageTypeID = 56; // Integer | Format - int32.

        try {
            ActionResults result = apiInstance.packageTypeDelete(packageTypeID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#packageTypeDelete");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer packageTypeID = new Integer(); // Integer | Format - int32.

try {
    final result = await api_instance.packageTypeDelete(packageTypeID);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->packageTypeDelete: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Integer packageTypeID = 56; // Integer | Format - int32.

        try {
            ActionResults result = apiInstance.packageTypeDelete(packageTypeID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#packageTypeDelete");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
Integer *packageTypeID = 56; // Format - int32. (default to null)

// PackageType_Delete
[apiInstance packageTypeDeleteWith:packageTypeID
              completionHandler: ^(ActionResults output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AsServerApiPackageType = require('as_server_api_package_type');

// Create an instance of the API class
var api = new AsServerApiPackageType.DefaultApi()
var packageTypeID = 56; // {Integer} Format - int32.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.packageTypeDelete(packageTypeID, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class packageTypeDeleteExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var packageTypeID = 56;  // Integer | Format - int32. (default to null)

            try {
                // PackageType_Delete
                ActionResults result = apiInstance.packageTypeDelete(packageTypeID);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.packageTypeDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$packageTypeID = 56; // Integer | Format - int32.

try {
    $result = $api_instance->packageTypeDelete($packageTypeID);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->packageTypeDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $packageTypeID = 56; # Integer | Format - int32.

eval {
    my $result = $api_instance->packageTypeDelete(packageTypeID => $packageTypeID);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->packageTypeDelete: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
packageTypeID = 56 # Integer | Format - int32. (default to null)

try:
    # PackageType_Delete
    api_response = api_instance.package_type_delete(packageTypeID)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->packageTypeDelete: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let packageTypeID = 56; // Integer

    let mut context = DefaultApi::Context::default();
    let result = client.packageTypeDelete(packageTypeID, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
packageTypeID*
Integer (int32)
Format - int32.
Required

Responses


packageTypeGet

PackageType_Get


/PackageType/{packageTypeID}

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json,text/json,application/xml,text/xml" \
 "https://api.dev.spenda.co/api/PackageType/{packageTypeID}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        Integer packageTypeID = 56; // Integer | Format - int32.

        try {
            ActionResults_PackageTypeT_ result = apiInstance.packageTypeGet(packageTypeID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#packageTypeGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer packageTypeID = new Integer(); // Integer | Format - int32.

try {
    final result = await api_instance.packageTypeGet(packageTypeID);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->packageTypeGet: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Integer packageTypeID = 56; // Integer | Format - int32.

        try {
            ActionResults_PackageTypeT_ result = apiInstance.packageTypeGet(packageTypeID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#packageTypeGet");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
Integer *packageTypeID = 56; // Format - int32. (default to null)

// PackageType_Get
[apiInstance packageTypeGetWith:packageTypeID
              completionHandler: ^(ActionResults_PackageTypeT_ output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AsServerApiPackageType = require('as_server_api_package_type');

// Create an instance of the API class
var api = new AsServerApiPackageType.DefaultApi()
var packageTypeID = 56; // {Integer} Format - int32.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.packageTypeGet(packageTypeID, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class packageTypeGetExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var packageTypeID = 56;  // Integer | Format - int32. (default to null)

            try {
                // PackageType_Get
                ActionResults_PackageTypeT_ result = apiInstance.packageTypeGet(packageTypeID);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.packageTypeGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$packageTypeID = 56; // Integer | Format - int32.

try {
    $result = $api_instance->packageTypeGet($packageTypeID);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->packageTypeGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $packageTypeID = 56; # Integer | Format - int32.

eval {
    my $result = $api_instance->packageTypeGet(packageTypeID => $packageTypeID);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->packageTypeGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
packageTypeID = 56 # Integer | Format - int32. (default to null)

try:
    # PackageType_Get
    api_response = api_instance.package_type_get(packageTypeID)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->packageTypeGet: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let packageTypeID = 56; // Integer

    let mut context = DefaultApi::Context::default();
    let result = client.packageTypeGet(packageTypeID, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
packageTypeID*
Integer (int32)
Format - int32.
Required

Responses


packageTypeGetAll

PackageType_GetAll


/PackageType/GetAll

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json,text/json,application/xml,text/xml" \
 "https://api.dev.spenda.co/api/PackageType/GetAll"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();

        try {
            ActionResultsList_PackageTypeT_ result = apiInstance.packageTypeGetAll();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#packageTypeGetAll");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.packageTypeGetAll();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->packageTypeGetAll: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();

        try {
            ActionResultsList_PackageTypeT_ result = apiInstance.packageTypeGetAll();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#packageTypeGetAll");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];

// PackageType_GetAll
[apiInstance packageTypeGetAllWithCompletionHandler: 
              ^(ActionResultsList_PackageTypeT_ output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AsServerApiPackageType = require('as_server_api_package_type');

// Create an instance of the API class
var api = new AsServerApiPackageType.DefaultApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.packageTypeGetAll(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class packageTypeGetAllExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new DefaultApi();

            try {
                // PackageType_GetAll
                ActionResultsList_PackageTypeT_ result = apiInstance.packageTypeGetAll();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.packageTypeGetAll: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();

try {
    $result = $api_instance->packageTypeGetAll();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->packageTypeGetAll: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();

eval {
    my $result = $api_instance->packageTypeGetAll();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->packageTypeGetAll: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()

try:
    # PackageType_GetAll
    api_response = api_instance.package_type_get_all()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->packageTypeGetAll: %s\n" % e)
extern crate DefaultApi;

pub fn main() {

    let mut context = DefaultApi::Context::default();
    let result = client.packageTypeGetAll(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


packageTypePost

PackageType_Post


/PackageType/

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json,text/json,application/xml,text/xml" \
 -H "Content-Type: application/json,text/json,application/xml,text/xml,application/x-www-form-urlencoded" \
 "https://api.dev.spenda.co/api/PackageType/" \
 -d 'Custom MIME type example not yet supported: text/json' \
 -d '' \
 -d 'Custom MIME type example not yet supported: text/xml' \
 -d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        ActionRequestPackageTypeT actionRequestPackageTypeT = {"Value":{"ID":0,"TenantID":0,"LogisticServiceType":1,"Name":"string","Description":"string","PackageCode":"string","DefaultLength_m":0,"DefaultWidth_m":0,"DefaultHeight_m":0,"MaxWeight_kg":0,"IsDefault":true,"IsActive":true},"TenantID":0,"WebsiteID":0,"UserID":0}; // ActionRequestPackageTypeT | 

        try {
            ActionResults_PackageTypeT_ result = apiInstance.packageTypePost(actionRequestPackageTypeT);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#packageTypePost");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final ActionRequestPackageTypeT actionRequestPackageTypeT = new ActionRequestPackageTypeT(); // ActionRequestPackageTypeT | 

try {
    final result = await api_instance.packageTypePost(actionRequestPackageTypeT);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->packageTypePost: $e\n');
}

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        ActionRequestPackageTypeT actionRequestPackageTypeT = {"Value":{"ID":0,"TenantID":0,"LogisticServiceType":1,"Name":"string","Description":"string","PackageCode":"string","DefaultLength_m":0,"DefaultWidth_m":0,"DefaultHeight_m":0,"MaxWeight_kg":0,"IsDefault":true,"IsActive":true},"TenantID":0,"WebsiteID":0,"UserID":0}; // ActionRequestPackageTypeT | 

        try {
            ActionResults_PackageTypeT_ result = apiInstance.packageTypePost(actionRequestPackageTypeT);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#packageTypePost");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
ActionRequestPackageTypeT *actionRequestPackageTypeT = {"Value":{"ID":0,"TenantID":0,"LogisticServiceType":1,"Name":"string","Description":"string","PackageCode":"string","DefaultLength_m":0,"DefaultWidth_m":0,"DefaultHeight_m":0,"MaxWeight_kg":0,"IsDefault":true,"IsActive":true},"TenantID":0,"WebsiteID":0,"UserID":0}; //  (optional)

// PackageType_Post
[apiInstance packageTypePostWith:actionRequestPackageTypeT
              completionHandler: ^(ActionResults_PackageTypeT_ output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AsServerApiPackageType = require('as_server_api_package_type');

// Create an instance of the API class
var api = new AsServerApiPackageType.DefaultApi()
var opts = {
  'actionRequestPackageTypeT': {"Value":{"ID":0,"TenantID":0,"LogisticServiceType":1,"Name":"string","Description":"string","PackageCode":"string","DefaultLength_m":0,"DefaultWidth_m":0,"DefaultHeight_m":0,"MaxWeight_kg":0,"IsDefault":true,"IsActive":true},"TenantID":0,"WebsiteID":0,"UserID":0} // {ActionRequestPackageTypeT} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.packageTypePost(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class packageTypePostExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var actionRequestPackageTypeT = new ActionRequestPackageTypeT(); // ActionRequestPackageTypeT |  (optional) 

            try {
                // PackageType_Post
                ActionResults_PackageTypeT_ result = apiInstance.packageTypePost(actionRequestPackageTypeT);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.packageTypePost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$actionRequestPackageTypeT = {"Value":{"ID":0,"TenantID":0,"LogisticServiceType":1,"Name":"string","Description":"string","PackageCode":"string","DefaultLength_m":0,"DefaultWidth_m":0,"DefaultHeight_m":0,"MaxWeight_kg":0,"IsDefault":true,"IsActive":true},"TenantID":0,"WebsiteID":0,"UserID":0}; // ActionRequestPackageTypeT | 

try {
    $result = $api_instance->packageTypePost($actionRequestPackageTypeT);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->packageTypePost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $actionRequestPackageTypeT = WWW::OPenAPIClient::Object::ActionRequestPackageTypeT->new(); # ActionRequestPackageTypeT | 

eval {
    my $result = $api_instance->packageTypePost(actionRequestPackageTypeT => $actionRequestPackageTypeT);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->packageTypePost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
actionRequestPackageTypeT = {"Value":{"ID":0,"TenantID":0,"LogisticServiceType":1,"Name":"string","Description":"string","PackageCode":"string","DefaultLength_m":0,"DefaultWidth_m":0,"DefaultHeight_m":0,"MaxWeight_kg":0,"IsDefault":true,"IsActive":true},"TenantID":0,"WebsiteID":0,"UserID":0} # ActionRequestPackageTypeT |  (optional)

try:
    # PackageType_Post
    api_response = api_instance.package_type_post(actionRequestPackageTypeT=actionRequestPackageTypeT)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->packageTypePost: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let actionRequestPackageTypeT = {"Value":{"ID":0,"TenantID":0,"LogisticServiceType":1,"Name":"string","Description":"string","PackageCode":"string","DefaultLength_m":0,"DefaultWidth_m":0,"DefaultHeight_m":0,"MaxWeight_kg":0,"IsDefault":true,"IsActive":true},"TenantID":0,"WebsiteID":0,"UserID":0}; // ActionRequestPackageTypeT

    let mut context = DefaultApi::Context::default();
    let result = client.packageTypePost(actionRequestPackageTypeT, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
actionRequestPackageTypeT

Responses