@blockchyp/blockchyp-ts 2.24.4 → 2.24.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": "2.24.4",
3
+ "version": "2.24.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
@@ -515,6 +515,13 @@ export class BlockChypClient {
515
515
  return this._gatewayRequest('post', '/api/unlink-token', request);
516
516
  }
517
517
 
518
+ /**
519
+ * Updates a payment token.
520
+ */
521
+ updateToken(request: Models.UpdateTokenRequest): Promise<AxiosResponse<Models.UpdateTokenResponse>> {
522
+ return this._gatewayRequest('post', '/api/token/' + request.token, request);
523
+ }
524
+
518
525
  /**
519
526
  * Deletes a payment token.
520
527
  */
package/src/models.ts CHANGED
@@ -1829,6 +1829,133 @@ export class TokenMetadataResponse {
1829
1829
  }
1830
1830
  }
1831
1831
 
1832
+ /**
1833
+ * Updates a payment token.
1834
+ */
1835
+ export class UpdateTokenRequest {
1836
+
1837
+ /**
1838
+ * The request timeout in seconds.
1839
+ */
1840
+ timeout: number | null = null;
1841
+
1842
+ /**
1843
+ * Whether or not to route transaction to the test gateway.
1844
+ */
1845
+ test: boolean | null = null;
1846
+
1847
+ /**
1848
+ * The token to update.
1849
+ */
1850
+ token: string | null = null;
1851
+
1852
+ /**
1853
+ * Bank account holder type (personal or business).
1854
+ */
1855
+ accountHolderType: string | null = null;
1856
+
1857
+ /**
1858
+ * Bank account type (checking or saving).
1859
+ */
1860
+ accountType: string | null = null;
1861
+
1862
+ /**
1863
+ * Bank name.
1864
+ */
1865
+ bankName: string | null = null;
1866
+
1867
+ /**
1868
+ * Card holder name.
1869
+ */
1870
+ cardHolderName: string | null = null;
1871
+
1872
+ /**
1873
+ * Expiry month.
1874
+ */
1875
+ expiryMonth: string | null = null;
1876
+
1877
+ /**
1878
+ * Expiry year.
1879
+ */
1880
+ expiryYear: string | null = null;
1881
+
1882
+ /**
1883
+ * Address.
1884
+ */
1885
+ address: string | null = null;
1886
+
1887
+ /**
1888
+ * Postal code.
1889
+ */
1890
+ postalCode: string | null = null;
1891
+
1892
+ // Constructor with default values for optional fields
1893
+ constructor(
1894
+ timeout: number | null = null,
1895
+ test: boolean | null = null,
1896
+ token: string | null = null,
1897
+ accountHolderType: string | null = null,
1898
+ accountType: string | null = null,
1899
+ bankName: string | null = null,
1900
+ cardHolderName: string | null = null,
1901
+ expiryMonth: string | null = null,
1902
+ expiryYear: string | null = null,
1903
+ address: string | null = null,
1904
+ postalCode: string | null = null,
1905
+ ) {
1906
+ this.timeout = timeout;
1907
+ this.test = test;
1908
+ this.token = token;
1909
+ this.accountHolderType = accountHolderType;
1910
+ this.accountType = accountType;
1911
+ this.bankName = bankName;
1912
+ this.cardHolderName = cardHolderName;
1913
+ this.expiryMonth = expiryMonth;
1914
+ this.expiryYear = expiryYear;
1915
+ this.address = address;
1916
+ this.postalCode = postalCode;
1917
+ }
1918
+ }
1919
+
1920
+ /**
1921
+ * The response to a update token request.
1922
+ */
1923
+ export class UpdateTokenResponse {
1924
+
1925
+ /**
1926
+ * Whether or not the request succeeded.
1927
+ */
1928
+ success: boolean | null = null;
1929
+
1930
+ /**
1931
+ * The error, if an error occurred.
1932
+ */
1933
+ error: string | null = null;
1934
+
1935
+ /**
1936
+ * A narrative description of the transaction result.
1937
+ */
1938
+ responseDescription: string | null = null;
1939
+
1940
+ /**
1941
+ * The updated token for a given query.
1942
+ */
1943
+ token: CustomerToken | null = null;
1944
+
1945
+ // Constructor with default values for optional fields
1946
+ constructor(
1947
+ success: boolean | null = null,
1948
+ error: string | null = null,
1949
+ responseDescription: string | null = null,
1950
+ token: CustomerToken | null = null,
1951
+ ) {
1952
+ this.success = success;
1953
+ this.error = error;
1954
+ this.responseDescription = responseDescription;
1955
+ this.token = token;
1956
+ }
1957
+ }
1958
+
1832
1959
  /**
1833
1960
  * Models a customer token.
1834
1961
  */
@@ -10143,6 +10270,11 @@ export class MerchantProfile {
10143
10270
  */
10144
10271
  accountUpdaterEnrolled: boolean | null = null;
10145
10272
 
10273
+ /**
10274
+ * Whether the merchant should bypass an auth with TSYS on Enrollment.
10275
+ */
10276
+ bypassEnrollAuthEnabled: boolean | null = null;
10277
+
10146
10278
  // Constructor with default values for optional fields
10147
10279
  constructor(
10148
10280
  timeout: number | null = null,
@@ -10208,6 +10340,7 @@ export class MerchantProfile {
10208
10340
  avsRule: string | null = null,
10209
10341
  followPartnerAvsSettings: boolean | null = null,
10210
10342
  accountUpdaterEnrolled: boolean | null = null,
10343
+ bypassEnrollAuthEnabled: boolean | null = null,
10211
10344
  ) {
10212
10345
  this.timeout = timeout;
10213
10346
  this.test = test;
@@ -10272,6 +10405,7 @@ export class MerchantProfile {
10272
10405
  this.avsRule = avsRule;
10273
10406
  this.followPartnerAvsSettings = followPartnerAvsSettings;
10274
10407
  this.accountUpdaterEnrolled = accountUpdaterEnrolled;
10408
+ this.bypassEnrollAuthEnabled = bypassEnrollAuthEnabled;
10275
10409
  }
10276
10410
  }
10277
10411
 
@@ -10614,6 +10748,11 @@ export class MerchantProfileResponse {
10614
10748
  */
10615
10749
  accountUpdaterEnrolled: boolean | null = null;
10616
10750
 
10751
+ /**
10752
+ * Whether the merchant should bypass an auth with TSYS on Enrollment.
10753
+ */
10754
+ bypassEnrollAuthEnabled: boolean | null = null;
10755
+
10617
10756
  // Constructor with default values for optional fields
10618
10757
  constructor(
10619
10758
  success: boolean | null = null,
@@ -10681,6 +10820,7 @@ export class MerchantProfileResponse {
10681
10820
  avsRule: string | null = null,
10682
10821
  followPartnerAvsSettings: boolean | null = null,
10683
10822
  accountUpdaterEnrolled: boolean | null = null,
10823
+ bypassEnrollAuthEnabled: boolean | null = null,
10684
10824
  ) {
10685
10825
  this.success = success;
10686
10826
  this.error = error;
@@ -10747,6 +10887,7 @@ export class MerchantProfileResponse {
10747
10887
  this.avsRule = avsRule;
10748
10888
  this.followPartnerAvsSettings = followPartnerAvsSettings;
10749
10889
  this.accountUpdaterEnrolled = accountUpdaterEnrolled;
10890
+ this.bypassEnrollAuthEnabled = bypassEnrollAuthEnabled;
10750
10891
  }
10751
10892
  }
10752
10893