Spenda.Services.Customers

Address

customerUpdateBusinessLocationAddress

Update business location address

Allows a tenant user to update business location address


/Spenda/Customers/Address/{businessLocationAddressID}

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Customers/Address/{businessLocationAddressID}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AddressApi;

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

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

        // Create an instance of the API class
        AddressApi apiInstance = new AddressApi();
        Integer businessLocationAddressID = 56; // Integer | The business location ID
        UpdateBusinessLocationAddressRequest updateBusinessLocationAddressRequest = {"id":0,"city":"string","state":"string","postCode":"string","country":"string","streetAddress":"string","isEmpty":true}; // UpdateBusinessLocationAddressRequest | 

        try {
            apiInstance.customerUpdateBusinessLocationAddress(businessLocationAddressID, updateBusinessLocationAddressRequest);
        } catch (ApiException e) {
            System.err.println("Exception when calling AddressApi#customerUpdateBusinessLocationAddress");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer businessLocationAddressID = new Integer(); // Integer | The business location ID
final UpdateBusinessLocationAddressRequest updateBusinessLocationAddressRequest = new UpdateBusinessLocationAddressRequest(); // UpdateBusinessLocationAddressRequest | 

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

import org.openapitools.client.api.AddressApi;

public class AddressApiExample {
    public static void main(String[] args) {
        AddressApi apiInstance = new AddressApi();
        Integer businessLocationAddressID = 56; // Integer | The business location ID
        UpdateBusinessLocationAddressRequest updateBusinessLocationAddressRequest = {"id":0,"city":"string","state":"string","postCode":"string","country":"string","streetAddress":"string","isEmpty":true}; // UpdateBusinessLocationAddressRequest | 

        try {
            apiInstance.customerUpdateBusinessLocationAddress(businessLocationAddressID, updateBusinessLocationAddressRequest);
        } catch (ApiException e) {
            System.err.println("Exception when calling AddressApi#customerUpdateBusinessLocationAddress");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
AddressApi *apiInstance = [[AddressApi alloc] init];
Integer *businessLocationAddressID = 56; // The business location ID (default to null)
UpdateBusinessLocationAddressRequest *updateBusinessLocationAddressRequest = {"id":0,"city":"string","state":"string","postCode":"string","country":"string","streetAddress":"string","isEmpty":true}; //  (optional)

// Update business location address
[apiInstance customerUpdateBusinessLocationAddressWith:businessLocationAddressID
    updateBusinessLocationAddressRequest:updateBusinessLocationAddressRequest
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesCustomers = require('spenda_services_customers');

// Create an instance of the API class
var api = new SpendaServicesCustomers.AddressApi()
var businessLocationAddressID = 56; // {Integer} The business location ID
var opts = {
  'updateBusinessLocationAddressRequest': {"id":0,"city":"string","state":"string","postCode":"string","country":"string","streetAddress":"string","isEmpty":true} // {UpdateBusinessLocationAddressRequest} 
};

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

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

            // Create an instance of the API class
            var apiInstance = new AddressApi();
            var businessLocationAddressID = 56;  // Integer | The business location ID (default to null)
            var updateBusinessLocationAddressRequest = new UpdateBusinessLocationAddressRequest(); // UpdateBusinessLocationAddressRequest |  (optional) 

            try {
                // Update business location address
                apiInstance.customerUpdateBusinessLocationAddress(businessLocationAddressID, updateBusinessLocationAddressRequest);
            } catch (Exception e) {
                Debug.Print("Exception when calling AddressApi.customerUpdateBusinessLocationAddress: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AddressApi();
$businessLocationAddressID = 56; // Integer | The business location ID
$updateBusinessLocationAddressRequest = {"id":0,"city":"string","state":"string","postCode":"string","country":"string","streetAddress":"string","isEmpty":true}; // UpdateBusinessLocationAddressRequest | 

try {
    $api_instance->customerUpdateBusinessLocationAddress($businessLocationAddressID, $updateBusinessLocationAddressRequest);
} catch (Exception $e) {
    echo 'Exception when calling AddressApi->customerUpdateBusinessLocationAddress: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AddressApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AddressApi->new();
my $businessLocationAddressID = 56; # Integer | The business location ID
my $updateBusinessLocationAddressRequest = WWW::OPenAPIClient::Object::UpdateBusinessLocationAddressRequest->new(); # UpdateBusinessLocationAddressRequest | 

eval {
    $api_instance->customerUpdateBusinessLocationAddress(businessLocationAddressID => $businessLocationAddressID, updateBusinessLocationAddressRequest => $updateBusinessLocationAddressRequest);
};
if ($@) {
    warn "Exception when calling AddressApi->customerUpdateBusinessLocationAddress: $@\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.AddressApi()
businessLocationAddressID = 56 # Integer | The business location ID (default to null)
updateBusinessLocationAddressRequest = {"id":0,"city":"string","state":"string","postCode":"string","country":"string","streetAddress":"string","isEmpty":true} # UpdateBusinessLocationAddressRequest |  (optional)

try:
    # Update business location address
    api_instance.customer_update_business_location_address(businessLocationAddressID, updateBusinessLocationAddressRequest=updateBusinessLocationAddressRequest)
except ApiException as e:
    print("Exception when calling AddressApi->customerUpdateBusinessLocationAddress: %s\n" % e)
extern crate AddressApi;

pub fn main() {
    let businessLocationAddressID = 56; // Integer
    let updateBusinessLocationAddressRequest = {"id":0,"city":"string","state":"string","postCode":"string","country":"string","streetAddress":"string","isEmpty":true}; // UpdateBusinessLocationAddressRequest

    let mut context = AddressApi::Context::default();
    let result = client.customerUpdateBusinessLocationAddress(businessLocationAddressID, updateBusinessLocationAddressRequest, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
businessLocationAddressID*
Integer (int32)
The business location ID
Required
Body parameters
Name Description
updateBusinessLocationAddressRequest

Responses


CustomerAssets

customerCreateAsset

Creates asset for a customer

Allows a tenant user to create customer assets


/Spenda/Customers/{customerID}/Assets

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Customers/{customerID}/Assets" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CustomerAssetsApi;

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

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

        // Create an instance of the API class
        CustomerAssetsApi apiInstance = new CustomerAssetsApi();
        Integer customerID = 56; // Integer | The customer ID
        CreateAssetRequest createAssetRequest = {"assetType":0,"assetFacilityType":0,"customerID":0,"businessLocationAddress":{"id":0,"city":"string","state":"string","postCode":"string","country":"string","description":"string","streetAddress":"string","isActive":true,"addressType":"string","isMailTo":true,"isDeliverTo":true,"isServiceTo":true,"isDefaultDeliverTo":true,"isDefaultServiceTo":true,"isDefaultBilling":true,"isAssetLocationAddressOnly":true,"action":"string"}}; // CreateAssetRequest | 

        try {
            httpActionResult_getAssetResponse result = apiInstance.customerCreateAsset(customerID, createAssetRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerAssetsApi#customerCreateAsset");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer customerID = new Integer(); // Integer | The customer ID
final CreateAssetRequest createAssetRequest = new CreateAssetRequest(); // CreateAssetRequest | 

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

import org.openapitools.client.api.CustomerAssetsApi;

public class CustomerAssetsApiExample {
    public static void main(String[] args) {
        CustomerAssetsApi apiInstance = new CustomerAssetsApi();
        Integer customerID = 56; // Integer | The customer ID
        CreateAssetRequest createAssetRequest = {"assetType":0,"assetFacilityType":0,"customerID":0,"businessLocationAddress":{"id":0,"city":"string","state":"string","postCode":"string","country":"string","description":"string","streetAddress":"string","isActive":true,"addressType":"string","isMailTo":true,"isDeliverTo":true,"isServiceTo":true,"isDefaultDeliverTo":true,"isDefaultServiceTo":true,"isDefaultBilling":true,"isAssetLocationAddressOnly":true,"action":"string"}}; // CreateAssetRequest | 

        try {
            httpActionResult_getAssetResponse result = apiInstance.customerCreateAsset(customerID, createAssetRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerAssetsApi#customerCreateAsset");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
CustomerAssetsApi *apiInstance = [[CustomerAssetsApi alloc] init];
Integer *customerID = 56; // The customer ID (default to null)
CreateAssetRequest *createAssetRequest = {"assetType":0,"assetFacilityType":0,"customerID":0,"businessLocationAddress":{"id":0,"city":"string","state":"string","postCode":"string","country":"string","description":"string","streetAddress":"string","isActive":true,"addressType":"string","isMailTo":true,"isDeliverTo":true,"isServiceTo":true,"isDefaultDeliverTo":true,"isDefaultServiceTo":true,"isDefaultBilling":true,"isAssetLocationAddressOnly":true,"action":"string"}}; //  (optional)

// Creates asset for a customer
[apiInstance customerCreateAssetWith:customerID
    createAssetRequest:createAssetRequest
              completionHandler: ^(httpActionResult_getAssetResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesCustomers = require('spenda_services_customers');

// Create an instance of the API class
var api = new SpendaServicesCustomers.CustomerAssetsApi()
var customerID = 56; // {Integer} The customer ID
var opts = {
  'createAssetRequest': {"assetType":0,"assetFacilityType":0,"customerID":0,"businessLocationAddress":{"id":0,"city":"string","state":"string","postCode":"string","country":"string","description":"string","streetAddress":"string","isActive":true,"addressType":"string","isMailTo":true,"isDeliverTo":true,"isServiceTo":true,"isDefaultDeliverTo":true,"isDefaultServiceTo":true,"isDefaultBilling":true,"isAssetLocationAddressOnly":true,"action":"string"}} // {CreateAssetRequest} 
};

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

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

            // Create an instance of the API class
            var apiInstance = new CustomerAssetsApi();
            var customerID = 56;  // Integer | The customer ID (default to null)
            var createAssetRequest = new CreateAssetRequest(); // CreateAssetRequest |  (optional) 

            try {
                // Creates asset for a customer
                httpActionResult_getAssetResponse result = apiInstance.customerCreateAsset(customerID, createAssetRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CustomerAssetsApi.customerCreateAsset: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CustomerAssetsApi();
$customerID = 56; // Integer | The customer ID
$createAssetRequest = {"assetType":0,"assetFacilityType":0,"customerID":0,"businessLocationAddress":{"id":0,"city":"string","state":"string","postCode":"string","country":"string","description":"string","streetAddress":"string","isActive":true,"addressType":"string","isMailTo":true,"isDeliverTo":true,"isServiceTo":true,"isDefaultDeliverTo":true,"isDefaultServiceTo":true,"isDefaultBilling":true,"isAssetLocationAddressOnly":true,"action":"string"}}; // CreateAssetRequest | 

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

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CustomerAssetsApi->new();
my $customerID = 56; # Integer | The customer ID
my $createAssetRequest = WWW::OPenAPIClient::Object::CreateAssetRequest->new(); # CreateAssetRequest | 

eval {
    my $result = $api_instance->customerCreateAsset(customerID => $customerID, createAssetRequest => $createAssetRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CustomerAssetsApi->customerCreateAsset: $@\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.CustomerAssetsApi()
customerID = 56 # Integer | The customer ID (default to null)
createAssetRequest = {"assetType":0,"assetFacilityType":0,"customerID":0,"businessLocationAddress":{"id":0,"city":"string","state":"string","postCode":"string","country":"string","description":"string","streetAddress":"string","isActive":true,"addressType":"string","isMailTo":true,"isDeliverTo":true,"isServiceTo":true,"isDefaultDeliverTo":true,"isDefaultServiceTo":true,"isDefaultBilling":true,"isAssetLocationAddressOnly":true,"action":"string"}} # CreateAssetRequest |  (optional)

try:
    # Creates asset for a customer
    api_response = api_instance.customer_create_asset(customerID, createAssetRequest=createAssetRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CustomerAssetsApi->customerCreateAsset: %s\n" % e)
extern crate CustomerAssetsApi;

pub fn main() {
    let customerID = 56; // Integer
    let createAssetRequest = {"assetType":0,"assetFacilityType":0,"customerID":0,"businessLocationAddress":{"id":0,"city":"string","state":"string","postCode":"string","country":"string","description":"string","streetAddress":"string","isActive":true,"addressType":"string","isMailTo":true,"isDeliverTo":true,"isServiceTo":true,"isDefaultDeliverTo":true,"isDefaultServiceTo":true,"isDefaultBilling":true,"isAssetLocationAddressOnly":true,"action":"string"}}; // CreateAssetRequest

    let mut context = CustomerAssetsApi::Context::default();
    let result = client.customerCreateAsset(customerID, createAssetRequest, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
customerID*
Integer (int32)
The customer ID
Required
Body parameters
Name Description
createAssetRequest

Responses


customerGetAsset

Gets a customer asset

Allows a tenant user to get customer assets


/Spenda/Customers/Assets/{assetID}

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Customers/Assets/{assetID}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CustomerAssetsApi;

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

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

        // Create an instance of the API class
        CustomerAssetsApi apiInstance = new CustomerAssetsApi();
        Integer assetID = 56; // Integer | The asset ID

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

final api_instance = DefaultApi();

final Integer assetID = new Integer(); // Integer | The asset ID

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

import org.openapitools.client.api.CustomerAssetsApi;

public class CustomerAssetsApiExample {
    public static void main(String[] args) {
        CustomerAssetsApi apiInstance = new CustomerAssetsApi();
        Integer assetID = 56; // Integer | The asset ID

        try {
            httpActionResult_getAssetResponse result = apiInstance.customerGetAsset(assetID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerAssetsApi#customerGetAsset");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
CustomerAssetsApi *apiInstance = [[CustomerAssetsApi alloc] init];
Integer *assetID = 56; // The asset ID (default to null)

// Gets a customer asset
[apiInstance customerGetAssetWith:assetID
              completionHandler: ^(httpActionResult_getAssetResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesCustomers = require('spenda_services_customers');

// Create an instance of the API class
var api = new SpendaServicesCustomers.CustomerAssetsApi()
var assetID = 56; // {Integer} The asset ID

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

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

            // Create an instance of the API class
            var apiInstance = new CustomerAssetsApi();
            var assetID = 56;  // Integer | The asset ID (default to null)

            try {
                // Gets a customer asset
                httpActionResult_getAssetResponse result = apiInstance.customerGetAsset(assetID);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CustomerAssetsApi.customerGetAsset: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CustomerAssetsApi();
$assetID = 56; // Integer | The asset ID

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

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CustomerAssetsApi->new();
my $assetID = 56; # Integer | The asset ID

eval {
    my $result = $api_instance->customerGetAsset(assetID => $assetID);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CustomerAssetsApi->customerGetAsset: $@\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.CustomerAssetsApi()
assetID = 56 # Integer | The asset ID (default to null)

try:
    # Gets a customer asset
    api_response = api_instance.customer_get_asset(assetID)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CustomerAssetsApi->customerGetAsset: %s\n" % e)
extern crate CustomerAssetsApi;

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

    let mut context = CustomerAssetsApi::Context::default();
    let result = client.customerGetAsset(assetID, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
assetID*
Integer (int32)
The asset ID
Required

Responses


customerSearchAssets

Search customer assets

Allows a tenant user to search customer assets


/Spenda/Customers/{customerID}/Assets

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Customers/{customerID}/Assets?StartRow=56&MaxResults=56&SearchString=searchString_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CustomerAssetsApi;

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

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

        // Create an instance of the API class
        CustomerAssetsApi apiInstance = new CustomerAssetsApi();
        Integer customerID = 56; // Integer | The customer ID
        Integer startRow = 56; // Integer | The start row position
        Integer maxResults = 56; // Integer | The number of results to return
        String searchString = searchString_example; // String | The search string

        try {
            httpActionResult_searchAssetsResponse result = apiInstance.customerSearchAssets(customerID, startRow, maxResults, searchString);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerAssetsApi#customerSearchAssets");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer customerID = new Integer(); // Integer | The customer ID
final Integer startRow = new Integer(); // Integer | The start row position
final Integer maxResults = new Integer(); // Integer | The number of results to return
final String searchString = new String(); // String | The search string

try {
    final result = await api_instance.customerSearchAssets(customerID, startRow, maxResults, searchString);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->customerSearchAssets: $e\n');
}

import org.openapitools.client.api.CustomerAssetsApi;

public class CustomerAssetsApiExample {
    public static void main(String[] args) {
        CustomerAssetsApi apiInstance = new CustomerAssetsApi();
        Integer customerID = 56; // Integer | The customer ID
        Integer startRow = 56; // Integer | The start row position
        Integer maxResults = 56; // Integer | The number of results to return
        String searchString = searchString_example; // String | The search string

        try {
            httpActionResult_searchAssetsResponse result = apiInstance.customerSearchAssets(customerID, startRow, maxResults, searchString);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerAssetsApi#customerSearchAssets");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
CustomerAssetsApi *apiInstance = [[CustomerAssetsApi alloc] init];
Integer *customerID = 56; // The customer ID (default to null)
Integer *startRow = 56; // The start row position (optional) (default to null)
Integer *maxResults = 56; // The number of results to return (optional) (default to null)
String *searchString = searchString_example; // The search string (optional) (default to null)

// Search customer assets
[apiInstance customerSearchAssetsWith:customerID
    startRow:startRow
    maxResults:maxResults
    searchString:searchString
              completionHandler: ^(httpActionResult_searchAssetsResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesCustomers = require('spenda_services_customers');

// Create an instance of the API class
var api = new SpendaServicesCustomers.CustomerAssetsApi()
var customerID = 56; // {Integer} The customer ID
var opts = {
  'startRow': 56, // {Integer} The start row position
  'maxResults': 56, // {Integer} The number of results to return
  'searchString': searchString_example // {String} The search string
};

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

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

            // Create an instance of the API class
            var apiInstance = new CustomerAssetsApi();
            var customerID = 56;  // Integer | The customer ID (default to null)
            var startRow = 56;  // Integer | The start row position (optional)  (default to null)
            var maxResults = 56;  // Integer | The number of results to return (optional)  (default to null)
            var searchString = searchString_example;  // String | The search string (optional)  (default to null)

            try {
                // Search customer assets
                httpActionResult_searchAssetsResponse result = apiInstance.customerSearchAssets(customerID, startRow, maxResults, searchString);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CustomerAssetsApi.customerSearchAssets: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CustomerAssetsApi();
$customerID = 56; // Integer | The customer ID
$startRow = 56; // Integer | The start row position
$maxResults = 56; // Integer | The number of results to return
$searchString = searchString_example; // String | The search string

try {
    $result = $api_instance->customerSearchAssets($customerID, $startRow, $maxResults, $searchString);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerAssetsApi->customerSearchAssets: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CustomerAssetsApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CustomerAssetsApi->new();
my $customerID = 56; # Integer | The customer ID
my $startRow = 56; # Integer | The start row position
my $maxResults = 56; # Integer | The number of results to return
my $searchString = searchString_example; # String | The search string

eval {
    my $result = $api_instance->customerSearchAssets(customerID => $customerID, startRow => $startRow, maxResults => $maxResults, searchString => $searchString);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CustomerAssetsApi->customerSearchAssets: $@\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.CustomerAssetsApi()
customerID = 56 # Integer | The customer ID (default to null)
startRow = 56 # Integer | The start row position (optional) (default to null)
maxResults = 56 # Integer | The number of results to return (optional) (default to null)
searchString = searchString_example # String | The search string (optional) (default to null)

try:
    # Search customer assets
    api_response = api_instance.customer_search_assets(customerID, startRow=startRow, maxResults=maxResults, searchString=searchString)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CustomerAssetsApi->customerSearchAssets: %s\n" % e)
extern crate CustomerAssetsApi;

pub fn main() {
    let customerID = 56; // Integer
    let startRow = 56; // Integer
    let maxResults = 56; // Integer
    let searchString = searchString_example; // String

    let mut context = CustomerAssetsApi::Context::default();
    let result = client.customerSearchAssets(customerID, startRow, maxResults, searchString, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
customerID*
Integer (int32)
The customer ID
Required
Query parameters
Name Description
StartRow
Integer (int32)
The start row position
MaxResults
Integer (int32)
The number of results to return
SearchString
String
The search string

Responses


CustomerClass

customerGetCustomerClass

Get a customer class

Allows a tenant user to get a customer class


/Spenda/Customers/CustomerClass/{customerClassID}

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Customers/CustomerClass/{customerClassID}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CustomerClassApi;

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

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

        // Create an instance of the API class
        CustomerClassApi apiInstance = new CustomerClassApi();
        Integer customerClassID = 56; // Integer | The customer class ID

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

final api_instance = DefaultApi();

final Integer customerClassID = new Integer(); // Integer | The customer class ID

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

import org.openapitools.client.api.CustomerClassApi;

public class CustomerClassApiExample {
    public static void main(String[] args) {
        CustomerClassApi apiInstance = new CustomerClassApi();
        Integer customerClassID = 56; // Integer | The customer class ID

        try {
            httpActionResult_getCustomerClassResponse result = apiInstance.customerGetCustomerClass(customerClassID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerClassApi#customerGetCustomerClass");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
CustomerClassApi *apiInstance = [[CustomerClassApi alloc] init];
Integer *customerClassID = 56; // The customer class ID (default to null)

// Get a customer class
[apiInstance customerGetCustomerClassWith:customerClassID
              completionHandler: ^(httpActionResult_getCustomerClassResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesCustomers = require('spenda_services_customers');

// Create an instance of the API class
var api = new SpendaServicesCustomers.CustomerClassApi()
var customerClassID = 56; // {Integer} The customer class ID

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

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

            // Create an instance of the API class
            var apiInstance = new CustomerClassApi();
            var customerClassID = 56;  // Integer | The customer class ID (default to null)

            try {
                // Get a customer class
                httpActionResult_getCustomerClassResponse result = apiInstance.customerGetCustomerClass(customerClassID);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CustomerClassApi.customerGetCustomerClass: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CustomerClassApi();
$customerClassID = 56; // Integer | The customer class ID

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

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CustomerClassApi->new();
my $customerClassID = 56; # Integer | The customer class ID

eval {
    my $result = $api_instance->customerGetCustomerClass(customerClassID => $customerClassID);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CustomerClassApi->customerGetCustomerClass: $@\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.CustomerClassApi()
customerClassID = 56 # Integer | The customer class ID (default to null)

try:
    # Get a customer class
    api_response = api_instance.customer_get_customer_class(customerClassID)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CustomerClassApi->customerGetCustomerClass: %s\n" % e)
extern crate CustomerClassApi;

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

    let mut context = CustomerClassApi::Context::default();
    let result = client.customerGetCustomerClass(customerClassID, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
customerClassID*
Integer (int32)
The customer class ID
Required

Responses


CustomerContacts

customerUpsertContacts

Upsert customer contacts

Allows a tenant user to upsert customer contacts


/Spenda/Customers/{customerID}/Contacts

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Customers/{customerID}/Contacts" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CustomerContactsApi;

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

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

        // Create an instance of the API class
        CustomerContactsApi apiInstance = new CustomerContactsApi();
        Integer customerID = 56; // Integer | The customer ID
        UpdateContactRequest updateContactRequest = {"contacts":[{"id":0,"firstName":"string","lastName":"string","emailAddress":"string","isPrimaryContact":true,"isActive":true,"positionOrOccupation":"string","phone":"string","phoneMobile":"string"}]}; // UpdateContactRequest | 

        try {
            httpActionResult_updateContactResponse result = apiInstance.customerUpsertContacts(customerID, updateContactRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerContactsApi#customerUpsertContacts");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer customerID = new Integer(); // Integer | The customer ID
final UpdateContactRequest updateContactRequest = new UpdateContactRequest(); // UpdateContactRequest | 

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

import org.openapitools.client.api.CustomerContactsApi;

public class CustomerContactsApiExample {
    public static void main(String[] args) {
        CustomerContactsApi apiInstance = new CustomerContactsApi();
        Integer customerID = 56; // Integer | The customer ID
        UpdateContactRequest updateContactRequest = {"contacts":[{"id":0,"firstName":"string","lastName":"string","emailAddress":"string","isPrimaryContact":true,"isActive":true,"positionOrOccupation":"string","phone":"string","phoneMobile":"string"}]}; // UpdateContactRequest | 

        try {
            httpActionResult_updateContactResponse result = apiInstance.customerUpsertContacts(customerID, updateContactRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomerContactsApi#customerUpsertContacts");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
CustomerContactsApi *apiInstance = [[CustomerContactsApi alloc] init];
Integer *customerID = 56; // The customer ID (default to null)
UpdateContactRequest *updateContactRequest = {"contacts":[{"id":0,"firstName":"string","lastName":"string","emailAddress":"string","isPrimaryContact":true,"isActive":true,"positionOrOccupation":"string","phone":"string","phoneMobile":"string"}]}; //  (optional)

// Upsert customer contacts
[apiInstance customerUpsertContactsWith:customerID
    updateContactRequest:updateContactRequest
              completionHandler: ^(httpActionResult_updateContactResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesCustomers = require('spenda_services_customers');

// Create an instance of the API class
var api = new SpendaServicesCustomers.CustomerContactsApi()
var customerID = 56; // {Integer} The customer ID
var opts = {
  'updateContactRequest': {"contacts":[{"id":0,"firstName":"string","lastName":"string","emailAddress":"string","isPrimaryContact":true,"isActive":true,"positionOrOccupation":"string","phone":"string","phoneMobile":"string"}]} // {UpdateContactRequest} 
};

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

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

            // Create an instance of the API class
            var apiInstance = new CustomerContactsApi();
            var customerID = 56;  // Integer | The customer ID (default to null)
            var updateContactRequest = new UpdateContactRequest(); // UpdateContactRequest |  (optional) 

            try {
                // Upsert customer contacts
                httpActionResult_updateContactResponse result = apiInstance.customerUpsertContacts(customerID, updateContactRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CustomerContactsApi.customerUpsertContacts: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CustomerContactsApi();
$customerID = 56; // Integer | The customer ID
$updateContactRequest = {"contacts":[{"id":0,"firstName":"string","lastName":"string","emailAddress":"string","isPrimaryContact":true,"isActive":true,"positionOrOccupation":"string","phone":"string","phoneMobile":"string"}]}; // UpdateContactRequest | 

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

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CustomerContactsApi->new();
my $customerID = 56; # Integer | The customer ID
my $updateContactRequest = WWW::OPenAPIClient::Object::UpdateContactRequest->new(); # UpdateContactRequest | 

eval {
    my $result = $api_instance->customerUpsertContacts(customerID => $customerID, updateContactRequest => $updateContactRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CustomerContactsApi->customerUpsertContacts: $@\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.CustomerContactsApi()
customerID = 56 # Integer | The customer ID (default to null)
updateContactRequest = {"contacts":[{"id":0,"firstName":"string","lastName":"string","emailAddress":"string","isPrimaryContact":true,"isActive":true,"positionOrOccupation":"string","phone":"string","phoneMobile":"string"}]} # UpdateContactRequest |  (optional)

try:
    # Upsert customer contacts
    api_response = api_instance.customer_upsert_contacts(customerID, updateContactRequest=updateContactRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CustomerContactsApi->customerUpsertContacts: %s\n" % e)
extern crate CustomerContactsApi;

pub fn main() {
    let customerID = 56; // Integer
    let updateContactRequest = {"contacts":[{"id":0,"firstName":"string","lastName":"string","emailAddress":"string","isPrimaryContact":true,"isActive":true,"positionOrOccupation":"string","phone":"string","phoneMobile":"string"}]}; // UpdateContactRequest

    let mut context = CustomerContactsApi::Context::default();
    let result = client.customerUpsertContacts(customerID, updateContactRequest, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
customerID*
Integer (int32)
The customer ID
Required
Body parameters
Name Description
updateContactRequest

Responses