@houlak/plexo-sdk 0.1.3 → 0.1.4-h
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/lib/handler/PlexoHandler.d.ts +17 -7
- package/lib/handler/PlexoHandler.js +168 -15
- package/lib/index.d.ts +1 -0
- package/lib/index.js +4 -1
- package/lib/lib/logger.lib.d.ts +1 -6
- package/lib/lib/logger.lib.js +10 -6
- package/lib/sdk/IPaymentGatewayClient.d.ts +2 -2
- package/lib/sdk/PaymentGatewayClient.d.ts +2 -2
- package/lib/sdk/PaymentGatewayClient.js +9 -8
- package/lib/sdk/PaymentGatewayMock.d.ts +2 -2
- package/lib/sdk/PaymentGatewayMock.js +2 -8
- package/lib/sdk/enums/plexo-error-enum.d.ts +1 -0
- package/lib/sdk/enums/plexo-error-enum.js +1 -0
- package/lib/sdk/helpers/signature/signatureHelper.d.ts +3 -7
- package/lib/sdk/helpers/signature/signatureHelper.js +65 -195
- package/lib/sdk/helpers/signature/signatureUtils.d.ts +10 -0
- package/lib/{helpers/signature/signatureHelper.js → sdk/helpers/signature/signatureUtils.js} +50 -66
- package/lib/sdk/helpers/signature/stringifyWithFloats.js +2 -0
- package/lib/sdk/models/Authorization.d.ts +4 -5
- package/lib/sdk/models/Authorization.js +2 -1
- package/lib/sdk/models/BuiltInPagesOptions.d.ts +5 -0
- package/lib/sdk/models/BuiltInPagesOptions.js +11 -0
- package/lib/sdk/models/DisplayOptions.d.ts +8 -0
- package/lib/sdk/models/DisplayOptions.js +14 -0
- package/lib/sdk/models/ExpressCheckoutSettings.d.ts +7 -0
- package/lib/{models/ExpressCheckoutSettingsDto.js → sdk/models/ExpressCheckoutSettings.js} +3 -1
- package/lib/sdk/models/FieldType.d.ts +23 -14
- package/lib/sdk/models/FieldType.js +23 -14
- package/lib/sdk/models/IndexSDK.d.ts +8 -6
- package/lib/sdk/models/IndexSDK.js +16 -14
- package/lib/sdk/models/IssuerData.d.ts +2 -0
- package/lib/sdk/models/TokenizationSettings.d.ts +5 -0
- package/lib/sdk/models/TokenizationSettings.js +10 -0
- package/lib/sdk/models/TransactionsCSV.d.ts +3 -0
- package/lib/sdk/models/{UIOptionsDto.d.ts → UIOptions.d.ts} +2 -2
- package/lib/{models/UIOptionsDto.js → sdk/models/UIOptions.js} +5 -5
- package/lib/sdk/models/WebFormSettings.d.ts +9 -0
- package/lib/sdk/models/WebFormSettings.js +12 -0
- package/lib/sdk/models/webhook/Address.d.ts +9 -0
- package/lib/sdk/models/webhook/Address.js +15 -0
- package/lib/sdk/models/webhook/CancellationInfo.d.ts +11 -0
- package/lib/sdk/models/webhook/CancellationInfo.js +17 -0
- package/lib/sdk/models/webhook/Client.d.ts +9 -0
- package/lib/sdk/models/webhook/Client.js +14 -0
- package/lib/sdk/models/webhook/Commerce.d.ts +6 -0
- package/lib/sdk/models/webhook/Commerce.js +12 -0
- package/lib/sdk/models/webhook/Currency.d.ts +8 -0
- package/lib/sdk/models/webhook/Currency.js +14 -0
- package/lib/sdk/models/webhook/Customer.d.ts +17 -0
- package/lib/sdk/models/webhook/Customer.js +22 -0
- package/lib/sdk/models/webhook/Document.d.ts +5 -0
- package/lib/sdk/models/webhook/Document.js +11 -0
- package/lib/sdk/models/webhook/Instrument.d.ts +17 -0
- package/lib/sdk/models/webhook/Instrument.js +21 -0
- package/lib/sdk/models/webhook/Issuer.d.ts +8 -0
- package/lib/sdk/models/webhook/Issuer.js +14 -0
- package/lib/sdk/models/webhook/IssuerData.d.ts +8 -0
- package/lib/sdk/models/webhook/IssuerData.js +13 -0
- package/lib/sdk/models/webhook/IssuerDto.d.ts +5 -0
- package/lib/sdk/models/webhook/IssuerDto.js +11 -0
- package/lib/sdk/models/webhook/Item.d.ts +14 -0
- package/lib/sdk/models/webhook/Item.js +19 -0
- package/lib/sdk/models/webhook/PartialRefundsInfo.d.ts +12 -0
- package/lib/sdk/models/webhook/PartialRefundsInfo.js +18 -0
- package/lib/sdk/models/webhook/PaymentFacilitator.d.ts +8 -0
- package/lib/sdk/models/webhook/PaymentFacilitator.js +13 -0
- package/lib/sdk/models/webhook/PaymentProcessor.d.ts +5 -0
- package/lib/{models → sdk/models/webhook}/PaymentProcessor.js +2 -2
- package/lib/sdk/models/webhook/PurchaseInfo.d.ts +16 -0
- package/lib/sdk/models/webhook/PurchaseInfo.js +22 -0
- package/lib/sdk/models/webhook/RefundInfo.d.ts +12 -0
- package/lib/sdk/models/webhook/RefundInfo.js +18 -0
- package/lib/sdk/models/webhook/ReserveInfo.d.ts +13 -0
- package/lib/sdk/models/webhook/ReserveInfo.js +19 -0
- package/lib/sdk/models/webhook/Shipping.d.ts +7 -0
- package/lib/sdk/models/webhook/Shipping.js +12 -0
- package/lib/sdk/models/webhook/Transaction.d.ts +31 -0
- package/lib/sdk/models/webhook/Transaction.js +36 -0
- package/lib/sdk/models/webhook/TransactionResult.d.ts +5 -0
- package/lib/sdk/models/webhook/TransactionResult.js +10 -0
- package/lib/sdk/models/webhook/index.d.ts +21 -0
- package/lib/sdk/models/webhook/index.js +45 -0
- package/lib/utils/boolean.utils.d.ts +4 -0
- package/lib/utils/boolean.utils.js +53 -0
- package/lib/utils/case.util.d.ts +4 -0
- package/lib/utils/case.util.js +61 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +5 -0
- package/package.json +3 -3
- package/lib/IPaymentGatewayClient.d.ts +0 -31
- package/lib/PaymentGatewayClient.d.ts +0 -33
- package/lib/PaymentGatewayClient.js +0 -179
- package/lib/helpers/signature/signatureHelper.d.ts +0 -5
- package/lib/models/ActionType.d.ts +0 -9
- package/lib/models/ActionType.js +0 -13
- package/lib/models/AmountLimit.d.ts +0 -7
- package/lib/models/AmountLimit.js +0 -2
- package/lib/models/Authorization.d.ts +0 -16
- package/lib/models/Authorization.js +0 -32
- package/lib/models/AuthorizationInfo.d.ts +0 -6
- package/lib/models/AuthorizationInfo.js +0 -11
- package/lib/models/AuthorizationType.d.ts +0 -5
- package/lib/models/AuthorizationType.js +0 -9
- package/lib/models/BaseServerResponse.d.ts +0 -7
- package/lib/models/BaseServerResponse.js +0 -12
- package/lib/models/BuiltInPagesOptionsDto.d.ts +0 -4
- package/lib/models/BuiltInPagesOptionsDto.js +0 -9
- package/lib/models/CancelRequest.d.ts +0 -6
- package/lib/models/CancelRequest.js +0 -29
- package/lib/models/CardStatus.d.ts +0 -7
- package/lib/models/CardStatus.js +0 -11
- package/lib/models/CardTypes.d.ts +0 -9
- package/lib/models/CardTypes.js +0 -13
- package/lib/models/CertificateHelper.d.ts +0 -0
- package/lib/models/CertificateHelper.js +0 -152
- package/lib/models/CertificateHelperFactory.js +0 -12
- package/lib/models/ClientRequest.d.ts +0 -4
- package/lib/models/ClientRequest.js +0 -10
- package/lib/models/ClientResponse.d.ts +0 -6
- package/lib/models/ClientResponse.js +0 -29
- package/lib/models/ClientSignedRequest.d.ts +0 -4
- package/lib/models/ClientSignedRequest.js +0 -27
- package/lib/models/ClientSignedResponse.d.ts +0 -4
- package/lib/models/ClientSignedResponse.js +0 -27
- package/lib/models/CodeAction.d.ts +0 -10
- package/lib/models/CodeAction.js +0 -10
- package/lib/models/CodeRequest.d.ts +0 -5
- package/lib/models/CodeRequest.js +0 -2
- package/lib/models/Commerce.d.ts +0 -4
- package/lib/models/Commerce.js +0 -2
- package/lib/models/CommerceIdRequest.d.ts +0 -3
- package/lib/models/CommerceIdRequest.js +0 -2
- package/lib/models/CommerceIssuerIdRequest.d.ts +0 -4
- package/lib/models/CommerceIssuerIdRequest.js +0 -2
- package/lib/models/CommerceModifyRequest.d.ts +0 -4
- package/lib/models/CommerceModifyRequest.js +0 -2
- package/lib/models/CommerceRequest.d.ts +0 -3
- package/lib/models/CommerceRequest.js +0 -2
- package/lib/models/CreateBankInstrumentRequest.d.ts +0 -6
- package/lib/models/CreateBankInstrumentRequest.js +0 -2
- package/lib/models/Currency.d.ts +0 -6
- package/lib/models/Currency.js +0 -2
- package/lib/models/DeleteInstrumentRequest.d.ts +0 -6
- package/lib/models/DeleteInstrumentRequest.js +0 -29
- package/lib/models/DisplayOptionsDto.d.ts +0 -7
- package/lib/models/DisplayOptionsDto.js +0 -9
- package/lib/models/ExpressCheckoutRequest.d.ts +0 -6
- package/lib/models/ExpressCheckoutRequest.js +0 -2
- package/lib/models/ExpressCheckoutSettingsDto.d.ts +0 -6
- package/lib/models/ExtendedCredit.d.ts +0 -4
- package/lib/models/ExtendedCredit.js +0 -2
- package/lib/models/FieldInfo.d.ts +0 -6
- package/lib/models/FieldInfo.js +0 -2
- package/lib/models/FieldInfoPaymentProcessors.d.ts +0 -6
- package/lib/models/FieldInfoPaymentProcessors.js +0 -11
- package/lib/models/FieldType.d.ts +0 -76
- package/lib/models/FieldType.js +0 -89
- package/lib/models/FinancialInclusion.d.ts +0 -8
- package/lib/models/FinancialInclusion.js +0 -2
- package/lib/models/FinancialInclusionResult.d.ts +0 -6
- package/lib/models/FinancialInclusionResult.js +0 -2
- package/lib/models/GenericClientRequest.d.ts +0 -5
- package/lib/models/GenericClientRequest.js +0 -29
- package/lib/models/GenericClientSignedRequest.d.ts +0 -4
- package/lib/models/GenericClientSignedRequest.js +0 -27
- package/lib/models/GenericIssuerRequest.d.ts +0 -5
- package/lib/models/GenericIssuerRequest.js +0 -29
- package/lib/models/GenericIssuerSignedRequest.d.ts +0 -4
- package/lib/models/GenericIssuerSignedRequest.js +0 -27
- package/lib/models/GenericServerSignedResponse.d.ts +0 -4
- package/lib/models/GenericServerSignedResponse.js +0 -27
- package/lib/models/GenericSignedObject.d.ts +0 -6
- package/lib/models/GenericSignedObject.js +0 -11
- package/lib/models/GenericStateObject.d.ts +0 -5
- package/lib/models/GenericStateObject.js +0 -29
- package/lib/models/IClientCallback.d.ts +0 -3
- package/lib/models/IClientCallback.js +0 -2
- package/lib/models/IdentificationType.d.ts +0 -6
- package/lib/models/IdentificationType.js +0 -10
- package/lib/models/InclusionType.d.ts +0 -5
- package/lib/models/InclusionType.js +0 -9
- package/lib/models/IndexSDK.d.ts +0 -33
- package/lib/models/IndexSDK.js +0 -39
- package/lib/models/InfoLine.d.ts +0 -4
- package/lib/models/InfoLine.js +0 -2
- package/lib/models/InstrumentCallback.d.ts +0 -9
- package/lib/models/InstrumentCallback.js +0 -31
- package/lib/models/InstrumentWithMetadata.d.ts +0 -6
- package/lib/models/InstrumentWithMetadata.js +0 -11
- package/lib/models/IssuerData.d.ts +0 -5
- package/lib/models/IssuerData.js +0 -2
- package/lib/models/IssuerInfo.d.ts +0 -14
- package/lib/models/IssuerInfo.js +0 -2
- package/lib/models/IssuerProcessor.d.ts +0 -7
- package/lib/models/IssuerProcessor.js +0 -12
- package/lib/models/IssuerRequest.d.ts +0 -4
- package/lib/models/IssuerRequest.js +0 -10
- package/lib/models/IssuerSignedRequest.d.ts +0 -4
- package/lib/models/IssuerSignedRequest.js +0 -27
- package/lib/models/Item.d.ts +0 -8
- package/lib/models/Item.js +0 -2
- package/lib/models/PaymentInstrument.d.ts +0 -20
- package/lib/models/PaymentInstrument.js +0 -2
- package/lib/models/PaymentInstrumentInput.d.ts +0 -6
- package/lib/models/PaymentInstrumentInput.js +0 -2
- package/lib/models/PaymentProcessor.d.ts +0 -6
- package/lib/models/PaymentRequest.d.ts +0 -17
- package/lib/models/PaymentRequest.js +0 -20
- package/lib/models/PlexoSdkSettings.d.ts +0 -8
- package/lib/models/PlexoSdkSettings.js +0 -14
- package/lib/models/PublicKeyInfo.d.ts +0 -4
- package/lib/models/PublicKeyInfo.js +0 -2
- package/lib/models/Reference.d.ts +0 -6
- package/lib/models/Reference.js +0 -11
- package/lib/models/ReferenceType.d.ts +0 -6
- package/lib/models/ReferenceType.js +0 -10
- package/lib/models/Reserve.d.ts +0 -6
- package/lib/models/Reserve.js +0 -29
- package/lib/models/ReserveRequest.d.ts +0 -6
- package/lib/models/ReserveRequest.js +0 -29
- package/lib/models/ResultCodes.d.ts +0 -30
- package/lib/models/ResultCodes.js +0 -35
- package/lib/models/ServerResponse.d.ts +0 -6
- package/lib/models/ServerResponse.js +0 -29
- package/lib/models/ServerSignedCallback.d.ts +0 -3
- package/lib/models/ServerSignedCallback.js +0 -27
- package/lib/models/ServerSignedRequest.d.ts +0 -3
- package/lib/models/ServerSignedRequest.js +0 -27
- package/lib/models/ServerSignedResponse.d.ts +0 -4
- package/lib/models/ServerSignedResponse.js +0 -27
- package/lib/models/Session.d.ts +0 -5
- package/lib/models/Session.js +0 -2
- package/lib/models/Settings.d.ts +0 -11
- package/lib/models/Settings.js +0 -19
- package/lib/models/SignedObject.d.ts +0 -6
- package/lib/models/SignedObject.js +0 -11
- package/lib/models/StateObject.d.ts +0 -5
- package/lib/models/StateObject.js +0 -11
- package/lib/models/TimeLimit.d.ts +0 -5
- package/lib/models/TimeLimit.js +0 -2
- package/lib/models/TokenizationSettingsDto.d.ts +0 -4
- package/lib/models/TokenizationSettingsDto.js +0 -9
- package/lib/models/Transaction.d.ts +0 -26
- package/lib/models/Transaction.js +0 -26
- package/lib/models/TransactionCallback.d.ts +0 -7
- package/lib/models/TransactionCallback.js +0 -29
- package/lib/models/TransactionCursor.d.ts +0 -6
- package/lib/models/TransactionCursor.js +0 -2
- package/lib/models/TransactionInfo.d.ts +0 -12
- package/lib/models/TransactionInfo.js +0 -2
- package/lib/models/TransactionOrder.d.ts +0 -5
- package/lib/models/TransactionOrder.js +0 -2
- package/lib/models/TransactionQuery.d.ts +0 -54
- package/lib/models/TransactionQuery.js +0 -47
- package/lib/models/TransactionResult.d.ts +0 -13
- package/lib/models/TransactionResult.js +0 -17
- package/lib/models/TransactionType.d.ts +0 -5
- package/lib/models/TransactionType.js +0 -9
- package/lib/models/UIOptionsDto.d.ts +0 -7
- package/lib/models/WebFormSettingsDto.d.ts +0 -8
- package/lib/models/WebFormSettingsDto.js +0 -9
- package/lib/sdk/models/BuiltInPagesOptionsDto.d.ts +0 -4
- package/lib/sdk/models/BuiltInPagesOptionsDto.js +0 -9
- package/lib/sdk/models/DisplayOptionsDto.d.ts +0 -7
- package/lib/sdk/models/DisplayOptionsDto.js +0 -9
- package/lib/sdk/models/ExpressCheckoutSettingsDto.d.ts +0 -6
- package/lib/sdk/models/ExpressCheckoutSettingsDto.js +0 -9
- package/lib/sdk/models/TokenizationSettingsDto.d.ts +0 -4
- package/lib/sdk/models/TokenizationSettingsDto.js +0 -9
- package/lib/sdk/models/UIOptionsDto.js +0 -13
- package/lib/sdk/models/WebFormSettingsDto.d.ts +0 -8
- package/lib/sdk/models/WebFormSettingsDto.js +0 -9
- /package/lib/{IPaymentGatewayClient.js → sdk/models/TransactionsCSV.js} +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Item = void 0;
|
|
4
|
+
var Item = /** @class */ (function () {
|
|
5
|
+
function Item(id, transactionId, externalId, amount, name, description, quantity, metadata, creationDate, currency) {
|
|
6
|
+
this.id = id;
|
|
7
|
+
this.transactionId = transactionId;
|
|
8
|
+
this.externalId = externalId;
|
|
9
|
+
this.amount = amount;
|
|
10
|
+
this.name = name;
|
|
11
|
+
this.description = description;
|
|
12
|
+
this.quantity = quantity;
|
|
13
|
+
this.metadata = metadata;
|
|
14
|
+
this.creationDate = creationDate;
|
|
15
|
+
this.currency = currency;
|
|
16
|
+
}
|
|
17
|
+
return Item;
|
|
18
|
+
}());
|
|
19
|
+
exports.Item = Item;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class PartialRefundsInfo {
|
|
2
|
+
amount: number;
|
|
3
|
+
status: number;
|
|
4
|
+
externalId: string;
|
|
5
|
+
transactionCode: number;
|
|
6
|
+
resultText: string;
|
|
7
|
+
executionDate: Date;
|
|
8
|
+
authorization: string;
|
|
9
|
+
metadata: string;
|
|
10
|
+
ticket: string;
|
|
11
|
+
constructor(amount: number, status: number, externalId: string, transactionCode: number, resultText: string, executionDate: Date, authorization: string, metadata: string, ticket: string);
|
|
12
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PartialRefundsInfo = void 0;
|
|
4
|
+
var PartialRefundsInfo = /** @class */ (function () {
|
|
5
|
+
function PartialRefundsInfo(amount, status, externalId, transactionCode, resultText, executionDate, authorization, metadata, ticket) {
|
|
6
|
+
this.amount = amount;
|
|
7
|
+
this.status = status;
|
|
8
|
+
this.externalId = externalId;
|
|
9
|
+
this.transactionCode = transactionCode;
|
|
10
|
+
this.resultText = resultText;
|
|
11
|
+
this.executionDate = executionDate;
|
|
12
|
+
this.authorization = authorization;
|
|
13
|
+
this.metadata = metadata;
|
|
14
|
+
this.ticket = ticket;
|
|
15
|
+
}
|
|
16
|
+
return PartialRefundsInfo;
|
|
17
|
+
}());
|
|
18
|
+
exports.PartialRefundsInfo = PartialRefundsInfo;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PaymentFacilitator = void 0;
|
|
4
|
+
var PaymentFacilitator = /** @class */ (function () {
|
|
5
|
+
function PaymentFacilitator(id, name, clientId, client) {
|
|
6
|
+
this.id = id;
|
|
7
|
+
this.name = name;
|
|
8
|
+
this.clientId = clientId;
|
|
9
|
+
this.client = client;
|
|
10
|
+
}
|
|
11
|
+
return PaymentFacilitator;
|
|
12
|
+
}());
|
|
13
|
+
exports.PaymentFacilitator = PaymentFacilitator;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PaymentProcessor = void 0;
|
|
4
4
|
var PaymentProcessor = /** @class */ (function () {
|
|
5
|
-
function PaymentProcessor(
|
|
5
|
+
function PaymentProcessor(id, acquirer) {
|
|
6
|
+
this.id = id;
|
|
6
7
|
this.acquirer = acquirer;
|
|
7
|
-
this.fields = fields;
|
|
8
8
|
}
|
|
9
9
|
return PaymentProcessor;
|
|
10
10
|
}());
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare class PurchaseInfo {
|
|
2
|
+
externalId: string;
|
|
3
|
+
resultText: string;
|
|
4
|
+
authorization: string;
|
|
5
|
+
ticket: string;
|
|
6
|
+
metadata: string;
|
|
7
|
+
appliedLaw: number;
|
|
8
|
+
discount: number;
|
|
9
|
+
taxAmount?: number;
|
|
10
|
+
commitFinalAmount?: number;
|
|
11
|
+
status?: number;
|
|
12
|
+
executionDate?: Date;
|
|
13
|
+
expirationDate?: Date;
|
|
14
|
+
transactionCode?: number;
|
|
15
|
+
constructor(externalId: string, resultText: string, authorization: string, ticket: string, metadata: string, appliedLaw: number, discount: number, taxAmount: number, commitFinalAmount: number, status: number, executionDate: Date, expirationDate: Date, transactionCode: number);
|
|
16
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PurchaseInfo = void 0;
|
|
4
|
+
var PurchaseInfo = /** @class */ (function () {
|
|
5
|
+
function PurchaseInfo(externalId, resultText, authorization, ticket, metadata, appliedLaw, discount, taxAmount, commitFinalAmount, status, executionDate, expirationDate, transactionCode) {
|
|
6
|
+
this.externalId = externalId;
|
|
7
|
+
this.resultText = resultText;
|
|
8
|
+
this.authorization = authorization;
|
|
9
|
+
this.ticket = ticket;
|
|
10
|
+
this.metadata = metadata;
|
|
11
|
+
this.appliedLaw = appliedLaw;
|
|
12
|
+
this.discount = discount;
|
|
13
|
+
this.taxAmount = taxAmount;
|
|
14
|
+
this.commitFinalAmount = commitFinalAmount;
|
|
15
|
+
this.status = status;
|
|
16
|
+
this.executionDate = executionDate;
|
|
17
|
+
this.expirationDate = expirationDate;
|
|
18
|
+
this.transactionCode = transactionCode;
|
|
19
|
+
}
|
|
20
|
+
return PurchaseInfo;
|
|
21
|
+
}());
|
|
22
|
+
exports.PurchaseInfo = PurchaseInfo;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class RefundInfo {
|
|
2
|
+
amount?: number;
|
|
3
|
+
status?: number;
|
|
4
|
+
externalId: string;
|
|
5
|
+
transactionCode?: number;
|
|
6
|
+
resultText: string;
|
|
7
|
+
executionDate?: Date;
|
|
8
|
+
authorization: string;
|
|
9
|
+
metadata: string;
|
|
10
|
+
ticket: string;
|
|
11
|
+
constructor(amount: number, status: number, externalId: string, transactionCode: number, resultText: string, executionDate: Date, authorization: string, metadata: string, ticket: string);
|
|
12
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RefundInfo = void 0;
|
|
4
|
+
var RefundInfo = /** @class */ (function () {
|
|
5
|
+
function RefundInfo(amount, status, externalId, transactionCode, resultText, executionDate, authorization, metadata, ticket) {
|
|
6
|
+
this.amount = amount;
|
|
7
|
+
this.status = status;
|
|
8
|
+
this.externalId = externalId;
|
|
9
|
+
this.transactionCode = transactionCode;
|
|
10
|
+
this.resultText = resultText;
|
|
11
|
+
this.executionDate = executionDate;
|
|
12
|
+
this.authorization = authorization;
|
|
13
|
+
this.metadata = metadata;
|
|
14
|
+
this.ticket = ticket;
|
|
15
|
+
}
|
|
16
|
+
return RefundInfo;
|
|
17
|
+
}());
|
|
18
|
+
exports.RefundInfo = RefundInfo;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare class ReserveInfo {
|
|
2
|
+
externalId: string;
|
|
3
|
+
status?: number;
|
|
4
|
+
executionDate?: Date;
|
|
5
|
+
expirationDate?: Date;
|
|
6
|
+
transactionCode?: number;
|
|
7
|
+
resultText: string;
|
|
8
|
+
authorization: string;
|
|
9
|
+
ticket: string;
|
|
10
|
+
metadata: string;
|
|
11
|
+
taxAmount?: number;
|
|
12
|
+
constructor(externalId: string, status: number, executionDate: Date, expirationDate: Date, transactionCode: number, resultText: string, authorization: string, ticket: string, metadata: string, taxAmount: number);
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReserveInfo = void 0;
|
|
4
|
+
var ReserveInfo = /** @class */ (function () {
|
|
5
|
+
function ReserveInfo(externalId, status, executionDate, expirationDate, transactionCode, resultText, authorization, ticket, metadata, taxAmount) {
|
|
6
|
+
this.externalId = externalId;
|
|
7
|
+
this.status = status;
|
|
8
|
+
this.executionDate = executionDate;
|
|
9
|
+
this.expirationDate = expirationDate;
|
|
10
|
+
this.transactionCode = transactionCode;
|
|
11
|
+
this.resultText = resultText;
|
|
12
|
+
this.authorization = authorization;
|
|
13
|
+
this.ticket = ticket;
|
|
14
|
+
this.metadata = metadata;
|
|
15
|
+
this.taxAmount = taxAmount;
|
|
16
|
+
}
|
|
17
|
+
return ReserveInfo;
|
|
18
|
+
}());
|
|
19
|
+
exports.ReserveInfo = ReserveInfo;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Shipping = void 0;
|
|
4
|
+
var Shipping = /** @class */ (function () {
|
|
5
|
+
function Shipping(address, name, phone) {
|
|
6
|
+
this.address = address;
|
|
7
|
+
this.name = name;
|
|
8
|
+
this.phone = phone;
|
|
9
|
+
}
|
|
10
|
+
return Shipping;
|
|
11
|
+
}());
|
|
12
|
+
exports.Shipping = Shipping;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { CancellationInfo, Client, Currency, Customer, Instrument, Item, PaymentFacilitator, PaymentProcessor, PurchaseInfo, RefundInfo, ReserveInfo } from '.';
|
|
2
|
+
export declare class Transaction {
|
|
3
|
+
id: string;
|
|
4
|
+
batchId?: number;
|
|
5
|
+
externalId: string;
|
|
6
|
+
invoiceNumber: string;
|
|
7
|
+
creationDate: Date;
|
|
8
|
+
expiration?: Date;
|
|
9
|
+
metadata: string;
|
|
10
|
+
state: number;
|
|
11
|
+
amount: number;
|
|
12
|
+
installments?: number;
|
|
13
|
+
taxedAmount: number;
|
|
14
|
+
tipAmount: number;
|
|
15
|
+
billedAmount: number;
|
|
16
|
+
loyaltyProgramAmount?: number;
|
|
17
|
+
law: number;
|
|
18
|
+
client: Client;
|
|
19
|
+
instrument: Instrument;
|
|
20
|
+
currency: Currency;
|
|
21
|
+
purchaseInfo?: PurchaseInfo;
|
|
22
|
+
cancellationInfo?: CancellationInfo;
|
|
23
|
+
refundInfo?: RefundInfo;
|
|
24
|
+
reserveInfo?: ReserveInfo;
|
|
25
|
+
partialRefundsInfo?: RefundInfo[];
|
|
26
|
+
items: Item[];
|
|
27
|
+
customer: Customer;
|
|
28
|
+
paymentProcessor: PaymentProcessor;
|
|
29
|
+
paymentFacilitator: PaymentFacilitator;
|
|
30
|
+
constructor(id: string, externalId: string, invoiceNumber: string, creationDate: Date, metadata: string, state: number, amount: number, taxedAmount: number, tipAmount: number, billedAmount: number, law: number, client: Client, instrument: Instrument, currency: Currency, items: Item[], customer: Customer, paymentProcessor: PaymentProcessor, paymentFacilitator: PaymentFacilitator, loyaltyProgramAmount?: number, installments?: number, expiration?: Date, batchId?: number, purchaseInfo?: PurchaseInfo, cancellationInfo?: CancellationInfo, refundInfo?: RefundInfo, reserveInfo?: ReserveInfo, partialRefundsInfo?: RefundInfo[]);
|
|
31
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Transaction = void 0;
|
|
4
|
+
var Transaction = /** @class */ (function () {
|
|
5
|
+
function Transaction(id, externalId, invoiceNumber, creationDate, metadata, state, amount, taxedAmount, tipAmount, billedAmount, law, client, instrument, currency, items, customer, paymentProcessor, paymentFacilitator, loyaltyProgramAmount, installments, expiration, batchId, purchaseInfo, cancellationInfo, refundInfo, reserveInfo, partialRefundsInfo) {
|
|
6
|
+
this.id = id;
|
|
7
|
+
this.batchId = batchId;
|
|
8
|
+
this.externalId = externalId;
|
|
9
|
+
this.invoiceNumber = invoiceNumber;
|
|
10
|
+
this.creationDate = creationDate;
|
|
11
|
+
this.expiration = expiration;
|
|
12
|
+
this.metadata = metadata;
|
|
13
|
+
this.state = state;
|
|
14
|
+
this.amount = amount;
|
|
15
|
+
this.installments = installments;
|
|
16
|
+
this.taxedAmount = taxedAmount;
|
|
17
|
+
this.tipAmount = tipAmount;
|
|
18
|
+
this.billedAmount = billedAmount;
|
|
19
|
+
this.loyaltyProgramAmount = loyaltyProgramAmount;
|
|
20
|
+
this.law = law;
|
|
21
|
+
this.client = client;
|
|
22
|
+
this.instrument = instrument;
|
|
23
|
+
this.currency = currency;
|
|
24
|
+
this.purchaseInfo = purchaseInfo;
|
|
25
|
+
this.cancellationInfo = cancellationInfo;
|
|
26
|
+
this.refundInfo = refundInfo;
|
|
27
|
+
this.reserveInfo = reserveInfo;
|
|
28
|
+
this.partialRefundsInfo = partialRefundsInfo;
|
|
29
|
+
this.items = items;
|
|
30
|
+
this.customer = customer;
|
|
31
|
+
this.paymentProcessor = paymentProcessor;
|
|
32
|
+
this.paymentFacilitator = paymentFacilitator;
|
|
33
|
+
}
|
|
34
|
+
return Transaction;
|
|
35
|
+
}());
|
|
36
|
+
exports.Transaction = Transaction;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransactionResult = void 0;
|
|
4
|
+
var TransactionResult = /** @class */ (function () {
|
|
5
|
+
function TransactionResult(results) {
|
|
6
|
+
this.results = results;
|
|
7
|
+
}
|
|
8
|
+
return TransactionResult;
|
|
9
|
+
}());
|
|
10
|
+
exports.TransactionResult = TransactionResult;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export { Address } from './Address';
|
|
2
|
+
export { CancellationInfo } from './CancellationInfo';
|
|
3
|
+
export { Client } from './Client';
|
|
4
|
+
export { Commerce } from './Commerce';
|
|
5
|
+
export { Currency } from './Currency';
|
|
6
|
+
export { Customer } from './Customer';
|
|
7
|
+
export { Document } from './Document';
|
|
8
|
+
export { Instrument } from './Instrument';
|
|
9
|
+
export { Issuer } from './Issuer';
|
|
10
|
+
export { IssuerData } from './IssuerData';
|
|
11
|
+
export { IssuerDto } from './IssuerDto';
|
|
12
|
+
export { Item } from './Item';
|
|
13
|
+
export { PartialRefundsInfo } from './PartialRefundsInfo';
|
|
14
|
+
export { PaymentFacilitator } from './PaymentFacilitator';
|
|
15
|
+
export { PaymentProcessor } from './PaymentProcessor';
|
|
16
|
+
export { PurchaseInfo } from './PurchaseInfo';
|
|
17
|
+
export { RefundInfo } from './RefundInfo';
|
|
18
|
+
export { ReserveInfo } from './ReserveInfo';
|
|
19
|
+
export { Shipping } from './Shipping';
|
|
20
|
+
export { Transaction } from './Transaction';
|
|
21
|
+
export { TransactionResult } from './TransactionResult';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransactionResult = exports.Transaction = exports.Shipping = exports.ReserveInfo = exports.RefundInfo = exports.PurchaseInfo = exports.PaymentProcessor = exports.PaymentFacilitator = exports.PartialRefundsInfo = exports.Item = exports.IssuerDto = exports.IssuerData = exports.Issuer = exports.Instrument = exports.Document = exports.Customer = exports.Currency = exports.Commerce = exports.Client = exports.CancellationInfo = exports.Address = void 0;
|
|
4
|
+
var Address_1 = require("./Address");
|
|
5
|
+
Object.defineProperty(exports, "Address", { enumerable: true, get: function () { return Address_1.Address; } });
|
|
6
|
+
var CancellationInfo_1 = require("./CancellationInfo");
|
|
7
|
+
Object.defineProperty(exports, "CancellationInfo", { enumerable: true, get: function () { return CancellationInfo_1.CancellationInfo; } });
|
|
8
|
+
var Client_1 = require("./Client");
|
|
9
|
+
Object.defineProperty(exports, "Client", { enumerable: true, get: function () { return Client_1.Client; } });
|
|
10
|
+
var Commerce_1 = require("./Commerce");
|
|
11
|
+
Object.defineProperty(exports, "Commerce", { enumerable: true, get: function () { return Commerce_1.Commerce; } });
|
|
12
|
+
var Currency_1 = require("./Currency");
|
|
13
|
+
Object.defineProperty(exports, "Currency", { enumerable: true, get: function () { return Currency_1.Currency; } });
|
|
14
|
+
var Customer_1 = require("./Customer");
|
|
15
|
+
Object.defineProperty(exports, "Customer", { enumerable: true, get: function () { return Customer_1.Customer; } });
|
|
16
|
+
var Document_1 = require("./Document");
|
|
17
|
+
Object.defineProperty(exports, "Document", { enumerable: true, get: function () { return Document_1.Document; } });
|
|
18
|
+
var Instrument_1 = require("./Instrument");
|
|
19
|
+
Object.defineProperty(exports, "Instrument", { enumerable: true, get: function () { return Instrument_1.Instrument; } });
|
|
20
|
+
var Issuer_1 = require("./Issuer");
|
|
21
|
+
Object.defineProperty(exports, "Issuer", { enumerable: true, get: function () { return Issuer_1.Issuer; } });
|
|
22
|
+
var IssuerData_1 = require("./IssuerData");
|
|
23
|
+
Object.defineProperty(exports, "IssuerData", { enumerable: true, get: function () { return IssuerData_1.IssuerData; } });
|
|
24
|
+
var IssuerDto_1 = require("./IssuerDto");
|
|
25
|
+
Object.defineProperty(exports, "IssuerDto", { enumerable: true, get: function () { return IssuerDto_1.IssuerDto; } });
|
|
26
|
+
var Item_1 = require("./Item");
|
|
27
|
+
Object.defineProperty(exports, "Item", { enumerable: true, get: function () { return Item_1.Item; } });
|
|
28
|
+
var PartialRefundsInfo_1 = require("./PartialRefundsInfo");
|
|
29
|
+
Object.defineProperty(exports, "PartialRefundsInfo", { enumerable: true, get: function () { return PartialRefundsInfo_1.PartialRefundsInfo; } });
|
|
30
|
+
var PaymentFacilitator_1 = require("./PaymentFacilitator");
|
|
31
|
+
Object.defineProperty(exports, "PaymentFacilitator", { enumerable: true, get: function () { return PaymentFacilitator_1.PaymentFacilitator; } });
|
|
32
|
+
var PaymentProcessor_1 = require("./PaymentProcessor");
|
|
33
|
+
Object.defineProperty(exports, "PaymentProcessor", { enumerable: true, get: function () { return PaymentProcessor_1.PaymentProcessor; } });
|
|
34
|
+
var PurchaseInfo_1 = require("./PurchaseInfo");
|
|
35
|
+
Object.defineProperty(exports, "PurchaseInfo", { enumerable: true, get: function () { return PurchaseInfo_1.PurchaseInfo; } });
|
|
36
|
+
var RefundInfo_1 = require("./RefundInfo");
|
|
37
|
+
Object.defineProperty(exports, "RefundInfo", { enumerable: true, get: function () { return RefundInfo_1.RefundInfo; } });
|
|
38
|
+
var ReserveInfo_1 = require("./ReserveInfo");
|
|
39
|
+
Object.defineProperty(exports, "ReserveInfo", { enumerable: true, get: function () { return ReserveInfo_1.ReserveInfo; } });
|
|
40
|
+
var Shipping_1 = require("./Shipping");
|
|
41
|
+
Object.defineProperty(exports, "Shipping", { enumerable: true, get: function () { return Shipping_1.Shipping; } });
|
|
42
|
+
var Transaction_1 = require("./Transaction");
|
|
43
|
+
Object.defineProperty(exports, "Transaction", { enumerable: true, get: function () { return Transaction_1.Transaction; } });
|
|
44
|
+
var TransactionResult_1 = require("./TransactionResult");
|
|
45
|
+
Object.defineProperty(exports, "TransactionResult", { enumerable: true, get: function () { return TransactionResult_1.TransactionResult; } });
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.booleanUtils = void 0;
|
|
4
|
+
var signatureUtils_1 = require("../sdk/helpers/signature/signatureUtils");
|
|
5
|
+
var booleanValues = [
|
|
6
|
+
'CrossBankTransfers'
|
|
7
|
+
];
|
|
8
|
+
var stringifyBooleans = function (object) {
|
|
9
|
+
booleanValues.forEach(function (word) {
|
|
10
|
+
if (JSON.stringify(object).includes(word)) {
|
|
11
|
+
substituteValueRecursively(object, word, true);
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
return object;
|
|
15
|
+
};
|
|
16
|
+
var substituteValueRecursively = function (object, specialWord, toString) {
|
|
17
|
+
if (object && typeof object === 'object') {
|
|
18
|
+
Object.keys(object).map(function (key) {
|
|
19
|
+
if (key === specialWord) {
|
|
20
|
+
if (toString)
|
|
21
|
+
if (object[key] === true) {
|
|
22
|
+
object[key] = 'True';
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
object[key] = 'False';
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
if (object[key] === 'True') {
|
|
29
|
+
object[key] = true;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
object[key] = false;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
if (typeof object[key] === 'object') {
|
|
37
|
+
substituteValueRecursively(object[key], specialWord, toString);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
var booleanizeStrings = function (object) {
|
|
43
|
+
booleanValues.forEach(function (specialWord) {
|
|
44
|
+
if (JSON.stringify(object).includes(specialWord)) {
|
|
45
|
+
substituteValueRecursively(object, specialWord, false);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
return signatureUtils_1.signatureUtils.sortObject(object);
|
|
49
|
+
};
|
|
50
|
+
exports.booleanUtils = {
|
|
51
|
+
stringifyBooleans: stringifyBooleans,
|
|
52
|
+
booleanizeStrings: booleanizeStrings,
|
|
53
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.caseUtils = void 0;
|
|
4
|
+
var js_convert_case_1 = require("js-convert-case");
|
|
5
|
+
var signatureUtils_1 = require("../sdk/helpers/signature/signatureUtils");
|
|
6
|
+
var specialWords = [
|
|
7
|
+
{ word: 'UtcUnixTimeExpiration', substitute: 'UTCUnixTimeExpiration' },
|
|
8
|
+
{ word: 'UtcunixTimeExpiration', substitute: 'UTCUnixTimeExpiration' },
|
|
9
|
+
{ word: 'VatAmount', substitute: 'VATAmount' },
|
|
10
|
+
{ word: 'InstrumentExpirationUtc', substitute: 'InstrumentExpirationUTC' },
|
|
11
|
+
{ word: 'Mcc', substitute: 'MCC' },
|
|
12
|
+
{ word: 'CommerceRut', substitute: 'CommerceRUT' },
|
|
13
|
+
{ word: 'Ui', substitute: 'UI' },
|
|
14
|
+
{ word: 'Background', substitute: 'background' },
|
|
15
|
+
{ word: 'Primary', substitute: 'primary' },
|
|
16
|
+
{ word: 'Secondary', substitute: 'secondary' },
|
|
17
|
+
];
|
|
18
|
+
var camelCaseSpecialWords = [
|
|
19
|
+
{
|
|
20
|
+
word: 'instrumentExpirationUtc',
|
|
21
|
+
substitute: 'instrumentExpirationUTC',
|
|
22
|
+
},
|
|
23
|
+
];
|
|
24
|
+
var toCamelKeys = function (object) {
|
|
25
|
+
var parsedObject = (0, js_convert_case_1.camelKeys)(object, { recursive: true, recursiveInArray: true });
|
|
26
|
+
camelCaseSpecialWords.forEach(function (specialWord) {
|
|
27
|
+
if (JSON.stringify(parsedObject).includes(specialWord.word)) {
|
|
28
|
+
substituteWordRecursively(parsedObject, specialWord.word, specialWord.substitute);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
return parsedObject;
|
|
32
|
+
};
|
|
33
|
+
var substituteWordRecursively = function (theParsedObject, word, substitute) {
|
|
34
|
+
var deleteObject = function (obj, key) {
|
|
35
|
+
delete obj[key];
|
|
36
|
+
};
|
|
37
|
+
if (theParsedObject && typeof theParsedObject === 'object') {
|
|
38
|
+
Object.keys(theParsedObject).map(function (key) {
|
|
39
|
+
if (key === word) {
|
|
40
|
+
Object.defineProperty(theParsedObject, substitute, Object.getOwnPropertyDescriptor(theParsedObject, word) || '');
|
|
41
|
+
deleteObject(theParsedObject, word);
|
|
42
|
+
}
|
|
43
|
+
if (typeof theParsedObject[key] === 'object') {
|
|
44
|
+
substituteWordRecursively(theParsedObject[key], word, substitute);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
var toPascalKeys = function (object) {
|
|
50
|
+
var parsedObject = (0, js_convert_case_1.pascalKeys)(object, { recursive: true, recursiveInArray: true });
|
|
51
|
+
specialWords.forEach(function (specialWord) {
|
|
52
|
+
if (JSON.stringify(parsedObject).includes(specialWord.word)) {
|
|
53
|
+
substituteWordRecursively(parsedObject, specialWord.word, specialWord.substitute);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
return signatureUtils_1.signatureUtils.sortObject(parsedObject);
|
|
57
|
+
};
|
|
58
|
+
exports.caseUtils = {
|
|
59
|
+
toCamelKeys: toCamelKeys,
|
|
60
|
+
toPascalKeys: toPascalKeys,
|
|
61
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { caseUtils } from './case.util';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.caseUtils = void 0;
|
|
4
|
+
var case_util_1 = require("./case.util");
|
|
5
|
+
Object.defineProperty(exports, "caseUtils", { enumerable: true, get: function () { return case_util_1.caseUtils; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@houlak/plexo-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4-h",
|
|
4
4
|
"description": "Node SDK for Plexo payment services",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
47
|
-
"node": "
|
|
47
|
+
"node": "20.9"
|
|
48
48
|
},
|
|
49
49
|
"files": [
|
|
50
50
|
"lib/**/*"
|
|
51
51
|
]
|
|
52
|
-
}
|
|
52
|
+
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { IssuerProcessor } from '.';
|
|
2
|
-
import { Authorization, AuthorizationInfo, CancelRequest, ClientSignedResponse, CodeRequest, Commerce, CommerceIdRequest, CommerceIssuerIdRequest, CommerceModifyRequest, CommerceRequest, CreateBankInstrumentRequest, DeleteInstrumentRequest, ExpressCheckoutRequest, InstrumentCallback, IssuerData, IssuerInfo, PaymentRequest, PaymentInstrument, Reference, Reserve, ReserveRequest, BaseServerResponse, ServerResponse, ServerSignedCallback, Session, Transaction, TransactionCallback, TransactionCursor, TransactionQuery } from './models/IndexSDK';
|
|
3
|
-
export interface IPaymentGatewayClient {
|
|
4
|
-
AddCommerceAsync(commerce: CommerceRequest): Promise<ServerResponse<Commerce>>;
|
|
5
|
-
AddIssuerCommerceAsync(issuerData: IssuerData): ServerResponse<IssuerData>;
|
|
6
|
-
DeleteCommerceAsync(commerceIdRequest: CommerceIdRequest): BaseServerResponse;
|
|
7
|
-
DeleteInstrumentAsync(info: DeleteInstrumentRequest): BaseServerResponse;
|
|
8
|
-
DeleteIssuerCommerceAsync(commerceIssuerIdRequest: CommerceIssuerIdRequest): BaseServerResponse;
|
|
9
|
-
GetCommerceIssuersAsync(commerceIdRequest: CommerceIdRequest): ServerResponse<IssuerData[]>;
|
|
10
|
-
GetCommercesAsync(): ServerResponse<Commerce[]>;
|
|
11
|
-
GetSupportedIssuersAsync(): ServerResponse<IssuerInfo[]>;
|
|
12
|
-
GetSupportedPaymentProcessorsAsync(): ServerResponse<IssuerProcessor[]>;
|
|
13
|
-
ModifyCommerceAsync(commerceModifyRequest: CommerceModifyRequest): ServerResponse<Commerce>;
|
|
14
|
-
GetInstrumentsAsync(authorizationInfo: AuthorizationInfo): ServerResponse<PaymentInstrument[]>;
|
|
15
|
-
SetDefaultCommerceAsync(commerceIdRequest: CommerceIdRequest): BaseServerResponse;
|
|
16
|
-
AuthorizeAsync(authorization: Authorization): Promise<ServerResponse<Session>>;
|
|
17
|
-
CancelAsync(cancel: CancelRequest): ServerResponse<Transaction>;
|
|
18
|
-
CodeActionAsync(request: CodeRequest): ServerResponse<Transaction>;
|
|
19
|
-
StartReserveAsync(payment: ReserveRequest): ServerResponse<Transaction>;
|
|
20
|
-
StatusAsync(payment: Reference): ServerResponse<Transaction>;
|
|
21
|
-
ExpressCheckoutAsync(expressCheckout: ExpressCheckoutRequest): ServerResponse<Session>;
|
|
22
|
-
ObtainCsvTransactionsAsync(query: TransactionQuery): ServerResponse<string>;
|
|
23
|
-
ObtainTransactionsAsync(query: TransactionQuery): ServerResponse<TransactionCursor>;
|
|
24
|
-
PurchaseAsync(payment: PaymentRequest): ServerResponse<Transaction>;
|
|
25
|
-
CreateBankInstrumentAsync(request: CreateBankInstrumentRequest): ServerResponse<PaymentInstrument>;
|
|
26
|
-
EndReserveAsync(reserve: Reserve): ServerResponse<Transaction>;
|
|
27
|
-
UnwrapInstrumentCallbackAsync(serverSignedInstrumentCallback: ServerSignedCallback<InstrumentCallback>): ServerResponse<InstrumentCallback>;
|
|
28
|
-
UnwrapTransactionCallbackAsync(serverSignedTransactionCallback: ServerSignedCallback<TransactionCallback>): ServerResponse<TransactionCallback>;
|
|
29
|
-
SignInstrumentCallback(serverResponse: ServerResponse<InstrumentCallback>): ClientSignedResponse;
|
|
30
|
-
SignTransactionCallback(serverResponse: ServerResponse<TransactionCallback>): ClientSignedResponse;
|
|
31
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Authorization, AuthorizationInfo, CancelRequest, ClientSignedResponse, CodeRequest, Commerce, CommerceIdRequest, CommerceIssuerIdRequest, CommerceModifyRequest, CommerceRequest, CreateBankInstrumentRequest, DeleteInstrumentRequest, ExpressCheckoutRequest, InstrumentCallback, IssuerData, IssuerInfo, PaymentRequest, PaymentInstrument, Reference, Reserve, ReserveRequest, BaseServerResponse, ServerResponse, ServerSignedCallback, Session, Transaction, TransactionCallback, TransactionCursor, TransactionQuery } from './models/IndexSDK';
|
|
2
|
-
import { IssuerProcessor } from './index';
|
|
3
|
-
import { IPaymentGatewayClient } from './IPaymentGatewayClient';
|
|
4
|
-
export declare class PaymentGatewayClient implements IPaymentGatewayClient {
|
|
5
|
-
private readonly baseUrl;
|
|
6
|
-
AddCommerceAsync(commerce: CommerceRequest): Promise<ServerResponse<Commerce>>;
|
|
7
|
-
AddIssuerCommerceAsync(issuerData: IssuerData): ServerResponse<IssuerData>;
|
|
8
|
-
DeleteCommerceAsync(commerceIdRequest: CommerceIdRequest): BaseServerResponse;
|
|
9
|
-
DeleteInstrumentAsync(info: DeleteInstrumentRequest): BaseServerResponse;
|
|
10
|
-
DeleteIssuerCommerceAsync(commerceIssuerIdRequest: CommerceIssuerIdRequest): BaseServerResponse;
|
|
11
|
-
GetCommerceIssuersAsync(commerceIdRequest: CommerceIdRequest): ServerResponse<IssuerData[]>;
|
|
12
|
-
GetCommercesAsync(): ServerResponse<Commerce[]>;
|
|
13
|
-
GetSupportedIssuersAsync(): ServerResponse<IssuerInfo[]>;
|
|
14
|
-
GetSupportedPaymentProcessorsAsync(): ServerResponse<IssuerProcessor[]>;
|
|
15
|
-
ModifyCommerceAsync(commerceModifyRequest: CommerceModifyRequest): ServerResponse<Commerce>;
|
|
16
|
-
GetInstrumentsAsync(authorizationInfo: AuthorizationInfo): ServerResponse<PaymentInstrument[]>;
|
|
17
|
-
SetDefaultCommerceAsync(commerceIdRequest: CommerceIdRequest): BaseServerResponse;
|
|
18
|
-
AuthorizeAsync(authorization: Authorization): Promise<ServerResponse<Session>>;
|
|
19
|
-
CancelAsync(cancel: CancelRequest): ServerResponse<Transaction>;
|
|
20
|
-
CodeActionAsync(request: CodeRequest): ServerResponse<Transaction>;
|
|
21
|
-
StartReserveAsync(payment: ReserveRequest): ServerResponse<Transaction>;
|
|
22
|
-
StatusAsync(payment: Reference): ServerResponse<Transaction>;
|
|
23
|
-
ExpressCheckoutAsync(expressCheckout: ExpressCheckoutRequest): ServerResponse<Session>;
|
|
24
|
-
ObtainCsvTransactionsAsync(query: TransactionQuery): ServerResponse<string>;
|
|
25
|
-
ObtainTransactionsAsync(query: TransactionQuery): ServerResponse<TransactionCursor>;
|
|
26
|
-
PurchaseAsync(payment: PaymentRequest): ServerResponse<Transaction>;
|
|
27
|
-
CreateBankInstrumentAsync(request: CreateBankInstrumentRequest): ServerResponse<PaymentInstrument>;
|
|
28
|
-
EndReserveAsync(reserve: Reserve): ServerResponse<Transaction>;
|
|
29
|
-
UnwrapInstrumentCallbackAsync(serverSignedInstrumentCallback: ServerSignedCallback<InstrumentCallback>): ServerResponse<InstrumentCallback>;
|
|
30
|
-
UnwrapTransactionCallbackAsync(serverSignedTransactionCallback: ServerSignedCallback<TransactionCallback>): ServerResponse<TransactionCallback>;
|
|
31
|
-
SignInstrumentCallback(serverResponse: ServerResponse<InstrumentCallback>): ClientSignedResponse;
|
|
32
|
-
SignTransactionCallback(serverResponse: ServerResponse<TransactionCallback>): ClientSignedResponse;
|
|
33
|
-
}
|