@cemiar/cemiarlink-sdk 1.0.42 → 1.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -214,18 +214,14 @@ export interface FinanceTransactionItem {
|
|
|
214
214
|
FinanceGenerateInvoice: boolean;
|
|
215
215
|
Flag?: number;
|
|
216
216
|
}
|
|
217
|
-
export interface
|
|
218
|
-
OptionName: string;
|
|
219
|
-
Value: number;
|
|
220
|
-
}
|
|
221
|
-
export interface TransactionApplyCreditsToDebits {
|
|
217
|
+
export interface ApplyCreditsToDebitsPayload {
|
|
222
218
|
AgencyCode: string;
|
|
223
219
|
AssociatedAccountID: string;
|
|
224
220
|
AssociatedAccountTypeCode: string;
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
221
|
+
}
|
|
222
|
+
export interface FinanceTransactionPercentageOption {
|
|
223
|
+
OptionName: string;
|
|
224
|
+
Value: number;
|
|
229
225
|
}
|
|
230
226
|
export interface TransactionCredit {
|
|
231
227
|
ARDueDate: string;
|
|
@@ -20,7 +20,7 @@ import { CreatePolicy, Policy } from '../../models/epic/Policy';
|
|
|
20
20
|
import { PolicyV2, PolicyV2Model } from '../../models/epic/PolicyV2';
|
|
21
21
|
import { Receipt } from '../../models/epic/Receipt';
|
|
22
22
|
import { RenewalStage } from '../../models/epic/RenewalStage';
|
|
23
|
-
import { CreatePaymentTransaction, CreateTransaction, FinanceTransaction, FinanceTransactionResult, Transaction
|
|
23
|
+
import { ApplyCreditsToDebitsPayload, CreatePaymentTransaction, CreateTransaction, FinanceTransaction, FinanceTransactionResult, Transaction } from '../../models/epic/Transaction';
|
|
24
24
|
import { Vehicle } from '../../models/epic/Vehicle';
|
|
25
25
|
import { BaseEpicService } from './BaseEpicService';
|
|
26
26
|
import { DirectBillCommissionEpicService } from './DirectBillCommissionEpicService';
|
|
@@ -74,7 +74,7 @@ export declare class EpicService extends BaseEpicService {
|
|
|
74
74
|
getTransaction(transactionId: string): Promise<Transaction>;
|
|
75
75
|
financeTransaction(transactionId: string, payload: FinanceTransaction): Promise<string | FinanceTransactionResult>;
|
|
76
76
|
reverseTransaction(transactionId: string, payload: object): Promise<string>;
|
|
77
|
-
|
|
77
|
+
applyCreditsToDebits(transactionId: string, payload: ApplyCreditsToDebitsPayload): Promise<string>;
|
|
78
78
|
updateTransaction(transactionId: string, payload: object): Promise<string>;
|
|
79
79
|
createTransaction(payload: CreateTransaction): Promise<string | string[]>;
|
|
80
80
|
createPaymentTransaction(payload: CreatePaymentTransaction): Promise<string | string[]>;
|
|
@@ -153,15 +153,8 @@ class EpicService extends BaseEpicService_1.BaseEpicService {
|
|
|
153
153
|
async reverseTransaction(transactionId, payload) {
|
|
154
154
|
return await this.put(`transaction/reverse/${transactionId}`, payload);
|
|
155
155
|
}
|
|
156
|
-
async
|
|
157
|
-
|
|
158
|
-
if (!axiosResponse.success) {
|
|
159
|
-
if (axiosResponse.code == '400' || axiosResponse.code == '401' || axiosResponse.code == '404') {
|
|
160
|
-
throw new EpicException_1.EpicException(axiosResponse.message || axiosResponse.Message);
|
|
161
|
-
}
|
|
162
|
-
throw new Error(axiosResponse.message || axiosResponse.Message);
|
|
163
|
-
}
|
|
164
|
-
return axiosResponse.result;
|
|
156
|
+
async applyCreditsToDebits(transactionId, payload) {
|
|
157
|
+
return await this.put(`transaction/applyCreditsToDebits/${transactionId}`, payload);
|
|
165
158
|
}
|
|
166
159
|
async updateTransaction(transactionId, payload) {
|
|
167
160
|
return await this.put(`transaction/${transactionId}`, payload);
|