HouseAccounts.svc

Sending a Request to HouseAccounts.svc
All calls to HouseAccounts.svc require the AccessToken and the LocationToken in the HTTP Web Request Headers of the request. The parameters for the request body of each call are outlined in the sections below.

HouseAccounts.svc Endpoint
Endpoint
https://{{server}}.brinkpos.net/HouseAccounts.svc


HTTP Web Request Headers
Header Name
Header Value
AccessToken
{{AccessToken}}
LocationToken
{{LocationToken}}
This call is to retrieve a HouseAccount object of the location.

GetHouseAccount Request
Data Name
Data Type
Data Description
AccountNumber
string?
Specify the account number of the HouseAccount you would like to retrieve. This can be null if Id is specified.
Id
int
Specify the Id of the HouseAccount you would like to retrieve. This can be null if AccountNumber is specified.


GetHouseAccount Response
Data Name
Data Type
Data Description
Message
string
Returns a Brink Error message if the request did not go through. Otherwise, this field will be null.
ResultCode
int
Returns one of the following:
  • 0 = Request went through successfully
  • 1 = Request returned an unknown error
  • 2 = Request was not valid
  • 3 = Server is currently unavailable and unable to receive the request
  • 4 = Access Denied
Account
Information about this HouseAccount


HouseAccount Type
Data Name
Data Type
Data Description
Id
int
Unique Id of this HouseAccount
AccountNumber
string
Unique Account Number of this HouseAccount
Active
bool
True if House Account is active, False if not
Balance
decimal
Balance of this HouseAccount
Limit
decimal
Limit for this HouseAccount, or 0 if there is no limit
Name
string
Name of the person who owns this HouseAccount
This call is to retrieve an array of HouseAccountCharge objects for the location.

GetHouseAccountCharges Request
Data Name
Data Type
Data Description
EndDate
DateTime
Specify the end date to which you would like to see HouseAccountCharges made for this location
Id
int
Specify the Id of the House Account you would like to see HouseAccountCharges for. If left null, HouseAccountCharges will not be filtered by HouseAccount.
StartDate
DateTime
Specify the start date from which you would like to see HouseAccountCharges made for this location


GetHouseAccountCharges Response
Data Name
Data Type
Data Description
Message
string
Returns a Brink Error message if the request did not go through. Otherwise, this field will be null.
ResultCode
int
Returns one of the following:
  • 0 = Request went through successfully
  • 1 = Request returned an unknown error
  • 2 = Request was not valid
  • 3 = Server is currently unavailable and unable to receive the request
  • 4 = Access Denied
Charges
Charges within the date range for the location or for the house account specified


HouseAccountCharge Type
Data Name
Data Type
Data Description
AccountId
int
Maps to the Id of the HouseAccount that was charged
Amount
decimal
Amount charged to the HouseAccount
OrderId
long
Maps to the Id of the Order the charge occurred for
PaymentId
int
Maps to the Id of the HouseAccountPayment
TransactionTime
DateTime
Date and time of this HouseAccountCharge
This call is to retrieve an array of HouseAccountPayment objects for the location.

GetHouseAccountPayments Request
Data Name
Data Type
Data Description
Id
int
Specify the Id of the HouseAccount you would like to retrieve HouseAccountPayments for


GetHouseAccountPayments Response
Data Name
Data Type
Data Description
Message
string
Returns a Brink Error message if the request did not go through. Otherwise, this field will be null.
ResultCode
int
Returns one of the following:
  • 0 = Request went through successfully
  • 1 = Request returned an unknown error
  • 2 = Request was not valid
  • 3 = Server is currently unavailable and unable to receive the request
  • 4 = Access Denied
Payments
Payments for the house account specified


HouseAccountPayment Type
Data Name
Data Type
Data Description
AccountId
int
Maps to the Id of the HouseAccount that was charged
Amount
decimal
Amount of this HouseAccountPayment
TransactionTime
DateTime
Date and time of this HouseAccountPayment
This call is to retrieve an array of HouseAccount objects for the location.

GetHouseAccounts Request
Data Name
Data Type
Data Description
Id
int
Specify the Id of the HouseAccount you would like to retrieve HouseAccounts for


