@blockchyp/blockchyp-ts 2.28.1 → 2.30.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/README.md +40 -0
- package/_bundles/blockchyp.js +276 -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 +290 -6
- package/lib/src/models.js +270 -4
- package/lib/src/models.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +7 -0
- package/src/models.ts +500 -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) {
|
|
31519
31526
|
/**
|
|
31520
31527
|
* The request timeout in seconds.
|
|
31521
31528
|
*/
|
|
@@ -31642,9 +31649,15 @@ class AuthorizationRequest {
|
|
|
31642
31649
|
this.healthcareTotal = healthcareTotal;
|
|
31643
31650
|
this.ebtTotal = ebtTotal;
|
|
31644
31651
|
this.cardMetadataLookup = cardMetadataLookup;
|
|
31652
|
+
this.totalDiscountAmount = totalDiscountAmount;
|
|
31645
31653
|
this.shippingAmount = shippingAmount;
|
|
31654
|
+
this.dutyAmount = dutyAmount;
|
|
31646
31655
|
this.processorId = processorId;
|
|
31647
31656
|
this.externalCustomerId = externalCustomerId;
|
|
31657
|
+
this.destinationCountryCode = destinationCountryCode;
|
|
31658
|
+
this.shipFromPostalCode = shipFromPostalCode;
|
|
31659
|
+
this.shipToPostalCode = shipToPostalCode;
|
|
31660
|
+
this.orderDate = orderDate;
|
|
31648
31661
|
}
|
|
31649
31662
|
}
|
|
31650
31663
|
exports.AuthorizationRequest = AuthorizationRequest;
|
|
@@ -32109,7 +32122,7 @@ exports.RefundRequest = RefundRequest;
|
|
|
32109
32122
|
*/
|
|
32110
32123
|
class CaptureRequest {
|
|
32111
32124
|
// 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) {
|
|
32125
|
+
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
32126
|
/**
|
|
32114
32127
|
* The request timeout in seconds.
|
|
32115
32128
|
*/
|
|
@@ -32187,6 +32200,7 @@ class CaptureRequest {
|
|
|
32187
32200
|
this.taxAmount = taxAmount;
|
|
32188
32201
|
this.shipmentCount = shipmentCount;
|
|
32189
32202
|
this.shipmentNumber = shipmentNumber;
|
|
32203
|
+
this.passthroughSurcharge = passthroughSurcharge;
|
|
32190
32204
|
}
|
|
32191
32205
|
}
|
|
32192
32206
|
exports.CaptureRequest = CaptureRequest;
|
|
@@ -33618,7 +33632,7 @@ exports.TransactionDisplayDiscount = TransactionDisplayDiscount;
|
|
|
33618
33632
|
*/
|
|
33619
33633
|
class TransactionDisplayItem {
|
|
33620
33634
|
// 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) {
|
|
33635
|
+
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
33636
|
/**
|
|
33623
33637
|
* A unique value identifying the item. This is not required, but recommended since it is
|
|
33624
33638
|
* required to update or delete line items.
|
|
@@ -33667,6 +33681,9 @@ class TransactionDisplayItem {
|
|
|
33667
33681
|
this.commodityCode = commodityCode;
|
|
33668
33682
|
this.productCode = productCode;
|
|
33669
33683
|
this.discounts = discounts;
|
|
33684
|
+
this.taxAmount = taxAmount;
|
|
33685
|
+
this.taxRate = taxRate;
|
|
33686
|
+
this.discountCode = discountCode;
|
|
33670
33687
|
}
|
|
33671
33688
|
}
|
|
33672
33689
|
exports.TransactionDisplayItem = TransactionDisplayItem;
|
|
@@ -40366,6 +40383,261 @@ class SubmitApplicationRequest {
|
|
|
40366
40383
|
}
|
|
40367
40384
|
}
|
|
40368
40385
|
exports.SubmitApplicationRequest = SubmitApplicationRequest;
|
|
40386
|
+
/**
|
|
40387
|
+
* Models settings related to state checks for a merchant.
|
|
40388
|
+
*/
|
|
40389
|
+
class StateCheckSettings {
|
|
40390
|
+
// Constructor with default values for optional fields
|
|
40391
|
+
constructor(enabled = null, surchargeExemptStates = null) {
|
|
40392
|
+
/**
|
|
40393
|
+
* If state checks are enabled for the merchant.
|
|
40394
|
+
*/
|
|
40395
|
+
this.enabled = null;
|
|
40396
|
+
/**
|
|
40397
|
+
* The list of states that are exempt from surcharges.
|
|
40398
|
+
*/
|
|
40399
|
+
this.surchargeExemptStates = null;
|
|
40400
|
+
this.enabled = enabled;
|
|
40401
|
+
this.surchargeExemptStates = surchargeExemptStates;
|
|
40402
|
+
}
|
|
40403
|
+
}
|
|
40404
|
+
exports.StateCheckSettings = StateCheckSettings;
|
|
40405
|
+
/**
|
|
40406
|
+
* Models merchant settings and configuration.
|
|
40407
|
+
*/
|
|
40408
|
+
class PricingMerchantSettings {
|
|
40409
|
+
// Constructor with default values for optional fields
|
|
40410
|
+
constructor(account = null, gateway = null, surchargingEnabled = null, customSurchargePercent = 0, reducedRate = false, inversePricingEnabled = false, creditDiscountRate = 0, acquiringSolution = null, acceptDebit = false, stateCheckSettings = undefined) {
|
|
40411
|
+
/**
|
|
40412
|
+
* The merchant account identifier.
|
|
40413
|
+
*/
|
|
40414
|
+
this.account = null;
|
|
40415
|
+
/**
|
|
40416
|
+
* The gateway identifier.
|
|
40417
|
+
*/
|
|
40418
|
+
this.gateway = null;
|
|
40419
|
+
/**
|
|
40420
|
+
* Whether surcharging is enabled for the merchant.
|
|
40421
|
+
*/
|
|
40422
|
+
this.surchargingEnabled = null;
|
|
40423
|
+
/**
|
|
40424
|
+
* The acquiring solution identifier.
|
|
40425
|
+
*/
|
|
40426
|
+
this.acquiringSolution = null;
|
|
40427
|
+
this.account = account;
|
|
40428
|
+
this.gateway = gateway;
|
|
40429
|
+
this.surchargingEnabled = surchargingEnabled;
|
|
40430
|
+
this.customSurchargePercent = customSurchargePercent;
|
|
40431
|
+
this.reducedRate = reducedRate;
|
|
40432
|
+
this.inversePricingEnabled = inversePricingEnabled;
|
|
40433
|
+
this.creditDiscountRate = creditDiscountRate;
|
|
40434
|
+
this.acquiringSolution = acquiringSolution;
|
|
40435
|
+
this.acceptDebit = acceptDebit;
|
|
40436
|
+
this.stateCheckSettings = stateCheckSettings;
|
|
40437
|
+
}
|
|
40438
|
+
}
|
|
40439
|
+
exports.PricingMerchantSettings = PricingMerchantSettings;
|
|
40440
|
+
/**
|
|
40441
|
+
* Models the attributes for a pricing request.
|
|
40442
|
+
*/
|
|
40443
|
+
class PricingRequestAttributes {
|
|
40444
|
+
// Constructor with default values for optional fields
|
|
40445
|
+
constructor(cardNumber = undefined, token = null, merchantIdentifier = undefined, amount = null, country = undefined, postalCode = undefined, state = undefined, merchantSettings = undefined) {
|
|
40446
|
+
/**
|
|
40447
|
+
* The payment token.
|
|
40448
|
+
*/
|
|
40449
|
+
this.token = null;
|
|
40450
|
+
/**
|
|
40451
|
+
* The transaction amount.
|
|
40452
|
+
*/
|
|
40453
|
+
this.amount = null;
|
|
40454
|
+
this.cardNumber = cardNumber;
|
|
40455
|
+
this.token = token;
|
|
40456
|
+
this.merchantIdentifier = merchantIdentifier;
|
|
40457
|
+
this.amount = amount;
|
|
40458
|
+
this.country = country;
|
|
40459
|
+
this.postalCode = postalCode;
|
|
40460
|
+
this.state = state;
|
|
40461
|
+
this.merchantSettings = merchantSettings;
|
|
40462
|
+
}
|
|
40463
|
+
}
|
|
40464
|
+
exports.PricingRequestAttributes = PricingRequestAttributes;
|
|
40465
|
+
/**
|
|
40466
|
+
* Models the data wrapper for a pricing request.
|
|
40467
|
+
*/
|
|
40468
|
+
class PricingRequestData {
|
|
40469
|
+
// Constructor with default values for optional fields
|
|
40470
|
+
constructor(type = null, attributes = null) {
|
|
40471
|
+
/**
|
|
40472
|
+
* The type of the request.
|
|
40473
|
+
*/
|
|
40474
|
+
this.type = null;
|
|
40475
|
+
/**
|
|
40476
|
+
* The pricing request attributes.
|
|
40477
|
+
*/
|
|
40478
|
+
this.attributes = null;
|
|
40479
|
+
this.type = type;
|
|
40480
|
+
this.attributes = attributes;
|
|
40481
|
+
}
|
|
40482
|
+
}
|
|
40483
|
+
exports.PricingRequestData = PricingRequestData;
|
|
40484
|
+
/**
|
|
40485
|
+
* Models a pricing request.
|
|
40486
|
+
*/
|
|
40487
|
+
class PricingRequest {
|
|
40488
|
+
// Constructor with default values for optional fields
|
|
40489
|
+
constructor(timeout = null, test = null, data = null) {
|
|
40490
|
+
/**
|
|
40491
|
+
* The request timeout in seconds.
|
|
40492
|
+
*/
|
|
40493
|
+
this.timeout = null;
|
|
40494
|
+
/**
|
|
40495
|
+
* Whether or not to route transaction to the test gateway.
|
|
40496
|
+
*/
|
|
40497
|
+
this.test = null;
|
|
40498
|
+
/**
|
|
40499
|
+
* The pricing request data.
|
|
40500
|
+
*/
|
|
40501
|
+
this.data = null;
|
|
40502
|
+
this.timeout = timeout;
|
|
40503
|
+
this.test = test;
|
|
40504
|
+
this.data = data;
|
|
40505
|
+
}
|
|
40506
|
+
}
|
|
40507
|
+
exports.PricingRequest = PricingRequest;
|
|
40508
|
+
/**
|
|
40509
|
+
* Models pricing response data for new handler for pricing api responses.
|
|
40510
|
+
*/
|
|
40511
|
+
class PricingResponseAttributes {
|
|
40512
|
+
// Constructor with default values for optional fields
|
|
40513
|
+
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) {
|
|
40514
|
+
/**
|
|
40515
|
+
* The surcharge percentage.
|
|
40516
|
+
*/
|
|
40517
|
+
this.surchargePercent = null;
|
|
40518
|
+
/**
|
|
40519
|
+
* The surcharge amount.
|
|
40520
|
+
*/
|
|
40521
|
+
this.surchargeAmount = null;
|
|
40522
|
+
/**
|
|
40523
|
+
* If the transaction is exempt from surcharges.
|
|
40524
|
+
*/
|
|
40525
|
+
this.surchargeExempt = null;
|
|
40526
|
+
/**
|
|
40527
|
+
* The type of card.
|
|
40528
|
+
*/
|
|
40529
|
+
this.cardType = null;
|
|
40530
|
+
/**
|
|
40531
|
+
* The card brand.
|
|
40532
|
+
*/
|
|
40533
|
+
this.brand = null;
|
|
40534
|
+
/**
|
|
40535
|
+
* The bank identification number.
|
|
40536
|
+
*/
|
|
40537
|
+
this.bin = null;
|
|
40538
|
+
/**
|
|
40539
|
+
* The commercial card indicator.
|
|
40540
|
+
*/
|
|
40541
|
+
this.commercialIndicator = null;
|
|
40542
|
+
/**
|
|
40543
|
+
* The debit card category.
|
|
40544
|
+
*/
|
|
40545
|
+
this.debitCategory = null;
|
|
40546
|
+
/**
|
|
40547
|
+
* The country where the card was issued.
|
|
40548
|
+
*/
|
|
40549
|
+
this.countryIssued = null;
|
|
40550
|
+
/**
|
|
40551
|
+
* The unique identifier for the pricing response.
|
|
40552
|
+
*/
|
|
40553
|
+
this.uuid = null;
|
|
40554
|
+
this.surchargePercent = surchargePercent;
|
|
40555
|
+
this.surchargeAmount = surchargeAmount;
|
|
40556
|
+
this.surchargeExempt = surchargeExempt;
|
|
40557
|
+
this.cardType = cardType;
|
|
40558
|
+
this.cardToken = cardToken;
|
|
40559
|
+
this.brand = brand;
|
|
40560
|
+
this.bin = bin;
|
|
40561
|
+
this.commercialIndicator = commercialIndicator;
|
|
40562
|
+
this.disclosure = disclosure;
|
|
40563
|
+
this.debitCategory = debitCategory;
|
|
40564
|
+
this.countryIssued = countryIssued;
|
|
40565
|
+
this.uuid = uuid;
|
|
40566
|
+
}
|
|
40567
|
+
}
|
|
40568
|
+
exports.PricingResponseAttributes = PricingResponseAttributes;
|
|
40569
|
+
/**
|
|
40570
|
+
* Models the data wrapper for a pricing response.
|
|
40571
|
+
*/
|
|
40572
|
+
class PricingResponseData {
|
|
40573
|
+
// Constructor with default values for optional fields
|
|
40574
|
+
constructor(type = null, attributes = null) {
|
|
40575
|
+
/**
|
|
40576
|
+
* The type of the response.
|
|
40577
|
+
*/
|
|
40578
|
+
this.type = null;
|
|
40579
|
+
/**
|
|
40580
|
+
* The pricing response attributes.
|
|
40581
|
+
*/
|
|
40582
|
+
this.attributes = null;
|
|
40583
|
+
this.type = type;
|
|
40584
|
+
this.attributes = attributes;
|
|
40585
|
+
}
|
|
40586
|
+
}
|
|
40587
|
+
exports.PricingResponseData = PricingResponseData;
|
|
40588
|
+
/**
|
|
40589
|
+
* Models an error response.
|
|
40590
|
+
*/
|
|
40591
|
+
class ErrorType {
|
|
40592
|
+
// Constructor with default values for optional fields
|
|
40593
|
+
constructor(status = null, title = null, detail = null) {
|
|
40594
|
+
/**
|
|
40595
|
+
* The HTTP status code.
|
|
40596
|
+
*/
|
|
40597
|
+
this.status = null;
|
|
40598
|
+
/**
|
|
40599
|
+
* The error title.
|
|
40600
|
+
*/
|
|
40601
|
+
this.title = null;
|
|
40602
|
+
/**
|
|
40603
|
+
* The detailed error message.
|
|
40604
|
+
*/
|
|
40605
|
+
this.detail = null;
|
|
40606
|
+
this.status = status;
|
|
40607
|
+
this.title = title;
|
|
40608
|
+
this.detail = detail;
|
|
40609
|
+
}
|
|
40610
|
+
}
|
|
40611
|
+
exports.ErrorType = ErrorType;
|
|
40612
|
+
/**
|
|
40613
|
+
* Models a pricing response.
|
|
40614
|
+
*/
|
|
40615
|
+
class PricingResponse {
|
|
40616
|
+
// Constructor with default values for optional fields
|
|
40617
|
+
constructor(success = null, error = null, responseDescription = null, data = null) {
|
|
40618
|
+
/**
|
|
40619
|
+
* Whether or not the request succeeded.
|
|
40620
|
+
*/
|
|
40621
|
+
this.success = null;
|
|
40622
|
+
/**
|
|
40623
|
+
* The error, if an error occurred.
|
|
40624
|
+
*/
|
|
40625
|
+
this.error = null;
|
|
40626
|
+
/**
|
|
40627
|
+
* A narrative description of the transaction result.
|
|
40628
|
+
*/
|
|
40629
|
+
this.responseDescription = null;
|
|
40630
|
+
/**
|
|
40631
|
+
* The pricing response data.
|
|
40632
|
+
*/
|
|
40633
|
+
this.data = null;
|
|
40634
|
+
this.success = success;
|
|
40635
|
+
this.error = error;
|
|
40636
|
+
this.responseDescription = responseDescription;
|
|
40637
|
+
this.data = data;
|
|
40638
|
+
}
|
|
40639
|
+
}
|
|
40640
|
+
exports.PricingResponse = PricingResponse;
|
|
40369
40641
|
/**
|
|
40370
40642
|
* A request for customer signature data.
|
|
40371
40643
|
*/
|