SWS GetRetailReceiptItems Method
Retrieves the list of assessments for a specific transaction ID for retail sales only.
Parameters
Name | Data Type | Is Required |
---|---|---|
SiteID | Long | Required |
Description | The site’s ID. This can be found using the GetSiteList method. | |
TransactionID | Long | Required |
Description | The transaction’s ID number. Transaction IDs are system generated for each payment transaction that occurs in the system. If there is no transaction ID the transaction failed. The transaction ID is returned when any MakePayment method is used. |
Returned Parameters
Name | Data Type |
---|---|
TNX_ID | Long |
Description | The transaction’s ID number. Transaction IDs are system generated for each payment transaction that occurs in the system. A null or “0” response indicates the transaction failed. |
SITE_ID | Long |
Description | The site’s ID number. |
ACCT_ID | Long |
Description | The account’s ID associated with the transaction. |
ACCT_NAME | String |
Description | The name on the account. This may differ from the primary contact’s name in some instances, such as a business account or a guardianship account. |
ACCT_TYPE | Integer |
Description | A numerical value identifying the type of account. Available values:
|
RETAIL_ID | Long |
Description | The ID of the retail item. |
TNX_DETAIL_ID | Long |
Description | The ID of the transaction detail |
RETAIL_OBJECT_ID | Long |
Description | The ID of the individual retail object. |
TNX_DATE | DateTime |
Description | The date of the transaction. |
AMT | Decimal |
Description | The amount of the transaction. |
ITEM_PRICE | Decimal |
Description | The price of the item. |
TAX_CHARGED | String |
Description | Indicates if tax was charged (“Y”) or not (“N”). Default is “Y”. |
TAX | Decimal |
Description | The amount of tax that was charged. |
EXTENDED | Decimal |
Description | The extended amount. |
FULFILLED | Decimal |
Description | The fulfilled amount. |
ASS_ID | Long |
Description | The assessment ID. |
ASS_REF | Long |
Description | The assessment reference number. |
ICON | String |
Description | The processed function for the transaction. |
CLASS_DESC | String |
Description | The description of the retail class. |
ITEM_NAME | String |
Description | The name of the item. |
DESCRIPTION | String |
Description | The description of the item sold. |
QTY | Decimal |
Description | The quantity of the item sold. |
RETURNED | Decimal |
Description | A numerical value displaying whether the item is returned. |
PART_NUMBER | String |
Description | The part number of the item. |
SKU | String |
Description | The individual SKU of the item sold. |
BARCODE | String |
Description | A numerical value assigned for an item type. |
ITEM_TYPE | Integer |
Description | The ID assigned to the tax group. |
TAX_GROUP_ID | Decimal |
Description | The ID for the tax group applicable to the retail revenue class. |
STATUS | Integer |
Description | A numerical value for the status of the transaction. |
Example
As with every method we need to pass in credentials. We do this with the LookupUser request object.
We’ll assume you’ve got a web reference, let’s name it SWS, in your Visual Studio project. At this point we need to our objects. We’ll need the standard service object, a GetRetailReceiptItems request object and a GetRetailReceiptItems response object. We can define and create those like this:
// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.GetRetailReceiptItems_Request request = new SWS.GetRetailReceiptItems_Request();
SWS.GetRetailReceiptItems_Response response;
Here’s my sample code of the Request object.
// GetRetailReceiptItems Request
request.SiteID = 123456;
request.TransactionID = 123456;
Finally we can call the method and pass across the login object and the request object to get items for our retail receipt. It’s a good idea to do this in a Try Catch block.
' Call the method that will load the response object
try
{
response = service.GetRetailReceiptItems(user_request, request);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
Note that if something goes wrong the service will respond with an exception. You’ll want to take a look at that message returned in that exception so it can be debugged.
For a full list of methods see SWS Methods.