@colijnit/transactionapi 1.1.47 → 1.1.48
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.
- package/build/enum/payment-method.enum.d.ts +1 -0
- package/build/enum/payment-method.enum.js +1 -0
- package/build/ione-api-transaction.d.ts +1 -0
- package/build/model/down-payment.bo.d.ts +10 -0
- package/build/model/down-payment.bo.js +36 -0
- package/build/model/transaction-down-payment-info.bo.d.ts +8 -0
- package/build/model/transaction-down-payment-info.bo.js +39 -0
- package/build/model/transaction-info.bo.d.ts +2 -2
- package/build/model/transaction-info.bo.js +0 -5
- package/build/model/transaction-total.bo.d.ts +2 -2
- package/build/transaction-auth.d.ts +1 -0
- package/build/transaction-auth.js +12 -0
- package/build/transaction-public.d.ts +1 -0
- package/build/transaction-public.js +4 -0
- package/build/transaction.d.ts +1 -0
- package/build/transaction.js +3 -0
- package/build/transaction.unit.test.js +16 -0
- package/package.json +1 -1
- package/build/model/transaction-payment-info.bo.d.ts +0 -5
- package/build/model/transaction-payment-info.bo.js +0 -22
|
@@ -3,5 +3,6 @@ export declare enum PaymentMethod {
|
|
|
3
3
|
RegisterSalesOrderPayment = "registerSalesOrderPayment",
|
|
4
4
|
CreateIonePaymentLinkAndQRCode = "createIonePaymentLinkAndQRCode",
|
|
5
5
|
GetPaymentLinkStatus = "getPaymentLinkStatus",
|
|
6
|
+
GetDownPaymentInfo = "getDownPaymentInfo",
|
|
6
7
|
GetPaymentMethodsForSalesOrder = "getPaymentMethodsForSalesOrder"
|
|
7
8
|
}
|
|
@@ -4,5 +4,6 @@ export var PaymentMethod;
|
|
|
4
4
|
PaymentMethod["RegisterSalesOrderPayment"] = "registerSalesOrderPayment";
|
|
5
5
|
PaymentMethod["CreateIonePaymentLinkAndQRCode"] = "createIonePaymentLinkAndQRCode";
|
|
6
6
|
PaymentMethod["GetPaymentLinkStatus"] = "getPaymentLinkStatus";
|
|
7
|
+
PaymentMethod["GetDownPaymentInfo"] = "getDownPaymentInfo";
|
|
7
8
|
PaymentMethod["GetPaymentMethodsForSalesOrder"] = "getPaymentMethodsForSalesOrder";
|
|
8
9
|
})(PaymentMethod || (PaymentMethod = {}));
|
|
@@ -121,6 +121,7 @@ export declare abstract class IoneApiTransaction {
|
|
|
121
121
|
abstract registerSalesOrderPayment(request: PaymentRequest): Promise<DataServiceResponseData>;
|
|
122
122
|
abstract createIonePaymentLinkAndQRCode(request: CreatePaymentLinkRequest): Promise<DataServiceResponseData>;
|
|
123
123
|
abstract getPaymentLinkStatus(paymentLinkUUID: string): Promise<DataServiceResponseData>;
|
|
124
|
+
abstract getDownPaymentInfo(uuid: string): Promise<DataServiceResponseData>;
|
|
124
125
|
abstract getPaymentMethods(): Promise<DataServiceResponseData>;
|
|
125
126
|
abstract getPaymentMethodsForSalesOrder(): Promise<DataServiceResponseData>;
|
|
126
127
|
abstract changeLineSequence(request: ChangeLineSequenceRequest): Promise<DataServiceResponseData>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
extendStatics(d, b);
|
|
10
|
+
function __() { this.constructor = d; }
|
|
11
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
+
};
|
|
13
|
+
})();
|
|
14
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
+
};
|
|
20
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
21
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
22
|
+
};
|
|
23
|
+
import { BusinessObject } from './business-object';
|
|
24
|
+
import { DateField } from '../factory/decorators/date-field.decorator';
|
|
25
|
+
var DownPayment = (function (_super) {
|
|
26
|
+
__extends(DownPayment, _super);
|
|
27
|
+
function DownPayment() {
|
|
28
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
29
|
+
}
|
|
30
|
+
__decorate([
|
|
31
|
+
DateField(),
|
|
32
|
+
__metadata("design:type", Date)
|
|
33
|
+
], DownPayment.prototype, "date", void 0);
|
|
34
|
+
return DownPayment;
|
|
35
|
+
}(BusinessObject));
|
|
36
|
+
export { DownPayment };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BusinessObject } from './business-object';
|
|
2
|
+
import { DownPayment } from './down-payment.bo';
|
|
3
|
+
export declare class TransactionDownPaymentInfo extends BusinessObject {
|
|
4
|
+
toDownPayAmount: number;
|
|
5
|
+
toPayDownRemainderAmount: number;
|
|
6
|
+
payedDownAmount: number;
|
|
7
|
+
downPayments: DownPayment[];
|
|
8
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
extendStatics(d, b);
|
|
10
|
+
function __() { this.constructor = d; }
|
|
11
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
+
};
|
|
13
|
+
})();
|
|
14
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
+
};
|
|
20
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
21
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
22
|
+
};
|
|
23
|
+
import { BusinessObject } from './business-object';
|
|
24
|
+
import { DownPayment } from './down-payment.bo';
|
|
25
|
+
import { ComplexArray } from '../factory/decorators/complex-array.decorator';
|
|
26
|
+
var TransactionDownPaymentInfo = (function (_super) {
|
|
27
|
+
__extends(TransactionDownPaymentInfo, _super);
|
|
28
|
+
function TransactionDownPaymentInfo() {
|
|
29
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
30
|
+
_this.downPayments = [];
|
|
31
|
+
return _this;
|
|
32
|
+
}
|
|
33
|
+
__decorate([
|
|
34
|
+
ComplexArray(DownPayment),
|
|
35
|
+
__metadata("design:type", Array)
|
|
36
|
+
], TransactionDownPaymentInfo.prototype, "downPayments", void 0);
|
|
37
|
+
return TransactionDownPaymentInfo;
|
|
38
|
+
}(BusinessObject));
|
|
39
|
+
export { TransactionDownPaymentInfo };
|
|
@@ -2,7 +2,6 @@ import { BusinessObject } from './business-object';
|
|
|
2
2
|
import { TransactionKind } from '../enum/transaction-kind.enum';
|
|
3
3
|
import { RelationSmallObject } from './relation-small-object.bo';
|
|
4
4
|
import { PriceType } from '../enum/refcode/price-type.enum';
|
|
5
|
-
import { TransactionPaymentInfo } from './transaction-payment-info.bo';
|
|
6
5
|
export declare class TransactionInfo extends BusinessObject {
|
|
7
6
|
uuid: string;
|
|
8
7
|
id: number;
|
|
@@ -31,7 +30,8 @@ export declare class TransactionInfo extends BusinessObject {
|
|
|
31
30
|
transactionAddress: number;
|
|
32
31
|
invoiceAddress: number;
|
|
33
32
|
relationTransactionDate: Date;
|
|
34
|
-
|
|
33
|
+
toDownPayAmount: number;
|
|
34
|
+
toDownPayPercentage: number;
|
|
35
35
|
messages: string[];
|
|
36
36
|
deliveryOptions: string[];
|
|
37
37
|
canPlanDelivery: boolean;
|
|
@@ -25,7 +25,6 @@ import { DateField } from '../factory/decorators/date-field.decorator';
|
|
|
25
25
|
import { ComplexField } from '../factory/decorators/complex-field.decorator';
|
|
26
26
|
import { RelationSmallObject } from './relation-small-object.bo';
|
|
27
27
|
import { NoDbField } from '../factory/decorators/no-db-field.decorator';
|
|
28
|
-
import { TransactionPaymentInfo } from './transaction-payment-info.bo';
|
|
29
28
|
var TransactionInfo = (function (_super) {
|
|
30
29
|
__extends(TransactionInfo, _super);
|
|
31
30
|
function TransactionInfo() {
|
|
@@ -66,10 +65,6 @@ var TransactionInfo = (function (_super) {
|
|
|
66
65
|
DateField(),
|
|
67
66
|
__metadata("design:type", Date)
|
|
68
67
|
], TransactionInfo.prototype, "relationTransactionDate", void 0);
|
|
69
|
-
__decorate([
|
|
70
|
-
ComplexField(TransactionPaymentInfo),
|
|
71
|
-
__metadata("design:type", TransactionPaymentInfo)
|
|
72
|
-
], TransactionInfo.prototype, "paymentInfo", void 0);
|
|
73
68
|
__decorate([
|
|
74
69
|
NoDbField(),
|
|
75
70
|
__metadata("design:type", Boolean)
|
|
@@ -2,8 +2,8 @@ import { BusinessObject } from "./business-object";
|
|
|
2
2
|
export declare class TransactionTotal extends BusinessObject {
|
|
3
3
|
grossAmount: number;
|
|
4
4
|
netAmount: number;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
totalDiscountAmount: number;
|
|
6
|
+
totalSurchargeAmount: number;
|
|
7
7
|
assemblyCosts: number;
|
|
8
8
|
transactionDiscountPercentage: number;
|
|
9
9
|
transactionDiscountAmount: number;
|
|
@@ -155,6 +155,7 @@ export declare class TransactionAuth extends IoneApiTransaction {
|
|
|
155
155
|
registerSalesOrderPayment(request: PaymentRequest): Promise<DataServiceResponseData>;
|
|
156
156
|
createIonePaymentLinkAndQRCode(request: CreatePaymentLinkRequest): Promise<DataServiceResponseData>;
|
|
157
157
|
getPaymentLinkStatus(paymentLinkUUID: string): Promise<DataServiceResponseData>;
|
|
158
|
+
getDownPaymentInfo(uuid: string): Promise<DataServiceResponseData>;
|
|
158
159
|
getPaymentMethods(): Promise<DataServiceResponseData>;
|
|
159
160
|
getPaymentMethodsForSalesOrder(): Promise<DataServiceResponseData>;
|
|
160
161
|
getGoodsReceiptStatusWithHistory(transId: number, lineNr: number): Promise<DataServiceResponseData>;
|
|
@@ -977,6 +977,18 @@ var TransactionAuth = (function (_super) {
|
|
|
977
977
|
};
|
|
978
978
|
return this._call(DataServiceMethod.ExecuteMethod, data);
|
|
979
979
|
};
|
|
980
|
+
TransactionAuth.prototype.getDownPaymentInfo = function (uuid) {
|
|
981
|
+
var params = {
|
|
982
|
+
transactionUUID: uuid
|
|
983
|
+
};
|
|
984
|
+
var data = {
|
|
985
|
+
moduleName: ModuleName.Accounting,
|
|
986
|
+
methodName: PaymentMethod.GetDownPaymentInfo,
|
|
987
|
+
parameterValues: params,
|
|
988
|
+
refCursorAsArray: true
|
|
989
|
+
};
|
|
990
|
+
return this._call(DataServiceMethod.ExecuteMethod, data);
|
|
991
|
+
};
|
|
980
992
|
TransactionAuth.prototype.getPaymentMethods = function () {
|
|
981
993
|
return this.selectMultiple(ModuleName.MasterData, MasterDataObjectName.PaymentMethod);
|
|
982
994
|
};
|
|
@@ -156,6 +156,7 @@ export declare class TransactionPublic extends IoneApiTransaction {
|
|
|
156
156
|
registerSalesOrderPayment(request: PaymentRequest): Promise<DataServiceResponseData>;
|
|
157
157
|
createIonePaymentLinkAndQRCode(request: CreatePaymentLinkRequest): Promise<DataServiceResponseData>;
|
|
158
158
|
getPaymentLinkStatus(paymentLinkUUID: string): Promise<DataServiceResponseData>;
|
|
159
|
+
getDownPaymentInfo(uuid: string): Promise<DataServiceResponseData>;
|
|
159
160
|
getPaymentMethods(): Promise<DataServiceResponseData>;
|
|
160
161
|
getPaymentMethodsForSalesOrder(): Promise<DataServiceResponseData>;
|
|
161
162
|
getGoodsReceiptStatusWithHistory(transId: number, lineNr: number): Promise<DataServiceResponseData>;
|
|
@@ -810,6 +810,10 @@ var TransactionPublic = (function (_super) {
|
|
|
810
810
|
console.warn('getPaymentLinkStatus not implemented');
|
|
811
811
|
return Promise.resolve(new DataServiceResponseData());
|
|
812
812
|
};
|
|
813
|
+
TransactionPublic.prototype.getDownPaymentInfo = function (uuid) {
|
|
814
|
+
console.warn('getDownPaymentInfo not implemented');
|
|
815
|
+
return Promise.resolve(new DataServiceResponseData());
|
|
816
|
+
};
|
|
813
817
|
TransactionPublic.prototype.getPaymentMethods = function () {
|
|
814
818
|
console.warn('registerSalesOrderPayment not implemented');
|
|
815
819
|
return Promise.resolve(new DataServiceResponseData());
|
package/build/transaction.d.ts
CHANGED
|
@@ -106,6 +106,7 @@ export declare class Transaction {
|
|
|
106
106
|
getTransactionById(transactionId: number): Promise<DataServiceResponseData>;
|
|
107
107
|
getArticleBoundTextLinesOfArticleLine(articleLineUuid: string): Promise<DataServiceResponseData>;
|
|
108
108
|
getCashRegister(branch?: string, group?: number): Promise<DataServiceResponseData>;
|
|
109
|
+
getDownPaymentInfo(uuid: string): Promise<DataServiceResponseData>;
|
|
109
110
|
addRelationToTransaction(uuid: string, relationId: number): Promise<DataServiceResponseData>;
|
|
110
111
|
saveTransaction(uuid: string): Promise<DataServiceResponseData>;
|
|
111
112
|
setTransactionDeliveryOptions(request: SetTransactionDeliveryOptionsRequest): Promise<DataServiceResponseData>;
|
package/build/transaction.js
CHANGED
|
@@ -152,6 +152,9 @@ var Transaction = (function () {
|
|
|
152
152
|
Transaction.prototype.getCashRegister = function (branch, group) {
|
|
153
153
|
return this.transaction.getCashRegisters(branch, group);
|
|
154
154
|
};
|
|
155
|
+
Transaction.prototype.getDownPaymentInfo = function (uuid) {
|
|
156
|
+
return this.transaction.getDownPaymentInfo(uuid);
|
|
157
|
+
};
|
|
155
158
|
Transaction.prototype.addRelationToTransaction = function (uuid, relationId) {
|
|
156
159
|
return this.transaction.addRelationToTransaction(uuid, relationId);
|
|
157
160
|
};
|
|
@@ -587,6 +587,22 @@ describe("TransactionAPI", function () {
|
|
|
587
587
|
}
|
|
588
588
|
});
|
|
589
589
|
}); });
|
|
590
|
+
it('getDownPaymentInfo', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
591
|
+
var response, uuid, result;
|
|
592
|
+
return __generator(this, function (_a) {
|
|
593
|
+
switch (_a.label) {
|
|
594
|
+
case 0: return [4, transaction.getTransactionById(111174)];
|
|
595
|
+
case 1:
|
|
596
|
+
response = _a.sent();
|
|
597
|
+
uuid = response.resultObject.transactionInfo.uuid;
|
|
598
|
+
return [4, transaction.getDownPaymentInfo(uuid)];
|
|
599
|
+
case 2:
|
|
600
|
+
result = _a.sent();
|
|
601
|
+
expect(result.resultObjects.length).toBeGreaterThan(0);
|
|
602
|
+
return [2];
|
|
603
|
+
}
|
|
604
|
+
});
|
|
605
|
+
}); });
|
|
590
606
|
it('getPurchaseAdviceLines', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
591
607
|
var filterObject, result;
|
|
592
608
|
return __generator(this, function (_a) {
|
package/package.json
CHANGED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
extendStatics(d, b);
|
|
10
|
-
function __() { this.constructor = d; }
|
|
11
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
-
};
|
|
13
|
-
})();
|
|
14
|
-
import { BusinessObject } from './business-object';
|
|
15
|
-
var TransactionPaymentInfo = (function (_super) {
|
|
16
|
-
__extends(TransactionPaymentInfo, _super);
|
|
17
|
-
function TransactionPaymentInfo() {
|
|
18
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
19
|
-
}
|
|
20
|
-
return TransactionPaymentInfo;
|
|
21
|
-
}(BusinessObject));
|
|
22
|
-
export { TransactionPaymentInfo };
|