@colijnit/transactionapi 1.1.32 → 1.1.34
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/master-data-operation-name.enum.d.ts +3 -0
- package/build/enum/master-data-operation-name.enum.js +4 -0
- package/build/enum/payment-method.enum.d.ts +2 -1
- package/build/enum/payment-method.enum.js +1 -0
- package/build/ione-api-transaction.d.ts +3 -2
- package/build/model/doc-delivery-batch.bo.d.ts +2 -2
- package/build/model/relation.bo.d.ts +11 -11
- package/build/model/relation.bo.js +15 -15
- package/build/model/transaction-line-info.bo.d.ts +4 -0
- package/build/model/transaction-line-info.bo.js +16 -0
- package/build/transaction-auth.d.ts +4 -3
- package/build/transaction-auth.js +23 -6
- package/build/transaction-public.d.ts +3 -2
- package/build/transaction-public.js +6 -2
- package/build/transaction.d.ts +3 -2
- package/build/transaction.js +7 -4
- package/build/transaction.unit.test.js +70 -81
- package/package.json +1 -1
|
@@ -2,5 +2,6 @@ export declare enum PaymentMethod {
|
|
|
2
2
|
CreateOutstandingEntry = "createOutstandingEntry",
|
|
3
3
|
RegisterSalesOrderPayment = "registerSalesOrderPayment",
|
|
4
4
|
CreateIonePaymentLinkAndQRCode = "createIonePaymentLinkAndQRCode",
|
|
5
|
-
GetPaymentLinkStatus = "getPaymentLinkStatus"
|
|
5
|
+
GetPaymentLinkStatus = "getPaymentLinkStatus",
|
|
6
|
+
GetPaymentMethodsForSalesOrder = "getPaymentMethodsForSalesOrder"
|
|
6
7
|
}
|
|
@@ -4,4 +4,5 @@ export var PaymentMethod;
|
|
|
4
4
|
PaymentMethod["RegisterSalesOrderPayment"] = "registerSalesOrderPayment";
|
|
5
5
|
PaymentMethod["CreateIonePaymentLinkAndQRCode"] = "createIonePaymentLinkAndQRCode";
|
|
6
6
|
PaymentMethod["GetPaymentLinkStatus"] = "getPaymentLinkStatus";
|
|
7
|
+
PaymentMethod["GetPaymentMethodsForSalesOrder"] = "getPaymentMethodsForSalesOrder";
|
|
7
8
|
})(PaymentMethod || (PaymentMethod = {}));
|
|
@@ -108,7 +108,7 @@ export declare abstract class IoneApiTransaction {
|
|
|
108
108
|
abstract insertCustomer(customer: CustomerFullObject): Promise<DataServiceResponseData>;
|
|
109
109
|
abstract updateCustomer(customer: CustomerFullObject): Promise<DataServiceResponseData>;
|
|
110
110
|
abstract getDeliveryMethods(): Promise<DataServiceResponseData>;
|
|
111
|
-
abstract getDeliveryOptions(): Promise<DataServiceResponseData>;
|
|
111
|
+
abstract getDeliveryOptions(method?: string): Promise<DataServiceResponseData>;
|
|
112
112
|
abstract getPostalCodeRetrieval(postalCode: string, houseNumber: string): Promise<DataServiceResponseData>;
|
|
113
113
|
abstract getRelationListObjects(relationRequest: RelationRequest): Promise<DataServiceResponseData>;
|
|
114
114
|
abstract setRelationByUser(uuid: string, username: string, password: string): Promise<DataServiceResponseData>;
|
|
@@ -117,6 +117,7 @@ export declare abstract class IoneApiTransaction {
|
|
|
117
117
|
abstract createIonePaymentLinkAndQRCode(request: CreatePaymentLinkRequest): Promise<DataServiceResponseData>;
|
|
118
118
|
abstract getPaymentLinkStatus(paymentLinkUUID: string): Promise<DataServiceResponseData>;
|
|
119
119
|
abstract getPaymentMethods(): Promise<DataServiceResponseData>;
|
|
120
|
+
abstract getPaymentMethodsForSalesOrder(): Promise<DataServiceResponseData>;
|
|
120
121
|
abstract changeLineSequence(request: ChangeLineSequenceRequest): Promise<DataServiceResponseData>;
|
|
121
122
|
abstract changeLineQuantity(request: ChangeLineQuantityRequest): Promise<DataServiceResponseData>;
|
|
122
123
|
abstract changeLineCommissionCode(request: ChangeLineCommissionCodeRequest): Promise<DataServiceResponseData>;
|
|
@@ -162,7 +163,7 @@ export declare abstract class IoneApiTransaction {
|
|
|
162
163
|
abstract receiveGoodsForPurchaseOrderCorrection(request: ReceiveGoodsForPurchaseOrderCorrectionRequest): Promise<DataServiceResponseData>;
|
|
163
164
|
abstract getPurchasePortalLines(purchasePortalLine: GetPurchasePortalLine): Promise<DataServiceResponseData>;
|
|
164
165
|
abstract updatePurchasePortalLines(request: PurchasePortalLine): Promise<DataServiceResponseData>;
|
|
165
|
-
abstract lockPurchasePortalLines(
|
|
166
|
+
abstract lockPurchasePortalLines(transIdPurchase: number, lineId: number): Promise<DataServiceResponseData>;
|
|
166
167
|
abstract deletePurchasePortalLines(request: GetPurchasePortalLine): Promise<DataServiceResponseData>;
|
|
167
168
|
abstract getPurchaseAdviceLines(filters: PurchaseAdviceFilters, goodId?: number): Promise<DataServiceResponseData>;
|
|
168
169
|
protected endPoint: string;
|
|
@@ -3,8 +3,8 @@ export declare class DocDeliveryBatch extends BusinessObject {
|
|
|
3
3
|
deliveryBatch: string;
|
|
4
4
|
docAmountOrg: number;
|
|
5
5
|
docAmount: number;
|
|
6
|
-
docDateOrg:
|
|
7
|
-
docDate:
|
|
6
|
+
docDateOrg: Date;
|
|
7
|
+
docDate: Date;
|
|
8
8
|
reference: string;
|
|
9
9
|
confirmedPrice: number;
|
|
10
10
|
deleteLine: string;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { BusinessObject } from
|
|
2
|
-
import { Address } from
|
|
3
|
-
import { RelationKind } from
|
|
4
|
-
import { RelationNameKind } from
|
|
5
|
-
import { GenderType } from
|
|
6
|
-
import { ContactOption } from
|
|
7
|
-
import { CommunicationType } from
|
|
8
|
-
import { AddressType } from
|
|
9
|
-
import { RelationEmployeeFte } from
|
|
10
|
-
import { VatType } from
|
|
11
|
-
import { RelationContactLink } from
|
|
1
|
+
import { BusinessObject } from './business-object';
|
|
2
|
+
import { Address } from './address.bo';
|
|
3
|
+
import { RelationKind } from '../enum/relation-kind.enum';
|
|
4
|
+
import { RelationNameKind } from '../enum/relation-name-kind.enum';
|
|
5
|
+
import { GenderType } from '../enum/gender-type.enum';
|
|
6
|
+
import { ContactOption } from './contact-option.bo';
|
|
7
|
+
import { CommunicationType } from '../enum/communication-type.enum';
|
|
8
|
+
import { AddressType } from '../enum/address-type.enum';
|
|
9
|
+
import { RelationEmployeeFte } from './relation-employee-fte.bo';
|
|
10
|
+
import { VatType } from '../enum/vat-type.enum';
|
|
11
|
+
import { RelationContactLink } from './relation-contact-link.bo';
|
|
12
12
|
export declare class Relation extends BusinessObject {
|
|
13
13
|
relationId: number;
|
|
14
14
|
relationType: RelationKind;
|
|
@@ -20,21 +20,21 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
20
20
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
21
21
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
22
22
|
};
|
|
23
|
-
import { BusinessObject } from
|
|
24
|
-
import { DateField } from
|
|
25
|
-
import { BooleanText } from
|
|
26
|
-
import { ComplexArray } from
|
|
27
|
-
import { Address } from
|
|
28
|
-
import { NoDbField } from
|
|
29
|
-
import { DbFieldAlias } from
|
|
30
|
-
import { ContactOption } from
|
|
31
|
-
import { CommunicationType } from
|
|
32
|
-
import { ArrayUtils } from
|
|
33
|
-
import { AddressType } from
|
|
34
|
-
import { BusinessObjectUtils } from
|
|
35
|
-
import { RelationEmployeeFte } from
|
|
36
|
-
import { VatType } from
|
|
37
|
-
import { RelationContactLink } from
|
|
23
|
+
import { BusinessObject } from './business-object';
|
|
24
|
+
import { DateField } from '../factory/decorators/date-field.decorator';
|
|
25
|
+
import { BooleanText } from '../factory/decorators/boolean.decorator';
|
|
26
|
+
import { ComplexArray } from '../factory/decorators/complex-array.decorator';
|
|
27
|
+
import { Address } from './address.bo';
|
|
28
|
+
import { NoDbField } from '../factory/decorators/no-db-field.decorator';
|
|
29
|
+
import { DbFieldAlias } from '../factory/decorators/db-field-alias.decorator';
|
|
30
|
+
import { ContactOption } from './contact-option.bo';
|
|
31
|
+
import { CommunicationType } from '../enum/communication-type.enum';
|
|
32
|
+
import { ArrayUtils } from '../utils/array-utils';
|
|
33
|
+
import { AddressType } from '../enum/address-type.enum';
|
|
34
|
+
import { BusinessObjectUtils } from '../utils/business-object-utils';
|
|
35
|
+
import { RelationEmployeeFte } from './relation-employee-fte.bo';
|
|
36
|
+
import { VatType } from '../enum/vat-type.enum';
|
|
37
|
+
import { RelationContactLink } from './relation-contact-link.bo';
|
|
38
38
|
var Relation = (function (_super) {
|
|
39
39
|
__extends(Relation, _super);
|
|
40
40
|
function Relation() {
|
|
@@ -36,11 +36,15 @@ export declare class TransactionLineInfo extends BusinessObject {
|
|
|
36
36
|
assemblyCost: number;
|
|
37
37
|
vatId: number;
|
|
38
38
|
vatCode: string;
|
|
39
|
+
vatDescription: string;
|
|
39
40
|
priceDeclaration: string;
|
|
40
41
|
netto: boolean;
|
|
41
42
|
warehouseNumber: number;
|
|
43
|
+
warehouseDescription: string;
|
|
42
44
|
commissionCode: string;
|
|
45
|
+
commissionDescription: string;
|
|
43
46
|
deliveryMethodCode: string;
|
|
47
|
+
deliveryMethodDescription: string;
|
|
44
48
|
deliveryDate: Date;
|
|
45
49
|
assemblyTime: number;
|
|
46
50
|
editTime: number;
|
|
@@ -86,6 +86,22 @@ var TransactionLineInfo = (function (_super) {
|
|
|
86
86
|
enumerable: true,
|
|
87
87
|
configurable: true
|
|
88
88
|
});
|
|
89
|
+
__decorate([
|
|
90
|
+
NoDbField(),
|
|
91
|
+
__metadata("design:type", String)
|
|
92
|
+
], TransactionLineInfo.prototype, "vatDescription", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
NoDbField(),
|
|
95
|
+
__metadata("design:type", String)
|
|
96
|
+
], TransactionLineInfo.prototype, "warehouseDescription", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
NoDbField(),
|
|
99
|
+
__metadata("design:type", String)
|
|
100
|
+
], TransactionLineInfo.prototype, "commissionDescription", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
NoDbField(),
|
|
103
|
+
__metadata("design:type", String)
|
|
104
|
+
], TransactionLineInfo.prototype, "deliveryMethodDescription", void 0);
|
|
89
105
|
__decorate([
|
|
90
106
|
NoDbField(),
|
|
91
107
|
__metadata("design:type", Array),
|
|
@@ -140,7 +140,7 @@ export declare class TransactionAuth extends IoneApiTransaction {
|
|
|
140
140
|
insertCustomer(customer: CustomerFullObject): Promise<DataServiceResponseData>;
|
|
141
141
|
updateCustomer(customer: CustomerFullObject): Promise<DataServiceResponseData>;
|
|
142
142
|
getDeliveryMethods(): Promise<DataServiceResponseData>;
|
|
143
|
-
getDeliveryOptions(): Promise<DataServiceResponseData>;
|
|
143
|
+
getDeliveryOptions(method?: string): Promise<DataServiceResponseData>;
|
|
144
144
|
getPostalCodeRetrieval(postalCode: string, houseNumber: string): Promise<DataServiceResponseData>;
|
|
145
145
|
getRelationListObjects(relationRequest: RelationRequest): Promise<DataServiceResponseData>;
|
|
146
146
|
setRelationByUser(uuid: string, username: string, password: string): Promise<DataServiceResponseData>;
|
|
@@ -149,13 +149,14 @@ export declare class TransactionAuth extends IoneApiTransaction {
|
|
|
149
149
|
createIonePaymentLinkAndQRCode(request: CreatePaymentLinkRequest): Promise<DataServiceResponseData>;
|
|
150
150
|
getPaymentLinkStatus(paymentLinkUUID: string): Promise<DataServiceResponseData>;
|
|
151
151
|
getPaymentMethods(): Promise<DataServiceResponseData>;
|
|
152
|
+
getPaymentMethodsForSalesOrder(): Promise<DataServiceResponseData>;
|
|
152
153
|
getGoodsReceiptStatusWithHistory(transId: number, lineNr: number): Promise<DataServiceResponseData>;
|
|
153
154
|
getGoodsReceiptStatus(transId: number, lineNr: number): Promise<DataServiceResponseData>;
|
|
154
155
|
receiveGoodsForPurchaseOrder(request: ReceiveGoodsForPurchaseOrderRequest): Promise<DataServiceResponseData>;
|
|
155
156
|
receiveGoodsForPurchaseOrderCorrection(request: ReceiveGoodsForPurchaseOrderCorrectionRequest): Promise<DataServiceResponseData>;
|
|
156
157
|
getPurchasePortalLines(purchasePortalLine: GetPurchasePortalLine): Promise<DataServiceResponseData>;
|
|
157
|
-
updatePurchasePortalLines(
|
|
158
|
-
lockPurchasePortalLines(
|
|
158
|
+
updatePurchasePortalLines(purchasePortalLine: PurchasePortalLine): Promise<DataServiceResponseData>;
|
|
159
|
+
lockPurchasePortalLines(transIdPurchase: number, lineId: number): Promise<DataServiceResponseData>;
|
|
159
160
|
deletePurchasePortalLines(request: GetPurchasePortalLine): Promise<DataServiceResponseData>;
|
|
160
161
|
getPurchaseAdviceLines(filters: PurchaseAdviceFilters, goodId?: number): Promise<DataServiceResponseData>;
|
|
161
162
|
private _getDomainCollection;
|
|
@@ -857,8 +857,12 @@ var TransactionAuth = (function (_super) {
|
|
|
857
857
|
TransactionAuth.prototype.getDeliveryMethods = function () {
|
|
858
858
|
return this.selectMultiple(ModuleName.MasterData, MasterDataObjectName.DeliveryMethod, OperationName.GetAll);
|
|
859
859
|
};
|
|
860
|
-
TransactionAuth.prototype.getDeliveryOptions = function () {
|
|
861
|
-
|
|
860
|
+
TransactionAuth.prototype.getDeliveryOptions = function (method) {
|
|
861
|
+
var params = {};
|
|
862
|
+
if (method) {
|
|
863
|
+
params.deliveryMethod = method;
|
|
864
|
+
}
|
|
865
|
+
return this.selectMultiple(ModuleName.MasterData, MasterDataObjectName.DeliveryOption, undefined, params);
|
|
862
866
|
};
|
|
863
867
|
TransactionAuth.prototype.getPostalCodeRetrieval = function (postalCode, houseNumber) {
|
|
864
868
|
var params = {
|
|
@@ -948,6 +952,15 @@ var TransactionAuth = (function (_super) {
|
|
|
948
952
|
TransactionAuth.prototype.getPaymentMethods = function () {
|
|
949
953
|
return this.selectMultiple(ModuleName.MasterData, MasterDataObjectName.PaymentMethod);
|
|
950
954
|
};
|
|
955
|
+
TransactionAuth.prototype.getPaymentMethodsForSalesOrder = function () {
|
|
956
|
+
var data = {
|
|
957
|
+
moduleName: ModuleName.MasterData,
|
|
958
|
+
methodName: PaymentMethod.GetPaymentMethodsForSalesOrder,
|
|
959
|
+
parameterValues: {},
|
|
960
|
+
refCursorAsArray: true
|
|
961
|
+
};
|
|
962
|
+
return this._call(DataServiceMethod.ExecuteMethod, data);
|
|
963
|
+
};
|
|
951
964
|
TransactionAuth.prototype.getGoodsReceiptStatusWithHistory = function (transId, lineNr) {
|
|
952
965
|
var paramValues = {
|
|
953
966
|
transId: transId,
|
|
@@ -1008,21 +1021,25 @@ var TransactionAuth = (function (_super) {
|
|
|
1008
1021
|
};
|
|
1009
1022
|
return this.selectMultiple(ModuleName.PurchasePortal, PurchasePortal.PurchaseOrderLine, "", params);
|
|
1010
1023
|
};
|
|
1011
|
-
TransactionAuth.prototype.updatePurchasePortalLines = function (
|
|
1024
|
+
TransactionAuth.prototype.updatePurchasePortalLines = function (purchasePortalLine) {
|
|
1012
1025
|
var data = {
|
|
1013
1026
|
moduleName: ModuleName.PurchasePortal,
|
|
1014
1027
|
objectName: PurchasePortal.PurchaseOrderLine,
|
|
1015
1028
|
refCursorAsArray: true,
|
|
1016
|
-
object:
|
|
1029
|
+
object: purchasePortalLine
|
|
1017
1030
|
};
|
|
1018
1031
|
return this._call(DataServiceMethod.UpdateObject, data);
|
|
1019
1032
|
};
|
|
1020
|
-
TransactionAuth.prototype.lockPurchasePortalLines = function (
|
|
1033
|
+
TransactionAuth.prototype.lockPurchasePortalLines = function (transIdPurchase, lineId) {
|
|
1034
|
+
var params = {
|
|
1035
|
+
transIdPurchase: transIdPurchase,
|
|
1036
|
+
lineId: lineId
|
|
1037
|
+
};
|
|
1021
1038
|
var data = {
|
|
1022
1039
|
moduleName: ModuleName.PurchasePortal,
|
|
1023
1040
|
objectName: PurchasePortal.PurchaseOrderLine,
|
|
1024
1041
|
refCursorAsArray: true,
|
|
1025
|
-
parameterValues:
|
|
1042
|
+
parameterValues: params
|
|
1026
1043
|
};
|
|
1027
1044
|
return this._call(DataServiceMethod.LockObject, data);
|
|
1028
1045
|
};
|
|
@@ -141,7 +141,7 @@ export declare class TransactionPublic extends IoneApiTransaction {
|
|
|
141
141
|
getPriceLists(code?: string): Promise<DataServiceResponseData>;
|
|
142
142
|
getVatList(onlyValid: boolean): Promise<DataServiceResponseData>;
|
|
143
143
|
getDeliveryMethods(): Promise<DataServiceResponseData>;
|
|
144
|
-
getDeliveryOptions(): Promise<DataServiceResponseData>;
|
|
144
|
+
getDeliveryOptions(method?: string): Promise<DataServiceResponseData>;
|
|
145
145
|
getPostalCodeRetrieval(postalCode: string, houseNumber: string): Promise<DataServiceResponseData>;
|
|
146
146
|
getRelationListObjects(relationRequest: RelationRequest): Promise<DataServiceResponseData>;
|
|
147
147
|
setRelationByUser(uuid: string, username: string, password: string): Promise<DataServiceResponseData>;
|
|
@@ -150,13 +150,14 @@ export declare class TransactionPublic extends IoneApiTransaction {
|
|
|
150
150
|
createIonePaymentLinkAndQRCode(request: CreatePaymentLinkRequest): Promise<DataServiceResponseData>;
|
|
151
151
|
getPaymentLinkStatus(paymentLinkUUID: string): Promise<DataServiceResponseData>;
|
|
152
152
|
getPaymentMethods(): Promise<DataServiceResponseData>;
|
|
153
|
+
getPaymentMethodsForSalesOrder(): Promise<DataServiceResponseData>;
|
|
153
154
|
getGoodsReceiptStatusWithHistory(transId: number, lineNr: number): Promise<DataServiceResponseData>;
|
|
154
155
|
getGoodsReceiptStatus(transId: number, lineNr: number): Promise<DataServiceResponseData>;
|
|
155
156
|
receiveGoodsForPurchaseOrder(request: ReceiveGoodsForPurchaseOrderRequest): Promise<DataServiceResponseData>;
|
|
156
157
|
receiveGoodsForPurchaseOrderCorrection(request: ReceiveGoodsForPurchaseOrderCorrectionRequest): Promise<DataServiceResponseData>;
|
|
157
158
|
getPurchasePortalLines(purchaseOrderLine: GetPurchasePortalLine): Promise<DataServiceResponseData>;
|
|
158
159
|
updatePurchasePortalLines(request: PurchasePortalLine): Promise<DataServiceResponseData>;
|
|
159
|
-
lockPurchasePortalLines(
|
|
160
|
+
lockPurchasePortalLines(transIdPurchase: number, lineId: number): Promise<DataServiceResponseData>;
|
|
160
161
|
deletePurchasePortalLines(request: GetPurchasePortalLine): Promise<DataServiceResponseData>;
|
|
161
162
|
getPurchaseAdviceLines(filters: PurchaseAdviceFilters, goodId?: number): Promise<DataServiceResponseData>;
|
|
162
163
|
private createServiceRequestData;
|
|
@@ -736,7 +736,7 @@ var TransactionPublic = (function (_super) {
|
|
|
736
736
|
});
|
|
737
737
|
});
|
|
738
738
|
};
|
|
739
|
-
TransactionPublic.prototype.getDeliveryOptions = function () {
|
|
739
|
+
TransactionPublic.prototype.getDeliveryOptions = function (method) {
|
|
740
740
|
return __awaiter(this, void 0, void 0, function () {
|
|
741
741
|
var data;
|
|
742
742
|
return __generator(this, function (_a) {
|
|
@@ -794,6 +794,10 @@ var TransactionPublic = (function (_super) {
|
|
|
794
794
|
console.warn('registerSalesOrderPayment not implemented');
|
|
795
795
|
return Promise.resolve(new DataServiceResponseData());
|
|
796
796
|
};
|
|
797
|
+
TransactionPublic.prototype.getPaymentMethodsForSalesOrder = function () {
|
|
798
|
+
console.warn('getPaymentMethodsForSalesOrder not implemented');
|
|
799
|
+
return Promise.resolve(new DataServiceResponseData());
|
|
800
|
+
};
|
|
797
801
|
TransactionPublic.prototype.getGoodsReceiptStatusWithHistory = function (transId, lineNr) {
|
|
798
802
|
return __awaiter(this, void 0, void 0, function () {
|
|
799
803
|
var data;
|
|
@@ -840,7 +844,7 @@ var TransactionPublic = (function (_super) {
|
|
|
840
844
|
TransactionPublic.prototype.updatePurchasePortalLines = function (request) {
|
|
841
845
|
return null;
|
|
842
846
|
};
|
|
843
|
-
TransactionPublic.prototype.lockPurchasePortalLines = function (
|
|
847
|
+
TransactionPublic.prototype.lockPurchasePortalLines = function (transIdPurchase, lineId) {
|
|
844
848
|
return null;
|
|
845
849
|
};
|
|
846
850
|
TransactionPublic.prototype.deletePurchasePortalLines = function (request) {
|
package/build/transaction.d.ts
CHANGED
|
@@ -159,7 +159,7 @@ export declare class Transaction {
|
|
|
159
159
|
insertCustomer(customer: CustomerFullObject): Promise<DataServiceResponseData>;
|
|
160
160
|
updateCustomer(customer: CustomerFullObject): Promise<DataServiceResponseData>;
|
|
161
161
|
getDeliveryMethods(): Promise<DataServiceResponseData>;
|
|
162
|
-
getDeliveryOptions(): Promise<DataServiceResponseData>;
|
|
162
|
+
getDeliveryOptions(method?: string): Promise<DataServiceResponseData>;
|
|
163
163
|
getPostalCodeRetrieval(postalCode: string, houseNumber: string): Promise<DataServiceResponseData>;
|
|
164
164
|
getRelationListObjects(relationRequest: RelationRequest): Promise<DataServiceResponseData>;
|
|
165
165
|
getGoodsReceiptStatusWithHistory(transId: number, lineNr: number): Promise<DataServiceResponseData>;
|
|
@@ -173,9 +173,10 @@ export declare class Transaction {
|
|
|
173
173
|
createIonePaymentLinkAndQRCode(request: CreatePaymentLinkRequest): Promise<DataServiceResponseData>;
|
|
174
174
|
getPaymentLinkStatus(paymentLinkUUID: string): Promise<DataServiceResponseData>;
|
|
175
175
|
getPaymentMethods(): Promise<DataServiceResponseData>;
|
|
176
|
+
getPaymentMethodsForSalesOrder(): Promise<DataServiceResponseData>;
|
|
176
177
|
getPurchasePortalLines(purchasePortalLine: GetPurchasePortalLine): Promise<DataServiceResponseData>;
|
|
177
178
|
updatePurchasePortalLines(request: PurchasePortalLine): Promise<DataServiceResponseData>;
|
|
178
|
-
lockPurchasePortalLines(
|
|
179
|
+
lockPurchasePortalLines(transIdPurchase: number, lineId: number): Promise<DataServiceResponseData>;
|
|
179
180
|
deletePurchasePortalLines(request: GetPurchasePortalLine): Promise<DataServiceResponseData>;
|
|
180
181
|
static createConnector(options: Options): IoneApiTransaction;
|
|
181
182
|
private _handleConnectionReset;
|
package/build/transaction.js
CHANGED
|
@@ -325,8 +325,8 @@ var Transaction = (function () {
|
|
|
325
325
|
Transaction.prototype.getDeliveryMethods = function () {
|
|
326
326
|
return this.transaction.getDeliveryMethods();
|
|
327
327
|
};
|
|
328
|
-
Transaction.prototype.getDeliveryOptions = function () {
|
|
329
|
-
return this.transaction.getDeliveryOptions();
|
|
328
|
+
Transaction.prototype.getDeliveryOptions = function (method) {
|
|
329
|
+
return this.transaction.getDeliveryOptions(method);
|
|
330
330
|
};
|
|
331
331
|
Transaction.prototype.getPostalCodeRetrieval = function (postalCode, houseNumber) {
|
|
332
332
|
return this.transaction.getPostalCodeRetrieval(postalCode, houseNumber);
|
|
@@ -371,6 +371,9 @@ var Transaction = (function () {
|
|
|
371
371
|
Transaction.prototype.getPaymentMethods = function () {
|
|
372
372
|
return this.transaction.getPaymentMethods();
|
|
373
373
|
};
|
|
374
|
+
Transaction.prototype.getPaymentMethodsForSalesOrder = function () {
|
|
375
|
+
return this.transaction.getPaymentMethodsForSalesOrder();
|
|
376
|
+
};
|
|
374
377
|
Transaction.prototype.getPurchasePortalLines = function (purchasePortalLine) {
|
|
375
378
|
return __awaiter(this, void 0, void 0, function () {
|
|
376
379
|
return __generator(this, function (_a) {
|
|
@@ -385,10 +388,10 @@ var Transaction = (function () {
|
|
|
385
388
|
});
|
|
386
389
|
});
|
|
387
390
|
};
|
|
388
|
-
Transaction.prototype.lockPurchasePortalLines = function (
|
|
391
|
+
Transaction.prototype.lockPurchasePortalLines = function (transIdPurchase, lineId) {
|
|
389
392
|
return __awaiter(this, void 0, void 0, function () {
|
|
390
393
|
return __generator(this, function (_a) {
|
|
391
|
-
return [2, this.transaction.lockPurchasePortalLines(
|
|
394
|
+
return [2, this.transaction.lockPurchasePortalLines(transIdPurchase, lineId)];
|
|
392
395
|
});
|
|
393
396
|
});
|
|
394
397
|
};
|
|
@@ -39,11 +39,10 @@ import { RelationRequest } from './model/relation-request';
|
|
|
39
39
|
import { TransactionKind } from './enum/transaction-kind.enum';
|
|
40
40
|
import { SequenceName } from './enum/sequence-name.enum';
|
|
41
41
|
import { TransactionSearchViewRequest } from './model/transaction-search-view-request';
|
|
42
|
-
import { PurchaseAdviceFilters } from
|
|
43
|
-
import { PurchasePortalFilters } from
|
|
44
|
-
import { GetPurchasePortalLine } from
|
|
45
|
-
import {
|
|
46
|
-
import { DocDeliveryBatch } from "./model/doc-delivery-batch.bo";
|
|
42
|
+
import { PurchaseAdviceFilters } from './model/purchase-advice-filters';
|
|
43
|
+
import { PurchasePortalFilters } from './model/purchase-portal-filters.bo';
|
|
44
|
+
import { GetPurchasePortalLine } from './model/get-purchase-portal-line';
|
|
45
|
+
import { DocDeliveryBatch } from './model/doc-delivery-batch.bo';
|
|
47
46
|
var options = {
|
|
48
47
|
url: 'http',
|
|
49
48
|
ajaxUrl: 'http'
|
|
@@ -84,8 +83,8 @@ var publicOptions = {
|
|
|
84
83
|
describe("TransactionAPI", function () {
|
|
85
84
|
var transaction;
|
|
86
85
|
beforeEach(function () {
|
|
87
|
-
transaction = new Transaction(
|
|
88
|
-
jest.setTimeout(
|
|
86
|
+
transaction = new Transaction(localOptions);
|
|
87
|
+
jest.setTimeout(130000);
|
|
89
88
|
});
|
|
90
89
|
it('getPostalCodeRetrieval_shouldContainCityMiddelburg', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
91
90
|
var result;
|
|
@@ -217,24 +216,6 @@ describe("TransactionAPI", function () {
|
|
|
217
216
|
case 0:
|
|
218
217
|
purchasePortalFilter = new PurchasePortalFilters();
|
|
219
218
|
purchasePortalFilter.purchaseOrderNo = "15461";
|
|
220
|
-
purchasePortalFilter.supplierNo = null;
|
|
221
|
-
purchasePortalFilter.purchaseOrderDate = null;
|
|
222
|
-
purchasePortalFilter.deliveryState = null;
|
|
223
|
-
purchasePortalFilter.articleNo = null;
|
|
224
|
-
purchasePortalFilter.turnOverGroup = null;
|
|
225
|
-
purchasePortalFilter.deliveryDate = null;
|
|
226
|
-
purchasePortalFilter.deliveryDateConfirmed = null;
|
|
227
|
-
purchasePortalFilter.serialNo = null;
|
|
228
|
-
purchasePortalFilter.batchNo = null;
|
|
229
|
-
purchasePortalFilter.branchNo = null;
|
|
230
|
-
purchasePortalFilter.wareHouseNo = null;
|
|
231
|
-
purchasePortalFilter.reference = null;
|
|
232
|
-
purchasePortalFilter.processingState = null;
|
|
233
|
-
purchasePortalFilter.tag = null;
|
|
234
|
-
purchasePortalFilter.acceptanceProcessingState = null;
|
|
235
|
-
purchasePortalFilter.supplierGroupNo = null;
|
|
236
|
-
purchasePortalFilter.purchasePersonNo = null;
|
|
237
|
-
purchasePortalFilter.deliveryBatch = null;
|
|
238
219
|
purchasePortalLine = new GetPurchasePortalLine();
|
|
239
220
|
purchasePortalLine.transIdPurchase = 108937;
|
|
240
221
|
purchasePortalLine.selOrdered = "F";
|
|
@@ -256,74 +237,58 @@ describe("TransactionAPI", function () {
|
|
|
256
237
|
});
|
|
257
238
|
}); });
|
|
258
239
|
it('updatePurchaseOrderLines', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
259
|
-
var
|
|
240
|
+
var getPurchasePortalLine, purchasePortalFilter, purchasePortalLinesResponse, purchasePortalLine, lockResponse, docBatchArray, result;
|
|
260
241
|
return __generator(this, function (_a) {
|
|
261
242
|
switch (_a.label) {
|
|
262
243
|
case 0:
|
|
244
|
+
getPurchasePortalLine = new GetPurchasePortalLine();
|
|
245
|
+
purchasePortalFilter = new PurchasePortalFilters();
|
|
246
|
+
purchasePortalFilter.purchaseOrderNo = "15461";
|
|
247
|
+
getPurchasePortalLine.transIdPurchase = 108937;
|
|
248
|
+
getPurchasePortalLine.selOrdered = "F";
|
|
249
|
+
getPurchasePortalLine.selPurchaseResp = "T";
|
|
250
|
+
getPurchasePortalLine.selPurchaseRespNotToDo = "F";
|
|
251
|
+
getPurchasePortalLine.selTranspNot = "F";
|
|
252
|
+
getPurchasePortalLine.selTranspNotToDo = "F";
|
|
253
|
+
getPurchasePortalLine.selRepReceived = "F";
|
|
254
|
+
getPurchasePortalLine.onlyInContainer = "F";
|
|
255
|
+
getPurchasePortalLine.docKind = "IB";
|
|
256
|
+
getPurchasePortalLine.filterObject = purchasePortalFilter;
|
|
257
|
+
return [4, transaction.getPurchasePortalLines(getPurchasePortalLine)];
|
|
258
|
+
case 1:
|
|
259
|
+
purchasePortalLinesResponse = _a.sent();
|
|
260
|
+
purchasePortalLine = purchasePortalLinesResponse.resultObjects[0];
|
|
261
|
+
return [4, transaction.lockPurchasePortalLines(purchasePortalLine.transIdPurchase, purchasePortalLine.lineId)];
|
|
262
|
+
case 2:
|
|
263
|
+
lockResponse = _a.sent();
|
|
264
|
+
if (!(lockResponse.validationResult && lockResponse.validationResult.success)) return [3, 4];
|
|
265
|
+
return [4, transaction.commit()];
|
|
266
|
+
case 3:
|
|
267
|
+
_a.sent();
|
|
268
|
+
_a.label = 4;
|
|
269
|
+
case 4:
|
|
270
|
+
if (!(lockResponse.validationResult && lockResponse.validationResult.success)) return [3, 8];
|
|
263
271
|
docBatchArray = new DocDeliveryBatch();
|
|
264
272
|
docBatchArray.deliveryBatch = "batch3";
|
|
265
273
|
docBatchArray.docAmount = 1;
|
|
266
274
|
docBatchArray.confirmedPrice = 10;
|
|
267
275
|
docBatchArray.reference = "Test ref";
|
|
268
276
|
docBatchArray.deleteLine = "F";
|
|
269
|
-
docBatchArray.
|
|
270
|
-
docBatchArray.
|
|
271
|
-
docBatchArray.
|
|
272
|
-
purchasePortalLine = new PurchasePortalLine();
|
|
273
|
-
purchasePortalLine.transIdPurchase = 108937;
|
|
274
|
-
purchasePortalLine.transIdSales = null;
|
|
275
|
-
purchasePortalLine.lineId = null;
|
|
276
|
-
purchasePortalLine.transNo = null;
|
|
277
|
-
purchasePortalLine.lineNo = null;
|
|
278
|
-
purchasePortalLine.transactionDate = null;
|
|
279
|
-
purchasePortalLine.supplierNo = null;
|
|
280
|
-
purchasePortalLine.supplierName = null;
|
|
281
|
-
purchasePortalLine.articleNo = null;
|
|
282
|
-
purchasePortalLine.description = null;
|
|
283
|
-
purchasePortalLine.volume = null;
|
|
284
|
-
purchasePortalLine.currencyPurchCode = null;
|
|
285
|
-
purchasePortalLine.noDecimalsPurch = null;
|
|
286
|
-
purchasePortalLine.grossOrderPrice = null;
|
|
287
|
-
purchasePortalLine.discountOrderPrice = null;
|
|
288
|
-
purchasePortalLine.netOrderPrice = null;
|
|
289
|
-
purchasePortalLine.currencyConfCode = null;
|
|
290
|
-
purchasePortalLine.noDecimalsConf = null;
|
|
291
|
-
purchasePortalLine.confirmedPrice = null;
|
|
292
|
-
purchasePortalLine.amountOrdered = null;
|
|
293
|
-
purchasePortalLine.amountConfirmed = null;
|
|
294
|
-
purchasePortalLine.amountConfirmedOrg = null;
|
|
295
|
-
purchasePortalLine.amountAccepted = null;
|
|
296
|
-
purchasePortalLine.amountAcceptedOrg = null;
|
|
297
|
-
purchasePortalLine.amountShipped = null;
|
|
298
|
-
purchasePortalLine.amountShippedOrg = null;
|
|
299
|
-
purchasePortalLine.amountShippedTotal = null;
|
|
300
|
-
purchasePortalLine.amountToBeShipped = null;
|
|
301
|
-
purchasePortalLine.amountSignedIn = null;
|
|
302
|
-
purchasePortalLine.amountToBeConfirmed = null;
|
|
303
|
-
purchasePortalLine.deliveryDate = null;
|
|
304
|
-
purchasePortalLine.deliveryDateConfirmed = null;
|
|
305
|
-
purchasePortalLine.deliveryDateConfirmedOrg = null;
|
|
306
|
-
purchasePortalLine.transportDate = null;
|
|
307
|
-
purchasePortalLine.arrivalDate = null;
|
|
308
|
-
purchasePortalLine.amountShippingTimes = null;
|
|
309
|
-
purchasePortalLine.selected = null;
|
|
310
|
-
purchasePortalLine.reference = null;
|
|
311
|
-
purchasePortalLine.referenceOriginal = null;
|
|
312
|
-
purchasePortalLine.referenceFromHeader = null;
|
|
313
|
-
purchasePortalLine.user = null;
|
|
314
|
-
purchasePortalLine.docKind = null;
|
|
315
|
-
purchasePortalLine.containerId = null;
|
|
316
|
-
purchasePortalLine.deleteDoc = null;
|
|
317
|
-
purchasePortalLine.articleRelatedText = null;
|
|
318
|
-
purchasePortalLine.articleNoSupplier = null;
|
|
319
|
-
purchasePortalLine.deliveryBatchOrg = null;
|
|
320
|
-
purchasePortalLine.deliveryBatch = null;
|
|
321
|
-
purchasePortalLine.docBatchArray = [docBatchArray];
|
|
277
|
+
docBatchArray.docDate = new Date();
|
|
278
|
+
docBatchArray.docDateOrg = new Date();
|
|
279
|
+
purchasePortalLine.docBatchArray.push(docBatchArray);
|
|
322
280
|
return [4, transaction.updatePurchasePortalLines(purchasePortalLine)];
|
|
323
|
-
case
|
|
281
|
+
case 5:
|
|
324
282
|
result = _a.sent();
|
|
283
|
+
if (!(result.validationResult && result.validationResult.success)) return [3, 7];
|
|
284
|
+
return [4, transaction.commit()];
|
|
285
|
+
case 6:
|
|
286
|
+
_a.sent();
|
|
287
|
+
_a.label = 7;
|
|
288
|
+
case 7:
|
|
325
289
|
expect(result).toBeDefined();
|
|
326
|
-
|
|
290
|
+
_a.label = 8;
|
|
291
|
+
case 8: return [2];
|
|
327
292
|
}
|
|
328
293
|
});
|
|
329
294
|
}); });
|
|
@@ -435,6 +400,18 @@ describe("TransactionAPI", function () {
|
|
|
435
400
|
}
|
|
436
401
|
});
|
|
437
402
|
}); });
|
|
403
|
+
it('getDeliveryOptions', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
404
|
+
var result;
|
|
405
|
+
return __generator(this, function (_a) {
|
|
406
|
+
switch (_a.label) {
|
|
407
|
+
case 0: return [4, transaction.getDeliveryOptions("AFH")];
|
|
408
|
+
case 1:
|
|
409
|
+
result = _a.sent();
|
|
410
|
+
expect(result.validationResult.success).toBeTruthy();
|
|
411
|
+
return [2];
|
|
412
|
+
}
|
|
413
|
+
});
|
|
414
|
+
}); });
|
|
438
415
|
it('searchTransactions', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
439
416
|
var request, result;
|
|
440
417
|
return __generator(this, function (_a) {
|
|
@@ -551,6 +528,18 @@ describe("TransactionAPI", function () {
|
|
|
551
528
|
}
|
|
552
529
|
});
|
|
553
530
|
}); });
|
|
531
|
+
it('getPaymentMethodsForSalesOrder', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
532
|
+
var result;
|
|
533
|
+
return __generator(this, function (_a) {
|
|
534
|
+
switch (_a.label) {
|
|
535
|
+
case 0: return [4, transaction.getPaymentMethodsForSalesOrder()];
|
|
536
|
+
case 1:
|
|
537
|
+
result = _a.sent();
|
|
538
|
+
expect(result.resultObjects.length).toBeGreaterThan(0);
|
|
539
|
+
return [2];
|
|
540
|
+
}
|
|
541
|
+
});
|
|
542
|
+
}); });
|
|
554
543
|
it('getPurchaseAdviceLines', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
555
544
|
var filterObject, result;
|
|
556
545
|
return __generator(this, function (_a) {
|