GetHouseAccounts Response
Data Name
Data Type
Data Description
Message
string
Returns a Brink Error message if the request did not go through. Otherwise, this field will be null.
ResultCode
int
Returns one of the following:
  • 0 = Request went through successfully
  • 1 = Request returned an unknown error
  • 2 = Request was not valid
  • 3 = Server is currently unavailable and unable to receive the request
  • 4 = Access Denied
Accounts
Array of HouseAccount
All HouseAccounts for this location
                
                
GetHouseAccount Sample Code
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.ServiceModel; using System.ServiceModel.Web; using HouseAccounts_GetHouseAccount.HouseAccountsServiceReference; namespace HouseAccounts_GetHouseAccount { class Program { static void Main(string[] args) { //Connect to HouseAccounts service client var client = new HouseAccountsWebServiceClient(); //Set security protocol to TLS 1.2 System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12; using (var scope = new OperationContextScope(client.InnerChannel)) { //Include tokens in HTTP Web Request Headers var headers = WebOperationContext.Current.OutgoingRequest.Headers; headers["AccessToken"] = @"AccessToken"; headers["LocationToken"] = @"LocationToken"; int accountId = 1; string accountNumber = "1"; //Include either Id or AccountNumber parameter in request body var request = new GetHouseAccountRequest() { Id = accountId, //AccountNumber = accountNumber, }; //Make GetHouseAccount call var response = client.GetHouseAccount(request); //If call is successful if (response.ResultCode == 0) { //Read HouseAccount object returned var account = response.Account; Console.WriteLine("Id: " + account.Id) Console.WriteLine("AccountNumber: " + account.AccountNumber); Console.WriteLine("Name: " + account.Name); Console.WriteLine("Active: " + account.Active); Console.WriteLine("Balance: " + account.Balance); Console.WriteLine("FirstName: " + account.FirstName); Console.WriteLine("MiddleName: " + account.MiddleName); Console.WriteLine("LastName: " + account.LastName); Console.WriteLine("Address1: " + account.Address1); Console.WriteLine("Address2: " + account.Address2); Console.WriteLine("Address3: " + account.Address3); Console.WriteLine("Address4: " + account.Address4); Console.WriteLine("City: " + account.City); Console.WriteLine("State: " + account.State); Console.WriteLine("Zip: " + account.Zip); Console.WriteLine("EmailAddress: " + account.EmailAddress); Console.WriteLine("PhoneNumber: " + account.PhoneNumber); Console.WriteLine("EnforceLimit: " + account.EnforceLimit); Console.WriteLine("Limit: " + account.Limit); Console.WriteLine("---------------------------"); Console.WriteLine("End"); Console.ReadKey(); } else { Console.WriteLine("Error Code: " + response.ResultCode); Console.WriteLine("Message: " + response.Message); Console.ReadKey(); } } } } }
GetHouseAccount Sample Code
using Microsoft.Extensions.DependencyInjection; using ServiceReference4; using System.ServiceModel; using System.ServiceModel.Channels; namespace HouseAccounts_GetHouseAccount { class Program { public static ServiceCollection services = new ServiceCollection(); public static void AddHouseAccountServiceClient() { services.AddTransient<IHouseAccountsWebService>((provider) => { BasicHttpBinding binding = new BasicHttpBinding(); binding.MaxReceivedMessageSize = 2147483647; EndpointAddress endpointAddress = new EndpointAddress("{YOUR_WSDL_URL_GOES_HERE}"); ChannelFactory<IHouseAccountsWebService> factory = new ChannelFactory<IHouseAccountsWebService>(binding, endpointAddress); return factory.CreateChannel(); }); } static void Main(string[] args) { AddHouseAccountServiceClient(); IHouseAccountsWebService client = services.BuildServiceProvider().GetRequiredService<IHouseAccountsWebService>(); try { using (OperationContextScope scope = new OperationContextScope((IContextChannel)client)) { OperationContext context = OperationContext.Current; HttpRequestMessageProperty httpRequestProperty = new HttpRequestMessageProperty(); httpRequestProperty.Headers["AccessToken"] = "AccessToken"; httpRequestProperty.Headers["LocationToken"] = "LocationToken"; context.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = httpRequestProperty; //int accountId = 1; string accountNumber = "12345"; //Include either Id or AccountNumber parameter in request body var request = new GetHouseAccountRequest() { //Id = accountId, AccountNumber = accountNumber, }; //Make GetHouseAccount call var response = client.GetHouseAccountAsync(request); Console.WriteLine("GetHouseAccount"); Console.WriteLine("----------------"); //If call is successful if (response.Result.ResultCode == 0) { //Read HouseAccount object returned var account = response.Result.Account; Console.WriteLine("Id: " + account.Id); Console.WriteLine("AccountNumber: " + account.AccountNumber); Console.WriteLine("Name: " + account.Name); Console.WriteLine("Active: " + account.Active); Console.WriteLine("Balance: " + account.Balance); Console.WriteLine("FirstName: " + account.FirstName); Console.WriteLine("MiddleName: " + account.MiddleName); Console.WriteLine("LastName: " + account.LastName); Console.WriteLine("Address1: " + account.Address1); Console.WriteLine("Address2: " + account.Address2); Console.WriteLine("Address3: " + account.Address3); Console.WriteLine("Address4: " + account.Address4); Console.WriteLine("City: " + account.City); Console.WriteLine("State: " + account.State); Console.WriteLine("Zip: " + account.Zip); Console.WriteLine("EmailAddress: " + account.EmailAddress); Console.WriteLine("PhoneNumber: " + account.PhoneNumber); Console.WriteLine("EnforceLimit: " + account.EnforceLimit); Console.WriteLine("Limit: " + account.Limit); Console.WriteLine("---------------------------"); Console.WriteLine("End"); Console.ReadKey(); } else { Console.WriteLine("Error Code: " + response.Result.ResultCode); Console.WriteLine("Message: " + response.Result.Message); } } } catch (Exception ex) { Console.WriteLine("Error calling GetHouseAccount operation: " + ex.Message); } } } }
GetHouseAccount Sample Code
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hous="http://www.brinksoftware.com/webservices/houseaccounts"> <soapenv:Header/> <soapenv:Body> <hous:GetHouseAccount> <hous:request> <!--<hous:AccountNumber>?</hous:AccountNumber>--> <hous:Id>1</hous:Id> </hous:request> </hous:GetHouseAccount> </soapenv:Body> </soapenv:Envelope>
GetHouseAccount Sample Code
from zeep import Client from zeep.transports import Transport import requests accessToken = 'AccessToken' locationToken = 'LocationToken' #Include tokens in HTTP Web Request Headers session = requests.Session() session.headers.update({'AccessToken': accessToken, 'LocationToken': locationToken}) transport = Transport(session=session) #Connect to HouseAccounts service client client = Client(wsdl='{YOUR_WSDL_URL_GOES_HERE}', transport=transport) service = client.create_service( '{http://www.brinksoftware.com/webservices/houseaccounts}BasicHttpBinding_IHouseAccountsWebService', 'https://{YourStack}.brinkpos.net/houseaccounts.svc' ) #Prepare the dynamic type for GetHouseAccountRequest reqType = client.get_type('ns1:GetHouseAccountRequest') accountId = 1 accountNumber = '1' #Include Id or AccountNumber parameter in request body req = reqType( Id=accountId, # AccountNumber=accountNumber, ) try: #Make GetHouseAccount call res = service.GetHouseAccount(req) #If call is successful if res.ResultCode == 0: #Read HouseAccount object returned account = res.Account print('Id: ' + str(account.Id)) print('AccountNumber: ' + str(account.AccountNumber)) print('Name: ' + str(account.Name)) print('Active: ' + str(account.Active)) print('Balance: ' + str(account.Balance)) print('FirstName: ' + str(account.FirstName)) print('MiddleName: ' + str(account.MiddleName)) print('LastName: ' + str(account.LastName)) print('Address1: ' + str(account.Address1)) print('Address2: ' + str(account.Address2)) print('Address3: ' + str(account.Address3)) print('Address4: ' + str(account.Address4)) print('City: ' + str(account.City)) print('State: ' + str(account.State)) print('Zip: ' + str(account.Zip)) print('EmailAddress: ' + str(account.EmailAddress)) print('PhoneNumber: ' + str(account.PhoneNumber)) print('EnforceLimit: ' + str(account.EnforceLimit)) print('Limit: ' + str(account.Limit)) print('---------------------------') print('End') else: print('Error Code: ' + str(res.ResultCode)) print('Message: ' + str(res.Message)) except Exception as e: print(e)

                
                
GetHouseAccountCharges Sample Code
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.ServiceModel; using System.ServiceModel.Web; using HouseAccounts_GetHouseAccountCharges.HouseAccountsServiceReference; namespace HouseAccounts_GetHouseAccountCharges { class Program { static void Main(string[] args) { //Connect to HouseAccounts service client var client = new HouseAccountsWebServiceClient(); //Set security protocol to TLS 1.2 System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12; using (var scope = new OperationContextScope(client.InnerChannel)) { //Include tokens in HTTP Web Request Headers var headers = WebOperationContext.Current.OutgoingRequest.Headers; headers["AccessToken"] = @"AccessToken"; headers["LocationToken"] = @"LocationToken"; int accountId = 1; DateTime startDate = new DateTime(2001, 01, 01); DateTime endDate = new DateTime(2001, 01, 08); //Include Id, StartDate, and EndDate parameters in request body var request = new GetHouseAccountChargesRequest() { Id = accountId, StartDate = startDate, EndDate = endDate, }; //Make GetHouseAccountCharges call var response = client.GetHouseAccountCharges(request); //If call is successful if (response.ResultCode == 0) { if (response.Charges.Length > 0) { //Loop through collection of HouseAccountCharge objects returned foreach (var charge in response.Charges) { Console.WriteLine("AccountId: " + charge.AccountId); Console.WriteLine("Amount: " + charge.Amount); Console.WriteLine("OrderId: " + charge.OrderId); Console.WriteLine("PaymentId: " + charge.PaymentId); Console.WriteLine("TransactionTime: " + charge.TransactionTime); Console.WriteLine("---------------------------"); } } else { Console.WriteLine("No House Account Charges"); Console.WriteLine("---------------------------"); } Console.WriteLine("End"); Console.ReadKey(); } else { Console.WriteLine("Error Code: " + response.ResultCode); Console.WriteLine("Message: " + response.Message); Console.ReadKey(); } } } } }
GetHouseAccountCharges Sample Code
using Microsoft.Extensions.DependencyInjection; using ServiceReference4; using System.ServiceModel; using System.ServiceModel.Channels; namespace HouseAccounts_GetHouseAccountCharges { class Program { public static ServiceCollection services = new ServiceCollection(); public static void AddHouseAccountServiceClient() { services.AddTransient<IHouseAccountsWebService>((provider) => { BasicHttpBinding binding = new BasicHttpBinding(); binding.MaxReceivedMessageSize = 2147483647; EndpointAddress endpointAddress = new EndpointAddress("{YOUR_WSDL_URL_GOES_HERE}"); ChannelFactory<IHouseAccountsWebService> factory = new ChannelFactory<IHouseAccountsWebService>(binding, endpointAddress); return factory.CreateChannel(); }); } static void Main(string[] args) { AddHouseAccountServiceClient(); IHouseAccountsWebService client = services.BuildServiceProvider().GetRequiredService<IHouseAccountsWebService>(); try { using (OperationContextScope scope = new OperationContextScope((IContextChannel)client)) { OperationContext context = OperationContext.Current; HttpRequestMessageProperty httpRequestProperty = new HttpRequestMessageProperty(); httpRequestProperty.Headers["AccessToken"] = "AccessToken"; httpRequestProperty.Headers["LocationToken"] = "LocationToken"; context.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = httpRequestProperty; int accountId = 1; DateTime startDate = new DateTime(2001, 01, 01); DateTime endDate = new DateTime(2001, 01, 08); //Include Id, StartDate, and EndDate parameters in request body var request = new GetHouseAccountChargesRequest() { Id = accountId, StartDate = startDate, EndDate = endDate, }; //Make GetHouseAccountCharges call var response = client.GetHouseAccountChargesAsync(request); Console.WriteLine("GetHouseAccountCharges"); Console.WriteLine("-------------------------"); //If call is successful if (response.Result.ResultCode == 0) { if (response.Result.Charges.Length > 0) { //Loop through collection of HouseAccountCharge objects returned foreach (var charge in response.Result.Charges) { Console.WriteLine("AccountId: " + charge.AccountId); Console.WriteLine("Amount: " + charge.Amount); Console.WriteLine("OrderId: " + charge.OrderId); Console.WriteLine("PaymentId: " + charge.PaymentId); Console.WriteLine("TransactionTime: " + charge.TransactionTime); Console.WriteLine("---------------------------"); } } else { Console.WriteLine("No House Account Charges"); Console.WriteLine("---------------------------"); } Console.WriteLine("End"); Console.ReadKey(); } else { Console.WriteLine("Error Code: " + response.Result.ResultCode); Console.WriteLine("Message: " + response.Result.Message); } } } catch (Exception ex) { Console.WriteLine("Error calling GetHouseAccountCharges operation: " + ex.Message); } } } }
GetHouseAccountCharges Sample Code
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hous="http://www.brinksoftware.com/webservices/houseaccounts"> <soapenv:Header/> <soapenv:Body> <hous:GetHouseAccountCharges> <hous:request> <hous:EndDate>2001-01-08</hous:EndDate> <!--<hous:Id>?</hous:Id>--> <hous:StartDate>2001-01-01</hous:StartDate> </hous:request> </hous:GetHouseAccountCharges> </soapenv:Body> </soapenv:Envelope>
GetHouseAccountCharges Sample Code
from zeep import Client from zeep.transports import Transport import requests from datetime import datetime accessToken = 'AccessToken' locationToken = 'LocationToken' #Include tokens in HTTP Web Request Headers session = requests.Session() session.headers.update({'AccessToken': accessToken, 'LocationToken': locationToken}) transport = Transport(session=session) #Connect to HouseAccounts service client client = Client(wsdl='{YOUR_WSDL_URL_GOES_HERE}', transport=transport) service = client.create_service( '{http://www.brinksoftware.com/webservices/houseaccounts}BasicHttpBinding_IHouseAccountsWebService', 'https://{YourStack}.brinkpos.net/houseaccounts.svc' ) #Prepare the dynamic type for GetHouseAccountChargesRequest reqType = client.get_type('ns1:GetHouseAccountChargesRequest') accountId = 1 startDate = datetime(2001, 1, 1) endDate = datetime(2001, 1, 8) #Include either Id or AccountNumber parameter in request body req = reqType( Id=accountId, StartDate=startDate, EndDate=endDate, ) try: #Make GetHouseAccountCharges call res = service.GetHouseAccountCharges(req) #If call is successful if res.ResultCode == 0: if res.Charges != None: #Loop through collection of HouseAccountCharge objects returned for charge in res.Charges.HouseAccountCharge: print('AccountId: ' + str(charge.AccountId)) print('Amount: ' + str(charge.Amount)) print('OrderId: ' + str(charge.OrderId)) print('PaymentId: ' + str(charge.PaymentId)) print('TransactionTime: ' + str(charge.TransactionTime)) print('---------------------------') else: print('No House Account Charges') print('---------------------------') print('End') else: print('Error Code: ' + str(res.ResultCode)) print('Message: ' + str(res.Message)) except Exception as e: print(e)

                
                
GetHouseAccountPayments Sample Code
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.ServiceModel; using System.ServiceModel.Web; using HouseAccounts_GetHouseAccountPayments.HouseAccountsServiceReference; namespace HouseAccounts_GetHouseAccountPayments { class Program { static void Main(string[] args) { //Connect to HouseAccounts service client var client = new HouseAccountsWebServiceClient(); //Set security protocol to TLS 1.2 System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12; using (var scope = new OperationContextScope(client.InnerChannel)) { //Include tokens in HTTP Web Request Headers var headers = WebOperationContext.Current.OutgoingRequest.Headers; headers["AccessToken"] = @"AccessToken"; headers["LocationToken"] = @"LocationToken"; int accountId = 1; //Include Id parameter in request body var request = new GetHouseAccountPaymentsRequest() { Id = accountId, }; //Make GetHouseAccountPayments call var response = client.GetHouseAccountPayments(request); //If call is successful if (response.ResultCode == 0) { if (response.Payments.Length > 0) { //Loop through collection of HouseAccountPayment objects returned foreach (var payment in response.Payments) { Console.WriteLine("AccountId: " + payment.AccountId); Console.WriteLine("Amount: " + payment.Amount); Console.WriteLine("TransactionTime: " + payment.TransactionTime); Console.WriteLine("---------------------------"); } } else { Console.WriteLine("No House Account Payments"); Console.WriteLine("---------------------------"); } Console.WriteLine("End"); Console.ReadKey(); } else { Console.WriteLine("Error Code: " + response.ResultCode); Console.WriteLine("Message: " + response.Message); Console.ReadKey(); } } } } }
GetHouseAccountPayments Sample Code
using Microsoft.Extensions.DependencyInjection; using ServiceReference4; using System.ServiceModel; using System.ServiceModel.Channels; namespace HouseAccounts_GetHouseAccountPayments { class Program { public static ServiceCollection services = new ServiceCollection(); public static void AddHouseAccountServiceClient() { services.AddTransient<IHouseAccountsWebService>((provider) => { BasicHttpBinding binding = new BasicHttpBinding(); binding.MaxReceivedMessageSize = 2147483647; EndpointAddress endpointAddress = new EndpointAddress("{YOUR_WSDL_URL_GOES_HERE}"); ChannelFactory<IHouseAccountsWebService> factory = new ChannelFactory<IHouseAccountsWebService>(binding, endpointAddress); return factory.CreateChannel(); }); } static void Main(string[] args) { AddHouseAccountServiceClient(); IHouseAccountsWebService client = services.BuildServiceProvider().GetRequiredService<IHouseAccountsWebService>(); try { using (OperationContextScope scope = new OperationContextScope((IContextChannel)client)) { OperationContext context = OperationContext.Current; HttpRequestMessageProperty httpRequestProperty = new HttpRequestMessageProperty(); httpRequestProperty.Headers["AccessToken"] = "AccessToken"; httpRequestProperty.Headers["LocationToken"] = "LocationToken"; context.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = httpRequestProperty; int accountId = 1; //Include Id parameter in request body var request = new GetHouseAccountPaymentsRequest() { Id = accountId, }; //Make GetHouseAccountPayments call var response = client.GetHouseAccountPaymentsAsync(request); //If call is successful if (response.Result.ResultCode == 0) { if (response.Result.Payments.Length > 0) { //Loop through collection of HouseAccountPayment objects returned foreach (var payment in response.Result.Payments) { Console.WriteLine("AccountId: " + payment.AccountId); Console.WriteLine("Amount: " + payment.Amount); Console.WriteLine("TransactionTime: " + payment.TransactionTime); Console.WriteLine("---------------------------"); } } else { Console.WriteLine("No House Account Payments"); Console.WriteLine("---------------------------"); } Console.WriteLine("End"); Console.ReadKey(); } else { Console.WriteLine("Error Code: " + response.Result.ResultCode); Console.WriteLine("Message: " + response.Result.Message); } } } catch (Exception ex) { Console.WriteLine("Error calling GetHouseAccountPayments operation: " + ex.Message); } } } }
GetHouseAccountPayments Sample Code
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hous="http://www.brinksoftware.com/webservices/houseaccounts"> <soapenv:Header/> <soapenv:Body> <hous:GetHouseAccountPayments> <hous:request> <hous:Id>1</hous:Id> </hous:request> </hous:GetHouseAccountPayments> </soapenv:Body> </soapenv:Envelope>
GetHouseAccountPayments Sample Code
from zeep import Client from zeep.transports import Transport import requests accessToken = 'AccessToken' locationToken = 'LocationToken' #Include tokens in HTTP Web Request Headers session = requests.Session() session.headers.update({'AccessToken': accessToken, 'LocationToken': locationToken}) transport = Transport(session=session) #Connect to HouseAccounts service client client = Client(wsdl='{YOUR_WSDL_URL_GOES_HERE}', transport=transport) service = client.create_service( '{http://www.brinksoftware.com/webservices/houseaccounts}BasicHttpBinding_IHouseAccountsWebService', 'https://{YourStack}.brinkpos.net/houseaccounts.svc' ) #Prepare the dynamic type for GetHouseAccountPaymentsRequest reqType = client.get_type('ns1:GetHouseAccountPaymentsRequest') accountId = 1 #Include either Id parameter in request body req = reqType(Id=accountId) try: #Make GetHouseAccountPayments call res = service.GetHouseAccountPayments(req) #If call is successful if res.ResultCode == 0: if res.Payments != None: #Loop through collection of HouseAccountPayment objects returned for payment in res.Payments.HouseAccountPayment: print('AccountId: ' + str(payment.AccountId)) print('Amount: ' + str(payment.Amount)) print('TransactionTime: ' + str(payment.TransactionTime)) print('---------------------------') else: print('No House Account Payments') print('---------------------------') print('End') else: print('Error Code: ' + str(res.ResultCode)) print('Message: ' + str(res.Message)) except Exception as e: print(e)

                
                
GetHouseAccounts Sample Code
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.ServiceModel; using System.ServiceModel.Web; using HouseAccounts_GetHouseAccounts.HouseAccountsServiceReference; namespace HouseAccounts_GetHouseAccounts { class Program { static void Main(string[] args) { //Connect to HouseAccounts service client var client = new HouseAccountsWebServiceClient(); //Set security protocol to TLS 1.2 System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12; using (var scope = new OperationContextScope(client.InnerChannel)) { //Include tokens in HTTP Web Request Headers var headers = WebOperationContext.Current.OutgoingRequest.Headers; headers["AccessToken"] = @"AccessToken"; headers["LocationToken"] = @"LocationToken"; //Create an empty request (no Id parameter is necessary) var request = new GetHouseAccountsRequest(); //Make GetHouseAccounts call var response = client.GetHouseAccounts(request); //If call is successful if (response.ResultCode == 0) { if (response.Accounts.Length > 0) { //Loop through collection of HouseAccount objects returned foreach (var account in response.Accounts) { Console.WriteLine("Id: " + account.Id); Console.WriteLine("AccountNumber: " + account.AccountNumber); Console.WriteLine("Name: " + account.Name); Console.WriteLine("Active: " + account.Active); Console.WriteLine("Balance: " + account.Balance); Console.WriteLine("FirstName: " + account.FirstName); Console.WriteLine("MiddleName: " + account.MiddleName); Console.WriteLine("LastName: " + account.LastName); Console.WriteLine("Address1: " + account.Address1); Console.WriteLine("Address2: " + account.Address2); Console.WriteLine("Address3: " + account.Address3); Console.WriteLine("Address4: " + account.Address4); Console.WriteLine("City: " + account.City); Console.WriteLine("State: " + account.State); Console.WriteLine("Zip: " + account.Zip); Console.WriteLine("EmailAddress: " + account.EmailAddress); Console.WriteLine("PhoneNumber: " + account.PhoneNumber); Console.WriteLine("EnforceLimit: " + account.EnforceLimit); Console.WriteLine("Limit: " + account.Limit); Console.WriteLine("---------------------------"); } } else { Console.WriteLine("No House Accounts"); Console.WriteLine("---------------------------"); } Console.WriteLine("End"); Console.ReadKey(); } else { Console.WriteLine("Error Code: " + response.ResultCode); Console.WriteLine("Message: " + response.Message); Console.ReadKey(); } } } } }
GetHouseAccounts Sample Code
using Microsoft.Extensions.DependencyInjection; using ServiceReference4; using System.ServiceModel; using System.ServiceModel.Channels; namespace HouseAccounts_GetHouseAccounts { class Program { public static ServiceCollection services = new ServiceCollection(); public static void AddHouseAccountServiceClient() { services.AddTransient<IHouseAccountsWebService>((provider) => { BasicHttpBinding binding = new BasicHttpBinding(); binding.MaxReceivedMessageSize = 2147483647; EndpointAddress endpointAddress = new EndpointAddress("{YOUR_WSDL_URL_GOES_HERE}"); ChannelFactory<IHouseAccountsWebService> factory = new ChannelFactory<IHouseAccountsWebService>(binding, endpointAddress); return factory.CreateChannel(); }); } static void Main(string[] args) { AddHouseAccountServiceClient(); IHouseAccountsWebService client = services.BuildServiceProvider().GetRequiredService<IHouseAccountsWebService>(); try { using (OperationContextScope scope = new OperationContextScope((IContextChannel)client)) { OperationContext context = OperationContext.Current; HttpRequestMessageProperty httpRequestProperty = new HttpRequestMessageProperty(); httpRequestProperty.Headers["AccessToken"] = "AccessToken"; httpRequestProperty.Headers["LocationToken"] = "LocationToken"; context.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = httpRequestProperty; var request = new GetHouseAccountsRequest() { Id = 1 }; //Make GetHouseAccounts call var response = client.GetHouseAccountsAsync(request); //If call is successful if (response.Result.ResultCode == 0) { if (response.Result.Accounts.Length > 0) { //Loop through collection of HouseAccount objects returned foreach (var account in response.Result.Accounts) { Console.WriteLine("Id: " + account.Id); Console.WriteLine("AccountNumber: " + account.AccountNumber); Console.WriteLine("Name: " + account.Name); Console.WriteLine("Active: " + account.Active); Console.WriteLine("Balance: " + account.Balance); Console.WriteLine("FirstName: " + account.FirstName); Console.WriteLine("MiddleName: " + account.MiddleName); Console.WriteLine("LastName: " + account.LastName); Console.WriteLine("Address1: " + account.Address1); Console.WriteLine("Address2: " + account.Address2); Console.WriteLine("Address3: " + account.Address3); Console.WriteLine("Address4: " + account.Address4); Console.WriteLine("City: " + account.City); Console.WriteLine("State: " + account.State); Console.WriteLine("Zip: " + account.Zip); Console.WriteLine("EmailAddress: " + account.EmailAddress); Console.WriteLine("PhoneNumber: " + account.PhoneNumber); Console.WriteLine("EnforceLimit: " + account.EnforceLimit); Console.WriteLine("Limit: " + account.Limit); Console.WriteLine("---------------------------"); } } else { Console.WriteLine("No House Accounts"); Console.WriteLine("---------------------------"); } Console.WriteLine("End"); Console.ReadKey(); } else { Console.WriteLine("Error Code: " + response.Result.ResultCode); Console.WriteLine("Message: " + response.Result.Message); } } } catch (Exception ex) { Console.WriteLine("Error calling GetHouseAccounts operation: " + ex.Message); } } } }
GetHouseAccounts Sample Code
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hous="http://www.brinksoftware.com/webservices/houseaccounts"> <soapenv:Header/> <soapenv:Body> <hous:GetHouseAccounts> <hous:request/> </hous:GetHouseAccounts> </soapenv:Body> </soapenv:Envelope>
GetHouseAccounts Sample Code
from zeep import Client from zeep.transports import Transport import requests accessToken = 'AccessToken' locationToken = 'LocationToken' #Include tokens in HTTP Web Request Headers session = requests.Session() session.headers.update({'AccessToken': accessToken, 'LocationToken': locationToken}) transport = Transport(session=session) #Connect to HouseAccounts service client client = Client(wsdl='{YOUR_WSDL_URL_GOES_HERE}', transport=transport) service = client.create_service( '{http://www.brinksoftware.com/webservices/houseaccounts}BasicHttpBinding_IHouseAccountsWebService', 'https://{YourStack}.brinkpos.net/houseaccounts.svc' ) #Prepare the dynamic type for GetHouseAccountsRequest reqType = client.get_type('ns1:GetHouseAccountsRequest') accountId = 1 #Include Id parameter in request body req = reqType(Id=accountId) try: #Make GetHouseAccounts call res = service.GetHouseAccounts(req) #If call is successful if res.ResultCode == 0: if res.Accounts != None: #Loop through collection of HouseAccount objects returned for account in res.Accounts.HouseAccount: print('AccountNumber: ' + str(account.AccountNumber)) print('Name: ' + str(account.Name)) print('Active: ' + str(account.Active)) print('Balance: ' + str(account.Balance)) print('FirstName: ' + str(account.FirstName)) print('MiddleName: ' + str(account.MiddleName)) print('LastName: ' + str(account.LastName)) print('Address1: ' + str(account.Address1)) print('Address2: ' + str(account.Address2)) print('Address3: ' + str(account.Address3)) print('Address4: ' + str(account.Address4)) print('City: ' + str(account.City)) print('State: ' + str(account.State)) print('Zip: ' + str(account.Zip)) print('EmailAddress: ' + str(account.EmailAddress)) print('PhoneNumber: ' + str(account.PhoneNumber)) print('EnforceLimit: ' + str(account.EnforceLimit)) print('Limit: ' + str(account.Limit)) print('---------------------------') else: print('No House Accounts') print('---------------------------') print('End') else: print('Error Code: ' + str(res.ResultCode)) print('Message: ' + str(res.Message)) except Exception as e: print(e)