@blockchyp/blockchyp-ts 2.18.5 → 2.18.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockchyp/blockchyp-ts",
3
- "version": "v2.18.5",
3
+ "version": "2.18.7",
4
4
  "description": "BlockChyp Typescript Client",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
package/src/client.ts CHANGED
@@ -68,7 +68,8 @@ export const HealthcareType = Object.freeze({
68
68
  DENTAL: 'dental',
69
69
  })
70
70
  /* eslint-enable no-unused-vars */
71
- const VERSION: string = "v2.18.5";
71
+ // TODO: Fix this to use the version from package.json
72
+ const VERSION: string = "v1.0.0";
72
73
  const USER_AGENT: string = `BlockChyp-TypeScript/${VERSION}`;
73
74
  // Some browsers do not allow setting the user-agent header, so we set
74
75
  // an alternative if running from a browser.
@@ -472,13 +473,6 @@ export class BlockChypClient {
472
473
  return this._gatewayRequest('post', '/api/partner-commission-breakdown', request);
473
474
  }
474
475
 
475
- /**
476
- * Generates and returns api credentials for a given merchant.
477
- */
478
- merchantCredentialGeneration(request: Models.MerchantCredentialGenerationRequest): Promise<AxiosResponse<Models.MerchantCredentialGenerationResponse>> {
479
- return this._gatewayRequest('post', '/api/creds/generateMerchant', request);
480
- }
481
-
482
476
  /**
483
477
  * Returns profile information for a merchant.
484
478
  */
@@ -521,6 +515,13 @@ export class BlockChypClient {
521
515
  return this._gatewayRequest('delete', '/api/token/' + request.token, request);
522
516
  }
523
517
 
518
+ /**
519
+ * Generates and returns api credentials for a given merchant.
520
+ */
521
+ merchantCredentialGeneration(request: Models.MerchantCredentialGenerationRequest): Promise<AxiosResponse<Models.MerchantCredentialGenerationResponse>> {
522
+ return this._dashboardRequest('post', '/api/generate-merchant-creds', request);
523
+ }
524
+
524
525
  /**
525
526
  * Adds a test merchant account.
526
527
  */
package/src/models.ts CHANGED
@@ -2228,6 +2228,11 @@ export class AuthorizationRequest {
2228
2228
  */
2229
2229
  enroll?: boolean;
2230
2230
 
2231
+ /**
2232
+ * Duplicate detection should be bypassed.
2233
+ */
2234
+ bypassDupeFilter?: boolean;
2235
+
2231
2236
  /**
2232
2237
  * A narrative description of the transaction.
2233
2238
  */
@@ -2354,6 +2359,12 @@ export class AuthorizationRequest {
2354
2359
  */
2355
2360
  asyncReversals?: boolean;
2356
2361
 
2362
+ /**
2363
+ * A passthrough surcharge amount. This surcharge amount will be passed directly to the
2364
+ * gateway and is not directly calculated.
2365
+ */
2366
+ passthroughSurcharge?: string;
2367
+
2357
2368
  // Constructor with default values for optional fields
2358
2369
  constructor(
2359
2370
  timeout: number | null = null,
@@ -2399,6 +2410,7 @@ export class AuthorizationRequest {
2399
2410
  transactionId: string | undefined = undefined,
2400
2411
  onlineAuthCode: string | undefined = undefined,
2401
2412
  enroll: boolean = false,
2413
+ bypassDupeFilter: boolean = false,
2402
2414
  description: string | undefined = undefined,
2403
2415
  promptForTip: boolean = false,
2404
2416
  cashBackEnabled: boolean = false,
@@ -2422,6 +2434,7 @@ export class AuthorizationRequest {
2422
2434
  simulateChipRejection: boolean = false,
2423
2435
  simulateOutOfOrderReversal: boolean = false,
2424
2436
  asyncReversals: boolean = false,
2437
+ passthroughSurcharge: string | undefined = undefined,
2425
2438
  ) {
2426
2439
  this.timeout = timeout;
2427
2440
  this.test = test;
@@ -2466,6 +2479,7 @@ export class AuthorizationRequest {
2466
2479
  this.transactionId = transactionId;
2467
2480
  this.onlineAuthCode = onlineAuthCode;
2468
2481
  this.enroll = enroll;
2482
+ this.bypassDupeFilter = bypassDupeFilter;
2469
2483
  this.description = description;
2470
2484
  this.promptForTip = promptForTip;
2471
2485
  this.cashBackEnabled = cashBackEnabled;
@@ -2489,6 +2503,7 @@ export class AuthorizationRequest {
2489
2503
  this.simulateChipRejection = simulateChipRejection;
2490
2504
  this.simulateOutOfOrderReversal = simulateOutOfOrderReversal;
2491
2505
  this.asyncReversals = asyncReversals;
2506
+ this.passthroughSurcharge = passthroughSurcharge;
2492
2507
  }
2493
2508
  }
2494
2509