@blockchyp/blockchyp-ts 2.30.1 → 2.30.3

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/src/models.ts CHANGED
@@ -2653,6 +2653,11 @@ export class AuthorizationRequest {
2653
2653
  */
2654
2654
  shipmentNumber: number | null = null;
2655
2655
 
2656
+ /**
2657
+ * An optional field that can be used to pass through data to external partners.
2658
+ */
2659
+ externalPartnerMetadata?: string;
2660
+
2656
2661
  // Constructor with default values for optional fields
2657
2662
  constructor(
2658
2663
  timeout: number | null = null,
@@ -2739,6 +2744,7 @@ export class AuthorizationRequest {
2739
2744
  orderDate: Date | undefined = undefined,
2740
2745
  shipmentCount: number | null = null,
2741
2746
  shipmentNumber: number | null = null,
2747
+ externalPartnerMetadata: string | undefined = undefined,
2742
2748
  ) {
2743
2749
  this.timeout = timeout;
2744
2750
  this.test = test;
@@ -2824,6 +2830,7 @@ export class AuthorizationRequest {
2824
2830
  this.orderDate = orderDate;
2825
2831
  this.shipmentCount = shipmentCount;
2826
2832
  this.shipmentNumber = shipmentNumber;
2833
+ this.externalPartnerMetadata = externalPartnerMetadata;
2827
2834
  }
2828
2835
  }
2829
2836
 
@@ -4591,6 +4598,11 @@ export class CaptureResponse {
4591
4598
  */
4592
4599
  customers: Customer[] | null = null;
4593
4600
 
4601
+ /**
4602
+ * Whether enhanced data was passed for the transaction.
4603
+ */
4604
+ enhancedDataPassed?: boolean;
4605
+
4594
4606
  // Constructor with default values for optional fields
4595
4607
  constructor(
4596
4608
  success: boolean | null = null,
@@ -4638,6 +4650,7 @@ export class CaptureResponse {
4638
4650
  receiptSuggestions: ReceiptSuggestions | null = null,
4639
4651
  customer: Customer | undefined = undefined,
4640
4652
  customers: Customer[] | null = null,
4653
+ enhancedDataPassed: boolean = false,
4641
4654
  ) {
4642
4655
  this.success = success;
4643
4656
  this.error = error;
@@ -4684,6 +4697,7 @@ export class CaptureResponse {
4684
4697
  this.receiptSuggestions = receiptSuggestions;
4685
4698
  this.customer = customer;
4686
4699
  this.customers = customers;
4700
+ this.enhancedDataPassed = enhancedDataPassed;
4687
4701
  }
4688
4702
  }
4689
4703
 
@@ -6847,6 +6861,11 @@ export class AuthorizationResponse {
6847
6861
  */
6848
6862
  cardMetadata?: CardMetadata;
6849
6863
 
6864
+ /**
6865
+ * Whether enhanced data was passed for the transaction.
6866
+ */
6867
+ enhancedDataPassed?: boolean;
6868
+
6850
6869
  // Constructor with default values for optional fields
6851
6870
  constructor(
6852
6871
  success: boolean | null = null,
@@ -6909,6 +6928,7 @@ export class AuthorizationResponse {
6909
6928
  storeAndForward: boolean | null = null,
6910
6929
  status: string | null = null,
6911
6930
  cardMetadata: CardMetadata | undefined = undefined,
6931
+ enhancedDataPassed: boolean = false,
6912
6932
  ) {
6913
6933
  this.success = success;
6914
6934
  this.error = error;
@@ -6970,6 +6990,7 @@ export class AuthorizationResponse {
6970
6990
  this.storeAndForward = storeAndForward;
6971
6991
  this.status = status;
6972
6992
  this.cardMetadata = cardMetadata;
6993
+ this.enhancedDataPassed = enhancedDataPassed;
6973
6994
  }
6974
6995
  }
6975
6996
 
@@ -17758,197 +17779,140 @@ export class SubmitApplicationRequest {
17758
17779
  }
17759
17780
 
17760
17781
  /**
17761
- * Models settings related to state checks for a merchant.
17762
- */
17763
- export class StateCheckSettings {
17764
-
17765
- /**
17766
- * If state checks are enabled for the merchant.
17767
- */
17768
- enabled: boolean | null = null;
17769
-
17770
- /**
17771
- * The list of states that are exempt from surcharges.
17772
- */
17773
- surchargeExemptStates: string[] | null = null;
17774
-
17775
- // Constructor with default values for optional fields
17776
- constructor(
17777
- enabled: boolean | null = null,
17778
- surchargeExemptStates: string[] | null = null,
17779
- ) {
17780
- this.enabled = enabled;
17781
- this.surchargeExemptStates = surchargeExemptStates;
17782
- }
17783
- }
17784
-
17785
- /**
17786
- * Models merchant settings and configuration.
17787
- */
17788
- export class PricingMerchantSettings {
17789
-
17790
- /**
17791
- * The merchant account identifier.
17792
- */
17793
- account: string | null = null;
17794
-
17795
- /**
17796
- * The gateway identifier.
17782
+ * Models a surcharge review request.
17797
17783
  */
17798
- gateway: string | null = null;
17784
+ export class SurchargeReviewRequest {
17799
17785
 
17800
17786
  /**
17801
- * Whether surcharging is enabled for the merchant.
17802
- */
17803
- surchargingEnabled: boolean | null = null;
17804
-
17805
- /**
17806
- * The custom surcharge percentage, if applicable.
17807
- */
17808
- customSurchargePercent?: number;
17809
-
17810
- /**
17811
- * If reduced rate pricing is enabled.
17787
+ * The request timeout in seconds.
17812
17788
  */
17813
- reducedRate?: boolean;
17789
+ timeout: number | null = null;
17814
17790
 
17815
17791
  /**
17816
- * If inverse pricing is enabled.
17792
+ * Whether or not to route transaction to the test gateway.
17817
17793
  */
17818
- inversePricingEnabled?: boolean;
17794
+ test: boolean | null = null;
17819
17795
 
17820
17796
  /**
17821
- * The credit discount rate, if applicable.
17797
+ * The card number for the pricing request.
17822
17798
  */
17823
- creditDiscountRate?: number;
17799
+ cardNumber?: string;
17824
17800
 
17825
17801
  /**
17826
- * The acquiring solution identifier.
17802
+ * The payment token.
17827
17803
  */
17828
- acquiringSolution: string | null = null;
17804
+ token?: string;
17829
17805
 
17830
17806
  /**
17831
- * Whether the merchant accepts debit cards.
17807
+ * The transaction amount.
17832
17808
  */
17833
- acceptDebit?: boolean;
17809
+ amount?: string;
17834
17810
 
17835
17811
  /**
17836
- * State check settings for the merchant.
17812
+ * The surcharge rate.
17837
17813
  */
17838
- stateCheckSettings?: StateCheckSettings;
17839
-
17840
- // Constructor with default values for optional fields
17841
- constructor(
17842
- account: string | null = null,
17843
- gateway: string | null = null,
17844
- surchargingEnabled: boolean | null = null,
17845
- customSurchargePercent: number = 0,
17846
- reducedRate: boolean = false,
17847
- inversePricingEnabled: boolean = false,
17848
- creditDiscountRate: number = 0,
17849
- acquiringSolution: string | null = null,
17850
- acceptDebit: boolean = false,
17851
- stateCheckSettings: StateCheckSettings | undefined = undefined,
17852
- ) {
17853
- this.account = account;
17854
- this.gateway = gateway;
17855
- this.surchargingEnabled = surchargingEnabled;
17856
- this.customSurchargePercent = customSurchargePercent;
17857
- this.reducedRate = reducedRate;
17858
- this.inversePricingEnabled = inversePricingEnabled;
17859
- this.creditDiscountRate = creditDiscountRate;
17860
- this.acquiringSolution = acquiringSolution;
17861
- this.acceptDebit = acceptDebit;
17862
- this.stateCheckSettings = stateCheckSettings;
17863
- }
17864
- }
17814
+ surchargeRate?: string;
17865
17815
 
17866
17816
  /**
17867
- * Models the attributes for a pricing request.
17817
+ * The debit transaction fee.
17868
17818
  */
17869
- export class PricingRequestAttributes {
17819
+ debitTransFee?: string;
17870
17820
 
17871
17821
  /**
17872
- * The card number for the pricing request.
17822
+ * The debit discount rate.
17873
17823
  */
17874
- cardNumber?: string;
17824
+ debitDiscountRate?: string;
17875
17825
 
17876
17826
  /**
17877
- * The payment token.
17827
+ * The surcharge policy.
17878
17828
  */
17879
- token: string | null = null;
17829
+ surchargePolicy: string | null = null;
17880
17830
 
17881
17831
  /**
17882
- * The merchant identifier.
17832
+ * The list of excluded merchant states.
17883
17833
  */
17884
- merchantIdentifier?: string;
17834
+ excludedMerchantStates: string[] | null = null;
17885
17835
 
17886
17836
  /**
17887
- * The transaction amount.
17837
+ * The zip code.
17888
17838
  */
17889
- amount: number | null = null;
17839
+ zip: string | null = null;
17890
17840
 
17891
17841
  /**
17892
- * The country code.
17842
+ * The state or province.
17893
17843
  */
17894
- country?: string;
17844
+ state: string | null = null;
17895
17845
 
17896
17846
  /**
17897
- * The postal code.
17847
+ * If foreign cards are exempt.
17898
17848
  */
17899
- postalCode?: string;
17849
+ exemptForeignCards: boolean | null = null;
17900
17850
 
17901
17851
  /**
17902
- * The state or province.
17852
+ * The surcharging mode.
17903
17853
  */
17904
- state?: string;
17854
+ surchargingMode: string | null = null;
17905
17855
 
17906
17856
  /**
17907
- * Merchant settings for the pricing request.
17857
+ * The pricing plan.
17908
17858
  */
17909
- merchantSettings?: PricingMerchantSettings;
17859
+ pricingPlan: string | null = null;
17910
17860
 
17911
17861
  // Constructor with default values for optional fields
17912
17862
  constructor(
17863
+ timeout: number | null = null,
17864
+ test: boolean | null = null,
17913
17865
  cardNumber: string | undefined = undefined,
17914
- token: string | null = null,
17915
- merchantIdentifier: string | undefined = undefined,
17916
- amount: number | null = null,
17917
- country: string | undefined = undefined,
17918
- postalCode: string | undefined = undefined,
17919
- state: string | undefined = undefined,
17920
- merchantSettings: PricingMerchantSettings | undefined = undefined,
17866
+ token: string | undefined = undefined,
17867
+ amount: string | undefined = undefined,
17868
+ surchargeRate: string | undefined = undefined,
17869
+ debitTransFee: string | undefined = undefined,
17870
+ debitDiscountRate: string | undefined = undefined,
17871
+ surchargePolicy: string | null = null,
17872
+ excludedMerchantStates: string[] | null = null,
17873
+ zip: string | null = null,
17874
+ state: string | null = null,
17875
+ exemptForeignCards: boolean | null = null,
17876
+ surchargingMode: string | null = null,
17877
+ pricingPlan: string | null = null,
17921
17878
  ) {
17879
+ this.timeout = timeout;
17880
+ this.test = test;
17922
17881
  this.cardNumber = cardNumber;
17923
17882
  this.token = token;
17924
- this.merchantIdentifier = merchantIdentifier;
17925
17883
  this.amount = amount;
17926
- this.country = country;
17927
- this.postalCode = postalCode;
17884
+ this.surchargeRate = surchargeRate;
17885
+ this.debitTransFee = debitTransFee;
17886
+ this.debitDiscountRate = debitDiscountRate;
17887
+ this.surchargePolicy = surchargePolicy;
17888
+ this.excludedMerchantStates = excludedMerchantStates;
17889
+ this.zip = zip;
17928
17890
  this.state = state;
17929
- this.merchantSettings = merchantSettings;
17891
+ this.exemptForeignCards = exemptForeignCards;
17892
+ this.surchargingMode = surchargingMode;
17893
+ this.pricingPlan = pricingPlan;
17930
17894
  }
17931
17895
  }
17932
17896
 
17933
17897
  /**
17934
- * Models the data wrapper for a pricing request.
17898
+ * Models the data included in a surcharge review response.
17935
17899
  */
17936
- export class PricingRequestData {
17900
+ export class SurchargeReviewResponseData {
17937
17901
 
17938
17902
  /**
17939
- * The type of the request.
17903
+ * The type of the response.
17940
17904
  */
17941
17905
  type: string | null = null;
17942
17906
 
17943
17907
  /**
17944
- * The pricing request attributes.
17908
+ * The attributes of the response.
17945
17909
  */
17946
- attributes: PricingRequestAttributes | null = null;
17910
+ attributes: SurchargeAttributeResponseData | null = null;
17947
17911
 
17948
17912
  // Constructor with default values for optional fields
17949
17913
  constructor(
17950
17914
  type: string | null = null,
17951
- attributes: PricingRequestAttributes | null = null,
17915
+ attributes: SurchargeAttributeResponseData | null = null,
17952
17916
  ) {
17953
17917
  this.type = type;
17954
17918
  this.attributes = attributes;
@@ -17956,51 +17920,34 @@ export class PricingRequestData {
17956
17920
  }
17957
17921
 
17958
17922
  /**
17959
- * Models a pricing request.
17923
+ * Models the surcharge attributes included in a surcharge review response.
17960
17924
  */
17961
- export class PricingRequest {
17925
+ export class SurchargeAttributeResponseData {
17962
17926
 
17963
17927
  /**
17964
- * The request timeout in seconds.
17928
+ * The total amount including surcharge.
17965
17929
  */
17966
- timeout: number | null = null;
17967
-
17968
- /**
17969
- * Whether or not to route transaction to the test gateway.
17970
- */
17971
- test: boolean | null = null;
17930
+ totalWithSurchargeAmount: string | null = null;
17972
17931
 
17973
17932
  /**
17974
- * The pricing request data.
17933
+ * If the surcharge review was successful.
17975
17934
  */
17976
- data: PricingRequestData | null = null;
17977
-
17978
- // Constructor with default values for optional fields
17979
- constructor(
17980
- timeout: number | null = null,
17981
- test: boolean | null = null,
17982
- data: PricingRequestData | null = null,
17983
- ) {
17984
- this.timeout = timeout;
17985
- this.test = test;
17986
- this.data = data;
17987
- }
17988
- }
17935
+ success: boolean | null = null;
17989
17936
 
17990
17937
  /**
17991
- * Models pricing response data for new handler for pricing api responses.
17938
+ * The type of the response.
17992
17939
  */
17993
- export class PricingResponseAttributes {
17940
+ type: string | null = null;
17994
17941
 
17995
17942
  /**
17996
17943
  * The surcharge percentage.
17997
17944
  */
17998
- surchargePercent: number | null = null;
17945
+ surchargePercent: string | null = null;
17999
17946
 
18000
17947
  /**
18001
17948
  * The surcharge amount.
18002
17949
  */
18003
- surchargeAmount: number | null = null;
17950
+ surchargeAmount: string | null = null;
18004
17951
 
18005
17952
  /**
18006
17953
  * If the transaction is exempt from surcharges.
@@ -18030,7 +17977,27 @@ export class PricingResponseAttributes {
18030
17977
  /**
18031
17978
  * The commercial card indicator.
18032
17979
  */
18033
- commercialIndicator: string | null = null;
17980
+ commercialIndicator?: string;
17981
+
17982
+ /**
17983
+ * If the card is commercial.
17984
+ */
17985
+ isCommercial: boolean | null = null;
17986
+
17987
+ /**
17988
+ * If the card is Durbin-regulated (US debit).
17989
+ */
17990
+ isRegulated: boolean | null = null;
17991
+
17992
+ /**
17993
+ * The reason for the exemption.
17994
+ */
17995
+ exemptionReason?: string;
17996
+
17997
+ /**
17998
+ * The debit fee amount.
17999
+ */
18000
+ debitFeeAmount?: string;
18034
18001
 
18035
18002
  /**
18036
18003
  * The disclosure statement.
@@ -18040,33 +18007,68 @@ export class PricingResponseAttributes {
18040
18007
  /**
18041
18008
  * The debit card category.
18042
18009
  */
18043
- debitCategory: string | null = null;
18010
+ debitCategory?: string;
18044
18011
 
18045
18012
  /**
18046
18013
  * The country where the card was issued.
18047
18014
  */
18048
- countryIssued: string | null = null;
18015
+ countryCode: string | null = null;
18016
+
18017
+ /**
18018
+ * Only included if state was sent in request OR derived from ZIP code.
18019
+ */
18020
+ state?: string;
18049
18021
 
18050
18022
  /**
18051
18023
  * The unique identifier for the pricing response.
18052
18024
  */
18053
18025
  uuid: string | null = null;
18054
18026
 
18027
+ /**
18028
+ * The expiration date of the card.
18029
+ */
18030
+ expirationDate?: string;
18031
+
18032
+ /**
18033
+ * When surcharging is enabled AND state is 'CO' (Colorado-specific statutory
18034
+ * language).
18035
+ */
18036
+ disclosureAdditional?: string;
18037
+
18038
+ /**
18039
+ * The cardholder information.
18040
+ */
18041
+ cardholderInfo?: string;
18042
+
18055
18043
  // Constructor with default values for optional fields
18056
18044
  constructor(
18057
- surchargePercent: number | null = null,
18058
- surchargeAmount: number | null = null,
18045
+ totalWithSurchargeAmount: string | null = null,
18046
+ success: boolean | null = null,
18047
+ type: string | null = null,
18048
+ surchargePercent: string | null = null,
18049
+ surchargeAmount: string | null = null,
18059
18050
  surchargeExempt: boolean | null = null,
18060
18051
  cardType: string | null = null,
18061
18052
  cardToken: string | undefined = undefined,
18062
18053
  brand: string | null = null,
18063
18054
  bin: string | null = null,
18064
- commercialIndicator: string | null = null,
18055
+ commercialIndicator: string | undefined = undefined,
18056
+ isCommercial: boolean | null = null,
18057
+ isRegulated: boolean | null = null,
18058
+ exemptionReason: string | undefined = undefined,
18059
+ debitFeeAmount: string | undefined = undefined,
18065
18060
  disclosure: string | undefined = undefined,
18066
- debitCategory: string | null = null,
18067
- countryIssued: string | null = null,
18061
+ debitCategory: string | undefined = undefined,
18062
+ countryCode: string | null = null,
18063
+ state: string | undefined = undefined,
18068
18064
  uuid: string | null = null,
18065
+ expirationDate: string | undefined = undefined,
18066
+ disclosureAdditional: string | undefined = undefined,
18067
+ cardholderInfo: string | undefined = undefined,
18069
18068
  ) {
18069
+ this.totalWithSurchargeAmount = totalWithSurchargeAmount;
18070
+ this.success = success;
18071
+ this.type = type;
18070
18072
  this.surchargePercent = surchargePercent;
18071
18073
  this.surchargeAmount = surchargeAmount;
18072
18074
  this.surchargeExempt = surchargeExempt;
@@ -18075,74 +18077,96 @@ export class PricingResponseAttributes {
18075
18077
  this.brand = brand;
18076
18078
  this.bin = bin;
18077
18079
  this.commercialIndicator = commercialIndicator;
18080
+ this.isCommercial = isCommercial;
18081
+ this.isRegulated = isRegulated;
18082
+ this.exemptionReason = exemptionReason;
18083
+ this.debitFeeAmount = debitFeeAmount;
18078
18084
  this.disclosure = disclosure;
18079
18085
  this.debitCategory = debitCategory;
18080
- this.countryIssued = countryIssued;
18086
+ this.countryCode = countryCode;
18087
+ this.state = state;
18081
18088
  this.uuid = uuid;
18089
+ this.expirationDate = expirationDate;
18090
+ this.disclosureAdditional = disclosureAdditional;
18091
+ this.cardholderInfo = cardholderInfo;
18082
18092
  }
18083
18093
  }
18084
18094
 
18085
18095
  /**
18086
- * Models the data wrapper for a pricing response.
18096
+ * Models a surcharge review response.
18087
18097
  */
18088
- export class PricingResponseData {
18098
+ export class SurchargeReviewResponse {
18089
18099
 
18090
18100
  /**
18091
- * The type of the response.
18101
+ * Whether or not the request succeeded.
18092
18102
  */
18093
- type: string | null = null;
18103
+ success: boolean | null = null;
18104
+
18105
+ /**
18106
+ * The error, if an error occurred.
18107
+ */
18108
+ error: string | null = null;
18094
18109
 
18095
18110
  /**
18096
- * The pricing response attributes.
18111
+ * A narrative description of the transaction result.
18112
+ */
18113
+ responseDescription: string | null = null;
18114
+
18115
+ /**
18116
+ * The data included in the surcharge review response.
18097
18117
  */
18098
- attributes: PricingResponseAttributes | null = null;
18118
+ data: SurchargeReviewResponseData | null = null;
18099
18119
 
18100
18120
  // Constructor with default values for optional fields
18101
18121
  constructor(
18102
- type: string | null = null,
18103
- attributes: PricingResponseAttributes | null = null,
18122
+ success: boolean | null = null,
18123
+ error: string | null = null,
18124
+ responseDescription: string | null = null,
18125
+ data: SurchargeReviewResponseData | null = null,
18104
18126
  ) {
18105
- this.type = type;
18106
- this.attributes = attributes;
18127
+ this.success = success;
18128
+ this.error = error;
18129
+ this.responseDescription = responseDescription;
18130
+ this.data = data;
18107
18131
  }
18108
18132
  }
18109
18133
 
18110
18134
  /**
18111
- * Models an error response.
18135
+ * Models a request for short-lived API credentials.
18112
18136
  */
18113
- export class ErrorType {
18137
+ export class TransientKeyRequest {
18114
18138
 
18115
18139
  /**
18116
- * The HTTP status code.
18140
+ * The request timeout in seconds.
18117
18141
  */
18118
- status: number | null = null;
18142
+ timeout: number | null = null;
18119
18143
 
18120
18144
  /**
18121
- * The error title.
18145
+ * Whether or not to route transaction to the test gateway.
18122
18146
  */
18123
- title: string | null = null;
18147
+ test: boolean | null = null;
18124
18148
 
18125
18149
  /**
18126
- * The detailed error message.
18150
+ * Restricts the returned credentials to a single API call when true.
18127
18151
  */
18128
- detail: string | null = null;
18152
+ oneTime?: boolean;
18129
18153
 
18130
18154
  // Constructor with default values for optional fields
18131
18155
  constructor(
18132
- status: number | null = null,
18133
- title: string | null = null,
18134
- detail: string | null = null,
18156
+ timeout: number | null = null,
18157
+ test: boolean | null = null,
18158
+ oneTime: boolean = false,
18135
18159
  ) {
18136
- this.status = status;
18137
- this.title = title;
18138
- this.detail = detail;
18160
+ this.timeout = timeout;
18161
+ this.test = test;
18162
+ this.oneTime = oneTime;
18139
18163
  }
18140
18164
  }
18141
18165
 
18142
18166
  /**
18143
- * Models a pricing response.
18167
+ * Models a response containing short-lived API credentials.
18144
18168
  */
18145
- export class PricingResponse {
18169
+ export class TransientKeyResponse {
18146
18170
 
18147
18171
  /**
18148
18172
  * Whether or not the request succeeded.
@@ -18160,21 +18184,35 @@ export class PricingResponse {
18160
18184
  responseDescription: string | null = null;
18161
18185
 
18162
18186
  /**
18163
- * The pricing response data.
18187
+ * The transient API key.
18188
+ */
18189
+ apiKey: string | null = null;
18190
+
18191
+ /**
18192
+ * The transient bearer token.
18164
18193
  */
18165
- data: PricingResponseData | null = null;
18194
+ bearerToken: string | null = null;
18195
+
18196
+ /**
18197
+ * The transient signing key.
18198
+ */
18199
+ signingKey: string | null = null;
18166
18200
 
18167
18201
  // Constructor with default values for optional fields
18168
18202
  constructor(
18169
18203
  success: boolean | null = null,
18170
18204
  error: string | null = null,
18171
18205
  responseDescription: string | null = null,
18172
- data: PricingResponseData | null = null,
18206
+ apiKey: string | null = null,
18207
+ bearerToken: string | null = null,
18208
+ signingKey: string | null = null,
18173
18209
  ) {
18174
18210
  this.success = success;
18175
18211
  this.error = error;
18176
18212
  this.responseDescription = responseDescription;
18177
- this.data = data;
18213
+ this.apiKey = apiKey;
18214
+ this.bearerToken = bearerToken;
18215
+ this.signingKey = signingKey;
18178
18216
  }
18179
18217
  }
18180
18218