1.0.4 • Published 5 years ago
@elnk/core-xmlc v1.0.4
core-xmlc
Library of functions to communicate with the XMLc service.
Using the module
Load
const xmlc = require('@elnk/core-xmlc');`
Initialize
xmlc.init({settings});
settings - Object containing module settings. The module has some hard coded defaults, most of which will work in a production environment. For testing, you can call init() with no arguments. For production you will have to set the baseUrl at the very least.
{
baseUrl: String, // the base URL to the XMLc server (default: https://xmlc-qe.corp.earthlink.net)
sourceCodeId: String, // can be changed in certain cases if special permissions are required (default: eln_cami)
signature: String, // signature for credentials calculation. This is tied to soureCodeId (default: sSECCaLAt0T3002)
serviceName: String, // name of service using this module. It is recommended that this be changed (default: xmlc)
serviceVersion: String, // version of the service using the module (default: 1.0.0)
timeout: Number, // timeout (milliseconds) (default: 10000)
};
Pre Qualify
const response = xmlc.serviceability.preQualify({params});
params - Object containing parameters for preQualify
{
affiliateId: String, // optional
isRegional: Boolean, // optional (default: false)
portalId: String, // optional
portalTrackingId: String, // optional
promoBillPlan: String, // optional
providerId: String, // optional
serviceableProduct: String, // optional
serviceAddress: { // required
address1: String, // required
address2: String, // optional
floor: String, // optional
city: String, // required
state: String, // required
zipCode: String, // required
},
servicePhone: String, // required
serviceReference: String, // optional
}
Product Description
const response = xmlc.products.productDescription({params});
params - Object containing parameters for productDescription
{
affiliateId: String, // optional
isRegional: Boolean, // optional (default: false)
portalId: String, // optional
portalTrackingId: String, // optional
promoCode: String, // required
providerId: String, // optional
servicePhone: String, // optional
}