Click or drag to resize

ServiceRouterGetCustomerConfig Method

Returns a GetCustomerConfigOut response with a result model List<GetCustomerConfigModel>

Namespace: AppOne.Services.V2
Assembly: AppOne.Web.Service (in AppOne.Web.Service.dll) Version: 1.0.141
Syntax
public GetCustomerConfigOut GetCustomerConfig(
	GetCustomerConfigIn input
)

Parameters

input  GetCustomerConfigIn
A new GetCustomerConfigIn object

Return Value

GetCustomerConfigOut
A GetCustomerConfigOut object
Remarks
Use this method to get a results list of GetCustomerConfigModel. The GetCustomerConfigModel contains almost all assigned meta data to a given customer/client.

Example
JSON Request
{
    "AuthToken":"String_Content",
    "EnableGlobalSettings":true
}
JSON Response
{
    "Report": {
        "APIVersion": "2.0",
        "ProcessTime": "0.041991",
        "RequestTime": "/Date(1472596827802-0700)/",
        "ResponseTime": "/Date(1472596827844-0700)/",
        "Results": 1
    },
    "Results": [
        {
            "CompanyInfo": {
                "Address": "8840 E Chaparral Rd, Suite 145",
                "City": "Scottsdale",
                "CompanyName": "ABC Company",
                "Phone": "480-296-0400",
                "PostalCode": "85250",
                "State": "AZ "
            },
            "GlobalSettings": [
                {
                    "ClockPin": "1234567",
                    "LaborLevelDescription": "Labor Level",
                    "LaborLevelDetailDescription": "Labor Levels",
                    "ScheduledDaysInAvance": 4,
                    "TimeCardApprovalLevel": 0,
                    "WebKioskPin": "777"
                }
            ]
        }
    ]
}
SOAP: C# WCF Sample
public void V2_GetCustomerConfig_SOAP_Test()
{
    try
    {
        var actionTestLogic = new Action<SoapServiceV2.ServiceRouterClient>((client) =>
        {
            // ==================================
            //TEST 1: Get CustomerConfig 
            int countTest_1 = 0;
            SoapServiceV2.GetCustomerConfigRequest request1 = new SoapServiceV2.GetCustomerConfigRequest();
            request1.input = new SoapServiceV2.GetCustomerConfigIn
            {
                AuthToken = AuthToken,
                EnableGlobalSettings = true
            };
            SoapServiceV2.GetCustomerConfigResponse response1 = client.GetCustomerConfig(request1);

            //In Generation Configuration CompanyInfo Section all the fields are REQUIRED and cant be null therefore checking for 
            //any of the field for null value will confirm Customer Config is present or not
            countTest_1 = response1.GetCustomerConfigResult.Results.FirstOrDefault().CompanyInfo.CompanyName != null ? 1 : 0;
            Assert.IsTrue(countTest_1 > 0);
        });

        RunServiceClient(actionTestLogic);
    }
    catch (FaultException<SoapServiceV2.ServiceException> fe)
    {
        Assert.Fail(fe.Detail.Message);
    }
}
See Also