globalpayments-api 3.0.0 → 3.1.0
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/.eslintignore +9 -0
- package/.eslintrc.cjs +39 -0
- package/.prettierrc +14 -4
- package/CHANGELOG.md +44 -32
- package/package.json +65 -58
- package/tsconfig.eslint.json +15 -0
- package/lib/src/Builders/AuthorizationBuilder.d.ts +0 -325
- package/lib/src/Builders/AuthorizationBuilder.js +0 -601
- package/lib/src/Builders/AuthorizationBuilder.js.map +0 -1
- package/lib/src/Builders/BaseBuilder/ValidationClause.d.ts +0 -14
- package/lib/src/Builders/BaseBuilder/ValidationClause.js +0 -62
- package/lib/src/Builders/BaseBuilder/ValidationClause.js.map +0 -1
- package/lib/src/Builders/BaseBuilder/ValidationTarget.d.ts +0 -16
- package/lib/src/Builders/BaseBuilder/ValidationTarget.js +0 -29
- package/lib/src/Builders/BaseBuilder/ValidationTarget.js.map +0 -1
- package/lib/src/Builders/BaseBuilder/Validations.d.ts +0 -11
- package/lib/src/Builders/BaseBuilder/Validations.js +0 -57
- package/lib/src/Builders/BaseBuilder/Validations.js.map +0 -1
- package/lib/src/Builders/BaseBuilder.d.ts +0 -11
- package/lib/src/Builders/BaseBuilder.js +0 -17
- package/lib/src/Builders/BaseBuilder.js.map +0 -1
- package/lib/src/Builders/ManagementBuilder.d.ts +0 -103
- package/lib/src/Builders/ManagementBuilder.js +0 -228
- package/lib/src/Builders/ManagementBuilder.js.map +0 -1
- package/lib/src/Builders/PayFacBuilder.d.ts +0 -96
- package/lib/src/Builders/PayFacBuilder.js +0 -185
- package/lib/src/Builders/PayFacBuilder.js.map +0 -1
- package/lib/src/Builders/RecurringBuilder.d.ts +0 -13
- package/lib/src/Builders/RecurringBuilder.js +0 -48
- package/lib/src/Builders/RecurringBuilder.js.map +0 -1
- package/lib/src/Builders/ReportBuilder.d.ts +0 -8
- package/lib/src/Builders/ReportBuilder.js +0 -37
- package/lib/src/Builders/ReportBuilder.js.map +0 -1
- package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomAuthorizationRequestBuilder.d.ts +0 -22
- package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomAuthorizationRequestBuilder.js +0 -160
- package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomAuthorizationRequestBuilder.js.map +0 -1
- package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomRequestBuilder.d.ts +0 -6
- package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomRequestBuilder.js +0 -24
- package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomRequestBuilder.js.map +0 -1
- package/lib/src/Builders/RequestBuilder/GpEcom/index.d.ts +0 -2
- package/lib/src/Builders/RequestBuilder/GpEcom/index.js +0 -15
- package/lib/src/Builders/RequestBuilder/GpEcom/index.js.map +0 -1
- package/lib/src/Builders/RequestBuilder/RequestBuilderFactory.d.ts +0 -6
- package/lib/src/Builders/RequestBuilder/RequestBuilderFactory.js +0 -30
- package/lib/src/Builders/RequestBuilder/RequestBuilderFactory.js.map +0 -1
- package/lib/src/Builders/RequestBuilder/index.d.ts +0 -2
- package/lib/src/Builders/RequestBuilder/index.js +0 -15
- package/lib/src/Builders/RequestBuilder/index.js.map +0 -1
- package/lib/src/Builders/TransactionBuilder.d.ts +0 -10
- package/lib/src/Builders/TransactionBuilder.js +0 -47
- package/lib/src/Builders/TransactionBuilder.js.map +0 -1
- package/lib/src/Builders/TransactionReportBuilder.d.ts +0 -15
- package/lib/src/Builders/TransactionReportBuilder.js +0 -80
- package/lib/src/Builders/TransactionReportBuilder.js.map +0 -1
- package/lib/src/Builders/index.d.ts +0 -8
- package/lib/src/Builders/index.js +0 -21
- package/lib/src/Builders/index.js.map +0 -1
- package/lib/src/ConfiguredServices.d.ts +0 -22
- package/lib/src/ConfiguredServices.js +0 -57
- package/lib/src/ConfiguredServices.js.map +0 -1
- package/lib/src/Entities/Address.d.ts +0 -13
- package/lib/src/Entities/Address.js +0 -20
- package/lib/src/Entities/Address.js.map +0 -1
- package/lib/src/Entities/BatchSummary.d.ts +0 -6
- package/lib/src/Entities/BatchSummary.js +0 -10
- package/lib/src/Entities/BatchSummary.js.map +0 -1
- package/lib/src/Entities/Customer.d.ts +0 -64
- package/lib/src/Entities/Customer.js +0 -48
- package/lib/src/Entities/Customer.js.map +0 -1
- package/lib/src/Entities/DocumentUploadData.d.ts +0 -13
- package/lib/src/Entities/DocumentUploadData.js +0 -49
- package/lib/src/Entities/DocumentUploadData.js.map +0 -1
- package/lib/src/Entities/EcommerceInfo.d.ts +0 -12
- package/lib/src/Entities/EcommerceInfo.js +0 -15
- package/lib/src/Entities/EcommerceInfo.js.map +0 -1
- package/lib/src/Entities/EncryptionData.d.ts +0 -6
- package/lib/src/Entities/EncryptionData.js +0 -10
- package/lib/src/Entities/EncryptionData.js.map +0 -1
- package/lib/src/Entities/Enums.d.ts +0 -373
- package/lib/src/Entities/Enums.js +0 -498
- package/lib/src/Entities/Enums.js.map +0 -1
- package/lib/src/Entities/Errors.d.ts +0 -23
- package/lib/src/Entities/Errors.js +0 -107
- package/lib/src/Entities/Errors.js.map +0 -1
- package/lib/src/Entities/HostedPaymentData.d.ts +0 -10
- package/lib/src/Entities/HostedPaymentData.js +0 -11
- package/lib/src/Entities/HostedPaymentData.js.map +0 -1
- package/lib/src/Entities/IRequestBuilder.d.ts +0 -7
- package/lib/src/Entities/IRequestBuilder.js +0 -3
- package/lib/src/Entities/IRequestBuilder.js.map +0 -1
- package/lib/src/Entities/ProFac/AccountBalanceResponseData.d.ts +0 -7
- package/lib/src/Entities/ProFac/AccountBalanceResponseData.js +0 -10
- package/lib/src/Entities/ProFac/AccountBalanceResponseData.js.map +0 -1
- package/lib/src/Entities/ProFac/AccountPermissions.d.ts +0 -15
- package/lib/src/Entities/ProFac/AccountPermissions.js +0 -10
- package/lib/src/Entities/ProFac/AccountPermissions.js.map +0 -1
- package/lib/src/Entities/ProFac/BankAccountData.d.ts +0 -10
- package/lib/src/Entities/ProFac/BankAccountData.js +0 -10
- package/lib/src/Entities/ProFac/BankAccountData.js.map +0 -1
- package/lib/src/Entities/ProFac/BankAccountOwnershipData.d.ts +0 -8
- package/lib/src/Entities/ProFac/BankAccountOwnershipData.js +0 -12
- package/lib/src/Entities/ProFac/BankAccountOwnershipData.js.map +0 -1
- package/lib/src/Entities/ProFac/BeneficialOwnerData.d.ts +0 -6
- package/lib/src/Entities/ProFac/BeneficialOwnerData.js +0 -11
- package/lib/src/Entities/ProFac/BeneficialOwnerData.js.map +0 -1
- package/lib/src/Entities/ProFac/BeneficialOwnerDataResult.d.ts +0 -5
- package/lib/src/Entities/ProFac/BeneficialOwnerDataResult.js +0 -10
- package/lib/src/Entities/ProFac/BeneficialOwnerDataResult.js.map +0 -1
- package/lib/src/Entities/ProFac/BusinessData.d.ts +0 -14
- package/lib/src/Entities/ProFac/BusinessData.js +0 -12
- package/lib/src/Entities/ProFac/BusinessData.js.map +0 -1
- package/lib/src/Entities/ProFac/DeviceAttributeInfo.d.ts +0 -4
- package/lib/src/Entities/ProFac/DeviceAttributeInfo.js +0 -10
- package/lib/src/Entities/ProFac/DeviceAttributeInfo.js.map +0 -1
- package/lib/src/Entities/ProFac/DeviceData.d.ts +0 -5
- package/lib/src/Entities/ProFac/DeviceData.js +0 -11
- package/lib/src/Entities/ProFac/DeviceData.js.map +0 -1
- package/lib/src/Entities/ProFac/DeviceInfo.d.ts +0 -6
- package/lib/src/Entities/ProFac/DeviceInfo.js +0 -10
- package/lib/src/Entities/ProFac/DeviceInfo.js.map +0 -1
- package/lib/src/Entities/ProFac/FlashFundsPaymentCardData.d.ts +0 -7
- package/lib/src/Entities/ProFac/FlashFundsPaymentCardData.js +0 -14
- package/lib/src/Entities/ProFac/FlashFundsPaymentCardData.js.map +0 -1
- package/lib/src/Entities/ProFac/GrossBillingInformation.d.ts +0 -8
- package/lib/src/Entities/ProFac/GrossBillingInformation.js +0 -10
- package/lib/src/Entities/ProFac/GrossBillingInformation.js.map +0 -1
- package/lib/src/Entities/ProFac/OrderDevice.d.ts +0 -18
- package/lib/src/Entities/ProFac/OrderDevice.js +0 -10
- package/lib/src/Entities/ProFac/OrderDevice.js.map +0 -1
- package/lib/src/Entities/ProFac/OwnersData.d.ts +0 -12
- package/lib/src/Entities/ProFac/OwnersData.js +0 -12
- package/lib/src/Entities/ProFac/OwnersData.js.map +0 -1
- package/lib/src/Entities/ProFac/PayFacResponseData.d.ts +0 -55
- package/lib/src/Entities/ProFac/PayFacResponseData.js +0 -10
- package/lib/src/Entities/ProFac/PayFacResponseData.js.map +0 -1
- package/lib/src/Entities/ProFac/RenewAccountData.d.ts +0 -10
- package/lib/src/Entities/ProFac/RenewAccountData.js +0 -12
- package/lib/src/Entities/ProFac/RenewAccountData.js.map +0 -1
- package/lib/src/Entities/ProFac/SignificantOwnerData.d.ts +0 -8
- package/lib/src/Entities/ProFac/SignificantOwnerData.js +0 -12
- package/lib/src/Entities/ProFac/SignificantOwnerData.js.map +0 -1
- package/lib/src/Entities/ProFac/ThreatRiskData.d.ts +0 -5
- package/lib/src/Entities/ProFac/ThreatRiskData.js +0 -10
- package/lib/src/Entities/ProFac/ThreatRiskData.js.map +0 -1
- package/lib/src/Entities/ProFac/UserPersonalData.d.ts +0 -26
- package/lib/src/Entities/ProFac/UserPersonalData.js +0 -15
- package/lib/src/Entities/ProFac/UserPersonalData.js.map +0 -1
- package/lib/src/Entities/RecurringEntity.d.ts +0 -14
- package/lib/src/Entities/RecurringEntity.js +0 -87
- package/lib/src/Entities/RecurringEntity.js.map +0 -1
- package/lib/src/Entities/Request.d.ts +0 -9
- package/lib/src/Entities/Request.js +0 -15
- package/lib/src/Entities/Request.js.map +0 -1
- package/lib/src/Entities/SSORequestData.d.ts +0 -5
- package/lib/src/Entities/SSORequestData.js +0 -10
- package/lib/src/Entities/SSORequestData.js.map +0 -1
- package/lib/src/Entities/Schedule.d.ts +0 -47
- package/lib/src/Entities/Schedule.js +0 -254
- package/lib/src/Entities/Schedule.js.map +0 -1
- package/lib/src/Entities/ServiceEndpoints.d.ts +0 -4
- package/lib/src/Entities/ServiceEndpoints.js +0 -9
- package/lib/src/Entities/ServiceEndpoints.js.map +0 -1
- package/lib/src/Entities/Transaction.d.ts +0 -78
- package/lib/src/Entities/Transaction.js +0 -109
- package/lib/src/Entities/Transaction.js.map +0 -1
- package/lib/src/Entities/TransactionSummary.d.ts +0 -61
- package/lib/src/Entities/TransactionSummary.js +0 -10
- package/lib/src/Entities/TransactionSummary.js.map +0 -1
- package/lib/src/Entities/index.d.ts +0 -15
- package/lib/src/Entities/index.js +0 -28
- package/lib/src/Entities/index.js.map +0 -1
- package/lib/src/Gateways/Gateway.d.ts +0 -10
- package/lib/src/Gateways/Gateway.js +0 -43
- package/lib/src/Gateways/Gateway.js.map +0 -1
- package/lib/src/Gateways/GpEcomConnector.d.ts +0 -36
- package/lib/src/Gateways/GpEcomConnector.js +0 -557
- package/lib/src/Gateways/GpEcomConnector.js.map +0 -1
- package/lib/src/Gateways/IPayFacProvider.d.ts +0 -5
- package/lib/src/Gateways/IPayFacProvider.js +0 -3
- package/lib/src/Gateways/IPayFacProvider.js.map +0 -1
- package/lib/src/Gateways/IPaymentGateway.d.ts +0 -8
- package/lib/src/Gateways/IPaymentGateway.js +0 -3
- package/lib/src/Gateways/IPaymentGateway.js.map +0 -1
- package/lib/src/Gateways/IRecurringService.d.ts +0 -6
- package/lib/src/Gateways/IRecurringService.js +0 -3
- package/lib/src/Gateways/IRecurringService.js.map +0 -1
- package/lib/src/Gateways/PayPlanConnector.d.ts +0 -42
- package/lib/src/Gateways/PayPlanConnector.js +0 -553
- package/lib/src/Gateways/PayPlanConnector.js.map +0 -1
- package/lib/src/Gateways/PorticoConnector.d.ts +0 -44
- package/lib/src/Gateways/PorticoConnector.js +0 -1018
- package/lib/src/Gateways/PorticoConnector.js.map +0 -1
- package/lib/src/Gateways/ProPayConnector.d.ts +0 -41
- package/lib/src/Gateways/ProPayConnector.js +0 -695
- package/lib/src/Gateways/ProPayConnector.js.map +0 -1
- package/lib/src/Gateways/RealexConnector.d.ts +0 -30
- package/lib/src/Gateways/RealexConnector.js +0 -524
- package/lib/src/Gateways/RealexConnector.js.map +0 -1
- package/lib/src/Gateways/RestGateway.d.ts +0 -6
- package/lib/src/Gateways/RestGateway.js +0 -32
- package/lib/src/Gateways/RestGateway.js.map +0 -1
- package/lib/src/Gateways/XmlGateway.d.ts +0 -6
- package/lib/src/Gateways/XmlGateway.js +0 -38
- package/lib/src/Gateways/XmlGateway.js.map +0 -1
- package/lib/src/Gateways/https-wrapper.d.ts +0 -3
- package/lib/src/Gateways/https-wrapper.js +0 -36
- package/lib/src/Gateways/https-wrapper.js.map +0 -1
- package/lib/src/Gateways/index.d.ts +0 -8
- package/lib/src/Gateways/index.js +0 -21
- package/lib/src/Gateways/index.js.map +0 -1
- package/lib/src/HostedPaymentConfig.d.ts +0 -12
- package/lib/src/HostedPaymentConfig.js +0 -10
- package/lib/src/HostedPaymentConfig.js.map +0 -1
- package/lib/src/Mapping/GpEcomMapping.d.ts +0 -9
- package/lib/src/Mapping/GpEcomMapping.js +0 -74
- package/lib/src/Mapping/GpEcomMapping.js.map +0 -1
- package/lib/src/Mapping/index.d.ts +0 -1
- package/lib/src/Mapping/index.js +0 -14
- package/lib/src/Mapping/index.js.map +0 -1
- package/lib/src/PaymentMethods/Cash.d.ts +0 -8
- package/lib/src/PaymentMethods/Cash.js +0 -37
- package/lib/src/PaymentMethods/Cash.js.map +0 -1
- package/lib/src/PaymentMethods/Credit.d.ts +0 -85
- package/lib/src/PaymentMethods/Credit.js +0 -107
- package/lib/src/PaymentMethods/Credit.js.map +0 -1
- package/lib/src/PaymentMethods/CreditCardData.d.ts +0 -20
- package/lib/src/PaymentMethods/CreditCardData.js +0 -58
- package/lib/src/PaymentMethods/CreditCardData.js.map +0 -1
- package/lib/src/PaymentMethods/CreditTrackData.d.ts +0 -7
- package/lib/src/PaymentMethods/CreditTrackData.js +0 -28
- package/lib/src/PaymentMethods/CreditTrackData.js.map +0 -1
- package/lib/src/PaymentMethods/Debit.d.ts +0 -40
- package/lib/src/PaymentMethods/Debit.js +0 -71
- package/lib/src/PaymentMethods/Debit.js.map +0 -1
- package/lib/src/PaymentMethods/DebitTrackData.d.ts +0 -7
- package/lib/src/PaymentMethods/DebitTrackData.js +0 -28
- package/lib/src/PaymentMethods/DebitTrackData.js.map +0 -1
- package/lib/src/PaymentMethods/EBT.d.ts +0 -48
- package/lib/src/PaymentMethods/EBT.js +0 -89
- package/lib/src/PaymentMethods/EBT.js.map +0 -1
- package/lib/src/PaymentMethods/EBTCardData.d.ts +0 -16
- package/lib/src/PaymentMethods/EBTCardData.js +0 -33
- package/lib/src/PaymentMethods/EBTCardData.js.map +0 -1
- package/lib/src/PaymentMethods/EBTTrackData.d.ts +0 -8
- package/lib/src/PaymentMethods/EBTTrackData.js +0 -28
- package/lib/src/PaymentMethods/EBTTrackData.js.map +0 -1
- package/lib/src/PaymentMethods/ECheck.d.ts +0 -32
- package/lib/src/PaymentMethods/ECheck.js +0 -41
- package/lib/src/PaymentMethods/ECheck.js.map +0 -1
- package/lib/src/PaymentMethods/GiftCard.d.ts +0 -131
- package/lib/src/PaymentMethods/GiftCard.js +0 -206
- package/lib/src/PaymentMethods/GiftCard.js.map +0 -1
- package/lib/src/PaymentMethods/Interfaces.d.ts +0 -55
- package/lib/src/PaymentMethods/Interfaces.js +0 -3
- package/lib/src/PaymentMethods/Interfaces.js.map +0 -1
- package/lib/src/PaymentMethods/PaymentMethod.d.ts +0 -19
- package/lib/src/PaymentMethods/PaymentMethod.js +0 -115
- package/lib/src/PaymentMethods/PaymentMethod.js.map +0 -1
- package/lib/src/PaymentMethods/RecurringPaymentMethod.d.ts +0 -23
- package/lib/src/PaymentMethods/RecurringPaymentMethod.js +0 -78
- package/lib/src/PaymentMethods/RecurringPaymentMethod.js.map +0 -1
- package/lib/src/PaymentMethods/TransactionReference.d.ts +0 -10
- package/lib/src/PaymentMethods/TransactionReference.js +0 -13
- package/lib/src/PaymentMethods/TransactionReference.js.map +0 -1
- package/lib/src/PaymentMethods/index.d.ts +0 -15
- package/lib/src/PaymentMethods/index.js +0 -28
- package/lib/src/PaymentMethods/index.js.map +0 -1
- package/lib/src/ServiceConfigs/AcceptorConfig.d.ts +0 -41
- package/lib/src/ServiceConfigs/AcceptorConfig.js +0 -30
- package/lib/src/ServiceConfigs/AcceptorConfig.js.map +0 -1
- package/lib/src/ServiceConfigs/Configuration.d.ts +0 -15
- package/lib/src/ServiceConfigs/Configuration.js +0 -16
- package/lib/src/ServiceConfigs/Configuration.js.map +0 -1
- package/lib/src/ServiceConfigs/Gateways/GatewayConfig.d.ts +0 -14
- package/lib/src/ServiceConfigs/Gateways/GatewayConfig.js +0 -46
- package/lib/src/ServiceConfigs/Gateways/GatewayConfig.js.map +0 -1
- package/lib/src/ServiceConfigs/Gateways/GpEcomConfig.d.ts +0 -27
- package/lib/src/ServiceConfigs/Gateways/GpEcomConfig.js +0 -61
- package/lib/src/ServiceConfigs/Gateways/GpEcomConfig.js.map +0 -1
- package/lib/src/ServiceConfigs/Gateways/index.d.ts +0 -2
- package/lib/src/ServiceConfigs/Gateways/index.js +0 -15
- package/lib/src/ServiceConfigs/Gateways/index.js.map +0 -1
- package/lib/src/ServiceConfigs/ServicesConfig.d.ts +0 -27
- package/lib/src/ServiceConfigs/ServicesConfig.js +0 -51
- package/lib/src/ServiceConfigs/ServicesConfig.js.map +0 -1
- package/lib/src/ServiceConfigs/ServicesConfigsAdded.d.ts +0 -10
- package/lib/src/ServiceConfigs/ServicesConfigsAdded.js +0 -27
- package/lib/src/ServiceConfigs/ServicesConfigsAdded.js.map +0 -1
- package/lib/src/ServiceConfigs/index.d.ts +0 -5
- package/lib/src/ServiceConfigs/index.js +0 -18
- package/lib/src/ServiceConfigs/index.js.map +0 -1
- package/lib/src/Services/BatchService.d.ts +0 -4
- package/lib/src/Services/BatchService.js +0 -18
- package/lib/src/Services/BatchService.js.map +0 -1
- package/lib/src/Services/CheckService.d.ts +0 -6
- package/lib/src/Services/CheckService.js +0 -21
- package/lib/src/Services/CheckService.js.map +0 -1
- package/lib/src/Services/CreditService.d.ts +0 -12
- package/lib/src/Services/CreditService.js +0 -55
- package/lib/src/Services/CreditService.js.map +0 -1
- package/lib/src/Services/DebitService.d.ts +0 -7
- package/lib/src/Services/DebitService.js +0 -29
- package/lib/src/Services/DebitService.js.map +0 -1
- package/lib/src/Services/EBTService.d.ts +0 -8
- package/lib/src/Services/EBTService.js +0 -33
- package/lib/src/Services/EBTService.js.map +0 -1
- package/lib/src/Services/GiftService.d.ts +0 -16
- package/lib/src/Services/GiftService.js +0 -55
- package/lib/src/Services/GiftService.js.map +0 -1
- package/lib/src/Services/HostedService.d.ts +0 -9
- package/lib/src/Services/HostedService.js +0 -60
- package/lib/src/Services/HostedService.js.map +0 -1
- package/lib/src/Services/PayFacService.d.ts +0 -26
- package/lib/src/Services/PayFacService.js +0 -78
- package/lib/src/Services/PayFacService.js.map +0 -1
- package/lib/src/Services/RecurringService.d.ts +0 -8
- package/lib/src/Services/RecurringService.js +0 -28
- package/lib/src/Services/RecurringService.js.map +0 -1
- package/lib/src/Services/ReportingService.d.ts +0 -6
- package/lib/src/Services/ReportingService.js +0 -20
- package/lib/src/Services/ReportingService.js.map +0 -1
- package/lib/src/Services/index.d.ts +0 -9
- package/lib/src/Services/index.js +0 -22
- package/lib/src/Services/index.js.map +0 -1
- package/lib/src/ServicesConfig.d.ts +0 -27
- package/lib/src/ServicesConfig.js +0 -51
- package/lib/src/ServicesConfig.js.map +0 -1
- package/lib/src/ServicesContainer.d.ts +0 -26
- package/lib/src/ServicesContainer.js +0 -140
- package/lib/src/ServicesContainer.js.map +0 -1
- package/lib/src/Utils/GenerationUtils.d.ts +0 -5
- package/lib/src/Utils/GenerationUtils.js +0 -37
- package/lib/src/Utils/GenerationUtils.js.map +0 -1
- package/lib/src/Utils/InputValidation.d.ts +0 -12
- package/lib/src/Utils/InputValidation.js +0 -73
- package/lib/src/Utils/InputValidation.js.map +0 -1
- package/lib/src/Utils/Sha1.d.ts +0 -6
- package/lib/src/Utils/Sha1.js +0 -226
- package/lib/src/Utils/Sha1.js.map +0 -1
- package/lib/src/Utils/StringUtils.d.ts +0 -6
- package/lib/src/Utils/StringUtils.js +0 -54
- package/lib/src/Utils/StringUtils.js.map +0 -1
- package/lib/src/Utils/index.d.ts +0 -2
- package/lib/src/Utils/index.js +0 -15
- package/lib/src/Utils/index.js.map +0 -1
- package/lib/src/index.d.ts +0 -12
- package/lib/src/index.js +0 -29
- package/lib/src/index.js.map +0 -1
- package/lib/test/Data/TestCards.d.ts +0 -24
- package/lib/test/Data/TestCards.js +0 -233
- package/lib/test/Data/TestCards.js.map +0 -1
- package/lib/test/Data/TestChecks.d.ts +0 -4
- package/lib/test/Data/TestChecks.js +0 -33
- package/lib/test/Data/TestChecks.js.map +0 -1
- package/lib/test/Data/index.d.ts +0 -2
- package/lib/test/Data/index.js +0 -15
- package/lib/test/Data/index.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/AchTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/AchTest.js +0 -113
- package/lib/test/Integration/Gateways/PorticoConnector/AchTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.js +0 -484
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.js +0 -84
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.js +0 -1721
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.js +0 -84
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.js +0 -1758
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.js +0 -683
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.js +0 -2219
- package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js +0 -708
- package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.js +0 -152
- package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.js +0 -172
- package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.js +0 -193
- package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.js +0 -378
- package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.js +0 -197
- package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.js.map +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.js +0 -48
- package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTests.d.ts +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTests.js +0 -101
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTests.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTests.d.ts +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTests.js +0 -353
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTests.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTests.d.ts +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTests.js +0 -124
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTests.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTests.d.ts +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTests.js +0 -143
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTests.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.d.ts +0 -39
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.js +0 -372
- package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTests.d.ts +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTests.js +0 -101
- package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTests.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTests.d.ts +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTests.js +0 -536
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTests.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTests.d.ts +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTests.js +0 -125
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTests.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTests.d.ts +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTests.js +0 -145
- package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTests.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.d.ts +0 -33
- package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.js +0 -269
- package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.js.map +0 -1
- package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.d.ts +0 -4
- package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.js +0 -31
- package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.js.map +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/AuthTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/AuthTest.js +0 -4374
- package/lib/test/Integration/Gateways/RealexConnector/Certification/AuthTest.js.map +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/AvsTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/AvsTest.js +0 -759
- package/lib/test/Integration/Gateways/RealexConnector/Certification/AvsTest.js.map +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/CreditTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/CreditTest.js +0 -2400
- package/lib/test/Integration/Gateways/RealexConnector/Certification/CreditTest.js.map +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/HoldTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/HoldTest.js +0 -1657
- package/lib/test/Integration/Gateways/RealexConnector/Certification/HoldTest.js.map +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ManualTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ManualTest.js +0 -5651
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ManualTest.js.map +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/OtbTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/OtbTest.js +0 -1986
- package/lib/test/Integration/Gateways/RealexConnector/Certification/OtbTest.js.map +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/RebateTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/RebateTest.js +0 -2370
- package/lib/test/Integration/Gateways/RealexConnector/Certification/RebateTest.js.map +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ReleaseTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ReleaseTest.js +0 -1704
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ReleaseTest.js.map +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/SettleTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/SettleTest.js +0 -2054
- package/lib/test/Integration/Gateways/RealexConnector/Certification/SettleTest.js.map +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ValidationTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ValidationTest.js +0 -2470
- package/lib/test/Integration/Gateways/RealexConnector/Certification/ValidationTest.js.map +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/VerifyEnrolledTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/VerifyEnrolledTest.js +0 -3117
- package/lib/test/Integration/Gateways/RealexConnector/Certification/VerifyEnrolledTest.js.map +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/VoidTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/Certification/VoidTest.js +0 -2032
- package/lib/test/Integration/Gateways/RealexConnector/Certification/VoidTest.js.map +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/CreditTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/CreditTest.js +0 -323
- package/lib/test/Integration/Gateways/RealexConnector/CreditTest.js.map +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/HppTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/HppTest.js +0 -99
- package/lib/test/Integration/Gateways/RealexConnector/HppTest.js.map +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/RecurringTest.d.ts +0 -1
- package/lib/test/Integration/Gateways/RealexConnector/RecurringTest.js +0 -264
- package/lib/test/Integration/Gateways/RealexConnector/RecurringTest.js.map +0 -1
- package/lib/test/Integration/Services/CheckServiceTest.d.ts +0 -1
- package/lib/test/Integration/Services/CheckServiceTest.js +0 -99
- package/lib/test/Integration/Services/CheckServiceTest.js.map +0 -1
- package/lib/test/Integration/Services/CreditServiceTest.d.ts +0 -1
- package/lib/test/Integration/Services/CreditServiceTest.js +0 -314
- package/lib/test/Integration/Services/CreditServiceTest.js.map +0 -1
- package/lib/test/Integration/Services/DebitServiceTest.d.ts +0 -1
- package/lib/test/Integration/Services/DebitServiceTest.js +0 -155
- package/lib/test/Integration/Services/DebitServiceTest.js.map +0 -1
- package/lib/test/Integration/Services/EBTServiceTest.d.ts +0 -1
- package/lib/test/Integration/Services/EBTServiceTest.js +0 -136
- package/lib/test/Integration/Services/EBTServiceTest.js.map +0 -1
- package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.d.ts +0 -1
- package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.js +0 -162
- package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.js.map +0 -1
- package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.d.ts +0 -1
- package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js +0 -140
- package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js.map +0 -1
- package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.d.ts +0 -1
- package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.js +0 -73
- package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.js.map +0 -1
- package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.d.ts +0 -1
- package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js +0 -203
- package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js.map +0 -1
- package/lib/test/Unit/Gateways/RealexConnector/CreditTest.d.ts +0 -1
- package/lib/test/Unit/Gateways/RealexConnector/CreditTest.js +0 -71
- package/lib/test/Unit/Gateways/RealexConnector/CreditTest.js.map +0 -1
|
@@ -1,601 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.AuthorizationBuilder = void 0;
|
|
19
|
-
var __1 = require("../");
|
|
20
|
-
var TransactionBuilder_1 = require("./TransactionBuilder");
|
|
21
|
-
var AuthorizationBuilder = /** @class */ (function (_super) {
|
|
22
|
-
__extends(AuthorizationBuilder, _super);
|
|
23
|
-
function AuthorizationBuilder(type, paymentMethod) {
|
|
24
|
-
var _this = _super.call(this, type, paymentMethod) || this;
|
|
25
|
-
if (paymentMethod) {
|
|
26
|
-
_this.paymentMethod = paymentMethod;
|
|
27
|
-
}
|
|
28
|
-
return _this;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Executes the authorization builder against the gateway.
|
|
32
|
-
*
|
|
33
|
-
* @returns Promise<Transaction>
|
|
34
|
-
*/
|
|
35
|
-
AuthorizationBuilder.prototype.execute = function (configName) {
|
|
36
|
-
if (configName === void 0) { configName = 'default'; }
|
|
37
|
-
_super.prototype.execute.call(this);
|
|
38
|
-
return __1.ServicesContainer.instance()
|
|
39
|
-
.getClient(configName)
|
|
40
|
-
.processAuthorization(this);
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* Serializes an authorization builder for hosted payment page requests.
|
|
44
|
-
*
|
|
45
|
-
* Requires the gateway and account support hosted payment pages.
|
|
46
|
-
*
|
|
47
|
-
* @throws UnsupportedTransactionError Thrown when gateway doesn't support hosted payments
|
|
48
|
-
* @returns string
|
|
49
|
-
*/
|
|
50
|
-
AuthorizationBuilder.prototype.serialize = function () {
|
|
51
|
-
this.transactionModifier = __1.TransactionModifier.HostedRequest;
|
|
52
|
-
_super.prototype.execute.call(this);
|
|
53
|
-
var client = __1.ServicesContainer.instance().getClient();
|
|
54
|
-
if (client.supportsHostedPayments) {
|
|
55
|
-
return client.serializeRequest(this);
|
|
56
|
-
}
|
|
57
|
-
throw new __1.UnsupportedTransactionError("Your current gateway does not support hosted payments");
|
|
58
|
-
};
|
|
59
|
-
AuthorizationBuilder.prototype.setupValidations = function () {
|
|
60
|
-
this.validations
|
|
61
|
-
.of("transactionType",
|
|
62
|
-
/* tslint:disable:trailing-comma */
|
|
63
|
-
__1.TransactionType.Auth |
|
|
64
|
-
__1.TransactionType.Sale |
|
|
65
|
-
__1.TransactionType.Refund |
|
|
66
|
-
__1.TransactionType.AddValue)
|
|
67
|
-
.with("transactionModifier", __1.TransactionModifier.None)
|
|
68
|
-
.check("amount")
|
|
69
|
-
.isNotNull()
|
|
70
|
-
.check("currency")
|
|
71
|
-
.isNotNull()
|
|
72
|
-
.check("paymentMethod")
|
|
73
|
-
.isNotNull();
|
|
74
|
-
this.validations
|
|
75
|
-
.of("transactionType",
|
|
76
|
-
/* tslint:disable:trailing-comma */
|
|
77
|
-
__1.TransactionType.Auth | __1.TransactionType.Sale | __1.TransactionType.Verify)
|
|
78
|
-
.with("transactionModifier", __1.TransactionModifier.HostedRequest)
|
|
79
|
-
.check("amount")
|
|
80
|
-
.isNotNull()
|
|
81
|
-
.check("currency")
|
|
82
|
-
.isNotNull();
|
|
83
|
-
this.validations
|
|
84
|
-
.of("transactionType",
|
|
85
|
-
/* tslint:disable:trailing-comma */
|
|
86
|
-
__1.TransactionType.Auth | __1.TransactionType.Sale)
|
|
87
|
-
.with("transactionModifier", __1.TransactionModifier.Offline)
|
|
88
|
-
.check("amount")
|
|
89
|
-
.isNotNull()
|
|
90
|
-
.check("currency")
|
|
91
|
-
.isNotNull()
|
|
92
|
-
.check("offlineAuthCode")
|
|
93
|
-
.isNotNull()
|
|
94
|
-
.check("offlineAuthCode")
|
|
95
|
-
.isNotEmpty();
|
|
96
|
-
this.validations
|
|
97
|
-
.of("transactionType", __1.TransactionType.Auth | __1.TransactionType.Sale)
|
|
98
|
-
.with("transactionModifier", __1.TransactionModifier.EncryptedMobile)
|
|
99
|
-
.check("paymentMethod")
|
|
100
|
-
.isNotNull()
|
|
101
|
-
.check("paymentMethod")
|
|
102
|
-
.isNotEmpty();
|
|
103
|
-
this.validations
|
|
104
|
-
.of("transactionType", __1.TransactionType.BenefitWithDrawal)
|
|
105
|
-
.with("transactionModifier", __1.TransactionModifier.CashBack)
|
|
106
|
-
.check("amount")
|
|
107
|
-
.isNotNull()
|
|
108
|
-
.check("currency")
|
|
109
|
-
.isNotNull()
|
|
110
|
-
.check("paymentMethod")
|
|
111
|
-
.isNotNull();
|
|
112
|
-
this.validations
|
|
113
|
-
.of("transactionType", __1.TransactionType.Balance)
|
|
114
|
-
.check("paymentMethod")
|
|
115
|
-
.isNotNull();
|
|
116
|
-
this.validations
|
|
117
|
-
.of("transactionType", __1.TransactionType.Alias)
|
|
118
|
-
.check("aliasAction")
|
|
119
|
-
.isNotNull()
|
|
120
|
-
.check("alias")
|
|
121
|
-
.isNotNull();
|
|
122
|
-
this.validations
|
|
123
|
-
.of("transactionType", __1.TransactionType.Replace)
|
|
124
|
-
.check("replacementCard")
|
|
125
|
-
.isNotNull();
|
|
126
|
-
this.validations
|
|
127
|
-
.of("paymentMethodType", __1.PaymentMethodType.ACH)
|
|
128
|
-
.check("billingAddress")
|
|
129
|
-
.isNotNull();
|
|
130
|
-
};
|
|
131
|
-
/**
|
|
132
|
-
* Sets an address value; where applicable.
|
|
133
|
-
*
|
|
134
|
-
* Currently supports billing and shipping addresses.
|
|
135
|
-
*
|
|
136
|
-
* @param address The desired address information
|
|
137
|
-
* @param addressType The desired address type
|
|
138
|
-
* @returns AuthorizationBuilder
|
|
139
|
-
*/
|
|
140
|
-
AuthorizationBuilder.prototype.withAddress = function (address, addressType) {
|
|
141
|
-
if (addressType === void 0) { addressType = __1.AddressType.Billing; }
|
|
142
|
-
if (address === undefined) {
|
|
143
|
-
return this;
|
|
144
|
-
}
|
|
145
|
-
address.type = addressType;
|
|
146
|
-
if (addressType === __1.AddressType.Billing) {
|
|
147
|
-
this.billingAddress = address;
|
|
148
|
-
}
|
|
149
|
-
else {
|
|
150
|
-
this.shippingAddress = address;
|
|
151
|
-
}
|
|
152
|
-
return this;
|
|
153
|
-
};
|
|
154
|
-
AuthorizationBuilder.prototype.withAlias = function (aliasAction, alias) {
|
|
155
|
-
if (alias !== undefined) {
|
|
156
|
-
this.alias = alias;
|
|
157
|
-
}
|
|
158
|
-
this.aliasAction = aliasAction;
|
|
159
|
-
return this;
|
|
160
|
-
};
|
|
161
|
-
/**
|
|
162
|
-
* Allows duplicate transactions by skipping the
|
|
163
|
-
* gateway's duplicate checking.
|
|
164
|
-
*
|
|
165
|
-
* @param allowDuplicates The duplicate skip flag
|
|
166
|
-
* @returns AuthorizationBuilder
|
|
167
|
-
*/
|
|
168
|
-
AuthorizationBuilder.prototype.withAllowDuplicates = function (allowDuplicates) {
|
|
169
|
-
if (allowDuplicates !== undefined) {
|
|
170
|
-
this.allowDuplicates = allowDuplicates;
|
|
171
|
-
}
|
|
172
|
-
return this;
|
|
173
|
-
};
|
|
174
|
-
/**
|
|
175
|
-
* Allows partial authorizations to occur.
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
* @param allowPartialAuth The allow partial flag
|
|
179
|
-
* @returns AuthorizationBuilder
|
|
180
|
-
*/
|
|
181
|
-
AuthorizationBuilder.prototype.withAllowPartialAuth = function (allowPartialAuth) {
|
|
182
|
-
if (allowPartialAuth !== undefined) {
|
|
183
|
-
this.allowPartialAuth = allowPartialAuth;
|
|
184
|
-
}
|
|
185
|
-
return this;
|
|
186
|
-
};
|
|
187
|
-
/**
|
|
188
|
-
* Sets the transaction's amount
|
|
189
|
-
*
|
|
190
|
-
* @param amount The amount
|
|
191
|
-
* @returns AuthorizationBuilder
|
|
192
|
-
*/
|
|
193
|
-
AuthorizationBuilder.prototype.withAmount = function (amount) {
|
|
194
|
-
if (amount !== undefined) {
|
|
195
|
-
this.amount = amount;
|
|
196
|
-
}
|
|
197
|
-
return this;
|
|
198
|
-
};
|
|
199
|
-
/**
|
|
200
|
-
* Sets the transaction's authorization amount; where applicable.
|
|
201
|
-
*
|
|
202
|
-
* This is a specialized field. In most cases,
|
|
203
|
-
* `Authorization.withAmount` should be used.
|
|
204
|
-
*
|
|
205
|
-
* @param authAmount The authorization amount
|
|
206
|
-
* @returns AuthorizationBuilder
|
|
207
|
-
*/
|
|
208
|
-
AuthorizationBuilder.prototype.withAuthAmount = function (authAmount) {
|
|
209
|
-
if (authAmount !== undefined) {
|
|
210
|
-
this.authAmount = authAmount;
|
|
211
|
-
}
|
|
212
|
-
return this;
|
|
213
|
-
};
|
|
214
|
-
AuthorizationBuilder.prototype.withBalanceInquiryType = function (inquiry) {
|
|
215
|
-
if (inquiry !== undefined) {
|
|
216
|
-
this.balanceInquiryType = inquiry;
|
|
217
|
-
}
|
|
218
|
-
return this;
|
|
219
|
-
};
|
|
220
|
-
/**
|
|
221
|
-
* Sets Credential on File fields
|
|
222
|
-
*/
|
|
223
|
-
AuthorizationBuilder.prototype.withCardBrandStorage = function (transactionInitiator, value) {
|
|
224
|
-
this.transactionInitiator = transactionInitiator;
|
|
225
|
-
if (value !== undefined) {
|
|
226
|
-
this.cardBrandTransactionId = value;
|
|
227
|
-
}
|
|
228
|
-
return this;
|
|
229
|
-
};
|
|
230
|
-
/**
|
|
231
|
-
* Sets the cash back amount.
|
|
232
|
-
*
|
|
233
|
-
* This is a specialized field for debit or EBT transactions.
|
|
234
|
-
*
|
|
235
|
-
* @param amount The desired cash back amount
|
|
236
|
-
* @returns AuthorizationBuilder
|
|
237
|
-
*/
|
|
238
|
-
AuthorizationBuilder.prototype.withCashBack = function (amount) {
|
|
239
|
-
if (amount !== undefined) {
|
|
240
|
-
this.cashBackAmount = amount;
|
|
241
|
-
this.transactionModifier = __1.TransactionModifier.CashBack;
|
|
242
|
-
}
|
|
243
|
-
return this;
|
|
244
|
-
};
|
|
245
|
-
/**
|
|
246
|
-
* Sets the client transaction ID.
|
|
247
|
-
*
|
|
248
|
-
* This is an application derived value that can be used to identify a
|
|
249
|
-
* transaction in case a gateway transaction ID is not returned, e.g.
|
|
250
|
-
* in cases of timeouts.
|
|
251
|
-
*
|
|
252
|
-
* The supplied value should be unique to the configured merchant or
|
|
253
|
-
* terminal account.
|
|
254
|
-
*
|
|
255
|
-
* @param clientTransactionId The client transaction ID
|
|
256
|
-
* @returns AuthorizationBuilder
|
|
257
|
-
*/
|
|
258
|
-
AuthorizationBuilder.prototype.withClientTransactionId = function (clientTransactionId) {
|
|
259
|
-
if (clientTransactionId === undefined) {
|
|
260
|
-
return this;
|
|
261
|
-
}
|
|
262
|
-
if (this.transactionType !== __1.TransactionType.Reversal &&
|
|
263
|
-
this.transactionType !== __1.TransactionType.Refund) {
|
|
264
|
-
this.clientTransactionId = clientTransactionId;
|
|
265
|
-
return this;
|
|
266
|
-
}
|
|
267
|
-
if (!(this.paymentMethod instanceof __1.TransactionReference)) {
|
|
268
|
-
this.paymentMethod = new __1.TransactionReference();
|
|
269
|
-
}
|
|
270
|
-
this
|
|
271
|
-
.paymentMethod.clientTransactionId = clientTransactionId;
|
|
272
|
-
return this;
|
|
273
|
-
};
|
|
274
|
-
/**
|
|
275
|
-
* Sets the transaction's currency; where applicable.
|
|
276
|
-
*
|
|
277
|
-
* The formatting for the supplied value will currently depend on
|
|
278
|
-
* the configured gateway's requirements.
|
|
279
|
-
*
|
|
280
|
-
* @param currency The currency
|
|
281
|
-
* @returns AuthorizationBuilder
|
|
282
|
-
*/
|
|
283
|
-
AuthorizationBuilder.prototype.withCurrency = function (currency) {
|
|
284
|
-
if (currency !== undefined) {
|
|
285
|
-
this.currency = currency;
|
|
286
|
-
}
|
|
287
|
-
return this;
|
|
288
|
-
};
|
|
289
|
-
/**
|
|
290
|
-
* Sets the customer ID; where applicable.
|
|
291
|
-
*
|
|
292
|
-
* This is an application/merchant generated value.
|
|
293
|
-
*
|
|
294
|
-
* @param customerId The customer ID
|
|
295
|
-
* @returns AuthorizationBuilder
|
|
296
|
-
*/
|
|
297
|
-
AuthorizationBuilder.prototype.withCustomerId = function (customerId) {
|
|
298
|
-
if (customerId !== undefined) {
|
|
299
|
-
this.customerId = customerId;
|
|
300
|
-
}
|
|
301
|
-
return this;
|
|
302
|
-
};
|
|
303
|
-
/**
|
|
304
|
-
* Sets the customer's IP address; where applicable.
|
|
305
|
-
*
|
|
306
|
-
* This value should be obtained during the payment process.
|
|
307
|
-
*
|
|
308
|
-
* @param customerIpAddress The customer's IP address
|
|
309
|
-
* @returns AuthorizationBuilder
|
|
310
|
-
*/
|
|
311
|
-
AuthorizationBuilder.prototype.withCustomerIpAddress = function (customerIpAddress) {
|
|
312
|
-
if (customerIpAddress !== undefined) {
|
|
313
|
-
this.customerIpAddress = customerIpAddress;
|
|
314
|
-
}
|
|
315
|
-
return this;
|
|
316
|
-
};
|
|
317
|
-
/**
|
|
318
|
-
* Sets the CVN value for recurring payments; where applicable.
|
|
319
|
-
*
|
|
320
|
-
* @param cvn CVN value to use in the request
|
|
321
|
-
* @returns AuthorizationBuilder
|
|
322
|
-
*/
|
|
323
|
-
AuthorizationBuilder.prototype.withCvn = function (cvn) {
|
|
324
|
-
if (cvn !== undefined) {
|
|
325
|
-
this.cvn = cvn;
|
|
326
|
-
}
|
|
327
|
-
return this;
|
|
328
|
-
};
|
|
329
|
-
/**
|
|
330
|
-
* Sets the transaction's description.
|
|
331
|
-
*
|
|
332
|
-
* This value is not guaranteed to be sent in the authorization
|
|
333
|
-
* or settlement process.
|
|
334
|
-
*
|
|
335
|
-
* @param description The description
|
|
336
|
-
* @returns AuthorizationBuilder
|
|
337
|
-
*/
|
|
338
|
-
AuthorizationBuilder.prototype.withDescription = function (description) {
|
|
339
|
-
if (description !== undefined) {
|
|
340
|
-
this.description = description;
|
|
341
|
-
}
|
|
342
|
-
return this;
|
|
343
|
-
};
|
|
344
|
-
/**
|
|
345
|
-
* Sets the transaction's dynamic descriptor.
|
|
346
|
-
*
|
|
347
|
-
* This value is sent during the authorization process and is displayed
|
|
348
|
-
* in the consumer's account.
|
|
349
|
-
*
|
|
350
|
-
* @param dynamicDescriptor The dynamic descriptor
|
|
351
|
-
* @returns AuthorizationBuilder
|
|
352
|
-
*/
|
|
353
|
-
AuthorizationBuilder.prototype.withDynamicDescriptor = function (dynamicDescriptor) {
|
|
354
|
-
if (dynamicDescriptor !== undefined) {
|
|
355
|
-
this.dynamicDescriptor = dynamicDescriptor;
|
|
356
|
-
}
|
|
357
|
-
return this;
|
|
358
|
-
};
|
|
359
|
-
/**
|
|
360
|
-
* Sets eCommerce specific data; where applicable.
|
|
361
|
-
*
|
|
362
|
-
* This can include:
|
|
363
|
-
*
|
|
364
|
-
* - Consumer authentication (3DSecure) data
|
|
365
|
-
* - Direct market data
|
|
366
|
-
*
|
|
367
|
-
* @param ecommerceInfo The eCommerce data
|
|
368
|
-
* @returns AuthorizationBuilder
|
|
369
|
-
*/
|
|
370
|
-
AuthorizationBuilder.prototype.withEcommerceInfo = function (ecommerceInfo) {
|
|
371
|
-
if (ecommerceInfo !== undefined) {
|
|
372
|
-
this.ecommerceInfo = ecommerceInfo;
|
|
373
|
-
}
|
|
374
|
-
return this;
|
|
375
|
-
};
|
|
376
|
-
/**
|
|
377
|
-
* Sets the gratuity amount; where applicable.
|
|
378
|
-
*
|
|
379
|
-
* This value is information only and does not affect
|
|
380
|
-
* the authorization amount.
|
|
381
|
-
*
|
|
382
|
-
* @param gratuity The gratuity amount
|
|
383
|
-
* @returns AuthorizationBuilder
|
|
384
|
-
*/
|
|
385
|
-
AuthorizationBuilder.prototype.withGratuity = function (gratuity) {
|
|
386
|
-
if (gratuity !== undefined) {
|
|
387
|
-
this.gratuity = gratuity;
|
|
388
|
-
}
|
|
389
|
-
return this;
|
|
390
|
-
};
|
|
391
|
-
/**
|
|
392
|
-
* Sets the Convenience amount; where applicable.
|
|
393
|
-
*
|
|
394
|
-
* @param convenienceAmt The Convenience amount
|
|
395
|
-
* @returns AuthorizationBuilder
|
|
396
|
-
*/
|
|
397
|
-
AuthorizationBuilder.prototype.withConvenienceAmt = function (convenienceAmt) {
|
|
398
|
-
if (convenienceAmt !== undefined) {
|
|
399
|
-
this.convenienceAmt = convenienceAmt;
|
|
400
|
-
}
|
|
401
|
-
return this;
|
|
402
|
-
};
|
|
403
|
-
/**
|
|
404
|
-
* Sets the Shipping amount; where applicable.
|
|
405
|
-
*
|
|
406
|
-
* @param shippingAmt The Shipping amount
|
|
407
|
-
* @returns AuthorizationBuilder
|
|
408
|
-
*/
|
|
409
|
-
AuthorizationBuilder.prototype.withShippingAmt = function (shippingAmt) {
|
|
410
|
-
if (shippingAmt !== undefined) {
|
|
411
|
-
this.shippingAmt = shippingAmt;
|
|
412
|
-
}
|
|
413
|
-
return this;
|
|
414
|
-
};
|
|
415
|
-
/**
|
|
416
|
-
* Additional hosted payment specific information for Realex HPP implementation.
|
|
417
|
-
*
|
|
418
|
-
* @param hostedPaymentData The hosted payment data
|
|
419
|
-
* @returns AuthorizationBuilder
|
|
420
|
-
*/
|
|
421
|
-
AuthorizationBuilder.prototype.withHostedPaymentData = function (hostedPaymentData) {
|
|
422
|
-
var client = __1.ServicesContainer.instance().getClient();
|
|
423
|
-
if (!client.supportsHostedPayments) {
|
|
424
|
-
throw new __1.UnsupportedTransactionError("Your current gateway does not support hosted payments.");
|
|
425
|
-
}
|
|
426
|
-
if (hostedPaymentData !== undefined) {
|
|
427
|
-
this.hostedPaymentData = hostedPaymentData;
|
|
428
|
-
}
|
|
429
|
-
return this;
|
|
430
|
-
};
|
|
431
|
-
/**
|
|
432
|
-
* Sets the invoice number; where applicable.
|
|
433
|
-
*
|
|
434
|
-
* @param invoiceNumber The invoice number
|
|
435
|
-
* @returns AuthorizationBuilder
|
|
436
|
-
*/
|
|
437
|
-
AuthorizationBuilder.prototype.withInvoiceNumber = function (invoiceNumber) {
|
|
438
|
-
if (invoiceNumber !== undefined) {
|
|
439
|
-
this.invoiceNumber = invoiceNumber;
|
|
440
|
-
}
|
|
441
|
-
return this;
|
|
442
|
-
};
|
|
443
|
-
/**
|
|
444
|
-
* Sets the commercial request flag; where applicable.
|
|
445
|
-
*
|
|
446
|
-
* This flag indicates commercial purchase cards are accepted/expected.
|
|
447
|
-
* The application should inspect the transaction response and pass the
|
|
448
|
-
* appropriate Level II data when necessary.
|
|
449
|
-
*
|
|
450
|
-
* @param level2Request The commercial request flag
|
|
451
|
-
* @returns AuthorizationBuilder
|
|
452
|
-
*/
|
|
453
|
-
AuthorizationBuilder.prototype.withCommercialRequest = function (level2Request) {
|
|
454
|
-
if (level2Request !== undefined) {
|
|
455
|
-
this.level2Request = level2Request;
|
|
456
|
-
}
|
|
457
|
-
return this;
|
|
458
|
-
};
|
|
459
|
-
/**
|
|
460
|
-
* Sets the offline authorization code; where applicable.
|
|
461
|
-
*
|
|
462
|
-
* The merchant is required to supply this value as obtained when
|
|
463
|
-
* calling the issuing bank for the authorization.
|
|
464
|
-
*
|
|
465
|
-
* @param offlineAuthCode The offline authorization code
|
|
466
|
-
* @returns AuthorizationBuilder
|
|
467
|
-
*/
|
|
468
|
-
AuthorizationBuilder.prototype.withOfflineAuthCode = function (offlineAuthCode) {
|
|
469
|
-
if (offlineAuthCode !== undefined) {
|
|
470
|
-
this.offlineAuthCode = offlineAuthCode;
|
|
471
|
-
this.transactionModifier = __1.TransactionModifier.Offline;
|
|
472
|
-
}
|
|
473
|
-
return this;
|
|
474
|
-
};
|
|
475
|
-
/**
|
|
476
|
-
* Sets the one-time payment flag; where applicable.
|
|
477
|
-
*
|
|
478
|
-
* This is only useful when using recurring payment profiles for
|
|
479
|
-
* one-time payments that are not a part of a recurring schedule.
|
|
480
|
-
*
|
|
481
|
-
* @param oneTimePayment The one-time flag
|
|
482
|
-
* @returns AuthorizationBuilder
|
|
483
|
-
*/
|
|
484
|
-
AuthorizationBuilder.prototype.withOneTimePayment = function (oneTimePayment) {
|
|
485
|
-
if (oneTimePayment !== undefined) {
|
|
486
|
-
this.oneTimePayment = oneTimePayment;
|
|
487
|
-
this.transactionModifier = __1.TransactionModifier.Recurring;
|
|
488
|
-
}
|
|
489
|
-
return this;
|
|
490
|
-
};
|
|
491
|
-
/**
|
|
492
|
-
* Sets the transaction's order ID; where applicable.
|
|
493
|
-
*
|
|
494
|
-
* @param orderId The order ID
|
|
495
|
-
* @returns AuthorizationBuilder
|
|
496
|
-
*/
|
|
497
|
-
AuthorizationBuilder.prototype.withOrderId = function (orderId) {
|
|
498
|
-
if (orderId !== undefined) {
|
|
499
|
-
this.orderId = orderId;
|
|
500
|
-
}
|
|
501
|
-
return this;
|
|
502
|
-
};
|
|
503
|
-
/**
|
|
504
|
-
* Sets the transaction's product ID; where applicable.
|
|
505
|
-
*
|
|
506
|
-
* @param productId The product ID
|
|
507
|
-
* @returns AuthorizationBuilder
|
|
508
|
-
*/
|
|
509
|
-
AuthorizationBuilder.prototype.withProductId = function (productId) {
|
|
510
|
-
if (productId !== undefined) {
|
|
511
|
-
this.productId = productId;
|
|
512
|
-
}
|
|
513
|
-
return this;
|
|
514
|
-
};
|
|
515
|
-
/**
|
|
516
|
-
* Sets the Recurring Info for Realex based recurring payments;
|
|
517
|
-
* where applicable.
|
|
518
|
-
*
|
|
519
|
-
* @param type The value can be 'fixed' or 'variable' depending on whether
|
|
520
|
-
* the amount will change for each transaction.
|
|
521
|
-
* @param sequence Indicates where in the recurring sequence the transaction
|
|
522
|
-
* occurs. Must be 'first' for the first transaction for this
|
|
523
|
-
* card, 'subsequent' for transactions after that, and 'last'
|
|
524
|
-
* for the final transaction of the set.
|
|
525
|
-
* @returns AuthorizationBuilder
|
|
526
|
-
*/
|
|
527
|
-
AuthorizationBuilder.prototype.withRecurringInfo = function (type, sequence) {
|
|
528
|
-
if (type !== undefined) {
|
|
529
|
-
this.recurringType = type;
|
|
530
|
-
}
|
|
531
|
-
if (sequence !== undefined) {
|
|
532
|
-
this.recurringSequence = sequence;
|
|
533
|
-
}
|
|
534
|
-
return this;
|
|
535
|
-
};
|
|
536
|
-
/**
|
|
537
|
-
* Requests multi-use tokenization / card storage.
|
|
538
|
-
*
|
|
539
|
-
* This will depend on a successful transaction. If there was a failure
|
|
540
|
-
* or decline, the multi-use tokenization / card storage will not be
|
|
541
|
-
* successful.
|
|
542
|
-
*
|
|
543
|
-
* @param requestMultiUseToken The request flag
|
|
544
|
-
* @returns AuthorizationBuilder
|
|
545
|
-
*/
|
|
546
|
-
AuthorizationBuilder.prototype.withRequestMultiUseToken = function (requestMultiUseToken) {
|
|
547
|
-
if (requestMultiUseToken !== undefined) {
|
|
548
|
-
this.requestMultiUseToken = requestMultiUseToken;
|
|
549
|
-
}
|
|
550
|
-
return this;
|
|
551
|
-
};
|
|
552
|
-
AuthorizationBuilder.prototype.withReplacementCard = function (replacementCard) {
|
|
553
|
-
if (replacementCard !== undefined) {
|
|
554
|
-
this.replacementCard = replacementCard;
|
|
555
|
-
}
|
|
556
|
-
return this;
|
|
557
|
-
};
|
|
558
|
-
/**
|
|
559
|
-
* Sets the schedule ID associated with the transaction; where applicable.
|
|
560
|
-
*
|
|
561
|
-
* This is specific to transactions against recurring profiles that are
|
|
562
|
-
* a part of a recurring schedule.
|
|
563
|
-
*
|
|
564
|
-
* @param scheduleId The schedule ID
|
|
565
|
-
* @returns AuthorizationBuilder
|
|
566
|
-
*/
|
|
567
|
-
AuthorizationBuilder.prototype.withScheduleId = function (scheduleId) {
|
|
568
|
-
if (scheduleId !== undefined) {
|
|
569
|
-
this.scheduleId = scheduleId;
|
|
570
|
-
}
|
|
571
|
-
return this;
|
|
572
|
-
};
|
|
573
|
-
/**
|
|
574
|
-
* Sets the related gateway transaction ID; where applicable.
|
|
575
|
-
*
|
|
576
|
-
* This value is used to associated a previous transaction with the
|
|
577
|
-
* current transaction.
|
|
578
|
-
*
|
|
579
|
-
* @param transactionId The gateway transaction ID
|
|
580
|
-
* @returns AuthorizationBuilder
|
|
581
|
-
*/
|
|
582
|
-
AuthorizationBuilder.prototype.withTransactionId = function (transactionId) {
|
|
583
|
-
if (transactionId === undefined) {
|
|
584
|
-
return this;
|
|
585
|
-
}
|
|
586
|
-
if (this.paymentMethod instanceof __1.TransactionReference) {
|
|
587
|
-
this.paymentMethod.transactionId = transactionId;
|
|
588
|
-
return this;
|
|
589
|
-
}
|
|
590
|
-
return this.withPaymentMethod(new __1.TransactionReference(transactionId));
|
|
591
|
-
};
|
|
592
|
-
AuthorizationBuilder.prototype.withTimestamp = function (timestamp) {
|
|
593
|
-
if (timestamp !== undefined) {
|
|
594
|
-
this.timestamp = timestamp;
|
|
595
|
-
}
|
|
596
|
-
return this;
|
|
597
|
-
};
|
|
598
|
-
return AuthorizationBuilder;
|
|
599
|
-
}(TransactionBuilder_1.TransactionBuilder));
|
|
600
|
-
exports.AuthorizationBuilder = AuthorizationBuilder;
|
|
601
|
-
//# sourceMappingURL=AuthorizationBuilder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AuthorizationBuilder.js","sourceRoot":"","sources":["../../../src/Builders/AuthorizationBuilder.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,yBAoBa;AACb,2DAA0D;AAE1D;IAA0C,wCAA+B;IAsCvE,8BAAmB,IAAY,EAAE,aAA8B;QAA/D,YACE,kBAAM,IAAI,EAAE,aAAa,CAAC,SAK3B;QAHC,IAAI,aAAa,EAAE;YACjB,KAAI,CAAC,aAAa,GAAG,aAA8B,CAAC;SACrD;;IACH,CAAC;IAED;;;;OAIG;IACI,sCAAO,GAAd,UAAe,UAA8B;QAA9B,2BAAA,EAAA,sBAA8B;QAC3C,iBAAM,OAAO,WAAE,CAAC;QAChB,OAAO,qBAAiB,CAAC,QAAQ,EAAE;aAChC,SAAS,CAAC,UAAU,CAAC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ACd,CAAC;IAED;;;;;;;;;OASG;IACI,uDAAwB,GAA/B,UAAgC,oBAA8B;QAC5D,IAAI,oBAAoB,KAAK,SAAS,EAAE;YACtC,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;SAClD;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,kDAAmB,GAA1B,UAA2B,eAA0B;QACnD,IAAI,eAAe,KAAK,SAAS,EAAE;YACjC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;SACxC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;OAQG;IACI,6CAAc,GAArB,UAAsB,UAAmB;QACvC,IAAI,UAAU,KAAK,SAAS,EAAE;YAC5B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;SAC9B;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;OAQG;IACI,gDAAiB,GAAxB,UAAyB,aAAsB;QAC7C,IAAI,aAAa,KAAK,SAAS,EAAE;YAC/B,OAAO,IAAI,CAAC;SACb;QAED,IAAI,IAAI,CAAC,aAAa,YAAY,wBAAoB,EAAE;YACtD,IAAI,CAAC,aAAa,CAAC,aAAa,GAAG,aAAa,CAAC;YACjD,OAAO,IAAI,CAAC;SACb;QAED,OAAO,IAAI,CAAC,iBAAiB,CAAC,IAAI,wBAAoB,CAAC,aAAa,CAAC,CAAC,CAAC;IACzE,CAAC;IAEM,4CAAa,GAApB,UAAqB,SAAkB;QACrC,IAAI,SAAS,KAAK,SAAS,EAAE;YAC3B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;SAC5B;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IACH,2BAAC;AAAD,CAAC,AAzqBD,CAA0C,uCAAkB,GAyqB3D;AAzqBY,oDAAoB"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { BaseBuilder } from "../";
|
|
2
|
-
import { Validations } from "./Validations";
|
|
3
|
-
import { ValidationTarget } from "./ValidationTarget";
|
|
4
|
-
export declare class ValidationClause {
|
|
5
|
-
parent: Validations;
|
|
6
|
-
target: ValidationTarget;
|
|
7
|
-
callback: <T>(build: BaseBuilder<T>) => boolean;
|
|
8
|
-
message: string;
|
|
9
|
-
precondition: boolean;
|
|
10
|
-
constructor(parent: Validations, target: ValidationTarget, precondition?: boolean);
|
|
11
|
-
isNotNull(message?: string): ValidationTarget;
|
|
12
|
-
isNull(message?: string): ValidationTarget;
|
|
13
|
-
isNotEmpty(message?: string): ValidationTarget;
|
|
14
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ValidationClause = void 0;
|
|
4
|
-
var ValidationClause = /** @class */ (function () {
|
|
5
|
-
function ValidationClause(parent, target, precondition) {
|
|
6
|
-
if (precondition === void 0) { precondition = false; }
|
|
7
|
-
this.parent = parent;
|
|
8
|
-
this.target = target;
|
|
9
|
-
this.precondition = precondition;
|
|
10
|
-
}
|
|
11
|
-
ValidationClause.prototype.isNotNull = function (message) {
|
|
12
|
-
var _this = this;
|
|
13
|
-
this.callback = function (builder) {
|
|
14
|
-
var value = builder[_this.target.property];
|
|
15
|
-
return undefined !== value && null !== value;
|
|
16
|
-
};
|
|
17
|
-
this.message = message
|
|
18
|
-
? message
|
|
19
|
-
: this.target.property + " cannot be null for this transaction type.";
|
|
20
|
-
if (this.precondition) {
|
|
21
|
-
return this.target;
|
|
22
|
-
}
|
|
23
|
-
return this.parent
|
|
24
|
-
.of(this.target.enumName, this.target.type)
|
|
25
|
-
.with(this.target.constraintProperty, this.target.constraint);
|
|
26
|
-
};
|
|
27
|
-
ValidationClause.prototype.isNull = function (message) {
|
|
28
|
-
var _this = this;
|
|
29
|
-
this.callback = function (builder) {
|
|
30
|
-
var value = builder[_this.target.property];
|
|
31
|
-
return undefined === value || null === value;
|
|
32
|
-
};
|
|
33
|
-
this.message = message
|
|
34
|
-
? message
|
|
35
|
-
: this.target.property + " cannot be set for this transaction type.";
|
|
36
|
-
if (this.precondition) {
|
|
37
|
-
return this.target;
|
|
38
|
-
}
|
|
39
|
-
return this.parent
|
|
40
|
-
.of(this.target.enumName, this.target.type)
|
|
41
|
-
.with(this.target.constraintProperty, this.target.constraint);
|
|
42
|
-
};
|
|
43
|
-
ValidationClause.prototype.isNotEmpty = function (message) {
|
|
44
|
-
var _this = this;
|
|
45
|
-
this.callback = function (builder) {
|
|
46
|
-
var value = builder[_this.target.property];
|
|
47
|
-
return !!value;
|
|
48
|
-
};
|
|
49
|
-
this.message = message
|
|
50
|
-
? message
|
|
51
|
-
: this.target.property + " cannot be empty for this transaction type.";
|
|
52
|
-
if (this.precondition) {
|
|
53
|
-
return this.target;
|
|
54
|
-
}
|
|
55
|
-
return this.parent
|
|
56
|
-
.of(this.target.enumName, this.target.type)
|
|
57
|
-
.with(this.target.constraintProperty, this.target.constraint);
|
|
58
|
-
};
|
|
59
|
-
return ValidationClause;
|
|
60
|
-
}());
|
|
61
|
-
exports.ValidationClause = ValidationClause;
|
|
62
|
-
//# sourceMappingURL=ValidationClause.js.map
|