var Services=function() {
Services.initializeBase(this);
this._timeout = 0;
this._userContext = null;
this._succeeded = null;
this._failed = null;
}
Services.prototype={
GetProducts:function(categoryID,succeededCallback, failedCallback, userContext) {
return this._invoke(Services.get_path(), 'GetProducts',false,{categoryID:categoryID},succeededCallback,failedCallback,userContext); },
GetProduct:function(productID,succeededCallback, failedCallback, userContext) {
return this._invoke(Services.get_path(), 'GetProduct',false,{productID:productID},succeededCallback,failedCallback,userContext); },
GetCategories:function(succeededCallback, failedCallback, userContext) {
return this._invoke(Services.get_path(), 'GetCategories',false,{},succeededCallback,failedCallback,userContext); },
GetCategory:function(categoryGUID,succeededCallback, failedCallback, userContext) {
return this._invoke(Services.get_path(), 'GetCategory',false,{categoryGUID:categoryGUID},succeededCallback,failedCallback,userContext); },
TransactCreditCartOrder:function(order,succeededCallback, failedCallback, userContext) {
return this._invoke(Services.get_path(), 'TransactCreditCartOrder',false,{order:order},succeededCallback,failedCallback,userContext); },
ReviewExists:function(productId,succeededCallback, failedCallback, userContext) {
return this._invoke(Services.get_path(), 'ReviewExists',false,{productId:productId},succeededCallback,failedCallback,userContext); },
SubmitReview:function(productId,title,review,rating,succeededCallback, failedCallback, userContext) {
return this._invoke(Services.get_path(), 'SubmitReview',false,{productId:productId,title:title,review:review,rating:rating},succeededCallback,failedCallback,userContext); },
MarkReview:function(reviewId,helpful,pid,succeededCallback, failedCallback, userContext) {
return this._invoke(Services.get_path(), 'MarkReview',false,{reviewId:reviewId,helpful:helpful,pid:pid},succeededCallback,failedCallback,userContext); },
SubmitComment:function(email,comment,succeededCallback, failedCallback, userContext) {
return this._invoke(Services.get_path(), 'SubmitComment',false,{email:email,comment:comment},succeededCallback,failedCallback,userContext); }}
Services.registerClass('Services',Sys.Net.WebServiceProxy);
Services._staticInstance = new Services();
Services.set_path = function(value) { Services._staticInstance._path = value; }
Services.get_path = function() { return Services._staticInstance._path; }
Services.set_timeout = function(value) { Services._staticInstance._timeout = value; }
Services.get_timeout = function() { return Services._staticInstance._timeout; }
Services.set_defaultUserContext = function(value) { Services._staticInstance._userContext = value; }
Services.get_defaultUserContext = function() { return Services._staticInstance._userContext; }
Services.set_defaultSucceededCallback = function(value) { Services._staticInstance._succeeded = value; }
Services.get_defaultSucceededCallback = function() { return Services._staticInstance._succeeded; }
Services.set_defaultFailedCallback = function(value) { Services._staticInstance._failed = value; }
Services.get_defaultFailedCallback = function() { return Services._staticInstance._failed; }
Services.set_path("/Services.asmx");
Services.GetProducts= function(categoryID,onSuccess,onFailed,userContext) {Services._staticInstance.GetProducts(categoryID,onSuccess,onFailed,userContext); }
Services.GetProduct= function(productID,onSuccess,onFailed,userContext) {Services._staticInstance.GetProduct(productID,onSuccess,onFailed,userContext); }
Services.GetCategories= function(onSuccess,onFailed,userContext) {Services._staticInstance.GetCategories(onSuccess,onFailed,userContext); }
Services.GetCategory= function(categoryGUID,onSuccess,onFailed,userContext) {Services._staticInstance.GetCategory(categoryGUID,onSuccess,onFailed,userContext); }
Services.TransactCreditCartOrder= function(order,onSuccess,onFailed,userContext) {Services._staticInstance.TransactCreditCartOrder(order,onSuccess,onFailed,userContext); }
Services.ReviewExists= function(productId,onSuccess,onFailed,userContext) {Services._staticInstance.ReviewExists(productId,onSuccess,onFailed,userContext); }
Services.SubmitReview= function(productId,title,review,rating,onSuccess,onFailed,userContext) {Services._staticInstance.SubmitReview(productId,title,review,rating,onSuccess,onFailed,userContext); }
Services.MarkReview= function(reviewId,helpful,pid,onSuccess,onFailed,userContext) {Services._staticInstance.MarkReview(reviewId,helpful,pid,onSuccess,onFailed,userContext); }
Services.SubmitComment= function(email,comment,onSuccess,onFailed,userContext) {Services._staticInstance.SubmitComment(email,comment,onSuccess,onFailed,userContext); }
var gtc = Sys.Net.WebServiceProxy._generateTypedConstructor;
Type.registerNamespace('Commerce.Common');
if (typeof(Commerce.Common.Product) === 'undefined') {
Commerce.Common.Product=gtc("Commerce.Common.Product");
Commerce.Common.Product.registerClass('Commerce.Common.Product');
}
if (typeof(Commerce.Common.Category) === 'undefined') {
Commerce.Common.Category=gtc("Commerce.Common.Category");
Commerce.Common.Category.registerClass('Commerce.Common.Category');
}
if (typeof(Commerce.Common.Order) === 'undefined') {
Commerce.Common.Order=gtc("Commerce.Common.Order");
Commerce.Common.Order.registerClass('Commerce.Common.Order');
}
if (typeof(Commerce.Common.Transaction) === 'undefined') {
Commerce.Common.Transaction=gtc("Commerce.Common.Transaction");
Commerce.Common.Transaction.registerClass('Commerce.Common.Transaction');
}
