octopian-apis 1.0.64 → 1.0.66
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/package.json +1 -1
- package/src/CoreServices/transactionsServices.js +289 -63
- package/src/darAlBerServices/transactionsServices.js +226 -0
- package/src/darAlBerServices.ts +63 -1
- package/src/index.d.ts +37 -1
- package/src/index.js +4 -0
- package/src/modals/input-modals/transaction-catalog-modals/GetPaymentURLInput.ts +14 -1
- package/src/modals/output-modals/request-modals/GetMyRequestGroupedOutput.ts +1 -0
package/package.json
CHANGED
|
@@ -1442,6 +1442,232 @@ export async function GetPaymentURL(
|
|
|
1442
1442
|
}
|
|
1443
1443
|
}
|
|
1444
1444
|
|
|
1445
|
+
/**
|
|
1446
|
+
* @description
|
|
1447
|
+
* Retrieves the payment URL for a service.
|
|
1448
|
+
*
|
|
1449
|
+
* @param {object} getPaymentURLMultipleAssetsDTO
|
|
1450
|
+
* Data object containing fields necessary for retrieving the payment URL.
|
|
1451
|
+
* ServiceID: number
|
|
1452
|
+
* MultipleAssets: MultipleAssetsInput[]
|
|
1453
|
+
* ServiceAlias?: string
|
|
1454
|
+
* PaymentURLAlias: string
|
|
1455
|
+
*
|
|
1456
|
+
* @param {string} AuthToken
|
|
1457
|
+
* Authentication token for authorization purposes.
|
|
1458
|
+
*
|
|
1459
|
+
* @param {number} Timeout
|
|
1460
|
+
* Time in milliseconds to wait before the request times out. Default is 30000.
|
|
1461
|
+
*
|
|
1462
|
+
* @param {string} RequiredHeaderValue
|
|
1463
|
+
* Value for any required header. Default is null.
|
|
1464
|
+
*
|
|
1465
|
+
* @returns
|
|
1466
|
+
* An object containing the response from the Get Payment URL API,
|
|
1467
|
+
* including success message, status code, and any additional data returned by the API.
|
|
1468
|
+
* Message: Success,
|
|
1469
|
+
* StatusCode: 200,
|
|
1470
|
+
* Result: string (payment URL)
|
|
1471
|
+
*/
|
|
1472
|
+
export async function GetPaymentURLMultipleAssets(
|
|
1473
|
+
getPaymentURLDTO,
|
|
1474
|
+
AuthToken = null,
|
|
1475
|
+
Timeout = 30000,
|
|
1476
|
+
RequiredHeaderValue = null
|
|
1477
|
+
) {
|
|
1478
|
+
try {
|
|
1479
|
+
let serviceID = getPaymentURLDTO.ServiceID;
|
|
1480
|
+
if (serviceID === 0 && getPaymentURLDTO.ServiceAlias) {
|
|
1481
|
+
// Fetch the list of services
|
|
1482
|
+
const servicesList = await apiHandler.PostMethod(
|
|
1483
|
+
TransactionsAPIConstants.uriGetServiceList(),
|
|
1484
|
+
{ PageSize: 1000, PageIndex: 0 },
|
|
1485
|
+
AuthToken,
|
|
1486
|
+
Timeout,
|
|
1487
|
+
RequiredHeaderValue,
|
|
1488
|
+
true
|
|
1489
|
+
);
|
|
1490
|
+
|
|
1491
|
+
// Validate the response
|
|
1492
|
+
if (!servicesList || !Array.isArray(servicesList.Result)) {
|
|
1493
|
+
return {
|
|
1494
|
+
Message: "Error",
|
|
1495
|
+
StatusCode: -1,
|
|
1496
|
+
Result: {
|
|
1497
|
+
ErrorMessage: "Could not fetch service list",
|
|
1498
|
+
ErrorRefNo: "-1",
|
|
1499
|
+
},
|
|
1500
|
+
};
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
// Find the service with the matching alias
|
|
1504
|
+
const service = servicesList.Result.find(
|
|
1505
|
+
(service) => service.Alias === getPaymentURLDTO.ServiceAlias
|
|
1506
|
+
);
|
|
1507
|
+
|
|
1508
|
+
// Check if the service was found
|
|
1509
|
+
if (!service) {
|
|
1510
|
+
return {
|
|
1511
|
+
Message: "Error",
|
|
1512
|
+
StatusCode: -1,
|
|
1513
|
+
Result: {
|
|
1514
|
+
ErrorMessage: `Service with alias ${getPaymentURLDTO.ServiceAlias} not found`,
|
|
1515
|
+
ErrorRefNo: "-1",
|
|
1516
|
+
},
|
|
1517
|
+
};
|
|
1518
|
+
} else {
|
|
1519
|
+
serviceID = service.ServiceId;
|
|
1520
|
+
}
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
// Fetch the service parameters
|
|
1524
|
+
const serviceAttributes = await apiHandler.PostMethod(
|
|
1525
|
+
TransactionsAPIConstants.uriGetServiceRequestAttributeList(),
|
|
1526
|
+
{
|
|
1527
|
+
ServiceId: serviceID,
|
|
1528
|
+
AssetId: getPaymentURLDTO.MultipleAssets[0].AssetId,
|
|
1529
|
+
IsParameters: false,
|
|
1530
|
+
},
|
|
1531
|
+
AuthToken,
|
|
1532
|
+
Timeout,
|
|
1533
|
+
RequiredHeaderValue,
|
|
1534
|
+
true
|
|
1535
|
+
);
|
|
1536
|
+
|
|
1537
|
+
// Validate the service attributes response
|
|
1538
|
+
if (!serviceAttributes || !Array.isArray(serviceAttributes.Result)) {
|
|
1539
|
+
return {
|
|
1540
|
+
Message: "Error",
|
|
1541
|
+
StatusCode: -1,
|
|
1542
|
+
Result: {
|
|
1543
|
+
ErrorMessage: "Invalid response format for service parameters",
|
|
1544
|
+
ErrorRefNo: "-1",
|
|
1545
|
+
},
|
|
1546
|
+
};
|
|
1547
|
+
}
|
|
1548
|
+
const paymentBatch = await GetPaymentBatch(
|
|
1549
|
+
AuthToken,
|
|
1550
|
+
Timeout,
|
|
1551
|
+
RequiredHeaderValue
|
|
1552
|
+
);
|
|
1553
|
+
let serviceAttributesList = [];
|
|
1554
|
+
getPaymentURLDTO.MultipleAssets.forEach((asset) => {
|
|
1555
|
+
asset.ParametersValues.forEach((parameter) => {
|
|
1556
|
+
let attribute = serviceAttributesList.find(
|
|
1557
|
+
(attribute) => attribute.Alias === parameter.Alias
|
|
1558
|
+
);
|
|
1559
|
+
if (attribute) {
|
|
1560
|
+
if (parameter.Alias === "Amount") {
|
|
1561
|
+
attribute.Value = (
|
|
1562
|
+
parseFloat(parameter.Value) + parseFloat(attribute.Value)
|
|
1563
|
+
).toString();
|
|
1564
|
+
} else {
|
|
1565
|
+
attribute.Value = parameter.Value;
|
|
1566
|
+
attribute.ExtendedValue = parameter.ExtendedValue;
|
|
1567
|
+
}
|
|
1568
|
+
} else {
|
|
1569
|
+
serviceAttributesList.push({
|
|
1570
|
+
Alias: parameter.Alias,
|
|
1571
|
+
Value: parameter.Value,
|
|
1572
|
+
ExtendedValue: parameter.ExtendedValue,
|
|
1573
|
+
});
|
|
1574
|
+
}
|
|
1575
|
+
});
|
|
1576
|
+
});
|
|
1577
|
+
serviceAttributes.Result.forEach((element) => {
|
|
1578
|
+
if (
|
|
1579
|
+
serviceAttributesList.find((param) => param.Alias === element.Alias)
|
|
1580
|
+
) {
|
|
1581
|
+
element.Value = serviceAttributesLists.find(
|
|
1582
|
+
(param) => param.Alias === element.Alias
|
|
1583
|
+
).Value;
|
|
1584
|
+
element.ExtendedValue = serviceAttributesList.find(
|
|
1585
|
+
(param) => param.Alias === element.Alias
|
|
1586
|
+
).ExtendedValue;
|
|
1587
|
+
}
|
|
1588
|
+
if (element.Alias === "BatchID") {
|
|
1589
|
+
element.Value = paymentBatch.Result.toString();
|
|
1590
|
+
}
|
|
1591
|
+
});
|
|
1592
|
+
const validateIntegrationResult = await ValidateAttributesWithIntegration(
|
|
1593
|
+
{
|
|
1594
|
+
ServiceId: serviceID,
|
|
1595
|
+
AssetId: getPaymentURLDTO.AssetId,
|
|
1596
|
+
BatchId: paymentBatch.Result,
|
|
1597
|
+
ClientRequestAttributeDtos: serviceAttributes.Result,
|
|
1598
|
+
FromPageNo: 1,
|
|
1599
|
+
PageNo: 2,
|
|
1600
|
+
},
|
|
1601
|
+
AuthToken,
|
|
1602
|
+
Timeout,
|
|
1603
|
+
RequiredHeaderValue
|
|
1604
|
+
);
|
|
1605
|
+
// const requestAttributeList = await AssignBatchToRequestList(
|
|
1606
|
+
// {
|
|
1607
|
+
// requestId: result.Result.RequestId,
|
|
1608
|
+
// batchId: result.Result.BatchId,
|
|
1609
|
+
// },
|
|
1610
|
+
// AuthToken,
|
|
1611
|
+
// Timeout,
|
|
1612
|
+
// RequiredHeaderValue
|
|
1613
|
+
// );
|
|
1614
|
+
const paymentURL = validateIntegrationResult.Result.RequestAttributes.find(
|
|
1615
|
+
(attribute) => attribute.Alias === getPaymentURLDTO.PaymentURLAlias
|
|
1616
|
+
);
|
|
1617
|
+
if (paymentURL && paymentURL.Value) {
|
|
1618
|
+
getPaymentURLDTO.MultipleAssets.forEach((asset) => {
|
|
1619
|
+
let assetAttributes = JSON.parse(
|
|
1620
|
+
JSON.stringify(validateIntegrationResult.Result.RequestAttributes)
|
|
1621
|
+
);
|
|
1622
|
+
asset.ParametersValues.forEach((parameter) => {
|
|
1623
|
+
let attribute = assetAttributes.find(
|
|
1624
|
+
(attribute) => attribute.Alias === parameter.Alias
|
|
1625
|
+
);
|
|
1626
|
+
if (attribute) {
|
|
1627
|
+
attribute.Value = parameter.Value;
|
|
1628
|
+
attribute.ExtendedValue = parameter.ExtendedValue;
|
|
1629
|
+
}
|
|
1630
|
+
});
|
|
1631
|
+
AddRequest(
|
|
1632
|
+
{
|
|
1633
|
+
ServiceId: serviceID,
|
|
1634
|
+
AssetId: asset.AssetId,
|
|
1635
|
+
ClientRequestAttributeDtos: assetAttributes,
|
|
1636
|
+
},
|
|
1637
|
+
AuthToken,
|
|
1638
|
+
Timeout,
|
|
1639
|
+
RequiredHeaderValue
|
|
1640
|
+
);
|
|
1641
|
+
});
|
|
1642
|
+
|
|
1643
|
+
return {
|
|
1644
|
+
Message: "Success",
|
|
1645
|
+
StatusCode: 200,
|
|
1646
|
+
Result: paymentURL.Value,
|
|
1647
|
+
};
|
|
1648
|
+
} else {
|
|
1649
|
+
return {
|
|
1650
|
+
Message: "Error",
|
|
1651
|
+
StatusCode: -1,
|
|
1652
|
+
Result: {
|
|
1653
|
+
ErrorMessage: "Error fetching Payment URL",
|
|
1654
|
+
ErrorRefNo: "-1",
|
|
1655
|
+
},
|
|
1656
|
+
};
|
|
1657
|
+
}
|
|
1658
|
+
} catch (error) {
|
|
1659
|
+
// Handle errors
|
|
1660
|
+
return {
|
|
1661
|
+
Message: "Error",
|
|
1662
|
+
StatusCode: -1,
|
|
1663
|
+
Result: {
|
|
1664
|
+
ErrorMessage: "Error fetching Payment URL",
|
|
1665
|
+
ErrorRefNo: "-1",
|
|
1666
|
+
},
|
|
1667
|
+
};
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1445
1671
|
/**
|
|
1446
1672
|
* @description
|
|
1447
1673
|
* Fetches the payment invoice details for a given invoice ID.
|
|
@@ -3671,20 +3897,20 @@ export async function GetDocumentRecordTemplate(
|
|
|
3671
3897
|
* @param {string} AuthToken
|
|
3672
3898
|
* Authentication token for authorization purposes.
|
|
3673
3899
|
*
|
|
3674
|
-
* @param {number} Timeout
|
|
3900
|
+
* @param {number} Timeout
|
|
3675
3901
|
* Time in milliseconds to wait before the request times out. Default is 30000.
|
|
3676
3902
|
*
|
|
3677
3903
|
* @param {string} RequiredHeaderValue
|
|
3678
3904
|
* Value for any required header. Default is null.
|
|
3679
3905
|
*
|
|
3680
3906
|
* @returns
|
|
3681
|
-
* An object containing the response from the Get Asset Management Asset Sub Group List API,
|
|
3907
|
+
* An object containing the response from the Get Asset Management Asset Sub Group List API,
|
|
3682
3908
|
* including success message, status code, and any additional data returned by the API.
|
|
3683
3909
|
* Message: Success,
|
|
3684
3910
|
* StatusCode: 200,
|
|
3685
3911
|
* Result: [
|
|
3686
3912
|
* --- asset management asset sub group data ---
|
|
3687
|
-
* ],
|
|
3913
|
+
* ],
|
|
3688
3914
|
* HeaderValue: string
|
|
3689
3915
|
*/
|
|
3690
3916
|
export async function GetAssetManagementAssetSubGroupList(
|
|
@@ -3942,37 +4168,37 @@ export async function GenerateDocument(
|
|
|
3942
4168
|
);
|
|
3943
4169
|
return APIResponse;
|
|
3944
4170
|
}
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
4171
|
+
/**
|
|
4172
|
+
* @description
|
|
4173
|
+
* Generates a child request step document based on the provided input data.
|
|
4174
|
+
*
|
|
4175
|
+
* @param {object} GenerateChildRequestStepDocumentInput
|
|
4176
|
+
* Data object containing fields necessary for generating the child request step document.
|
|
4177
|
+
* parentRequestId: number
|
|
4178
|
+
* templateAttributeAlias: string
|
|
4179
|
+
* clientRequestAttributes: ClientRequestAttribute[]
|
|
4180
|
+
* isGeneratedWord: boolean
|
|
4181
|
+
*
|
|
4182
|
+
* @param {string} AuthToken
|
|
4183
|
+
* Authentication token for authorization purposes.
|
|
4184
|
+
*
|
|
4185
|
+
* @param {number} Timeout
|
|
4186
|
+
* Time in milliseconds to wait before the request times out. Default is 30000.
|
|
4187
|
+
*
|
|
4188
|
+
* @param {string} RequiredHeaderValue
|
|
4189
|
+
* Value for any required header. Default is null.
|
|
4190
|
+
*
|
|
4191
|
+
* @returns
|
|
4192
|
+
* An object containing the response from the Generate Child Request Step Document API,
|
|
4193
|
+
* including success message, status code, and any additional data returned by the API.
|
|
4194
|
+
* Message: Success,
|
|
4195
|
+
* StatusCode: 200,
|
|
4196
|
+
* Result: [
|
|
4197
|
+
* RequestStepId: id,
|
|
4198
|
+
* DocumentPath: added document path
|
|
4199
|
+
* ]
|
|
4200
|
+
*/
|
|
4201
|
+
export async function GenerateChildRequestStepDocument(
|
|
3976
4202
|
GenerateChildRequestStepDocumentInput,
|
|
3977
4203
|
AuthToken = null,
|
|
3978
4204
|
Timeout = 30000,
|
|
@@ -3994,7 +4220,7 @@ export async function GenerateDocument(
|
|
|
3994
4220
|
*
|
|
3995
4221
|
* @param {object} GenerateStepDocumentInput
|
|
3996
4222
|
* Data object containing fields necessary for generating the step document.
|
|
3997
|
-
* ServiceId: number
|
|
4223
|
+
* ServiceId: number
|
|
3998
4224
|
* StepId: number
|
|
3999
4225
|
* TemplateAttributeAlias: string
|
|
4000
4226
|
* ClientRequestAttributes: ClientRequestAttribute[]
|
|
@@ -4038,14 +4264,14 @@ export async function GenerateStepDocument(
|
|
|
4038
4264
|
* @param {string} AuthToken
|
|
4039
4265
|
* Authentication token for authorization purposes.
|
|
4040
4266
|
*
|
|
4041
|
-
* @param {number} Timeout
|
|
4267
|
+
* @param {number} Timeout
|
|
4042
4268
|
* Time in milliseconds to wait before the request times out. Default is 30000.
|
|
4043
4269
|
*
|
|
4044
4270
|
* @param {string} RequiredHeaderValue
|
|
4045
4271
|
* Value for any required header. Default is null.
|
|
4046
4272
|
*
|
|
4047
4273
|
* @returns
|
|
4048
|
-
* An object containing the response from the Get Notification List API,
|
|
4274
|
+
* An object containing the response from the Get Notification List API,
|
|
4049
4275
|
* including success message, status code, and any additional data returned by the API.
|
|
4050
4276
|
* Message: Success,
|
|
4051
4277
|
* StatusCode: 200,
|
|
@@ -4081,13 +4307,13 @@ export async function GetNotificationList(
|
|
|
4081
4307
|
* Authentication token for authorization purposes.
|
|
4082
4308
|
*
|
|
4083
4309
|
* @param {number} Timeout
|
|
4084
|
-
* Time in milliseconds to wait before the request times out. Default is 30000.
|
|
4310
|
+
* Time in milliseconds to wait before the request times out. Default is 30000.
|
|
4085
4311
|
*
|
|
4086
4312
|
* @param {string} RequiredHeaderValue
|
|
4087
4313
|
* Value for any required header. Default is null.
|
|
4088
4314
|
*
|
|
4089
4315
|
* @returns
|
|
4090
|
-
* An object containing the response from the Update Notification List API,
|
|
4316
|
+
* An object containing the response from the Update Notification List API,
|
|
4091
4317
|
* including success message, status code, and any additional data returned by the API.
|
|
4092
4318
|
* Message: Success,
|
|
4093
4319
|
* StatusCode: 200,
|
|
@@ -4100,13 +4326,13 @@ export async function UpdateNotificationList(
|
|
|
4100
4326
|
Timeout = 30000,
|
|
4101
4327
|
RequiredHeaderValue = null
|
|
4102
4328
|
) {
|
|
4103
|
-
let APIResponse = await apiHandler.PostMethod(
|
|
4329
|
+
let APIResponse = await apiHandler.PostMethod(
|
|
4104
4330
|
TransactionsAPIConstants.uriUpdateNotificationList(),
|
|
4105
4331
|
UpdateNotificationListDTO,
|
|
4106
4332
|
AuthToken,
|
|
4107
4333
|
Timeout,
|
|
4108
4334
|
RequiredHeaderValue
|
|
4109
|
-
);
|
|
4335
|
+
);
|
|
4110
4336
|
return APIResponse;
|
|
4111
4337
|
}
|
|
4112
4338
|
|
|
@@ -4116,7 +4342,7 @@ export async function UpdateNotificationList(
|
|
|
4116
4342
|
*
|
|
4117
4343
|
* @param {string} AuthToken
|
|
4118
4344
|
* Authentication token for authorization purposes.
|
|
4119
|
-
*
|
|
4345
|
+
*
|
|
4120
4346
|
* @param {number} Timeout
|
|
4121
4347
|
* Time in milliseconds to wait before the request times out. Default is 30000.
|
|
4122
4348
|
*
|
|
@@ -4137,7 +4363,7 @@ export async function GetStepTypeList(
|
|
|
4137
4363
|
AuthToken = null,
|
|
4138
4364
|
Timeout = 30000,
|
|
4139
4365
|
RequiredHeaderValue = null
|
|
4140
|
-
) {
|
|
4366
|
+
) {
|
|
4141
4367
|
let APIResponse = await apiHandler.PostMethod(
|
|
4142
4368
|
TransactionsAPIConstants.uriGetStepTypeList(),
|
|
4143
4369
|
null,
|
|
@@ -4154,7 +4380,7 @@ export async function GetStepTypeList(
|
|
|
4154
4380
|
*
|
|
4155
4381
|
* @param {string} AuthToken
|
|
4156
4382
|
* Authentication token for authorization purposes.
|
|
4157
|
-
*
|
|
4383
|
+
*
|
|
4158
4384
|
* @param {number} Timeout
|
|
4159
4385
|
* Time in milliseconds to wait before the request times out. Default is 30000.
|
|
4160
4386
|
*
|
|
@@ -4194,7 +4420,7 @@ export async function GetInteractorSignatures(
|
|
|
4194
4420
|
*
|
|
4195
4421
|
* @param {string} AuthToken
|
|
4196
4422
|
* Authentication token for authorization purposes.
|
|
4197
|
-
*
|
|
4423
|
+
*
|
|
4198
4424
|
* @param {number} Timeout
|
|
4199
4425
|
* Time in milliseconds to wait before the request times out. Default is 30000.
|
|
4200
4426
|
*
|
|
@@ -4234,7 +4460,7 @@ export async function GetSignatureBlob(
|
|
|
4234
4460
|
*
|
|
4235
4461
|
* @param {string} AuthToken
|
|
4236
4462
|
* Authentication token for authorization purposes.
|
|
4237
|
-
*
|
|
4463
|
+
*
|
|
4238
4464
|
* @param {number} Timeout
|
|
4239
4465
|
* Time in milliseconds to wait before the request times out. Default is 30000.
|
|
4240
4466
|
*
|
|
@@ -4255,13 +4481,13 @@ export async function SignDocument(
|
|
|
4255
4481
|
Timeout = 30000,
|
|
4256
4482
|
RequiredHeaderValue = null
|
|
4257
4483
|
) {
|
|
4258
|
-
let APIResponse = await apiHandler.PostMethod(
|
|
4484
|
+
let APIResponse = await apiHandler.PostMethod(
|
|
4259
4485
|
TransactionsAPIConstants.uriSignDocument(),
|
|
4260
4486
|
SignDocumentDTO,
|
|
4261
4487
|
AuthToken,
|
|
4262
4488
|
Timeout,
|
|
4263
4489
|
RequiredHeaderValue
|
|
4264
|
-
);
|
|
4490
|
+
);
|
|
4265
4491
|
return APIResponse;
|
|
4266
4492
|
}
|
|
4267
4493
|
|
|
@@ -4298,13 +4524,13 @@ export async function SignDocumentList(
|
|
|
4298
4524
|
Timeout = 30000,
|
|
4299
4525
|
RequiredHeaderValue = null
|
|
4300
4526
|
) {
|
|
4301
|
-
let APIResponse = await apiHandler.PostMethod(
|
|
4527
|
+
let APIResponse = await apiHandler.PostMethod(
|
|
4302
4528
|
TransactionsAPIConstants.uriSignDocumentList(),
|
|
4303
4529
|
SignDocumentListDTO,
|
|
4304
4530
|
AuthToken,
|
|
4305
4531
|
Timeout,
|
|
4306
4532
|
RequiredHeaderValue
|
|
4307
|
-
);
|
|
4533
|
+
);
|
|
4308
4534
|
return APIResponse;
|
|
4309
4535
|
}
|
|
4310
4536
|
//#endregion
|
|
@@ -4745,7 +4971,7 @@ export async function GetAssignbleRoleList(
|
|
|
4745
4971
|
*
|
|
4746
4972
|
* @param {object} GetAgentProfileDTO
|
|
4747
4973
|
* Data object containing fields necessary for retrieving the agent profile.
|
|
4748
|
-
* --- agent profile data---
|
|
4974
|
+
* --- agent profile data---
|
|
4749
4975
|
*
|
|
4750
4976
|
* @param {string} AuthToken
|
|
4751
4977
|
* Authentication token for authorization purposes.
|
|
@@ -4753,13 +4979,13 @@ export async function GetAssignbleRoleList(
|
|
|
4753
4979
|
* @param {number} Timeout
|
|
4754
4980
|
* Time in milliseconds to wait before the request times out. Default is 30000.
|
|
4755
4981
|
*
|
|
4756
|
-
* @param {string} RequiredHeaderValue
|
|
4982
|
+
* @param {string} RequiredHeaderValue
|
|
4757
4983
|
* Value for any required header. Default is null.
|
|
4758
4984
|
*
|
|
4759
4985
|
* @returns
|
|
4760
4986
|
* An object containing the response from the Get My Profile Agent API,
|
|
4761
4987
|
* including success message, status code, and any additional data returned by the API.
|
|
4762
|
-
* Message: Success,
|
|
4988
|
+
* Message: Success,
|
|
4763
4989
|
* StatusCode: 200,
|
|
4764
4990
|
* Result: --- agent profile data---,
|
|
4765
4991
|
* HeaderValue: string
|
|
@@ -4785,19 +5011,19 @@ export async function GetAgentProfile(
|
|
|
4785
5011
|
*
|
|
4786
5012
|
* @param {object} MaintainMyAttributeListAgentDTO
|
|
4787
5013
|
* Data object containing fields necessary for maintaining the agent attribute list.
|
|
4788
|
-
* --- agent attribute data list---
|
|
5014
|
+
* --- agent attribute data list---
|
|
4789
5015
|
*
|
|
4790
5016
|
* @param {string} AuthToken
|
|
4791
5017
|
* Authentication token for authorization purposes.
|
|
4792
5018
|
*
|
|
4793
5019
|
* @param {number} Timeout
|
|
4794
|
-
* Time in milliseconds to wait before the request times out. Default is 30000.
|
|
5020
|
+
* Time in milliseconds to wait before the request times out. Default is 30000.
|
|
4795
5021
|
*
|
|
4796
5022
|
* @param {string} RequiredHeaderValue
|
|
4797
5023
|
* Value for any required header. Default is null.
|
|
4798
5024
|
*
|
|
4799
5025
|
* @returns
|
|
4800
|
-
* An object containing the response from the Maintain My Attribute List Agent API,
|
|
5026
|
+
* An object containing the response from the Maintain My Attribute List Agent API,
|
|
4801
5027
|
* including success message, status code, and any additional data returned by the API.
|
|
4802
5028
|
* Message: Success,
|
|
4803
5029
|
* StatusCode: 200,
|
|
@@ -4825,19 +5051,19 @@ export async function MaintainMyAttributeListAgent(
|
|
|
4825
5051
|
*
|
|
4826
5052
|
* @param {object} UpdateMyProfileAgentDTO
|
|
4827
5053
|
* Data object containing fields necessary for updating the agent profile.
|
|
4828
|
-
* --- agent profile data---
|
|
5054
|
+
* --- agent profile data---
|
|
4829
5055
|
*
|
|
4830
5056
|
* @param {string} AuthToken
|
|
4831
5057
|
* Authentication token for authorization purposes.
|
|
4832
5058
|
*
|
|
4833
5059
|
* @param {number} Timeout
|
|
4834
|
-
* Time in milliseconds to wait before the request times out. Default is 30000.
|
|
5060
|
+
* Time in milliseconds to wait before the request times out. Default is 30000.
|
|
4835
5061
|
*
|
|
4836
5062
|
* @param {string} RequiredHeaderValue
|
|
4837
5063
|
* Value for any required header. Default is null.
|
|
4838
5064
|
*
|
|
4839
5065
|
* @returns
|
|
4840
|
-
* An object containing the response from the Update My Profile Agent API,
|
|
5066
|
+
* An object containing the response from the Update My Profile Agent API,
|
|
4841
5067
|
* including success message, status code, and any additional data returned by the API.
|
|
4842
5068
|
* Message: Success,
|
|
4843
5069
|
* StatusCode: 200,
|
|
@@ -4873,13 +5099,13 @@ export async function UpdateMyProfileAgent(
|
|
|
4873
5099
|
* @param {number} Timeout
|
|
4874
5100
|
* Time in milliseconds to wait before the request times out. Default is 30000.
|
|
4875
5101
|
*
|
|
4876
|
-
* @param {string} RequiredHeaderValue
|
|
5102
|
+
* @param {string} RequiredHeaderValue
|
|
4877
5103
|
* Value for any required header. Default is null.
|
|
4878
5104
|
*
|
|
4879
5105
|
* @returns
|
|
4880
5106
|
* An object containing the response from the Maintain My Address List Agent API,
|
|
4881
5107
|
* including success message, status code, and any additional data returned by the API.
|
|
4882
|
-
* Message: Success,
|
|
5108
|
+
* Message: Success,
|
|
4883
5109
|
* StatusCode: 200,
|
|
4884
5110
|
* Result: --- update agent address list ---,
|
|
4885
5111
|
* HeaderValue: string
|
|
@@ -5030,14 +5256,14 @@ export async function MaintainAgentUnitList(
|
|
|
5030
5256
|
* @param {number} Timeout
|
|
5031
5257
|
* Time in milliseconds to wait before the request times out. Default is 30000.
|
|
5032
5258
|
*
|
|
5033
|
-
* @param {string} RequiredHeaderValue
|
|
5259
|
+
* @param {string} RequiredHeaderValue
|
|
5034
5260
|
* Value for any required header. Default is null.
|
|
5035
5261
|
*
|
|
5036
5262
|
* @returns
|
|
5037
5263
|
* An object containing the response from the Maintain Agent Interactor List Agent API,
|
|
5038
5264
|
* including success message, status code, and any additional data returned by the API.
|
|
5039
5265
|
* Message: Success,
|
|
5040
|
-
* StatusCode: 200,
|
|
5266
|
+
* StatusCode: 200,
|
|
5041
5267
|
* Result: --- update agent interactor list ---,
|
|
5042
5268
|
* HeaderValue: string
|
|
5043
5269
|
*/
|
|
@@ -1455,6 +1455,232 @@ export async function DABGetPaymentURL(
|
|
|
1455
1455
|
}
|
|
1456
1456
|
}
|
|
1457
1457
|
|
|
1458
|
+
/**
|
|
1459
|
+
* @description
|
|
1460
|
+
* Retrieves the payment URL for a service.
|
|
1461
|
+
*
|
|
1462
|
+
* @param {object} getPaymentURLMultipleAssetsDTO
|
|
1463
|
+
* Data object containing fields necessary for retrieving the payment URL.
|
|
1464
|
+
* ServiceID: number
|
|
1465
|
+
* MultipleAssets: MultipleAssetsInput[]
|
|
1466
|
+
* ServiceAlias?: string
|
|
1467
|
+
* PaymentURLAlias: string
|
|
1468
|
+
*
|
|
1469
|
+
* @param {string} AuthToken
|
|
1470
|
+
* Authentication token for authorization purposes.
|
|
1471
|
+
*
|
|
1472
|
+
* @param {number} Timeout
|
|
1473
|
+
* Time in milliseconds to wait before the request times out. Default is 30000.
|
|
1474
|
+
*
|
|
1475
|
+
* @param {string} RequiredHeaderValue
|
|
1476
|
+
* Value for any required header. Default is null.
|
|
1477
|
+
*
|
|
1478
|
+
* @returns
|
|
1479
|
+
* An object containing the response from the Get Payment URL API,
|
|
1480
|
+
* including success message, status code, and any additional data returned by the API.
|
|
1481
|
+
* Message: Success,
|
|
1482
|
+
* StatusCode: 200,
|
|
1483
|
+
* Result: string (payment URL)
|
|
1484
|
+
*/
|
|
1485
|
+
export async function DABGetPaymentURLMultipleAssets(
|
|
1486
|
+
getPaymentURLDTO,
|
|
1487
|
+
AuthToken = null,
|
|
1488
|
+
Timeout = 30000,
|
|
1489
|
+
RequiredHeaderValue = null
|
|
1490
|
+
) {
|
|
1491
|
+
try {
|
|
1492
|
+
let serviceID = getPaymentURLDTO.ServiceID;
|
|
1493
|
+
if (serviceID === 0 && getPaymentURLDTO.ServiceAlias) {
|
|
1494
|
+
// Fetch the list of services
|
|
1495
|
+
const servicesList = await apiHandler.PostMethod(
|
|
1496
|
+
TransactionsAPIConstants.uriGetServiceList(),
|
|
1497
|
+
{ PageSize: 1000, PageIndex: 0 },
|
|
1498
|
+
AuthToken,
|
|
1499
|
+
Timeout,
|
|
1500
|
+
RequiredHeaderValue,
|
|
1501
|
+
true
|
|
1502
|
+
);
|
|
1503
|
+
|
|
1504
|
+
// Validate the response
|
|
1505
|
+
if (!servicesList || !Array.isArray(servicesList.Result)) {
|
|
1506
|
+
return {
|
|
1507
|
+
Message: "Error",
|
|
1508
|
+
StatusCode: -1,
|
|
1509
|
+
Result: {
|
|
1510
|
+
ErrorMessage: "Could not fetch service list",
|
|
1511
|
+
ErrorRefNo: "-1",
|
|
1512
|
+
},
|
|
1513
|
+
};
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
// Find the service with the matching alias
|
|
1517
|
+
const service = servicesList.Result.find(
|
|
1518
|
+
(service) => service.Alias === getPaymentURLDTO.ServiceAlias
|
|
1519
|
+
);
|
|
1520
|
+
|
|
1521
|
+
// Check if the service was found
|
|
1522
|
+
if (!service) {
|
|
1523
|
+
return {
|
|
1524
|
+
Message: "Error",
|
|
1525
|
+
StatusCode: -1,
|
|
1526
|
+
Result: {
|
|
1527
|
+
ErrorMessage: `Service with alias ${getPaymentURLDTO.ServiceAlias} not found`,
|
|
1528
|
+
ErrorRefNo: "-1",
|
|
1529
|
+
},
|
|
1530
|
+
};
|
|
1531
|
+
} else {
|
|
1532
|
+
serviceID = service.ServiceId;
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
// Fetch the service parameters
|
|
1537
|
+
const serviceAttributes = await apiHandler.PostMethod(
|
|
1538
|
+
TransactionsAPIConstants.uriGetServiceRequestAttributeList(),
|
|
1539
|
+
{
|
|
1540
|
+
ServiceId: serviceID,
|
|
1541
|
+
AssetId: getPaymentURLDTO.MultipleAssets[0].AssetId,
|
|
1542
|
+
IsParameters: false,
|
|
1543
|
+
},
|
|
1544
|
+
AuthToken,
|
|
1545
|
+
Timeout,
|
|
1546
|
+
RequiredHeaderValue,
|
|
1547
|
+
true
|
|
1548
|
+
);
|
|
1549
|
+
|
|
1550
|
+
// Validate the service attributes response
|
|
1551
|
+
if (!serviceAttributes || !Array.isArray(serviceAttributes.Result)) {
|
|
1552
|
+
return {
|
|
1553
|
+
Message: "Error",
|
|
1554
|
+
StatusCode: -1,
|
|
1555
|
+
Result: {
|
|
1556
|
+
ErrorMessage: "Invalid response format for service parameters",
|
|
1557
|
+
ErrorRefNo: "-1",
|
|
1558
|
+
},
|
|
1559
|
+
};
|
|
1560
|
+
}
|
|
1561
|
+
const paymentBatch = await DABGetPaymentBatch(
|
|
1562
|
+
AuthToken,
|
|
1563
|
+
Timeout,
|
|
1564
|
+
RequiredHeaderValue
|
|
1565
|
+
);
|
|
1566
|
+
let serviceAttributesList = [];
|
|
1567
|
+
getPaymentURLDTO.MultipleAssets.forEach((asset) => {
|
|
1568
|
+
asset.ParametersValues.forEach((parameter) => {
|
|
1569
|
+
let attribute = serviceAttributesList.find(
|
|
1570
|
+
(attribute) => attribute.Alias === parameter.Alias
|
|
1571
|
+
);
|
|
1572
|
+
if (attribute) {
|
|
1573
|
+
if (parameter.Alias === "Amount") {
|
|
1574
|
+
attribute.Value = (
|
|
1575
|
+
parseFloat(parameter.Value) + parseFloat(attribute.Value)
|
|
1576
|
+
).toString();
|
|
1577
|
+
} else {
|
|
1578
|
+
attribute.Value = parameter.Value;
|
|
1579
|
+
attribute.ExtendedValue = parameter.ExtendedValue;
|
|
1580
|
+
}
|
|
1581
|
+
} else {
|
|
1582
|
+
serviceAttributesList.push({
|
|
1583
|
+
Alias: parameter.Alias,
|
|
1584
|
+
Value: parameter.Value,
|
|
1585
|
+
ExtendedValue: parameter.ExtendedValue,
|
|
1586
|
+
});
|
|
1587
|
+
}
|
|
1588
|
+
});
|
|
1589
|
+
});
|
|
1590
|
+
serviceAttributes.Result.forEach((element) => {
|
|
1591
|
+
if (
|
|
1592
|
+
serviceAttributesList.find((param) => param.Alias === element.Alias)
|
|
1593
|
+
) {
|
|
1594
|
+
element.Value = serviceAttributesLists.find(
|
|
1595
|
+
(param) => param.Alias === element.Alias
|
|
1596
|
+
).Value;
|
|
1597
|
+
element.ExtendedValue = serviceAttributesList.find(
|
|
1598
|
+
(param) => param.Alias === element.Alias
|
|
1599
|
+
).ExtendedValue;
|
|
1600
|
+
}
|
|
1601
|
+
if (element.Alias === "BatchID") {
|
|
1602
|
+
element.Value = paymentBatch.Result.toString();
|
|
1603
|
+
}
|
|
1604
|
+
});
|
|
1605
|
+
const validateIntegrationResult = await DABValidateAttributesWithIntegration(
|
|
1606
|
+
{
|
|
1607
|
+
ServiceId: serviceID,
|
|
1608
|
+
AssetId: getPaymentURLDTO.AssetId,
|
|
1609
|
+
BatchId: paymentBatch.Result,
|
|
1610
|
+
ClientRequestAttributeDtos: serviceAttributes.Result,
|
|
1611
|
+
FromPageNo: 1,
|
|
1612
|
+
PageNo: 2,
|
|
1613
|
+
},
|
|
1614
|
+
AuthToken,
|
|
1615
|
+
Timeout,
|
|
1616
|
+
RequiredHeaderValue
|
|
1617
|
+
);
|
|
1618
|
+
// const requestAttributeList = await AssignBatchToRequestList(
|
|
1619
|
+
// {
|
|
1620
|
+
// requestId: result.Result.RequestId,
|
|
1621
|
+
// batchId: result.Result.BatchId,
|
|
1622
|
+
// },
|
|
1623
|
+
// AuthToken,
|
|
1624
|
+
// Timeout,
|
|
1625
|
+
// RequiredHeaderValue
|
|
1626
|
+
// );
|
|
1627
|
+
const paymentURL = validateIntegrationResult.Result.RequestAttributes.find(
|
|
1628
|
+
(attribute) => attribute.Alias === getPaymentURLDTO.PaymentURLAlias
|
|
1629
|
+
);
|
|
1630
|
+
if (paymentURL && paymentURL.Value) {
|
|
1631
|
+
getPaymentURLDTO.MultipleAssets.forEach((asset) => {
|
|
1632
|
+
let assetAttributes = JSON.parse(
|
|
1633
|
+
JSON.stringify(validateIntegrationResult.Result.RequestAttributes)
|
|
1634
|
+
);
|
|
1635
|
+
asset.ParametersValues.forEach((parameter) => {
|
|
1636
|
+
let attribute = assetAttributes.find(
|
|
1637
|
+
(attribute) => attribute.Alias === parameter.Alias
|
|
1638
|
+
);
|
|
1639
|
+
if (attribute) {
|
|
1640
|
+
attribute.Value = parameter.Value;
|
|
1641
|
+
attribute.ExtendedValue = parameter.ExtendedValue;
|
|
1642
|
+
}
|
|
1643
|
+
});
|
|
1644
|
+
DABAddRequest(
|
|
1645
|
+
{
|
|
1646
|
+
ServiceId: serviceID,
|
|
1647
|
+
AssetId: asset.AssetId,
|
|
1648
|
+
ClientRequestAttributeDtos: assetAttributes,
|
|
1649
|
+
},
|
|
1650
|
+
AuthToken,
|
|
1651
|
+
Timeout,
|
|
1652
|
+
RequiredHeaderValue
|
|
1653
|
+
);
|
|
1654
|
+
});
|
|
1655
|
+
|
|
1656
|
+
return {
|
|
1657
|
+
Message: "Success",
|
|
1658
|
+
StatusCode: 200,
|
|
1659
|
+
Result: paymentURL.Value,
|
|
1660
|
+
};
|
|
1661
|
+
} else {
|
|
1662
|
+
return {
|
|
1663
|
+
Message: "Error",
|
|
1664
|
+
StatusCode: -1,
|
|
1665
|
+
Result: {
|
|
1666
|
+
ErrorMessage: "Error fetching Payment URL",
|
|
1667
|
+
ErrorRefNo: "-1",
|
|
1668
|
+
},
|
|
1669
|
+
};
|
|
1670
|
+
}
|
|
1671
|
+
} catch (error) {
|
|
1672
|
+
// Handle errors
|
|
1673
|
+
return {
|
|
1674
|
+
Message: "Error",
|
|
1675
|
+
StatusCode: -1,
|
|
1676
|
+
Result: {
|
|
1677
|
+
ErrorMessage: "Error fetching Payment URL",
|
|
1678
|
+
ErrorRefNo: "-1",
|
|
1679
|
+
},
|
|
1680
|
+
};
|
|
1681
|
+
}
|
|
1682
|
+
}
|
|
1683
|
+
|
|
1458
1684
|
/**
|
|
1459
1685
|
* @description
|
|
1460
1686
|
* Adds a service to the cart.
|
package/src/darAlBerServices.ts
CHANGED
|
@@ -228,7 +228,7 @@ import { GetParametersValueListInput } from "./modals/input-modals/transaction-c
|
|
|
228
228
|
import { AttributeTypeValueOutput } from "./modals/output-modals/transaction-catalog-modals/AttributeTypeValueOutput";
|
|
229
229
|
import { GetServiceSelectorListInput } from "./modals/input-modals/transaction-catalog-modals/GetServiceSelectorList";
|
|
230
230
|
import { CustomSubmitInput } from "./modals/input-modals/transaction-catalog-modals/CustomSubmitInput";
|
|
231
|
-
import { GetPaymentURLInput } from "./modals/input-modals/transaction-catalog-modals/GetPaymentURLInput";
|
|
231
|
+
import { GetPaymentURLInput, GetPaymentURLMultipleAssetsInput } from "./modals/input-modals/transaction-catalog-modals/GetPaymentURLInput";
|
|
232
232
|
import { PaymentInvoiceOutput, DonatorDetailsOutput, PaymentDetailsOutput } from "./modals/output-modals/transaction-catalog-modals/PaymentInvoiceOutput";
|
|
233
233
|
import { LinkedLoginOutput } from "./modals/output-modals/authentications-modals/LinkedLoginOutput";
|
|
234
234
|
// Define each module with its specific functions
|
|
@@ -1588,6 +1588,68 @@ interface DarAlBerServices {
|
|
|
1588
1588
|
RequiredHeaderValue?: string
|
|
1589
1589
|
) => BaseResponse<string | BaseErrorResponse>;
|
|
1590
1590
|
|
|
1591
|
+
/**
|
|
1592
|
+
* @description
|
|
1593
|
+
* Retrieves the payment URL for a service.
|
|
1594
|
+
*
|
|
1595
|
+
* @param {GetPaymentURLMultipleAssetsInput} Input
|
|
1596
|
+
* Data object containing fields necessary for retrieving the payment URL.
|
|
1597
|
+
* ServiceID: number
|
|
1598
|
+
* MultipleAssets: MultipleAssetsInput[]
|
|
1599
|
+
* ServiceAlias?: string
|
|
1600
|
+
* PaymentURLAlias: string
|
|
1601
|
+
*
|
|
1602
|
+
* @param {string} AuthToken
|
|
1603
|
+
* Authentication token for authorization purposes.
|
|
1604
|
+
*
|
|
1605
|
+
* @param {number} Timeout
|
|
1606
|
+
* Time in milliseconds to wait before the request times out. Default is 30000.
|
|
1607
|
+
*
|
|
1608
|
+
* @param {string} RequiredHeaderValue
|
|
1609
|
+
* Value for any required header. Default is null.
|
|
1610
|
+
*
|
|
1611
|
+
* @returns
|
|
1612
|
+
* An object containing the response from the Get Payment URL API,
|
|
1613
|
+
* including success message, status code, and any additional data returned by the API.
|
|
1614
|
+
* Message: Success,
|
|
1615
|
+
* StatusCode: 200,
|
|
1616
|
+
* Result: string (payment URL)
|
|
1617
|
+
*/
|
|
1618
|
+
DABGetPaymentURLMultipleAssets: (
|
|
1619
|
+
Input: GetPaymentURLMultipleAssetsInput,
|
|
1620
|
+
AuthToken?: string | null,
|
|
1621
|
+
Timeout?: number | null,
|
|
1622
|
+
RequiredHeaderValue?: string
|
|
1623
|
+
) => BaseResponse<string | BaseErrorResponse>;
|
|
1624
|
+
|
|
1625
|
+
/**
|
|
1626
|
+
* @description
|
|
1627
|
+
* Adds a request to the cart.
|
|
1628
|
+
*
|
|
1629
|
+
* @param {GetPaymentURLInput} Input
|
|
1630
|
+
* Data object containing fields necessary for adding a request to the cart.
|
|
1631
|
+
* ServiceID: number
|
|
1632
|
+
* AssetId: number
|
|
1633
|
+
* ServiceAlias?: string
|
|
1634
|
+
* ParametersValues: ParametersValues[]
|
|
1635
|
+
*
|
|
1636
|
+
* @param {string} AuthToken
|
|
1637
|
+
* Authentication token for authorization purposes.
|
|
1638
|
+
*
|
|
1639
|
+
* @param {number} Timeout
|
|
1640
|
+
* Time in milliseconds to wait before the request times out. Default is 30000.
|
|
1641
|
+
*
|
|
1642
|
+
* @param {string} RequiredHeaderValue
|
|
1643
|
+
* Value for any required header. Default is null.
|
|
1644
|
+
*
|
|
1645
|
+
* @returns
|
|
1646
|
+
* An object containing the response from the Add Request API,
|
|
1647
|
+
* including success message, status code, and any additional data returned by the API.
|
|
1648
|
+
* Message: Success,
|
|
1649
|
+
* StatusCode: 200,
|
|
1650
|
+
* Result: AddRequestOutput
|
|
1651
|
+
* HeaderValue: string
|
|
1652
|
+
*/
|
|
1591
1653
|
DABAddToCart: (
|
|
1592
1654
|
Input: GetPaymentURLInput,
|
|
1593
1655
|
AuthToken?: string | null,
|
package/src/index.d.ts
CHANGED
|
@@ -248,7 +248,7 @@ import { GetParametersValueListInput } from "./modals/input-modals/transaction-c
|
|
|
248
248
|
import { GetServiceSelectorListInput } from "./modals/input-modals/transaction-catalog-modals/GetServiceSelectorList";
|
|
249
249
|
import { CustomSubmitInput } from "./modals/input-modals/transaction-catalog-modals/CustomSubmitInput";
|
|
250
250
|
import { ParametersValues } from "./modals/input-modals/transaction-catalog-modals/ParametersValues";
|
|
251
|
-
import { GetPaymentURLInput } from "./modals/input-modals/transaction-catalog-modals/GetPaymentURLInput";
|
|
251
|
+
import { GetPaymentURLInput, GetPaymentURLMultipleAssetsInput, MultipleAssetsInput } from "./modals/input-modals/transaction-catalog-modals/GetPaymentURLInput";
|
|
252
252
|
import { GetAssetListwithParamsInput } from "./modals/input-modals/transaction-catalog-modals/GetAssetListwithParamsInput";
|
|
253
253
|
import {
|
|
254
254
|
PaymentInvoiceOutput,
|
|
@@ -1658,6 +1658,40 @@ interface TransactionRequesterServices {
|
|
|
1658
1658
|
RequiredHeaderValue?: string
|
|
1659
1659
|
) => BaseResponse<string | BaseErrorResponse>;
|
|
1660
1660
|
|
|
1661
|
+
/**
|
|
1662
|
+
* @description
|
|
1663
|
+
* Retrieves the payment URL for a service.
|
|
1664
|
+
*
|
|
1665
|
+
* @param {GetPaymentURLMultipleAssetsInput} Input
|
|
1666
|
+
* Data object containing fields necessary for retrieving the payment URL.
|
|
1667
|
+
* ServiceID: number
|
|
1668
|
+
* MultipleAssets: MultipleAssetsInput[]
|
|
1669
|
+
* ServiceAlias?: string
|
|
1670
|
+
* PaymentURLAlias: string
|
|
1671
|
+
*
|
|
1672
|
+
* @param {string} AuthToken
|
|
1673
|
+
* Authentication token for authorization purposes.
|
|
1674
|
+
*
|
|
1675
|
+
* @param {number} Timeout
|
|
1676
|
+
* Time in milliseconds to wait before the request times out. Default is 30000.
|
|
1677
|
+
*
|
|
1678
|
+
* @param {string} RequiredHeaderValue
|
|
1679
|
+
* Value for any required header. Default is null.
|
|
1680
|
+
*
|
|
1681
|
+
* @returns
|
|
1682
|
+
* An object containing the response from the Get Payment URL API,
|
|
1683
|
+
* including success message, status code, and any additional data returned by the API.
|
|
1684
|
+
* Message: Success,
|
|
1685
|
+
* StatusCode: 200,
|
|
1686
|
+
* Result: string (payment URL)
|
|
1687
|
+
*/
|
|
1688
|
+
GetPaymentURLMultipleAssets: (
|
|
1689
|
+
Input: GetPaymentURLMultipleAssetsInput,
|
|
1690
|
+
AuthToken?: string | null,
|
|
1691
|
+
Timeout?: number | null,
|
|
1692
|
+
RequiredHeaderValue?: string
|
|
1693
|
+
) => BaseResponse<string | BaseErrorResponse>;
|
|
1694
|
+
|
|
1661
1695
|
/**
|
|
1662
1696
|
* @description
|
|
1663
1697
|
* Fetches the payment invoice for a given invoice ID.
|
|
@@ -7826,4 +7860,6 @@ export {
|
|
|
7826
7860
|
GenerateChildDocumentsOutput,
|
|
7827
7861
|
RequesterAddBatchRequestInput,
|
|
7828
7862
|
UpdateRequestStepAttributesInput,
|
|
7863
|
+
GetPaymentURLMultipleAssetsInput,
|
|
7864
|
+
MultipleAssetsInput,
|
|
7829
7865
|
};
|
package/src/index.js
CHANGED
|
@@ -120,6 +120,7 @@ const {
|
|
|
120
120
|
CustomRegistration,
|
|
121
121
|
CustomSubmit,
|
|
122
122
|
GetPaymentURL,
|
|
123
|
+
GetPaymentURLMultipleAssets,
|
|
123
124
|
GetInvoiceDetails,
|
|
124
125
|
ValidateAttributesWithIntegration,
|
|
125
126
|
GetPaymentBatch,
|
|
@@ -163,6 +164,7 @@ const TransactionRequesterServices = {
|
|
|
163
164
|
CustomRegistration,
|
|
164
165
|
CustomSubmit,
|
|
165
166
|
GetPaymentURL,
|
|
167
|
+
GetPaymentURLMultipleAssets,
|
|
166
168
|
ValidateAttributesWithIntegration,
|
|
167
169
|
GetPaymentBatch,
|
|
168
170
|
GetInvoiceDetails,
|
|
@@ -583,6 +585,7 @@ const {
|
|
|
583
585
|
DABCustomRegistration,
|
|
584
586
|
DABCustomSubmit,
|
|
585
587
|
DABGetPaymentURL,
|
|
588
|
+
DABGetPaymentURLMultipleAssets,
|
|
586
589
|
DABValidateAttributesWithIntegration,
|
|
587
590
|
DABGetPaymentBatch,
|
|
588
591
|
DABGetInvoiceDetails,
|
|
@@ -827,6 +830,7 @@ const DarAlBerServices = {
|
|
|
827
830
|
DABCustomRegistration,
|
|
828
831
|
DABCustomSubmit,
|
|
829
832
|
DABGetPaymentURL,
|
|
833
|
+
DABGetPaymentURLMultipleAssets,
|
|
830
834
|
DABValidateAttributesWithIntegration,
|
|
831
835
|
DABGetPaymentBatch,
|
|
832
836
|
DABGetInvoiceDetails,
|
|
@@ -6,4 +6,17 @@ export interface GetPaymentURLInput {
|
|
|
6
6
|
ServiceAlias?: string;
|
|
7
7
|
ParametersValues: ParametersValues[];
|
|
8
8
|
PaymentURLAlias: string;
|
|
9
|
-
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
export interface GetPaymentURLMultipleAssetsInput {
|
|
13
|
+
ServiceID: number;
|
|
14
|
+
MultipleAssets: MultipleAssetsInput[];
|
|
15
|
+
ServiceAlias?: string;
|
|
16
|
+
PaymentURLAlias: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface MultipleAssetsInput {
|
|
20
|
+
AssetId: number;
|
|
21
|
+
ParametersValues: ParametersValues[];
|
|
22
|
+
}
|