[DEV-6353] Get and set past rate data
parent
9f8fb90d0d
commit
48aa315c2a
|
@ -44,7 +44,7 @@ const {
|
||||||
},
|
},
|
||||||
|
|
||||||
request: {
|
request: {
|
||||||
DataProcessor,
|
DataProcessor: { DataProcessor },
|
||||||
JsonServerResponse,
|
JsonServerResponse,
|
||||||
ServerDataApiFactory,
|
ServerDataApiFactory,
|
||||||
},
|
},
|
||||||
|
@ -89,7 +89,7 @@ module.exports = Class( 'DocumentServer',
|
||||||
logger,
|
logger,
|
||||||
enc_service,
|
enc_service,
|
||||||
|
|
||||||
DataProcessor(
|
new DataProcessor(
|
||||||
bucket_filter,
|
bucket_filter,
|
||||||
( apis, request, quote ) => this._createDapiManager(
|
( apis, request, quote ) => this._createDapiManager(
|
||||||
apis, request, origin_url, dapi_conf, quote, collection
|
apis, request, origin_url, dapi_conf, quote, collection
|
||||||
|
|
|
@ -49,7 +49,7 @@ const {
|
||||||
|
|
||||||
server: {
|
server: {
|
||||||
request: {
|
request: {
|
||||||
DataProcessor,
|
DataProcessor: { DataProcessor },
|
||||||
},
|
},
|
||||||
encsvc: {
|
encsvc: {
|
||||||
QuoteDataBucketCipher,
|
QuoteDataBucketCipher,
|
||||||
|
@ -366,6 +366,7 @@ module.exports = Class( 'Server' )
|
||||||
.setCreditScoreRef( quote_data.creditScoreRef || 0 )
|
.setCreditScoreRef( quote_data.creditScoreRef || 0 )
|
||||||
.setLastPremiumDate( quote_data.lastPremDate || 0 )
|
.setLastPremiumDate( quote_data.lastPremDate || 0 )
|
||||||
.setRatedDate( quote_data.initialRatedDate || 0 )
|
.setRatedDate( quote_data.initialRatedDate || 0 )
|
||||||
|
.setRatingData( quote_data.ratedata || {} )
|
||||||
.on( 'stepChange', function( step_id )
|
.on( 'stepChange', function( step_id )
|
||||||
{
|
{
|
||||||
// save the quote state (we don't care if it succeeds or
|
// save the quote state (we don't care if it succeeds or
|
||||||
|
|
|
@ -652,9 +652,11 @@ function createQuote( quote_id, program, request, callback, error_callback )
|
||||||
|
|
||||||
var bucket = QuoteDataBucket(),
|
var bucket = QuoteDataBucket(),
|
||||||
metabucket = QuoteDataBucket(),
|
metabucket = QuoteDataBucket(),
|
||||||
|
ratebucket = QuoteDataBucket(),
|
||||||
quote = Quote( quote_id, bucket );
|
quote = Quote( quote_id, bucket );
|
||||||
|
|
||||||
quote.setMetabucket( metabucket );
|
quote.setMetabucket( metabucket );
|
||||||
|
quote.setRateBucket( ratebucket );
|
||||||
|
|
||||||
var controller = this;
|
var controller = this;
|
||||||
return server.initQuote( quote, program, request,
|
return server.initQuote( quote, program, request,
|
||||||
|
|
|
@ -647,13 +647,13 @@ function createStubQuote()
|
||||||
{
|
{
|
||||||
let quote_data: Record<string, any> = {};
|
let quote_data: Record<string, any> = {};
|
||||||
|
|
||||||
return {
|
return <ServerSideQuote>{
|
||||||
getRatedDate()
|
getRatedDate()
|
||||||
{
|
{
|
||||||
return 1572292453;
|
return <UnixTimestamp>1572292453;
|
||||||
},
|
},
|
||||||
|
|
||||||
setRatedDate( _timestamp: any )
|
setRatedDate( _timestamp: UnixTimestamp )
|
||||||
{
|
{
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
@ -683,14 +683,14 @@ function createStubQuote()
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
setLastPremiumDate( _timestamp: any )
|
setLastPremiumDate( _timestamp: UnixTimestamp )
|
||||||
{
|
{
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
getLastPremiumDate()
|
getLastPremiumDate()
|
||||||
{
|
{
|
||||||
return 1572292453;
|
return <UnixTimestamp>1572292453;
|
||||||
},
|
},
|
||||||
|
|
||||||
setRateBucket( _bucket: any )
|
setRateBucket( _bucket: any )
|
||||||
|
|
Loading…
Reference in New Issue