@blockchyp/blockchyp-ts 2.28.1 → 2.30.1
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/README.md +40 -0
- package/_bundles/blockchyp.js +286 -4
- package/_bundles/blockchyp.js.map +1 -1
- package/_bundles/blockchyp.min.js +1 -1
- package/_bundles/blockchyp.min.js.map +1 -1
- package/lib/src/client.d.ts +4 -0
- package/lib/src/client.js +6 -0
- package/lib/src/client.js.map +1 -1
- package/lib/src/models.d.ts +298 -6
- package/lib/src/models.js +280 -4
- package/lib/src/models.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +7 -0
- package/src/models.ts +514 -3
package/README.md
CHANGED
|
@@ -70,6 +70,46 @@ These are the core payment APIs used to execute and work with payment transactio
|
|
|
70
70
|
|
|
71
71
|
|
|
72
72
|
|
|
73
|
+
#### Surcharge Review
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
* **API Credential Types:** Merchant
|
|
78
|
+
* **Required Role:** Payment API Access
|
|
79
|
+
|
|
80
|
+
This API calculates surcharge information for a payment request.
|
|
81
|
+
|
|
82
|
+
If you're using BlockChyp's surcharging features, you can use this endpoint
|
|
83
|
+
to preview the surcharge amounts before processing a transaction. This allows
|
|
84
|
+
you to display accurate pricing information to customers before completing
|
|
85
|
+
the payment.
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
```typescript
|
|
91
|
+
import * as BlockChyp from '@blockchyp/blockchyp-ts';
|
|
92
|
+
|
|
93
|
+
const client = BlockChyp.newClient({
|
|
94
|
+
apiKey: 'ZDSMMZLGRPBPRTJUBTAFBYZ33Q',
|
|
95
|
+
bearerToken: 'ZLBW5NR4U5PKD5PNP3ZP3OZS5U',
|
|
96
|
+
signingKey: '9c6a5e8e763df1c9256e3d72bd7f53dfbd07312938131c75b3bfd254da787947'
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
const request = new BlockChyp.PricingRequest();
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
client.surchargeReview(request)
|
|
103
|
+
.then(function(httpResponse) {
|
|
104
|
+
const response: BlockChyp.PricingResponse = httpResponse.data;
|
|
105
|
+
console.log('Response: ' + JSON.stringify(response));
|
|
106
|
+
})
|
|
107
|
+
.catch(function (error: any) {
|
|
108
|
+
console.log(error);
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
|
|
73
113
|
#### Charge
|
|
74
114
|
|
|
75
115
|
|
package/_bundles/blockchyp.js
CHANGED
|
@@ -29597,6 +29597,12 @@ class BlockChypClient {
|
|
|
29597
29597
|
locate(request) {
|
|
29598
29598
|
return this._gatewayRequest('post', '/api/terminal-locate', request);
|
|
29599
29599
|
}
|
|
29600
|
+
/**
|
|
29601
|
+
* Calculates surcharge information for a payment request.
|
|
29602
|
+
*/
|
|
29603
|
+
surchargeReview(request) {
|
|
29604
|
+
return this._gatewayRequest('post', '/api/surcharge-review', request);
|
|
29605
|
+
}
|
|
29600
29606
|
/**
|
|
29601
29607
|
* Captures a preauthorization.
|
|
29602
29608
|
*/
|
|
@@ -30367,7 +30373,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
30367
30373
|
exports.TransactionStatus = exports.PaymentLinkStatusResponse = exports.PaymentLinkStatusRequest = exports.TransactionStatusRequest = exports.AuthorizationResponse = exports.TermsAndConditionsResponse = exports.TermsAndConditionsRequest = exports.CloseBatchResponse = exports.CloseBatchRequest = exports.GiftActivateResponse = exports.GiftActivateRequest = exports.ClearTerminalRequest = exports.EnrollResponse = exports.EnrollRequest = exports.VoidResponse = exports.VoidRequest = exports.CaptureResponse = exports.CaptureRequest = exports.RefundRequest = exports.BalanceResponse = exports.BalanceRequest = exports.CardMetadataResponse = exports.CardMetadataRequest = exports.CardMetadata = exports.AuthorizationRequest = exports.WhiteListedCard = exports.BooleanPromptResponse = exports.TextPromptResponse = exports.CustomerToken = exports.UpdateTokenResponse = exports.UpdateTokenRequest = exports.TokenMetadataResponse = exports.TokenMetadataRequest = exports.Customer = exports.CustomerSearchResponse = exports.UpdateCustomerRequest = exports.CustomerSearchRequest = exports.CustomerResponse = exports.CustomerRequest = exports.TextPromptRequest = exports.BooleanPromptRequest = exports.MessageRequest = exports.LocateResponse = exports.LocateRequest = exports.PingResponse = exports.PingRequest = exports.CaptureSignatureResponse = exports.CaptureSignatureRequest = exports.Acknowledgement = exports.ReceiptSuggestions = void 0;
|
|
30368
30374
|
exports.UpdateMerchantPlatformRequest = exports.MerchantPlatformsResponse = exports.MerchantUser = exports.MerchantUsersResponse = exports.GetMerchantsResponse = exports.GetMerchantsRequest = exports.HealthcareGroup = exports.HealthcareMetadata = exports.UnlinkTokenRequest = exports.LinkTokenRequest = exports.DeleteTokenResponse = exports.DeleteTokenRequest = exports.DeleteCustomerResponse = exports.DeleteCustomerRequest = exports.DeleteQueuedTransactionResponse = exports.DeleteQueuedTransactionRequest = exports.ListQueuedTransactionsResponse = exports.ListQueuedTransactionsRequest = exports.BankAccount = exports.MerchantProfileResponse = exports.MerchantProfile = exports.Address = exports.InviteMerchantUserRequest = exports.MerchantPlatformRequest = exports.MerchantProfileRequest = exports.AddGatewayMerchantRequest = exports.AddTestMerchantRequest = exports.TerminalVolume = exports.BatchDetailsResponse = exports.BatchDetailsRequest = exports.BatchSummary = exports.BatchHistoryResponse = exports.BatchHistoryRequest = exports.TransactionHistoryResponse = exports.TransactionHistoryRequest = exports.CashDiscountResponse = exports.CashDiscountRequest = exports.ResendPaymentLinkResponse = exports.ResendPaymentLinkRequest = exports.CancelPaymentLinkResponse = exports.CancelPaymentLinkRequest = exports.PaymentLinkResponse = exports.PaymentLinkRequest = exports.TerminalStatusResponse = exports.TerminalStatusRequest = exports.HeartbeatResponse = exports.TransactionDisplayRequest = exports.TransactionDisplayTransaction = exports.TransactionDisplayItem = exports.TransactionDisplayDiscount = void 0;
|
|
30369
30375
|
exports.StatementDeposit = exports.InvoicePayment = exports.InvoiceLineItem = exports.MerchantInvoiceDetailResponse = exports.MerchantInvoiceDetailRequest = exports.MerchantInvoiceSummary = exports.MerchantInvoiceListResponse = exports.MerchantInvoiceListRequest = exports.PartnerStatementAdjustment = exports.PartnerStatementDisbursement = exports.PartnerStatementLineItem = exports.PartnerStatementDetailResponse = exports.PartnerStatementDetailRequest = exports.PartnerStatementListResponse = exports.PartnerStatementSummary = exports.PartnerStatementListRequest = exports.PricingPolicyResponse = exports.PricePoint = exports.PricingPolicyRequest = exports.BrandingAssetResponse = exports.BrandingAsset = exports.BrandingAssetRequest = exports.SlideShowRequest = exports.SlideShowResponse = exports.SlideShow = exports.Slide = exports.MediaLibraryResponse = exports.MediaRequest = exports.UploadStatusRequest = exports.UploadStatus = exports.UploadMetadata = exports.MediaMetadata = exports.SurveyResultsRequest = exports.SurveyDataPoint = exports.SurveyQuestionResponse = exports.SurveyQuestionRequest = exports.SurveyQuestion = exports.TermsAndConditionsLogEntry = exports.TermsAndConditionsLogResponse = exports.TermsAndConditionsLogRequest = exports.TermsAndConditionsTemplateResponse = exports.TermsAndConditionsTemplateRequest = exports.TermsAndConditionsTemplate = exports.TerminalProfile = exports.TerminalActivationRequest = exports.TerminalDeactivationRequest = exports.TerminalProfileResponse = exports.TerminalProfileRequest = exports.MerchantPlatform = exports.UpdateMerchantPlatformResponse = void 0;
|
|
30370
|
-
exports.
|
|
30376
|
+
exports.PaymentMethod = exports.PaymentAmounts = exports.CryptocurrencyResponse = exports.PaymentMethodResponse = exports.CoreRequest = exports.TimeoutRequest = exports.ApprovalResponse = exports.SignatureRequest = exports.SignatureResponse = exports.TerminalReference = exports.AbstractAcknowledgement = exports.TerminalDeleteQueuedTransactionRequest = exports.TerminalListQueuedTransactionsRequest = exports.TerminalTerminalStatusRequest = exports.TerminalTransactionDisplayRequest = exports.TerminalTermsAndConditionsResponse = exports.TerminalTermsAndConditionsRequest = exports.TerminalGiftActivateRequest = exports.TerminalClearTerminalRequest = exports.TerminalEnrollRequest = exports.TerminalRefundRequest = exports.TerminalBalanceRequest = exports.TerminalCardMetadataRequest = exports.TerminalAuthorizationRequest = exports.TerminalTextPromptRequest = exports.TerminalBooleanPromptRequest = exports.TerminalMessageRequest = exports.TerminalLocateRequest = exports.TerminalPingRequest = exports.TerminalCaptureSignatureRequest = exports.PricingResponse = exports.ErrorType = exports.PricingResponseData = exports.PricingResponseAttributes = exports.PricingRequest = exports.PricingRequestData = exports.PricingRequestAttributes = exports.PricingMerchantSettings = exports.StateCheckSettings = exports.SubmitApplicationRequest = exports.MerchantApplication = exports.ApplicationAccount = exports.Owner = exports.AggregateBillingLineItemStats = exports.AggregateBillingLineItem = exports.BuyRateLineItem = exports.MerchantCredentialGenerationResponse = exports.MerchantCredentialGenerationRequest = exports.PartnerCommissionBreakdownResponse = exports.PartnerCommissionBreakdownRequest = void 0;
|
|
30377
|
+
exports.CoreResponse = exports.PreviousTransaction = exports.Subtotals = exports.RequestAmount = void 0;
|
|
30371
30378
|
// CardType is used to differentiate credit, debit, and EBT.
|
|
30372
30379
|
var CardType;
|
|
30373
30380
|
(function (CardType) {
|
|
@@ -31515,7 +31522,7 @@ exports.WhiteListedCard = WhiteListedCard;
|
|
|
31515
31522
|
*/
|
|
31516
31523
|
class AuthorizationRequest {
|
|
31517
31524
|
// Constructor with default values for optional fields
|
|
31518
|
-
constructor(timeout = null, test = null, transactionRef = undefined, autogeneratedRef = null, async = null, queue = null, waitForRemovedCard = false, force = false, orderRef = undefined, destinationAccount = undefined, testCase = undefined, token = undefined, track1 = undefined, track2 = undefined, pan = undefined, routingNumber = undefined, cardholderName = undefined, expMonth = undefined, expYear = undefined, cvv = undefined, address = undefined, postalCode = undefined, country = undefined, manualEntry = false, ksn = undefined, pinBlock = undefined, cardType = undefined, paymentType = undefined, currencyCode = null, amount = null, taxExempt = null, surcharge = null, cashDiscount = null, sigFile = undefined, sigFormat = undefined, sigWidth = 0, disableSignature = false, tipAmount = undefined, taxAmount = undefined, terminalName = undefined, resetConnection = null, transactionId = undefined, onlineAuthCode = undefined, enroll = false, bypassDupeFilter = false, description = undefined, promptForTip = false, cashBackEnabled = false, cardOnFile = false, recurring = false, cit = false, mit = false, subscription = false, purchaseOrderNumber = undefined, supplierReferenceNumber = undefined, lineItems = null, altPrices = undefined, customer = undefined, roundingMode = undefined, healthcareMetadata = undefined, cryptocurrency = undefined, cryptoNetwork = undefined, cryptoReceiveAddress = undefined, paymentRequestLabel = undefined, paymentRequestMessage = undefined, simulateChipRejection = false, simulateOutOfOrderReversal = false, asyncReversals = false, passthroughSurcharge = undefined, healthcare = false, healthcareTotal = undefined, ebtTotal = undefined, cardMetadataLookup = false, shippingAmount = undefined, processorId = undefined, externalCustomerId = undefined) {
|
|
31525
|
+
constructor(timeout = null, test = null, transactionRef = undefined, autogeneratedRef = null, async = null, queue = null, waitForRemovedCard = false, force = false, orderRef = undefined, destinationAccount = undefined, testCase = undefined, token = undefined, track1 = undefined, track2 = undefined, pan = undefined, routingNumber = undefined, cardholderName = undefined, expMonth = undefined, expYear = undefined, cvv = undefined, address = undefined, postalCode = undefined, country = undefined, manualEntry = false, ksn = undefined, pinBlock = undefined, cardType = undefined, paymentType = undefined, currencyCode = null, amount = null, taxExempt = null, surcharge = null, cashDiscount = null, sigFile = undefined, sigFormat = undefined, sigWidth = 0, disableSignature = false, tipAmount = undefined, taxAmount = undefined, terminalName = undefined, resetConnection = null, transactionId = undefined, onlineAuthCode = undefined, enroll = false, bypassDupeFilter = false, description = undefined, promptForTip = false, cashBackEnabled = false, cardOnFile = false, recurring = false, cit = false, mit = false, subscription = false, purchaseOrderNumber = undefined, supplierReferenceNumber = undefined, lineItems = null, altPrices = undefined, customer = undefined, roundingMode = undefined, healthcareMetadata = undefined, cryptocurrency = undefined, cryptoNetwork = undefined, cryptoReceiveAddress = undefined, paymentRequestLabel = undefined, paymentRequestMessage = undefined, simulateChipRejection = false, simulateOutOfOrderReversal = false, asyncReversals = false, passthroughSurcharge = undefined, healthcare = false, healthcareTotal = undefined, ebtTotal = undefined, cardMetadataLookup = false, totalDiscountAmount = undefined, shippingAmount = undefined, dutyAmount = undefined, processorId = undefined, externalCustomerId = undefined, destinationCountryCode = undefined, shipFromPostalCode = undefined, shipToPostalCode = undefined, orderDate = undefined, shipmentCount = null, shipmentNumber = null) {
|
|
31519
31526
|
/**
|
|
31520
31527
|
* The request timeout in seconds.
|
|
31521
31528
|
*/
|
|
@@ -31569,6 +31576,14 @@ class AuthorizationRequest {
|
|
|
31569
31576
|
* An item to display. Can be overwritten or appended, based on the request type.
|
|
31570
31577
|
*/
|
|
31571
31578
|
this.lineItems = null;
|
|
31579
|
+
/**
|
|
31580
|
+
* The number of shipments the original authorization will be broken into.
|
|
31581
|
+
*/
|
|
31582
|
+
this.shipmentCount = null;
|
|
31583
|
+
/**
|
|
31584
|
+
* Which shipment this particular capture is for.
|
|
31585
|
+
*/
|
|
31586
|
+
this.shipmentNumber = null;
|
|
31572
31587
|
this.timeout = timeout;
|
|
31573
31588
|
this.test = test;
|
|
31574
31589
|
this.transactionRef = transactionRef;
|
|
@@ -31642,9 +31657,17 @@ class AuthorizationRequest {
|
|
|
31642
31657
|
this.healthcareTotal = healthcareTotal;
|
|
31643
31658
|
this.ebtTotal = ebtTotal;
|
|
31644
31659
|
this.cardMetadataLookup = cardMetadataLookup;
|
|
31660
|
+
this.totalDiscountAmount = totalDiscountAmount;
|
|
31645
31661
|
this.shippingAmount = shippingAmount;
|
|
31662
|
+
this.dutyAmount = dutyAmount;
|
|
31646
31663
|
this.processorId = processorId;
|
|
31647
31664
|
this.externalCustomerId = externalCustomerId;
|
|
31665
|
+
this.destinationCountryCode = destinationCountryCode;
|
|
31666
|
+
this.shipFromPostalCode = shipFromPostalCode;
|
|
31667
|
+
this.shipToPostalCode = shipToPostalCode;
|
|
31668
|
+
this.orderDate = orderDate;
|
|
31669
|
+
this.shipmentCount = shipmentCount;
|
|
31670
|
+
this.shipmentNumber = shipmentNumber;
|
|
31648
31671
|
}
|
|
31649
31672
|
}
|
|
31650
31673
|
exports.AuthorizationRequest = AuthorizationRequest;
|
|
@@ -32109,7 +32132,7 @@ exports.RefundRequest = RefundRequest;
|
|
|
32109
32132
|
*/
|
|
32110
32133
|
class CaptureRequest {
|
|
32111
32134
|
// Constructor with default values for optional fields
|
|
32112
|
-
constructor(timeout = null, test = null, transactionRef = undefined, autogeneratedRef = null, async = null, queue = null, waitForRemovedCard = false, force = false, orderRef = undefined, destinationAccount = undefined, testCase = undefined, transactionId = null, currencyCode = null, amount = null, taxExempt = null, surcharge = null, cashDiscount = null, tipAmount = undefined, taxAmount = undefined, shipmentCount = null, shipmentNumber = null) {
|
|
32135
|
+
constructor(timeout = null, test = null, transactionRef = undefined, autogeneratedRef = null, async = null, queue = null, waitForRemovedCard = false, force = false, orderRef = undefined, destinationAccount = undefined, testCase = undefined, transactionId = null, currencyCode = null, amount = null, taxExempt = null, surcharge = null, cashDiscount = null, tipAmount = undefined, taxAmount = undefined, shipmentCount = null, shipmentNumber = null, passthroughSurcharge = undefined) {
|
|
32113
32136
|
/**
|
|
32114
32137
|
* The request timeout in seconds.
|
|
32115
32138
|
*/
|
|
@@ -32187,6 +32210,7 @@ class CaptureRequest {
|
|
|
32187
32210
|
this.taxAmount = taxAmount;
|
|
32188
32211
|
this.shipmentCount = shipmentCount;
|
|
32189
32212
|
this.shipmentNumber = shipmentNumber;
|
|
32213
|
+
this.passthroughSurcharge = passthroughSurcharge;
|
|
32190
32214
|
}
|
|
32191
32215
|
}
|
|
32192
32216
|
exports.CaptureRequest = CaptureRequest;
|
|
@@ -33618,7 +33642,7 @@ exports.TransactionDisplayDiscount = TransactionDisplayDiscount;
|
|
|
33618
33642
|
*/
|
|
33619
33643
|
class TransactionDisplayItem {
|
|
33620
33644
|
// Constructor with default values for optional fields
|
|
33621
|
-
constructor(id = null, description = null, price = null, quantity = null, extended = null, unitCode = null, commodityCode = null, productCode = null, discounts = null) {
|
|
33645
|
+
constructor(id = null, description = null, price = null, quantity = null, extended = null, unitCode = null, commodityCode = null, productCode = null, discounts = null, taxAmount = undefined, taxRate = undefined, discountCode = undefined) {
|
|
33622
33646
|
/**
|
|
33623
33647
|
* A unique value identifying the item. This is not required, but recommended since it is
|
|
33624
33648
|
* required to update or delete line items.
|
|
@@ -33667,6 +33691,9 @@ class TransactionDisplayItem {
|
|
|
33667
33691
|
this.commodityCode = commodityCode;
|
|
33668
33692
|
this.productCode = productCode;
|
|
33669
33693
|
this.discounts = discounts;
|
|
33694
|
+
this.taxAmount = taxAmount;
|
|
33695
|
+
this.taxRate = taxRate;
|
|
33696
|
+
this.discountCode = discountCode;
|
|
33670
33697
|
}
|
|
33671
33698
|
}
|
|
33672
33699
|
exports.TransactionDisplayItem = TransactionDisplayItem;
|
|
@@ -40366,6 +40393,261 @@ class SubmitApplicationRequest {
|
|
|
40366
40393
|
}
|
|
40367
40394
|
}
|
|
40368
40395
|
exports.SubmitApplicationRequest = SubmitApplicationRequest;
|
|
40396
|
+
/**
|
|
40397
|
+
* Models settings related to state checks for a merchant.
|
|
40398
|
+
*/
|
|
40399
|
+
class StateCheckSettings {
|
|
40400
|
+
// Constructor with default values for optional fields
|
|
40401
|
+
constructor(enabled = null, surchargeExemptStates = null) {
|
|
40402
|
+
/**
|
|
40403
|
+
* If state checks are enabled for the merchant.
|
|
40404
|
+
*/
|
|
40405
|
+
this.enabled = null;
|
|
40406
|
+
/**
|
|
40407
|
+
* The list of states that are exempt from surcharges.
|
|
40408
|
+
*/
|
|
40409
|
+
this.surchargeExemptStates = null;
|
|
40410
|
+
this.enabled = enabled;
|
|
40411
|
+
this.surchargeExemptStates = surchargeExemptStates;
|
|
40412
|
+
}
|
|
40413
|
+
}
|
|
40414
|
+
exports.StateCheckSettings = StateCheckSettings;
|
|
40415
|
+
/**
|
|
40416
|
+
* Models merchant settings and configuration.
|
|
40417
|
+
*/
|
|
40418
|
+
class PricingMerchantSettings {
|
|
40419
|
+
// Constructor with default values for optional fields
|
|
40420
|
+
constructor(account = null, gateway = null, surchargingEnabled = null, customSurchargePercent = 0, reducedRate = false, inversePricingEnabled = false, creditDiscountRate = 0, acquiringSolution = null, acceptDebit = false, stateCheckSettings = undefined) {
|
|
40421
|
+
/**
|
|
40422
|
+
* The merchant account identifier.
|
|
40423
|
+
*/
|
|
40424
|
+
this.account = null;
|
|
40425
|
+
/**
|
|
40426
|
+
* The gateway identifier.
|
|
40427
|
+
*/
|
|
40428
|
+
this.gateway = null;
|
|
40429
|
+
/**
|
|
40430
|
+
* Whether surcharging is enabled for the merchant.
|
|
40431
|
+
*/
|
|
40432
|
+
this.surchargingEnabled = null;
|
|
40433
|
+
/**
|
|
40434
|
+
* The acquiring solution identifier.
|
|
40435
|
+
*/
|
|
40436
|
+
this.acquiringSolution = null;
|
|
40437
|
+
this.account = account;
|
|
40438
|
+
this.gateway = gateway;
|
|
40439
|
+
this.surchargingEnabled = surchargingEnabled;
|
|
40440
|
+
this.customSurchargePercent = customSurchargePercent;
|
|
40441
|
+
this.reducedRate = reducedRate;
|
|
40442
|
+
this.inversePricingEnabled = inversePricingEnabled;
|
|
40443
|
+
this.creditDiscountRate = creditDiscountRate;
|
|
40444
|
+
this.acquiringSolution = acquiringSolution;
|
|
40445
|
+
this.acceptDebit = acceptDebit;
|
|
40446
|
+
this.stateCheckSettings = stateCheckSettings;
|
|
40447
|
+
}
|
|
40448
|
+
}
|
|
40449
|
+
exports.PricingMerchantSettings = PricingMerchantSettings;
|
|
40450
|
+
/**
|
|
40451
|
+
* Models the attributes for a pricing request.
|
|
40452
|
+
*/
|
|
40453
|
+
class PricingRequestAttributes {
|
|
40454
|
+
// Constructor with default values for optional fields
|
|
40455
|
+
constructor(cardNumber = undefined, token = null, merchantIdentifier = undefined, amount = null, country = undefined, postalCode = undefined, state = undefined, merchantSettings = undefined) {
|
|
40456
|
+
/**
|
|
40457
|
+
* The payment token.
|
|
40458
|
+
*/
|
|
40459
|
+
this.token = null;
|
|
40460
|
+
/**
|
|
40461
|
+
* The transaction amount.
|
|
40462
|
+
*/
|
|
40463
|
+
this.amount = null;
|
|
40464
|
+
this.cardNumber = cardNumber;
|
|
40465
|
+
this.token = token;
|
|
40466
|
+
this.merchantIdentifier = merchantIdentifier;
|
|
40467
|
+
this.amount = amount;
|
|
40468
|
+
this.country = country;
|
|
40469
|
+
this.postalCode = postalCode;
|
|
40470
|
+
this.state = state;
|
|
40471
|
+
this.merchantSettings = merchantSettings;
|
|
40472
|
+
}
|
|
40473
|
+
}
|
|
40474
|
+
exports.PricingRequestAttributes = PricingRequestAttributes;
|
|
40475
|
+
/**
|
|
40476
|
+
* Models the data wrapper for a pricing request.
|
|
40477
|
+
*/
|
|
40478
|
+
class PricingRequestData {
|
|
40479
|
+
// Constructor with default values for optional fields
|
|
40480
|
+
constructor(type = null, attributes = null) {
|
|
40481
|
+
/**
|
|
40482
|
+
* The type of the request.
|
|
40483
|
+
*/
|
|
40484
|
+
this.type = null;
|
|
40485
|
+
/**
|
|
40486
|
+
* The pricing request attributes.
|
|
40487
|
+
*/
|
|
40488
|
+
this.attributes = null;
|
|
40489
|
+
this.type = type;
|
|
40490
|
+
this.attributes = attributes;
|
|
40491
|
+
}
|
|
40492
|
+
}
|
|
40493
|
+
exports.PricingRequestData = PricingRequestData;
|
|
40494
|
+
/**
|
|
40495
|
+
* Models a pricing request.
|
|
40496
|
+
*/
|
|
40497
|
+
class PricingRequest {
|
|
40498
|
+
// Constructor with default values for optional fields
|
|
40499
|
+
constructor(timeout = null, test = null, data = null) {
|
|
40500
|
+
/**
|
|
40501
|
+
* The request timeout in seconds.
|
|
40502
|
+
*/
|
|
40503
|
+
this.timeout = null;
|
|
40504
|
+
/**
|
|
40505
|
+
* Whether or not to route transaction to the test gateway.
|
|
40506
|
+
*/
|
|
40507
|
+
this.test = null;
|
|
40508
|
+
/**
|
|
40509
|
+
* The pricing request data.
|
|
40510
|
+
*/
|
|
40511
|
+
this.data = null;
|
|
40512
|
+
this.timeout = timeout;
|
|
40513
|
+
this.test = test;
|
|
40514
|
+
this.data = data;
|
|
40515
|
+
}
|
|
40516
|
+
}
|
|
40517
|
+
exports.PricingRequest = PricingRequest;
|
|
40518
|
+
/**
|
|
40519
|
+
* Models pricing response data for new handler for pricing api responses.
|
|
40520
|
+
*/
|
|
40521
|
+
class PricingResponseAttributes {
|
|
40522
|
+
// Constructor with default values for optional fields
|
|
40523
|
+
constructor(surchargePercent = null, surchargeAmount = null, surchargeExempt = null, cardType = null, cardToken = undefined, brand = null, bin = null, commercialIndicator = null, disclosure = undefined, debitCategory = null, countryIssued = null, uuid = null) {
|
|
40524
|
+
/**
|
|
40525
|
+
* The surcharge percentage.
|
|
40526
|
+
*/
|
|
40527
|
+
this.surchargePercent = null;
|
|
40528
|
+
/**
|
|
40529
|
+
* The surcharge amount.
|
|
40530
|
+
*/
|
|
40531
|
+
this.surchargeAmount = null;
|
|
40532
|
+
/**
|
|
40533
|
+
* If the transaction is exempt from surcharges.
|
|
40534
|
+
*/
|
|
40535
|
+
this.surchargeExempt = null;
|
|
40536
|
+
/**
|
|
40537
|
+
* The type of card.
|
|
40538
|
+
*/
|
|
40539
|
+
this.cardType = null;
|
|
40540
|
+
/**
|
|
40541
|
+
* The card brand.
|
|
40542
|
+
*/
|
|
40543
|
+
this.brand = null;
|
|
40544
|
+
/**
|
|
40545
|
+
* The bank identification number.
|
|
40546
|
+
*/
|
|
40547
|
+
this.bin = null;
|
|
40548
|
+
/**
|
|
40549
|
+
* The commercial card indicator.
|
|
40550
|
+
*/
|
|
40551
|
+
this.commercialIndicator = null;
|
|
40552
|
+
/**
|
|
40553
|
+
* The debit card category.
|
|
40554
|
+
*/
|
|
40555
|
+
this.debitCategory = null;
|
|
40556
|
+
/**
|
|
40557
|
+
* The country where the card was issued.
|
|
40558
|
+
*/
|
|
40559
|
+
this.countryIssued = null;
|
|
40560
|
+
/**
|
|
40561
|
+
* The unique identifier for the pricing response.
|
|
40562
|
+
*/
|
|
40563
|
+
this.uuid = null;
|
|
40564
|
+
this.surchargePercent = surchargePercent;
|
|
40565
|
+
this.surchargeAmount = surchargeAmount;
|
|
40566
|
+
this.surchargeExempt = surchargeExempt;
|
|
40567
|
+
this.cardType = cardType;
|
|
40568
|
+
this.cardToken = cardToken;
|
|
40569
|
+
this.brand = brand;
|
|
40570
|
+
this.bin = bin;
|
|
40571
|
+
this.commercialIndicator = commercialIndicator;
|
|
40572
|
+
this.disclosure = disclosure;
|
|
40573
|
+
this.debitCategory = debitCategory;
|
|
40574
|
+
this.countryIssued = countryIssued;
|
|
40575
|
+
this.uuid = uuid;
|
|
40576
|
+
}
|
|
40577
|
+
}
|
|
40578
|
+
exports.PricingResponseAttributes = PricingResponseAttributes;
|
|
40579
|
+
/**
|
|
40580
|
+
* Models the data wrapper for a pricing response.
|
|
40581
|
+
*/
|
|
40582
|
+
class PricingResponseData {
|
|
40583
|
+
// Constructor with default values for optional fields
|
|
40584
|
+
constructor(type = null, attributes = null) {
|
|
40585
|
+
/**
|
|
40586
|
+
* The type of the response.
|
|
40587
|
+
*/
|
|
40588
|
+
this.type = null;
|
|
40589
|
+
/**
|
|
40590
|
+
* The pricing response attributes.
|
|
40591
|
+
*/
|
|
40592
|
+
this.attributes = null;
|
|
40593
|
+
this.type = type;
|
|
40594
|
+
this.attributes = attributes;
|
|
40595
|
+
}
|
|
40596
|
+
}
|
|
40597
|
+
exports.PricingResponseData = PricingResponseData;
|
|
40598
|
+
/**
|
|
40599
|
+
* Models an error response.
|
|
40600
|
+
*/
|
|
40601
|
+
class ErrorType {
|
|
40602
|
+
// Constructor with default values for optional fields
|
|
40603
|
+
constructor(status = null, title = null, detail = null) {
|
|
40604
|
+
/**
|
|
40605
|
+
* The HTTP status code.
|
|
40606
|
+
*/
|
|
40607
|
+
this.status = null;
|
|
40608
|
+
/**
|
|
40609
|
+
* The error title.
|
|
40610
|
+
*/
|
|
40611
|
+
this.title = null;
|
|
40612
|
+
/**
|
|
40613
|
+
* The detailed error message.
|
|
40614
|
+
*/
|
|
40615
|
+
this.detail = null;
|
|
40616
|
+
this.status = status;
|
|
40617
|
+
this.title = title;
|
|
40618
|
+
this.detail = detail;
|
|
40619
|
+
}
|
|
40620
|
+
}
|
|
40621
|
+
exports.ErrorType = ErrorType;
|
|
40622
|
+
/**
|
|
40623
|
+
* Models a pricing response.
|
|
40624
|
+
*/
|
|
40625
|
+
class PricingResponse {
|
|
40626
|
+
// Constructor with default values for optional fields
|
|
40627
|
+
constructor(success = null, error = null, responseDescription = null, data = null) {
|
|
40628
|
+
/**
|
|
40629
|
+
* Whether or not the request succeeded.
|
|
40630
|
+
*/
|
|
40631
|
+
this.success = null;
|
|
40632
|
+
/**
|
|
40633
|
+
* The error, if an error occurred.
|
|
40634
|
+
*/
|
|
40635
|
+
this.error = null;
|
|
40636
|
+
/**
|
|
40637
|
+
* A narrative description of the transaction result.
|
|
40638
|
+
*/
|
|
40639
|
+
this.responseDescription = null;
|
|
40640
|
+
/**
|
|
40641
|
+
* The pricing response data.
|
|
40642
|
+
*/
|
|
40643
|
+
this.data = null;
|
|
40644
|
+
this.success = success;
|
|
40645
|
+
this.error = error;
|
|
40646
|
+
this.responseDescription = responseDescription;
|
|
40647
|
+
this.data = data;
|
|
40648
|
+
}
|
|
40649
|
+
}
|
|
40650
|
+
exports.PricingResponse = PricingResponse;
|
|
40369
40651
|
/**
|
|
40370
40652
|
* A request for customer signature data.
|
|
40371
40653
|
*/
|