baasic-sdk-nodejs
Version:
NodeJS SDK provides core functionality for building web and mobile applications on [Baasic](http://www.baasic.com/).
827 lines (826 loc) • 111 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var CommerceClient = (function () {
function CommerceClient(baasicApp) {
this.baasicApp = baasicApp;
}
/**
* Returns a promise that is resolved once the find action has been performed. Success response returns a list of commerce resources matching the given criteria.
* @method
* @example CommerceClient.find({
pageNumber : 1,
pageSize : 10,
orderBy : '<field>',
orderDirection : '<asc|desc>',
customerId: '<customer-id>'
})
.then(function (collection) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
CommerceClient.prototype.find = function (options) {
return this.baasicApp.commerceModule.find(options);
};
/**
* Returns a promise that is resolved once the get action has been performed. Success response returns the commerce resource.
* @method
* @example CommerceClient.get('<id>', {})
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
CommerceClient.prototype.get = function (id, options) {
return this.baasicApp.commerceModule.get(id, options);
};
/**
* Returns a promise that is resolved once the get action has been performed. Success response returns the commerce resource.
* @method
* @example CommerceClient.validateVAT({ countryCode: 'DE', vatId: 'DE999999999' })
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
CommerceClient.prototype.validateVAT = function (countryCode, vatId) {
return this.baasicApp.commerceModule.validateVAT(countryCode, vatId);
};
/**
* Returns a promise that is resolved once the subscribe pre-process commerce action has been performed; this action performes pre-subscribe operations such as getting client tokens etc.
* @method
* @example CommerceClient.preprocess({
systemName : '<system-name>',
productId : '<product-id>',
customerId: '<id>'
})
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
CommerceClient.prototype.preprocess = function (data) {
return this.baasicApp.commerceModule.preprocess(data);
};
/**
* Returns a promise that is resolved once the subscribe commerce action has been performed; this action creates a new commerce subscription resource.
* @method
* @example CommerceClient.subscribe({
systemName : '<system-name>',
productId : '<product-id>',
customer: {
id: '<id>',
firstName: '<first-name>',
lastName: '<last-name>'
}
})
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
CommerceClient.prototype.subscribe = function (data) {
return this.baasicApp.commerceModule.subscribe(data);
};
/**
* Returns a promise that is resolved once the cancel subscription action has been performed. This action will remove a commerce subscription resource from the system if successfully completed. This route obtain routes from `baasicCommerceRouteDefinition` route template. Here is an example of how execute this action:
* @method
* @example CommerceClient.cancel({
systemName: '<system-name>',
id: '<subscription-id>',
requestRefund: <true/false>,
refundAmount: <refund-amount>
})
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
CommerceClient.prototype.cancel = function (data) {
return this.baasicApp.commerceModule.cancel(data);
};
Object.defineProperty(CommerceClient.prototype, "customers", {
get: function () {
var baasicApp = this.baasicApp;
return {
/**
* Returns a promise that is resolved once the find action has been performed. Success response returns a list of commerce resources matching the given criteria.
* @method
* @example CommerceModule.customers.find({
pageNumber : 1,
pageSize : 10,
orderBy : '<field>',
orderDirection : '<asc|desc>',
search : '<search-phrase>'
})
.then(function (collection) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
find: function (options) {
return baasicApp.commerceModule.customers.find(options);
},
/**
* Returns a promise that is resolved once the get action has been performed. Success response returns the commerce resource.
* @method
* @example CommerceModule.customers.get(id)
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
get: function (id, options) {
return baasicApp.commerceModule.customers.get(id, options);
},
/**
* Returns a promise that is resolved once the update commerce action has been performed; this action updates a commerce resource. This route uses HAL enabled objects to obtain routes and therefore it doesn't apply `baasicCommerceCustomerRouteDefinition` route template. Here is an example of how a route can be obtained from HAL enabled objects:
* ```
* let params = baasicApiClient.removeParams(commerceCustomer);
* let uri = params['model'].links('put').href;
* ```
* @method
* @example // commerceCustomer is a resource previously fetched using get action.
commerceCustomer.isDefault : true;
CommerceModule.customers.update(commerceCustomer)
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
update: function (data) {
return baasicApp.commerceModule.customers.update(data);
},
/**
* Returns a promise that is resolved once the remove action has been performed. This action will remove a commerce resource from the system if successfully completed. This route uses HAL enabled objects to obtain routes and therefore it doesn't apply `baasicCommerceCustomerRouteDefinition` route template. Here is an example of how a route can be obtained from HAL enabled objects:
* ```
* let params = baasicApiClient.removeParams(commerceCustomer);
* let uri = params['model'].links('delete').href;
* ```
* @method
* @example // commerceCustomer is a resource previously fetched using get action.
CommerceModule.customers.remove(commerceCustomer)
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
remove: function (data) {
return baasicApp.commerceModule.customers.remove(data);
},
paymentMethods: {
/**
* Returns a promise that is resolved once the find action has been performed. Success response returns a list of commerce resources matching the given criteria.
* @method
* @param options Query resource options object.
* @returns A promise that is resolved once the find action has been performed.
* @example CommerceModule.customers.paymentMethods.find({
pageNumber : 1,
pageSize : 10,
orderBy : '<field>',
orderDirection : '<asc|desc>',
search : '<search-phrase>'
})
.then(function (collection) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
find: function (options) {
return baasicApp.commerceModule.customers.paymentMethods.find(options);
},
/**
* Returns a promise that is resolved once the get action has been performed. Success response returns the commerce resource.
* @method
* @example CommerceModule.customers.paymentMethods.get()
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
get: function (id, options) {
return baasicApp.commerceModule.customers.paymentMethods.get(id, options);
},
/**
* Returns a promise that is resolved once the update commerce action has been performed; this action updates a commerce resource. This route uses HAL enabled objects to obtain routes and therefore it doesn't apply `baasicCommerceCustomerPaymentMethodRouteDefinition` route template. Here is an example of how a route can be obtained from HAL enabled objects:
* ```
* let params = modelMapper.removeParams(commerceCustomerPaymentMethod);
* var uri = params['model'].links('put').href;
* ```
* @method
* @example // commerceCustomerPaymentMethod is a resource previously fetched using get action.
commerceCustomerPaymentMethod.isDefault : true;
CommerceModule.customers.paymentMethods.update(commerceCustomerPaymentMethod)
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
update: function (data) {
return baasicApp.commerceModule.customers.paymentMethods.update(data);
},
/**
* Returns a promise that is resolved once the create commerce action has been performed; this action creates a new commerce resource.
* @method
* @example CommerceModule.customers.paymentMethods.create({
paymentMethodNonce : '<payment-method-nonce>',
customerId : '<customer-id>',
typeName : '<type-name>'
})
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
create: function (data) {
return baasicApp.commerceModule.customers.paymentMethods.create(data);
},
/**
* Returns a promise that is resolved once the remove action has been performed. This action will remove a commerce resource from the system if successfully completed. This route uses HAL enabled objects to obtain routes and therefore it doesn't apply `baasicCommerceCustomerPaymentMethodRouteClient` route template. Here is an example of how a route can be obtained from HAL enabled objects:
* ```
* let params = modelMapper.removeParams(commerceCustomerPaymentMethod);
* let uri = params['model'].links('delete').href;
* ```
* @method
* @example // commerceCustomerPaymentMethod is a resource previously fetched using get action.
CommerceModule.customers.paymentMethods.remove(commerceCustomerPaymentMethod)
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
remove: function (data) {
return baasicApp.commerceModule.customers.paymentMethods.remove(data);
}
}
};
},
enumerable: true,
configurable: true
});
Object.defineProperty(CommerceClient.prototype, "invoices", {
get: function () {
var baasicApp = this.baasicApp;
return {
/**
* Returns a promise that is resolved once the find action has been performed. Success response returns a list of commerce resources matching the given criteria.
* @method
* @example CommerceClient.invoices.find({
pageNumber : 1,
pageSize : 10,
orderBy : '<field>',
orderDirection : '<asc|desc>',
search : '<search-phrase>'
})
.then(function (collection) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
find: function (options) {
return baasicApp.commerceModule.invoices.find(options);
},
/**
* Returns a promise that is resolved once the get action has been performed. Success response returns the commerce resource.
* @method
* @example CommerceClient.invoices.get()
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
get: function (id, options) {
return baasicApp.commerceModule.invoices.get(id, options);
},
/**
* Returns a promise that is resolved once the update commerce action has been performed; this action updates a commerce resource. This route uses HAL enabled objects to obtain routes and therefore it doesn't apply `baasicCommerceInvoiceRouteDefinition` route template. Here is an example of how a route can be obtained from HAL enabled objects:
* ```
* let params = modelMapper.removeParams(commerceInvoice);
* let uri = params['model'].links('put').href;
* ```
* @method
* @example // commerceInvoice is a resource previously fetched using get action.
commerceInvoice.invoiceStatusId : '<new-invoice-status-id>';
CommerceClient.invoices.update(commerceInvoice)
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
update: function (data) {
return baasicApp.commerceModule.invoices.update(data);
},
/**
* Returns a promise that is resolved once the remove action has been performed. This action will remove a commerce resource from the system if successfully completed. This route uses HAL enabled objects to obtain routes and therefore it doesn't apply `baasicCommerceInvoiceRouteDefinition` route template. Here is an example of how a route can be obtained from HAL enabled objects:
* ```
* let params = modelMapper.removeParams(commerceInvoice);
* let uri = params['model'].links('delete').href;
* ```
* @method
* @example // commerceInvoice is a resource previously fetched using get action.
CommerceClient.invoices.remove(commerceInvoice)
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
remove: function (data) {
return baasicApp.commerceModule.invoices.remove(data);
},
streams: {
/**
* Returns a promise that is resolved once the get action has been performed. Success response returns the invoice stream if successfully completed.
* @method
* @example // commerceInvoice is a resource previously fetched using get action.
CommerceClient.invoices.streams.get({id: commerceInvoice.id})
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
get: function (data) {
return baasicApp.commerceModule.invoices.streams.get(data);
},
/**
* Returns a promise that is resolved once the get action has been performed. Success response returns the invoice stream as a blob. For more information on Blob objects please see [Blob Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob).
* @method
* @example // Request the original blob
CommerceClient.invoices.streams.getBlobl({id: commerceInvoice.id})
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
getBlob: function (data) {
return baasicApp.commerceModule.invoices.streams.getBlob(data);
}
}
};
},
enumerable: true,
configurable: true
});
Object.defineProperty(CommerceClient.prototype, "products", {
get: function () {
var baasicApp = this.baasicApp;
return {
/**
* Returns a promise that is resolved once the find action has been performed. Success response returns a list of commerce resources matching the given criteria.
* @method
* @example CommerceClient.products.find({
pageNumber : 1,
pageSize : 10,
orderBy : '<field>',
orderDirection : '<asc|desc>',
search : '<search-phrase>'
})
.then(function (collection) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
find: function (options) {
return baasicApp.commerceModule.products.find(options);
},
/**
* Returns a promise that is resolved once the get action has been performed. Success response returns the commerce resource.
* @method
* @example CommerceClient.products.get()
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
get: function (id, options) {
return baasicApp.commerceModule.products.get(id, options);
},
/**
* Returns a promise that is resolved once the create commerce action has been performed; this action creates a new commerce resource.
* @method
* @example CommerceClient.products.create({
name : '<product-name>',
slug : '<slug>',
shortDescription : '<short-description>',
recurringCyclePeriodTypeId: '<recurring-cycle-period-type-id>'
planId : '<plan-id>',
price: 100,
published: true
})
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
create: function (data) {
return baasicApp.commerceModule.products.create(data);
},
/**
* Returns a promise that is resolved once the update commerce action has been performed; this action updates a commerce resource. This route uses HAL enabled objects to obtain routes and therefore it doesn't apply `baasicCommerceProductRouteDefinition` route template. Here is an example of how a route can be obtained from HAL enabled objects:
* ```
* let params = modelMapper.removeParams(commerceProduct);
* let uri = params['model'].links('put').href;
* ```
* @method
* @example // commerceProduct is a resource previously fetched using get action.
commerceProduct.shortDescription : '<short-description>';
CommerceClient.products.update(commerceProduct)
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
update: function (data) {
return baasicApp.commerceModule.products.update(data);
},
/**
* Returns a promise that is resolved once the remove action has been performed. This action will remove a commerce resource from the system if successfully completed. This route uses HAL enabled objects to obtain routes and therefore it doesn't apply `baasicCommerceProductRouteDefinition` route template. Here is an example of how a route can be obtained from HAL enabled objects:
* ```
* let params = modelMapper.removeParams(commerceProduct);
* let uri = params['model'].links('delete').href;
* ```
* @method
* @example // commerceProduct is a resource previously fetched using get action.
CommerceClient.products.remove(commerceProduct)
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
remove: function (data) {
return baasicApp.commerceModule.products.remove(data);
}
};
},
enumerable: true,
configurable: true
});
Object.defineProperty(CommerceClient.prototype, "paymentTransactions", {
get: function () {
var baasicApp = this.baasicApp;
return {
/**
* Returns a promise that is resolved once the find action has been performed. Success response returns a list of commerce resources matching the given criteria.
* @method
* @example CommerceClient.paymentTransactions.find({
pageNumber : 1,
pageSize : 10,
orderBy : '<field>',
orderDirection : '<asc|desc>',
search : '<search-phrase>'
})
.then(function (collection) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
find: function (options) {
return baasicApp.commerceModule.paymentTransactions.find(options);
},
/**
* Returns a promise that is resolved once the get action has been performed. Success response returns the commerce resource.
* @method
* @example CommerceClient.paymentTransactions.get()
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
get: function (id, options) {
return baasicApp.commerceModule.paymentTransactions.get(id, options);
},
/**
* Returns a promise that is resolved once the create action has been performed. Success response returns the commerce resource.
* @method
* @example CommerceClient.paymentTransactions.create(data)
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
create: function (data) {
return baasicApp.commerceModule.paymentTransactions.create(data);
},
/**
* Returns a promise that is resolved once the update commerce action has been performed; this action updates a commerce resource. This route uses HAL enabled objects to obtain routes and therefore it doesn't apply `baasicCommercePaymentTransactionRouteDefinition` route template. Here is an example of how a route can be obtained from HAL enabled objects:
* ```
* let params = modelMapper.removeParams(commercePaymentTransaction);
* let uri = params['model'].links('put').href;
* ```
* @method
* @example // commercePaymentTransaction is a resource previously fetched using get action.
commercePaymentTransaction.amount : 100;
CommerceClient.paymentTransactions.update(commercePaymentTransaction)
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
update: function (data) {
return baasicApp.commerceModule.paymentTransactions.update(data);
},
/**
* Returns a promise that is resolved once the remove action has been performed. This action will remove a commerce resource from the system if successfully completed. This route uses HAL enabled objects to obtain routes and therefore it doesn't apply `baasicCommercePaymentTransactionRouteDefinition` route template. Here is an example of how a route can be obtained from HAL enabled objects:
* ```
* let params = modelMapper.removeParams(commercePaymentTransaction);
* let uri = params['model'].links('delete').href;
* ```
* @method
* @example // commercePaymentTransaction is a resource previously fetched using get action.
CommerceClient.paymentTransactions.remove(commercePaymentTransaction)
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
remove: function (data) {
return baasicApp.commerceModule.paymentTransactions.remove(data);
}
};
},
enumerable: true,
configurable: true
});
Object.defineProperty(CommerceClient.prototype, "lookups", {
get: function () {
var baasicApp = this.baasicApp;
return {
addressTypes: {
/**
* Returns a promise that is resolved once the find action has been performed. Success response returns a list of commerce resources matching the given criteria.
* @method
* @example CommerceClient.lookups.addressTypes.find({
pageNumber : 1,
pageSize : 10,
orderBy : '<field>',
orderDirection : '<asc|desc>',
search : '<search-phrase>'
})
.then(function (collection) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
find: function (options) {
return baasicApp.commerceModule.lookups.addressTypes.find(options);
},
/**
* Returns a promise that is resolved once the get action has been performed. Success response returns the commerce resource.
* @method
* @example CommerceClient.lookups.addressTypes.get()
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
get: function (id, options) {
return baasicApp.commerceModule.lookups.addressTypes.get(id, options);
},
/**
* Returns a promise that is resolved once the create commerce action has been performed; this action creates a new commerce resource.
* @method
* @example CommerceClient.lookups.addressTypes.create({
name : '<name>',
abrv: '<abbreviation>',
description: '<description>'
})
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
create: function (data) {
return baasicApp.commerceModule.lookups.addressTypes.create(data);
},
/**
* Returns a promise that is resolved once the update commerce action has been performed; this action updates a commerce resource. This route uses HAL enabled objects to obtain routes and therefore it doesn't apply `baasicCommerceLookupsAddressTypeRouteDefinition` route template. Here is an example of how a route can be obtained from HAL enabled objects:
* ```
* let params = modelMapper.removeParams(commerceAddressType);
* let uri = params['model'].links('put').href;
* ```
* @method
* @example // commerceAddressType is a resource previously fetched using get action.
commerceAddressType.description = '<description>';
CommerceClient.lookups.addressTypes.update(commerceAddressType)
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
update: function (data) {
return baasicApp.commerceModule.lookups.addressTypes.update(data);
},
/**
* Returns a promise that is resolved once the remove action has been performed. This action will remove a commerce resource from the system if successfully completed. This route uses HAL enabled objects to obtain routes and therefore it doesn't apply `baasicCommerceLookupsAddressTypeRouteDefinition` route template. Here is an example of how a route can be obtained from HAL enabled objects:
* ```
* let params = modelMapper.removeParams(commerceAddressType);
* let uri = params['model'].links('delete').href;
* ```
* @method
* @example // commerceAddressType is a resource previously fetched using get action.
CommerceClient.lookups.addressTypes.remove(commerceAddressType)
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
remove: function (data) {
return baasicApp.commerceModule.lookups.addressTypes.remove(data);
},
batch: {
/**
* Returns a promise that is resolved once the create commerce action has been performed; this action creates a new commerce resources.
* @method
* @example CommerceClient.lookups.addressTypes.batch.create([{
name : '<name>',
abrv: '<abbreviation>',
description: '<description>'
}])
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
create: function (data) {
return baasicApp.commerceModule.lookups.addressTypes.batch.create(data);
},
/**
* Returns a promise that is resolved once the update commerce action has been performed; this action updates specified commerce resources.
* @method
* @example CommerceClient.lookups.addressTypes.batch.update(commerceAddressTypes)
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
update: function (data) {
return baasicApp.commerceModule.lookups.addressTypes.batch.update(data);
},
/**
* Returns a promise that is resolved once the remove commerce action has been performed. This action will remove commerce resources from the system if successfully completed.
* @method
* @example CommerceClient.lookups.addressTypes.batch.remove(commerceAddressTypeIds)
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
remove: function (ids) {
return baasicApp.commerceModule.lookups.addressTypes.batch.remove(ids);
}
}
},
countries: {
/**
* Returns a promise that is resolved once the find action has been performed. Success response returns a list of commerce resources matching the given criteria.
* @method
* @example baasicCommerceLookupsCountryClient.find({
pageNumber : 1,
pageSize : 10,
orderBy : '<field>',
orderDirection : '<asc|desc>',
search : '<search-phrase>'
})
.then(function (collection) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
find: function (options) {
return baasicApp.commerceModule.lookups.countries.find(options);
},
/**
* Returns a promise that is resolved once the get action has been performed. Success response returns the commerce resource.
* @method
* @example baasicCommerceLookupsCountryClient.get('<country-id>')
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
get: function (id, options) {
return baasicApp.commerceModule.lookups.countries.get(id, options);
},
/**
* Returns a promise that is resolved once the create commerce action has been performed; this action creates a new commerce resource.
* @method
* @example baasicCommerceLookupsCountryClient.create({
name : '<name>',
abrv: '<abbreviation>',
description: '<description>'
})
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
create: function (data) {
return baasicApp.commerceModule.lookups.countries.create(data);
},
/**
* Returns a promise that is resolved once the update commerce action has been performed; this action updates a commerce resource. This route uses HAL enabled objects to obtain routes and therefore it doesn't apply `baasicCommerceCountryRouteClient` route template. Here is an example of how a route can be obtained from HAL enabled objects:
* ```
* let params = modelMapper.removeParams(commerceCountry);
* let uri = params['model'].links('put').href;
* ```
* @method
* @example // commerceCountry is a resource previously fetched using get action.
commerceCountry.phoneCode = '<phone-code>';
baasicCommerceLookupsCountryClient.update(commerceCountry)
.then(function (data) {
// perform success action here
},
function (response, status, headers, config) {
// perform error handling here
});
**/
update: function (data) {
return baasicApp.commerceModule.lookups.countries.update(data);
},
/**
* Returns a promise that is resolved once the remove action has been performed. This action will remove a commerce resource from the system if successfully completed. This route uses HAL enabled objects to obtain routes and therefore it doesn't apply `baasicCommerceLookupsCountryRouteDefinition` route template. Here is an example of how a route can be obtained from HAL enabled objects:
* ```
* let params = modelMapper.removeParams(commerceCountry);