stitchcredit-direct-api v1.0.9
stitchcredit-direct-api
StitchCreditApi - JavaScript client for stitchcredit-direct-api This SDK is automatically generated by the OpenAPI Generator project:
Installation
For Node.js
npm
npm install stitchcredit-direct-api --save
Local development
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json
(and this README). Let's call this JAVASCRIPT_CLIENT_DIR
. Then run:
npm install
Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR
:
npm link
To use the link you just defined in your project, switch to the directory you want to use your stitch_credit_api from, and run:
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
Finally, you need to build the module:
npm run build
Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
Getting Started
Please follow the installation instruction and execute the following JS code:
var StitchCreditApi = require('stitchcredit-direct-api');
const loginPayload = {
apikey: {{API_KEY}},
secret: {{SECRET},
env: {{ENV}}
};
// This will initialize SDK and configure Bearer (JWT) access token for authorization: accessToken
const directApi = new StitchCreditApi.DirectControllerApi();
const response = await directApi.login(loginPayload);
/*
Call StitchCredit Direct API's methods
1. Example - get user info
2. Example - register user
*/
// get user info
const userId = {{USER_ID}};
const response = await directApi.getUser(userId);
//register user
const { DirectUserRegReqDTO } = require('stitchcredit-direct-api');
const registerUserReq = new DirectUserRegReqDTO({{EMAIL}}, {{F_NAME}}, {{L_NAME}});
const response = await directApi.register(registerUserReq);
//following syntax can be used too
directApi.register(registerUserReq).then(function() {
console.log('Do something with response: ', response);
}, function(error) {
console.error(error);
});
Documentation for API Endpoints
All URIs are relative to {{BASE_URL}}/api
Class | Method | HTTP request | Description |
---|---|---|---|
StitchCreditApi.DirectControllerApi | changeEmail | POST /direct/change-email/{id} | |
StitchCreditApi.DirectControllerApi | changeHost | POST /direct/change-host/{id} | |
StitchCreditApi.DirectControllerApi | changeMobile | POST /direct/change-mobile/{id} | |
StitchCreditApi.DirectControllerApi | closeAccount | POST /direct/close-account/{id} | |
StitchCreditApi.DirectControllerApi | efxAlert | GET /direct/efx-alert/{id} | |
StitchCreditApi.DirectControllerApi | efxConfig | GET /direct/efx-config/{id} | |
StitchCreditApi.DirectControllerApi | efxLatestEFXScore | GET /direct/efx-latest-efx-score/{id} | |
StitchCreditApi.DirectControllerApi | efxLatestReport | GET /direct/efx-latest-report/{id} | |
StitchCreditApi.DirectControllerApi | efxLatestReportSummary | GET /direct/efx-latest-report/{id}/summary | |
StitchCreditApi.DirectControllerApi | efxLatestScores | GET /direct/efx-latest-scores/{id} | |
StitchCreditApi.DirectControllerApi | efxScoreHistory | GET /direct/efx-score-history/{id} | |
StitchCreditApi.DirectControllerApi | efxScores | GET /direct/efx-scores/{id} | |
StitchCreditApi.DirectControllerApi | getEfxAlerts | GET /direct/efx-alerts/{id} | |
StitchCreditApi.DirectControllerApi | getUser | GET /direct/user/{id} | |
StitchCreditApi.DirectControllerApi | login | POST /direct/login | |
StitchCreditApi.DirectControllerApi | preauthToken | GET /direct/preauth-token/{id} | |
StitchCreditApi.DirectControllerApi | refreshToken | GET /direct/refresh-token | |
StitchCreditApi.DirectControllerApi | register | POST /direct/user-reg | |
StitchCreditApi.DirectControllerApi | registerOld | POST /direct/register | |
StitchCreditApi.DirectControllerApi | updateRefresh | POST /direct/update-refresh/{id} | |
StitchCreditApi.DirectControllerApi | userTokenOld | GET /direct/user-token/{id} |
Documentation for Models
- StitchCreditApi.AlertRespDTO
- StitchCreditApi.BankruptcyReport
- StitchCreditApi.CodeDescriptionReport
- StitchCreditApi.CollectionItemReport
- StitchCreditApi.ConsumerStatementReport
- StitchCreditApi.ContactInformationReport
- StitchCreditApi.CountryReport
- StitchCreditApi.CreditMonitoringAlertAbstract
- StitchCreditApi.CreditReportAccountReport
- StitchCreditApi.CreditReportProviderDisputeInformationReport
- StitchCreditApi.CreditReportProviderViewReport
- StitchCreditApi.CreditReportReport
- StitchCreditApi.CreditReportSummaryAccountsReport
- StitchCreditApi.CreditReportSummaryReport
- StitchCreditApi.CreditScoreAbstractScore
- StitchCreditApi.CreditScoreHistoryProviderViewScore
- StitchCreditApi.CreditScoreHistoryScore
- StitchCreditApi.CreditScoreLoanRiskRangeReport
- StitchCreditApi.CreditScoreLoanRiskRangeScore
- StitchCreditApi.CreditScoreProviderViewScore
- StitchCreditApi.CreditScoreRangeReport
- StitchCreditApi.CreditScoreRangeScore
- StitchCreditApi.CreditScoreReasonReport
- StitchCreditApi.CreditScoreReasonScore
- StitchCreditApi.CreditScoreReport
- StitchCreditApi.CreditScoreScore
- StitchCreditApi.DirectChangeEmailReqDTO
- StitchCreditApi.DirectChangeMobileReqDTO
- StitchCreditApi.DirectLoginReqDTO
- StitchCreditApi.DirectUserRegReqDTO
- StitchCreditApi.EfxConfigRespDTO
- StitchCreditApi.EmployerReport
- StitchCreditApi.InquiryReport
- StitchCreditApi.InternationalAddressReport
- StitchCreditApi.InternationalPhoneReport
- StitchCreditApi.JudgmentReport
- StitchCreditApi.LienReport
- StitchCreditApi.LoginRespDTO
- StitchCreditApi.MoneyReport
- StitchCreditApi.PaymentHistoryMonthReport
- StitchCreditApi.PaymentHistoryYearReport
- StitchCreditApi.PersonNameReport
- StitchCreditApi.PersonSubjectReport
- StitchCreditApi.PreauthTokenDTO
- StitchCreditApi.PublicRecordsReport
- StitchCreditApi.TrendedDataHistoryReport
- StitchCreditApi.TrendedDataReport
- StitchCreditApi.TrendedDataYearReport
- StitchCreditApi.UserLoginRespDTO
- StitchCreditApi.UserRespDTO
Documentation for Authorization
accessToken
- Type: Bearer authentication (JWT)