AS Server - API - PurchaseInvoice - v2

Default

purchaseInvoiceAddInventory

PurchaseInvoice_AddInventory


/v2/PurchaseInvoice/{id}/inventory

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/v2/PurchaseInvoice/{id}/inventory" \
 -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();
        Integer id = 56; // Integer | 
        ActionRequestSupplierTransAddInventoryRequest actionRequestSupplierTransAddInventoryRequest = {"Value":{"InventoryList":[{"InventoryID":0,"Quantity":0,"AdjustedQuantityReceived":0,"BuyPriceEx":0,"BuyPriceTax":0,"LineTotal":0,"IsActive":true}]},"TenantID":0,"WebsiteID":0,"UserID":0}; // ActionRequestSupplierTransAddInventoryRequest | 

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

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | 
final ActionRequestSupplierTransAddInventoryRequest actionRequestSupplierTransAddInventoryRequest = new ActionRequestSupplierTransAddInventoryRequest(); // ActionRequestSupplierTransAddInventoryRequest | 

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

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Integer id = 56; // Integer | 
        ActionRequestSupplierTransAddInventoryRequest actionRequestSupplierTransAddInventoryRequest = {"Value":{"InventoryList":[{"InventoryID":0,"Quantity":0,"AdjustedQuantityReceived":0,"BuyPriceEx":0,"BuyPriceTax":0,"LineTotal":0,"IsActive":true}]},"TenantID":0,"WebsiteID":0,"UserID":0}; // ActionRequestSupplierTransAddInventoryRequest | 

        try {
            ActionResults_PurchaseInvoiceT_ result = apiInstance.purchaseInvoiceAddInventory(id, actionRequestSupplierTransAddInventoryRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#purchaseInvoiceAddInventory");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
Integer *id = 56; //  (default to null)
ActionRequestSupplierTransAddInventoryRequest *actionRequestSupplierTransAddInventoryRequest = {"Value":{"InventoryList":[{"InventoryID":0,"Quantity":0,"AdjustedQuantityReceived":0,"BuyPriceEx":0,"BuyPriceTax":0,"LineTotal":0,"IsActive":true}]},"TenantID":0,"WebsiteID":0,"UserID":0}; //  (optional)

// PurchaseInvoice_AddInventory
[apiInstance purchaseInvoiceAddInventoryWith:id
    actionRequestSupplierTransAddInventoryRequest:actionRequestSupplierTransAddInventoryRequest
              completionHandler: ^(ActionResults_PurchaseInvoiceT_ output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AsServerApiPurchaseInvoiceV2 = require('as_server_api_purchase_invoice_v2');

// Create an instance of the API class
var api = new AsServerApiPurchaseInvoiceV2.DefaultApi()
var id = 56; // {Integer} 
var opts = {
  'actionRequestSupplierTransAddInventoryRequest': {"Value":{"InventoryList":[{"InventoryID":0,"Quantity":0,"AdjustedQuantityReceived":0,"BuyPriceEx":0,"BuyPriceTax":0,"LineTotal":0,"IsActive":true}]},"TenantID":0,"WebsiteID":0,"UserID":0} // {ActionRequestSupplierTransAddInventoryRequest} 
};

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

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

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var id = 56;  // Integer |  (default to null)
            var actionRequestSupplierTransAddInventoryRequest = new ActionRequestSupplierTransAddInventoryRequest(); // ActionRequestSupplierTransAddInventoryRequest |  (optional) 

            try {
                // PurchaseInvoice_AddInventory
                ActionResults_PurchaseInvoiceT_ result = apiInstance.purchaseInvoiceAddInventory(id, actionRequestSupplierTransAddInventoryRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.purchaseInvoiceAddInventory: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$id = 56; // Integer | 
$actionRequestSupplierTransAddInventoryRequest = {"Value":{"InventoryList":[{"InventoryID":0,"Quantity":0,"AdjustedQuantityReceived":0,"BuyPriceEx":0,"BuyPriceTax":0,"LineTotal":0,"IsActive":true}]},"TenantID":0,"WebsiteID":0,"UserID":0}; // ActionRequestSupplierTransAddInventoryRequest | 

try {
    $result = $api_instance->purchaseInvoiceAddInventory($id, $actionRequestSupplierTransAddInventoryRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->purchaseInvoiceAddInventory: ', $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 $id = 56; # Integer | 
my $actionRequestSupplierTransAddInventoryRequest = WWW::OPenAPIClient::Object::ActionRequestSupplierTransAddInventoryRequest->new(); # ActionRequestSupplierTransAddInventoryRequest | 

eval {
    my $result = $api_instance->purchaseInvoiceAddInventory(id => $id, actionRequestSupplierTransAddInventoryRequest => $actionRequestSupplierTransAddInventoryRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->purchaseInvoiceAddInventory: $@\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()
id = 56 # Integer |  (default to null)
actionRequestSupplierTransAddInventoryRequest = {"Value":{"InventoryList":[{"InventoryID":0,"Quantity":0,"AdjustedQuantityReceived":0,"BuyPriceEx":0,"BuyPriceTax":0,"LineTotal":0,"IsActive":true}]},"TenantID":0,"WebsiteID":0,"UserID":0} # ActionRequestSupplierTransAddInventoryRequest |  (optional)

try:
    # PurchaseInvoice_AddInventory
    api_response = api_instance.purchase_invoice_add_inventory(id, actionRequestSupplierTransAddInventoryRequest=actionRequestSupplierTransAddInventoryRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->purchaseInvoiceAddInventory: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let id = 56; // Integer
    let actionRequestSupplierTransAddInventoryRequest = {"Value":{"InventoryList":[{"InventoryID":0,"Quantity":0,"AdjustedQuantityReceived":0,"BuyPriceEx":0,"BuyPriceTax":0,"LineTotal":0,"IsActive":true}]},"TenantID":0,"WebsiteID":0,"UserID":0}; // ActionRequestSupplierTransAddInventoryRequest

    let mut context = DefaultApi::Context::default();
    let result = client.purchaseInvoiceAddInventory(id, actionRequestSupplierTransAddInventoryRequest, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
id*
Integer (int32)
Required
Body parameters
Name Description
actionRequestSupplierTransAddInventoryRequest

Responses


purchaseInvoiceGetT

PurchaseInvoice_GetT


/v2/PurchaseInvoice/{id}

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json,text/json,application/xml,text/xml" \
 "https://api.dev.spenda.co/api/v2/PurchaseInvoice/{id}"
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 id = 56; // Integer | 

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

final api_instance = DefaultApi();

final Integer id = new Integer(); // Integer | 

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

import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Integer id = 56; // Integer | 

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


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

// PurchaseInvoice_GetT
[apiInstance purchaseInvoiceGetTWith:id
              completionHandler: ^(ActionResults_PurchaseInvoiceT_ output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AsServerApiPurchaseInvoiceV2 = require('as_server_api_purchase_invoice_v2');

// Create an instance of the API class
var api = new AsServerApiPurchaseInvoiceV2.DefaultApi()
var id = 56; // {Integer} 

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

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

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var id = 56;  // Integer |  (default to null)

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

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

try {
    $result = $api_instance->purchaseInvoiceGetT($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->purchaseInvoiceGetT: ', $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 $id = 56; # Integer | 

eval {
    my $result = $api_instance->purchaseInvoiceGetT(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->purchaseInvoiceGetT: $@\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()
id = 56 # Integer |  (default to null)

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

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

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

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

Scopes

Parameters

Path parameters
Name Description
id*
Integer (int32)
Required

Responses