isValidZipCode
- Method
xxx.
Purpose
xxx.
Description
xxx.
Business Rules
Argument List
Name Required Usage isValidZipCodeRequest Required Object containing properties for the request timeout Optional Integer wait time, in seconds, before timeout response is generated callback* Optional Function to call upon completion of asynchronous request *for JavaScript only
isValidZipCode Request Fields
field string required n/a descr footnote.
Reply Fields
reply outer tag for the reply data block response Success, FAIL, Error Reply Hierarchy
- one
- 1
- 2
- 3
- 4
Remarks
xxx.
- one
- Include
012<script src="https://trans.slimcd.com/soft/json/slimcd.js"></script>
Method
01234function CloseBatch(request,callback)function CloseBatch(request,timeout,callback)request
012request= { "username" : "RGCQGBRU", "password" : "", "siteid" : "0", "batchnumber" : "" }Reply
012345678910callback ( {"reply":{"response":"Success","responsecode":"0","description":"OK","responseurl":"/wswebservices/transact.asmx/CloseBatch","datablock":"Y*876624\n"}} );Sample Code
12345678910111213141516171819<script src="https://trans.slimcd.com/soft/json/slimcd.js"></script><script>// <![CDATA[SlimCD.Transact.CloseBatch({"username": "R6UT8C6M", "siteid": "0", "password": "", "batchnumber": ""},function (reply) {if (reply.response == "Success") {alert ('Batch Closed');} else {alert('There was a problem closing the batch:\r\n' + reply.description);}});// ]]></script>Downloads
- Method
012code
request
012codeReply
012codeSample Code
12345678$SlimCD =new SlimCD() ;//(This just checks if the zip code is 5 or 9 digits long)if ($SlimCD->Validate_isValidZipCode('33445') )echo 'Valid USA zip code length';elseecho 'Not a Valid USA zip code length of 5 or 9';Downloads
- Include
012using SlimCD;
Method
012public bool isValidZipCode(string zip);Request
012345678public class CloseBatchRequest{public string username { get; set; }public string password { get; set; }public int siteid { get; set; }public string batchnumber { get; set; }}Reply
0123456789public class CloseBatchReply{public string response { get; set; }public string responsecode { get; set; }public string description { get; set; }public string responseurl { get; set; }public string datablock { get; set; }}Sample
12345678910111213using SlimCD.Transact;CloseBatchRequest request = new CloseBatchRequest();CloseBatchReply reply = new CloseBatchReply();request.username = "R6UT8C6M";reply = CloseBatch(request, 600);if (reply.response=="Success"){...} else {MessageBox.show (reply.description);}Downloads
- Method
012public async Task CloseBatch(CloseBatchRequest request, int timeout = 600)
Request
012345678public class CloseBatchRequest{public string username { get; set; }public string password { get; set; }public int siteid { get; set; }public string batchnumber { get; set; }}Reply
0123456789public class CloseBatchReply{public string response { get; set; }public string responsecode { get; set; }public string description { get; set; }public string responseurl { get; set; }public string datablock { get; set; }}Sample
123456789using SlimCD.Transact;CloseBatchRequest request = new CloseBatchRequest();CloseBatchReply reply = new CloseBatchReply();request.username = "1032";request.password = "289075";request.siteid = 0;reply = await CloseBatch(request, 600);Downloads
- Include
012#import "SlimCD.h"
Method
012- (BOOL) validateIsValidZipCode:(NSString*)theString;Reply
012YES or NOSample Code
1234567891011SlimCD *api = [[SlimCD alloc] init];if ([api validateIsValidZipCode:@"33324"]){NSLog(@"Zip code is valid.");}else{NSLog(@"Zip code is NOT valid.");} - Method
012code
request
012codeReply
012codeSample Code
123codeDownloads