@blockchyp/blockchyp-ts 2.24.5 → 2.24.8
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 +37 -0
- package/_bundles/blockchyp.js +103 -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 +72 -0
- package/lib/src/models.js +97 -4
- package/lib/src/models.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +7 -0
- package/src/models.ts +127 -0
package/package.json
CHANGED
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
|
*/
|