@enfuce/nextgen-sdk 0.0.1

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.
Files changed (313) hide show
  1. package/dist/authorisation-control/api.d.ts +771 -0
  2. package/dist/authorisation-control/api.js +240 -0
  3. package/dist/authorisation-control/base.d.ts +66 -0
  4. package/dist/authorisation-control/base.js +65 -0
  5. package/dist/authorisation-control/common.d.ts +65 -0
  6. package/dist/authorisation-control/common.js +161 -0
  7. package/dist/authorisation-control/configuration.d.ts +91 -0
  8. package/dist/authorisation-control/configuration.js +44 -0
  9. package/dist/authorisation-control/index.d.ts +13 -0
  10. package/dist/authorisation-control/index.js +31 -0
  11. package/dist/card/api.d.ts +2065 -0
  12. package/dist/card/api.js +1406 -0
  13. package/dist/card/base.d.ts +66 -0
  14. package/dist/card/base.js +65 -0
  15. package/dist/card/common.d.ts +65 -0
  16. package/dist/card/common.js +161 -0
  17. package/dist/card/configuration.d.ts +91 -0
  18. package/dist/card/configuration.js +44 -0
  19. package/dist/card/index.d.ts +13 -0
  20. package/dist/card/index.js +31 -0
  21. package/dist/cardholder/api.d.ts +1890 -0
  22. package/dist/cardholder/api.js +1239 -0
  23. package/dist/cardholder/base.d.ts +66 -0
  24. package/dist/cardholder/base.js +65 -0
  25. package/dist/cardholder/common.d.ts +65 -0
  26. package/dist/cardholder/common.js +161 -0
  27. package/dist/cardholder/configuration.d.ts +91 -0
  28. package/dist/cardholder/configuration.js +44 -0
  29. package/dist/cardholder/index.d.ts +13 -0
  30. package/dist/cardholder/index.js +31 -0
  31. package/dist/cards/api.d.ts +78 -0
  32. package/dist/cards/api.js +142 -0
  33. package/dist/cards/base.d.ts +66 -0
  34. package/dist/cards/base.js +65 -0
  35. package/dist/cards/common.d.ts +65 -0
  36. package/dist/cards/common.js +161 -0
  37. package/dist/cards/configuration.d.ts +91 -0
  38. package/dist/cards/configuration.js +44 -0
  39. package/dist/cards/index.d.ts +13 -0
  40. package/dist/cards/index.js +31 -0
  41. package/dist/clearing-file-copy/api.d.ts +1245 -0
  42. package/dist/clearing-file-copy/api.js +139 -0
  43. package/dist/clearing-file-copy/base.d.ts +66 -0
  44. package/dist/clearing-file-copy/base.js +65 -0
  45. package/dist/clearing-file-copy/common.d.ts +65 -0
  46. package/dist/clearing-file-copy/common.js +161 -0
  47. package/dist/clearing-file-copy/configuration.d.ts +91 -0
  48. package/dist/clearing-file-copy/configuration.js +44 -0
  49. package/dist/clearing-file-copy/index.d.ts +13 -0
  50. package/dist/clearing-file-copy/index.js +31 -0
  51. package/dist/esm/authorisation-control/api.d.ts +771 -0
  52. package/dist/esm/authorisation-control/api.js +233 -0
  53. package/dist/esm/authorisation-control/base.d.ts +66 -0
  54. package/dist/esm/authorisation-control/base.js +60 -0
  55. package/dist/esm/authorisation-control/common.d.ts +65 -0
  56. package/dist/esm/authorisation-control/common.js +149 -0
  57. package/dist/esm/authorisation-control/configuration.d.ts +91 -0
  58. package/dist/esm/authorisation-control/configuration.js +40 -0
  59. package/dist/esm/authorisation-control/index.d.ts +13 -0
  60. package/dist/esm/authorisation-control/index.js +15 -0
  61. package/dist/esm/card/api.d.ts +2065 -0
  62. package/dist/esm/card/api.js +1379 -0
  63. package/dist/esm/card/base.d.ts +66 -0
  64. package/dist/esm/card/base.js +60 -0
  65. package/dist/esm/card/common.d.ts +65 -0
  66. package/dist/esm/card/common.js +149 -0
  67. package/dist/esm/card/configuration.d.ts +91 -0
  68. package/dist/esm/card/configuration.js +40 -0
  69. package/dist/esm/card/index.d.ts +13 -0
  70. package/dist/esm/card/index.js +15 -0
  71. package/dist/esm/cardholder/api.d.ts +1890 -0
  72. package/dist/esm/cardholder/api.js +1220 -0
  73. package/dist/esm/cardholder/base.d.ts +66 -0
  74. package/dist/esm/cardholder/base.js +60 -0
  75. package/dist/esm/cardholder/common.d.ts +65 -0
  76. package/dist/esm/cardholder/common.js +149 -0
  77. package/dist/esm/cardholder/configuration.d.ts +91 -0
  78. package/dist/esm/cardholder/configuration.js +40 -0
  79. package/dist/esm/cardholder/index.d.ts +13 -0
  80. package/dist/esm/cardholder/index.js +15 -0
  81. package/dist/esm/cards/api.d.ts +78 -0
  82. package/dist/esm/cards/api.js +135 -0
  83. package/dist/esm/cards/base.d.ts +66 -0
  84. package/dist/esm/cards/base.js +60 -0
  85. package/dist/esm/cards/common.d.ts +65 -0
  86. package/dist/esm/cards/common.js +149 -0
  87. package/dist/esm/cards/configuration.d.ts +91 -0
  88. package/dist/esm/cards/configuration.js +40 -0
  89. package/dist/esm/cards/index.d.ts +13 -0
  90. package/dist/esm/cards/index.js +15 -0
  91. package/dist/esm/clearing-file-copy/api.d.ts +1245 -0
  92. package/dist/esm/clearing-file-copy/api.js +136 -0
  93. package/dist/esm/clearing-file-copy/base.d.ts +66 -0
  94. package/dist/esm/clearing-file-copy/base.js +60 -0
  95. package/dist/esm/clearing-file-copy/common.d.ts +65 -0
  96. package/dist/esm/clearing-file-copy/common.js +149 -0
  97. package/dist/esm/clearing-file-copy/configuration.d.ts +91 -0
  98. package/dist/esm/clearing-file-copy/configuration.js +40 -0
  99. package/dist/esm/clearing-file-copy/index.d.ts +13 -0
  100. package/dist/esm/clearing-file-copy/index.js +15 -0
  101. package/dist/esm/index.d.ts +12 -0
  102. package/dist/esm/index.js +14 -0
  103. package/dist/esm/issuer-events/api.d.ts +1721 -0
  104. package/dist/esm/issuer-events/api.js +940 -0
  105. package/dist/esm/issuer-events/base.d.ts +66 -0
  106. package/dist/esm/issuer-events/base.js +60 -0
  107. package/dist/esm/issuer-events/common.d.ts +65 -0
  108. package/dist/esm/issuer-events/common.js +149 -0
  109. package/dist/esm/issuer-events/configuration.d.ts +91 -0
  110. package/dist/esm/issuer-events/configuration.js +40 -0
  111. package/dist/esm/issuer-events/index.d.ts +13 -0
  112. package/dist/esm/issuer-events/index.js +15 -0
  113. package/dist/esm/oauth/axios.d.ts +14 -0
  114. package/dist/esm/oauth/axios.js +58 -0
  115. package/dist/esm/oauth/clientCredentials.d.ts +24 -0
  116. package/dist/esm/oauth/clientCredentials.js +59 -0
  117. package/dist/esm/oauth/index.d.ts +3 -0
  118. package/dist/esm/oauth/index.js +24 -0
  119. package/dist/esm/oauth/tokenManager.d.ts +38 -0
  120. package/dist/esm/oauth/tokenManager.js +77 -0
  121. package/dist/esm/pin/api.d.ts +329 -0
  122. package/dist/esm/pin/api.js +341 -0
  123. package/dist/esm/pin/base.d.ts +66 -0
  124. package/dist/esm/pin/base.js +60 -0
  125. package/dist/esm/pin/common.d.ts +65 -0
  126. package/dist/esm/pin/common.js +149 -0
  127. package/dist/esm/pin/configuration.d.ts +91 -0
  128. package/dist/esm/pin/configuration.js +40 -0
  129. package/dist/esm/pin/index.d.ts +13 -0
  130. package/dist/esm/pin/index.js +15 -0
  131. package/dist/esm/threeds/api.d.ts +104 -0
  132. package/dist/esm/threeds/api.js +136 -0
  133. package/dist/esm/threeds/base.d.ts +66 -0
  134. package/dist/esm/threeds/base.js +60 -0
  135. package/dist/esm/threeds/common.d.ts +65 -0
  136. package/dist/esm/threeds/common.js +149 -0
  137. package/dist/esm/threeds/configuration.d.ts +91 -0
  138. package/dist/esm/threeds/configuration.js +40 -0
  139. package/dist/esm/threeds/index.d.ts +13 -0
  140. package/dist/esm/threeds/index.js +15 -0
  141. package/dist/esm/threeds-oob/api.d.ts +241 -0
  142. package/dist/esm/threeds-oob/api.js +141 -0
  143. package/dist/esm/threeds-oob/base.d.ts +66 -0
  144. package/dist/esm/threeds-oob/base.js +60 -0
  145. package/dist/esm/threeds-oob/common.d.ts +65 -0
  146. package/dist/esm/threeds-oob/common.js +149 -0
  147. package/dist/esm/threeds-oob/configuration.d.ts +91 -0
  148. package/dist/esm/threeds-oob/configuration.js +40 -0
  149. package/dist/esm/threeds-oob/index.d.ts +13 -0
  150. package/dist/esm/threeds-oob/index.js +15 -0
  151. package/dist/esm/transaction-event/api.d.ts +1082 -0
  152. package/dist/esm/transaction-event/api.js +163 -0
  153. package/dist/esm/transaction-event/base.d.ts +66 -0
  154. package/dist/esm/transaction-event/base.js +60 -0
  155. package/dist/esm/transaction-event/common.d.ts +65 -0
  156. package/dist/esm/transaction-event/common.js +149 -0
  157. package/dist/esm/transaction-event/configuration.d.ts +91 -0
  158. package/dist/esm/transaction-event/configuration.js +40 -0
  159. package/dist/esm/transaction-event/index.d.ts +13 -0
  160. package/dist/esm/transaction-event/index.js +15 -0
  161. package/dist/esm/wallet/api.d.ts +1385 -0
  162. package/dist/esm/wallet/api.js +1342 -0
  163. package/dist/esm/wallet/base.d.ts +66 -0
  164. package/dist/esm/wallet/base.js +60 -0
  165. package/dist/esm/wallet/common.d.ts +65 -0
  166. package/dist/esm/wallet/common.js +149 -0
  167. package/dist/esm/wallet/configuration.d.ts +91 -0
  168. package/dist/esm/wallet/configuration.js +40 -0
  169. package/dist/esm/wallet/index.d.ts +13 -0
  170. package/dist/esm/wallet/index.js +15 -0
  171. package/dist/index.d.ts +12 -0
  172. package/dist/index.js +17 -0
  173. package/dist/issuer-events/api.d.ts +1721 -0
  174. package/dist/issuer-events/api.js +947 -0
  175. package/dist/issuer-events/base.d.ts +66 -0
  176. package/dist/issuer-events/base.js +65 -0
  177. package/dist/issuer-events/common.d.ts +65 -0
  178. package/dist/issuer-events/common.js +161 -0
  179. package/dist/issuer-events/configuration.d.ts +91 -0
  180. package/dist/issuer-events/configuration.js +44 -0
  181. package/dist/issuer-events/index.d.ts +13 -0
  182. package/dist/issuer-events/index.js +31 -0
  183. package/dist/oauth/axios.d.ts +14 -0
  184. package/dist/oauth/axios.js +61 -0
  185. package/dist/oauth/clientCredentials.d.ts +24 -0
  186. package/dist/oauth/clientCredentials.js +63 -0
  187. package/dist/oauth/index.d.ts +3 -0
  188. package/dist/oauth/index.js +31 -0
  189. package/dist/oauth/tokenManager.d.ts +38 -0
  190. package/dist/oauth/tokenManager.js +81 -0
  191. package/dist/pin/api.d.ts +329 -0
  192. package/dist/pin/api.js +352 -0
  193. package/dist/pin/base.d.ts +66 -0
  194. package/dist/pin/base.js +65 -0
  195. package/dist/pin/common.d.ts +65 -0
  196. package/dist/pin/common.js +161 -0
  197. package/dist/pin/configuration.d.ts +91 -0
  198. package/dist/pin/configuration.js +44 -0
  199. package/dist/pin/index.d.ts +13 -0
  200. package/dist/pin/index.js +31 -0
  201. package/dist/threeds/api.d.ts +104 -0
  202. package/dist/threeds/api.js +143 -0
  203. package/dist/threeds/base.d.ts +66 -0
  204. package/dist/threeds/base.js +65 -0
  205. package/dist/threeds/common.d.ts +65 -0
  206. package/dist/threeds/common.js +161 -0
  207. package/dist/threeds/configuration.d.ts +91 -0
  208. package/dist/threeds/configuration.js +44 -0
  209. package/dist/threeds/index.d.ts +13 -0
  210. package/dist/threeds/index.js +31 -0
  211. package/dist/threeds-oob/api.d.ts +241 -0
  212. package/dist/threeds-oob/api.js +148 -0
  213. package/dist/threeds-oob/base.d.ts +66 -0
  214. package/dist/threeds-oob/base.js +65 -0
  215. package/dist/threeds-oob/common.d.ts +65 -0
  216. package/dist/threeds-oob/common.js +161 -0
  217. package/dist/threeds-oob/configuration.d.ts +91 -0
  218. package/dist/threeds-oob/configuration.js +44 -0
  219. package/dist/threeds-oob/index.d.ts +13 -0
  220. package/dist/threeds-oob/index.js +31 -0
  221. package/dist/transaction-event/api.d.ts +1082 -0
  222. package/dist/transaction-event/api.js +166 -0
  223. package/dist/transaction-event/base.d.ts +66 -0
  224. package/dist/transaction-event/base.js +65 -0
  225. package/dist/transaction-event/common.d.ts +65 -0
  226. package/dist/transaction-event/common.js +161 -0
  227. package/dist/transaction-event/configuration.d.ts +91 -0
  228. package/dist/transaction-event/configuration.js +44 -0
  229. package/dist/transaction-event/index.d.ts +13 -0
  230. package/dist/transaction-event/index.js +31 -0
  231. package/dist/wallet/api.d.ts +1385 -0
  232. package/dist/wallet/api.js +1377 -0
  233. package/dist/wallet/base.d.ts +66 -0
  234. package/dist/wallet/base.js +65 -0
  235. package/dist/wallet/common.d.ts +65 -0
  236. package/dist/wallet/common.js +161 -0
  237. package/dist/wallet/configuration.d.ts +91 -0
  238. package/dist/wallet/configuration.js +44 -0
  239. package/dist/wallet/index.d.ts +13 -0
  240. package/dist/wallet/index.js +31 -0
  241. package/package.json +25 -0
  242. package/src/authorisation-control/api.ts +876 -0
  243. package/src/authorisation-control/base.ts +86 -0
  244. package/src/authorisation-control/common.ts +150 -0
  245. package/src/authorisation-control/configuration.ts +115 -0
  246. package/src/authorisation-control/index.ts +18 -0
  247. package/src/card/api.ts +2792 -0
  248. package/src/card/base.ts +86 -0
  249. package/src/card/common.ts +150 -0
  250. package/src/card/configuration.ts +115 -0
  251. package/src/card/index.ts +18 -0
  252. package/src/cardholder/api.ts +2244 -0
  253. package/src/cardholder/base.ts +86 -0
  254. package/src/cardholder/common.ts +150 -0
  255. package/src/cardholder/configuration.ts +115 -0
  256. package/src/cardholder/index.ts +18 -0
  257. package/src/cards/api.ts +141 -0
  258. package/src/cards/base.ts +86 -0
  259. package/src/cards/common.ts +150 -0
  260. package/src/cards/configuration.ts +115 -0
  261. package/src/cards/index.ts +18 -0
  262. package/src/clearing-file-copy/api.ts +1309 -0
  263. package/src/clearing-file-copy/base.ts +86 -0
  264. package/src/clearing-file-copy/common.ts +150 -0
  265. package/src/clearing-file-copy/configuration.ts +115 -0
  266. package/src/clearing-file-copy/index.ts +18 -0
  267. package/src/index.ts +16 -0
  268. package/src/issuer-events/api.ts +1926 -0
  269. package/src/issuer-events/base.ts +86 -0
  270. package/src/issuer-events/common.ts +150 -0
  271. package/src/issuer-events/configuration.ts +115 -0
  272. package/src/issuer-events/index.ts +18 -0
  273. package/src/oauth/axios.ts +60 -0
  274. package/src/oauth/clientCredentials.ts +72 -0
  275. package/src/oauth/index.ts +24 -0
  276. package/src/oauth/tokenManager.ts +85 -0
  277. package/src/pin/api.ts +507 -0
  278. package/src/pin/base.ts +86 -0
  279. package/src/pin/common.ts +150 -0
  280. package/src/pin/configuration.ts +115 -0
  281. package/src/pin/index.ts +18 -0
  282. package/src/threeds/api.ts +173 -0
  283. package/src/threeds/base.ts +86 -0
  284. package/src/threeds/common.ts +150 -0
  285. package/src/threeds/configuration.ts +115 -0
  286. package/src/threeds/index.ts +18 -0
  287. package/src/threeds-oob/api.ts +311 -0
  288. package/src/threeds-oob/base.ts +86 -0
  289. package/src/threeds-oob/common.ts +150 -0
  290. package/src/threeds-oob/configuration.ts +115 -0
  291. package/src/threeds-oob/index.ts +18 -0
  292. package/src/transaction-event/api.ts +1152 -0
  293. package/src/transaction-event/base.ts +86 -0
  294. package/src/transaction-event/common.ts +150 -0
  295. package/src/transaction-event/configuration.ts +115 -0
  296. package/src/transaction-event/index.ts +18 -0
  297. package/src/wallet/api.ts +2083 -0
  298. package/src/wallet/base.ts +86 -0
  299. package/src/wallet/common.ts +150 -0
  300. package/src/wallet/configuration.ts +115 -0
  301. package/src/wallet/index.ts +18 -0
  302. package/test/authorisation-control.test.ts +71 -0
  303. package/test/card.test.ts +39 -0
  304. package/test/cardholder.test.ts +51 -0
  305. package/test/cards.test.ts +35 -0
  306. package/test/issuer-events.test.ts +55 -0
  307. package/test/oauth.test.ts +205 -0
  308. package/test/pin.test.ts +39 -0
  309. package/test/threeds-oob.test.ts +90 -0
  310. package/test/threeds.test.ts +55 -0
  311. package/test/wallet.test.ts +62 -0
  312. package/tsconfig.esm.json +7 -0
  313. package/tsconfig.json +14 -0
@@ -0,0 +1,1406 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Card API
6
+ * Endpoints for doing various actions connected to the Card entity. All date-time fields adhere to the ISO 8601 standard unless specified otherwise. For example: 2024-05-31T06:55:17Z
7
+ *
8
+ * The version of the OpenAPI document: 1
9
+ * Contact: info@enfuce.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.UpdateCardApi = exports.UpdateCardApiFactory = exports.UpdateCardApiFp = exports.UpdateCardApiAxiosParamCreator = exports.GetPlasticManufacturingHistoryApi = exports.GetPlasticManufacturingHistoryApiFactory = exports.GetPlasticManufacturingHistoryApiFp = exports.GetPlasticManufacturingHistoryApiAxiosParamCreator = exports.GetCardPaymentInfoApi = exports.GetCardPaymentInfoApiFactory = exports.GetCardPaymentInfoApiFp = exports.GetCardPaymentInfoApiAxiosParamCreator = exports.GetCardApi = exports.GetCardApiFactory = exports.GetCardApiFp = exports.GetCardApiAxiosParamCreator = exports.CreatePINControlAccessTokenApi = exports.CreatePINControlAccessTokenApiFactory = exports.CreatePINControlAccessTokenApiFp = exports.CreatePINControlAccessTokenApiAxiosParamCreator = exports.CreateCardApi = exports.CreateCardApiFactory = exports.CreateCardApiFp = exports.CreateCardApiAxiosParamCreator = exports.UpdatePinStatus = exports.PinStatus = exports.PinScope = exports.PinDeliveryType = exports.ManufacturingStatus = exports.ManufacturingReason = exports.EncryptCardPaymentInfoRequestBodyFieldsEnum = exports.EncryptCardPaymentInfoRequestBodyEncryptionMethodEnum = exports.CreatePinStatus = exports.ChangePinStatus = exports.CardVersionStatus = exports.CardStatus = exports.CardScheme = exports.CardRole = exports.CardDeliveryType = exports.CardConfigurationType = void 0;
26
+ const axios_1 = require("axios");
27
+ // Some imports not used depending on template conditions
28
+ // @ts-ignore
29
+ const common_1 = require("./common");
30
+ // @ts-ignore
31
+ const base_1 = require("./base");
32
+ /**
33
+ * The type of card defined by this card configuration.
34
+ * @export
35
+ * @enum {string}
36
+ */
37
+ exports.CardConfigurationType = {
38
+ Debit: 'DEBIT',
39
+ Credit: 'CREDIT',
40
+ Combo: 'COMBO'
41
+ };
42
+ /**
43
+ * Select the type of delivery you prefer for the new card being created. - MAIL - The card would be sent via mail services. - COURIER - The card would be sent via courier services. - CUSTOM_1–CUSTOM_5 - Custom delivery types that can be used for shipping methods agreed between the customer and the bureau.
44
+ * @export
45
+ * @enum {string}
46
+ */
47
+ exports.CardDeliveryType = {
48
+ Mail: 'MAIL',
49
+ Courier: 'COURIER',
50
+ Custom1: 'CUSTOM_1',
51
+ Custom2: 'CUSTOM_2',
52
+ Custom3: 'CUSTOM_3',
53
+ Custom4: 'CUSTOM_4',
54
+ Custom5: 'CUSTOM_5'
55
+ };
56
+ /**
57
+ * The role of the card. Multi application cards will have one main card and multiple card applications. Single cards will be treated as main cards.
58
+ * @export
59
+ * @enum {string}
60
+ */
61
+ exports.CardRole = {
62
+ MainCard: 'MAIN_CARD',
63
+ CardApplication: 'CARD_APPLICATION'
64
+ };
65
+ /**
66
+ *
67
+ * @export
68
+ * @enum {string}
69
+ */
70
+ exports.CardScheme = {
71
+ Mastercard: 'MASTERCARD',
72
+ Visa: 'VISA'
73
+ };
74
+ /**
75
+ * - ACTIVE - Card is active and is enabled for normal usage. - BLOCKED - Card is temporarily blocked. - BLOCKED_SUSPECTED_FRAUD - Card is temporarily blocked due to suspected fraud. - CLOSED_DUE_TO_FRAUD - Card has been closed due to fraud. - CLOSED_LOST - Card has been closed due to being lost. - CLOSED_STOLEN - Card has been closed due to being stolen. - CLOSED - Card has been manually closed. - CLOSED_EXPIRED - Card has no active or initial card versions and cannot be used.
76
+ * @export
77
+ * @enum {string}
78
+ */
79
+ exports.CardStatus = {
80
+ Active: 'ACTIVE',
81
+ Blocked: 'BLOCKED',
82
+ BlockedSuspectedFraud: 'BLOCKED_SUSPECTED_FRAUD',
83
+ ClosedDueToFraud: 'CLOSED_DUE_TO_FRAUD',
84
+ ClosedLost: 'CLOSED_LOST',
85
+ ClosedStolen: 'CLOSED_STOLEN',
86
+ Closed: 'CLOSED',
87
+ ClosedExpired: 'CLOSED_EXPIRED'
88
+ };
89
+ /**
90
+ * - ACTIVE - The card is completely operational. You can perform all actions with the card. - INITIAL - The specific card version is awaiting activation. During this state, the card can have limited usage, such as being added to a digital wallet or cardholder can view the PIN (if it is a plastic card). However, in the INITIAL state, the card cannot be used for payments. - CLOSED - The previous versions of the card are no longer valid as a new version is activated or the card is closed.
91
+ * @export
92
+ * @enum {string}
93
+ */
94
+ exports.CardVersionStatus = {
95
+ Active: 'ACTIVE',
96
+ Initial: 'INITIAL',
97
+ Closed: 'CLOSED'
98
+ };
99
+ /**
100
+ * - GENERATED - A pin should be randomly generated for the card. - WAITING - A pin is waiting to be set on the card.
101
+ * @export
102
+ * @enum {string}
103
+ */
104
+ exports.ChangePinStatus = {
105
+ Generated: 'GENERATED',
106
+ Waiting: 'WAITING'
107
+ };
108
+ /**
109
+ * - GENERATED - This endpoint request would generate a random PIN for the new card. - WAITING - The card PIN would be set later.
110
+ * @export
111
+ * @enum {string}
112
+ */
113
+ exports.CreatePinStatus = {
114
+ Generated: 'GENERATED',
115
+ Waiting: 'WAITING'
116
+ };
117
+ exports.EncryptCardPaymentInfoRequestBodyEncryptionMethodEnum = {
118
+ RsaEcbOaepSha256Mgf12048: 'RSA_ECB_OAEP_SHA256_MGF1_2048'
119
+ };
120
+ exports.EncryptCardPaymentInfoRequestBodyFieldsEnum = {
121
+ PrimaryAccountNumber: 'PRIMARY_ACCOUNT_NUMBER',
122
+ ExpirationDate: 'EXPIRATION_DATE',
123
+ Cvv2: 'CVV2'
124
+ };
125
+ /**
126
+ * Reason for manufacturing the card.
127
+ * @export
128
+ * @enum {string}
129
+ */
130
+ exports.ManufacturingReason = {
131
+ NewCard: 'NEW_CARD',
132
+ ReplaceCard: 'REPLACE_CARD',
133
+ ReissueCard: 'REISSUE_CARD',
134
+ ReorderPin: 'REORDER_PIN',
135
+ RenewCard: 'RENEW_CARD'
136
+ };
137
+ /**
138
+ * - AWAITING_CRYPTO_VALUES - The card is created and is awaiting to receive cryptographic values before being sent to the card manufacturer. - CRYPTO_VALUES_PROCESSED - The card is awaiting to be included in the next embossing file. - SENT_TO_MANUFACTURER - The card has been successfully processed and sent to the manufacturer. - MANUFACTURING_ABORTED - The manufacturing process is aborted.
139
+ * @export
140
+ * @enum {string}
141
+ */
142
+ exports.ManufacturingStatus = {
143
+ AwaitingCryptoValues: 'AWAITING_CRYPTO_VALUES',
144
+ CryptoValuesProcessed: 'CRYPTO_VALUES_PROCESSED',
145
+ SentToManufacturer: 'SENT_TO_MANUFACTURER',
146
+ ManufacturingAborted: 'MANUFACTURING_ABORTED'
147
+ };
148
+ /**
149
+ * Select the type of delivery you prefer for sending the card PIN. - MAIL - The card PIN would be sent via mail services. - COURIER - The card PIN would be sent via courier services. - EPIN - The card PIN would be sent digitally.
150
+ * @export
151
+ * @enum {string}
152
+ */
153
+ exports.PinDeliveryType = {
154
+ Mail: 'MAIL',
155
+ Courier: 'COURIER',
156
+ Epin: 'EPIN'
157
+ };
158
+ /**
159
+ * Describes the scope of the operation authorised by the user.
160
+ * @export
161
+ * @enum {string}
162
+ */
163
+ exports.PinScope = {
164
+ ViewPin: 'VIEW_PIN',
165
+ SetPin: 'SET_PIN',
166
+ ChangePin: 'CHANGE_PIN'
167
+ };
168
+ /**
169
+ * - GENERATED - A pin has been randomly generated for the card. - WAITING - A pin is waiting to be set on the card. - SET - A pin has been manually set on the card. - INHERITED - For card applications only. The pin status is inherited from the main card.
170
+ * @export
171
+ * @enum {string}
172
+ */
173
+ exports.PinStatus = {
174
+ Generated: 'GENERATED',
175
+ Waiting: 'WAITING',
176
+ Set: 'SET',
177
+ Inherited: 'INHERITED'
178
+ };
179
+ /**
180
+ * - GENERATED - A pin should be randomly generated for the card.
181
+ * @export
182
+ * @enum {string}
183
+ */
184
+ exports.UpdatePinStatus = {
185
+ Generated: 'GENERATED'
186
+ };
187
+ /**
188
+ * CreateCardApi - axios parameter creator
189
+ * @export
190
+ */
191
+ const CreateCardApiAxiosParamCreator = function (configuration) {
192
+ return {
193
+ /**
194
+ * Send a request to this endpoint to create a new card.
195
+ * @summary Create Card
196
+ * @param {CreateCardRequest} createCardRequest
197
+ * @param {string} [xAuditUser] Optional audit user header
198
+ * @param {string} [xIdempotencyKey] Idempotency key for the request.
199
+ * @param {*} [options] Override http request option.
200
+ * @throws {RequiredError}
201
+ */
202
+ createCard: (createCardRequest_1, xAuditUser_1, xIdempotencyKey_1, ...args_1) => __awaiter(this, [createCardRequest_1, xAuditUser_1, xIdempotencyKey_1, ...args_1], void 0, function* (createCardRequest, xAuditUser, xIdempotencyKey, options = {}) {
203
+ // verify required parameter 'createCardRequest' is not null or undefined
204
+ (0, common_1.assertParamExists)('createCard', 'createCardRequest', createCardRequest);
205
+ const localVarPath = `/v1/cards`;
206
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
207
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
208
+ let baseOptions;
209
+ if (configuration) {
210
+ baseOptions = configuration.baseOptions;
211
+ }
212
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
213
+ const localVarHeaderParameter = {};
214
+ const localVarQueryParameter = {};
215
+ // authentication bearerAuth required
216
+ // http bearer authentication required
217
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
218
+ localVarHeaderParameter['Content-Type'] = 'application/json';
219
+ if (xAuditUser != null) {
220
+ localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
221
+ }
222
+ if (xIdempotencyKey != null) {
223
+ localVarHeaderParameter['x-idempotency-key'] = String(xIdempotencyKey);
224
+ }
225
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
226
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
227
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
228
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createCardRequest, localVarRequestOptions, configuration);
229
+ return {
230
+ url: (0, common_1.toPathString)(localVarUrlObj),
231
+ options: localVarRequestOptions,
232
+ };
233
+ }),
234
+ };
235
+ };
236
+ exports.CreateCardApiAxiosParamCreator = CreateCardApiAxiosParamCreator;
237
+ /**
238
+ * CreateCardApi - functional programming interface
239
+ * @export
240
+ */
241
+ const CreateCardApiFp = function (configuration) {
242
+ const localVarAxiosParamCreator = (0, exports.CreateCardApiAxiosParamCreator)(configuration);
243
+ return {
244
+ /**
245
+ * Send a request to this endpoint to create a new card.
246
+ * @summary Create Card
247
+ * @param {CreateCardRequest} createCardRequest
248
+ * @param {string} [xAuditUser] Optional audit user header
249
+ * @param {string} [xIdempotencyKey] Idempotency key for the request.
250
+ * @param {*} [options] Override http request option.
251
+ * @throws {RequiredError}
252
+ */
253
+ createCard(createCardRequest, xAuditUser, xIdempotencyKey, options) {
254
+ return __awaiter(this, void 0, void 0, function* () {
255
+ var _a, _b, _c;
256
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createCard(createCardRequest, xAuditUser, xIdempotencyKey, options);
257
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
258
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CreateCardApi.createCard']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
259
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
260
+ });
261
+ },
262
+ };
263
+ };
264
+ exports.CreateCardApiFp = CreateCardApiFp;
265
+ /**
266
+ * CreateCardApi - factory interface
267
+ * @export
268
+ */
269
+ const CreateCardApiFactory = function (configuration, basePath, axios) {
270
+ const localVarFp = (0, exports.CreateCardApiFp)(configuration);
271
+ return {
272
+ /**
273
+ * Send a request to this endpoint to create a new card.
274
+ * @summary Create Card
275
+ * @param {CreateCardRequest} createCardRequest
276
+ * @param {string} [xAuditUser] Optional audit user header
277
+ * @param {string} [xIdempotencyKey] Idempotency key for the request.
278
+ * @param {*} [options] Override http request option.
279
+ * @throws {RequiredError}
280
+ */
281
+ createCard(createCardRequest, xAuditUser, xIdempotencyKey, options) {
282
+ return localVarFp.createCard(createCardRequest, xAuditUser, xIdempotencyKey, options).then((request) => request(axios, basePath));
283
+ },
284
+ };
285
+ };
286
+ exports.CreateCardApiFactory = CreateCardApiFactory;
287
+ /**
288
+ * CreateCardApi - object-oriented interface
289
+ * @export
290
+ * @class CreateCardApi
291
+ * @extends {BaseAPI}
292
+ */
293
+ class CreateCardApi extends base_1.BaseAPI {
294
+ /**
295
+ * Send a request to this endpoint to create a new card.
296
+ * @summary Create Card
297
+ * @param {CreateCardRequest} createCardRequest
298
+ * @param {string} [xAuditUser] Optional audit user header
299
+ * @param {string} [xIdempotencyKey] Idempotency key for the request.
300
+ * @param {*} [options] Override http request option.
301
+ * @throws {RequiredError}
302
+ * @memberof CreateCardApi
303
+ */
304
+ createCard(createCardRequest, xAuditUser, xIdempotencyKey, options) {
305
+ return (0, exports.CreateCardApiFp)(this.configuration).createCard(createCardRequest, xAuditUser, xIdempotencyKey, options).then((request) => request(this.axios, this.basePath));
306
+ }
307
+ }
308
+ exports.CreateCardApi = CreateCardApi;
309
+ /**
310
+ * CreatePINControlAccessTokenApi - axios parameter creator
311
+ * @export
312
+ */
313
+ const CreatePINControlAccessTokenApiAxiosParamCreator = function (configuration) {
314
+ return {
315
+ /**
316
+ * Send a request to this endpoint to generate a PIN control access token for a specific card version. The requested `scope` determines which PIN operation the token authorises: `VIEW_PIN`, `SET_PIN` or `CHANGE_PIN`. If no `sequenceNumber` is provided, the latest card version is used. A successful response returns the token `id`, a `pinUrl` for the mobile device webview and a `pinFrameUrl` for the desktop browser iframe. Both URLs are specific to the requested `scope`. The token is valid for 30 seconds. For the mobile webview flow, the device sends another API request — a `POST` to the `pinUrl`, including the token `id` in a parameter named `controlId`. For the desktop browser flow, open an iframe to the `pinFrameUrl`. After the iframe has loaded, the browser makes a `window.postMessage()` call to the iframe. The message object contains an `operation` field (`view-pin` for the `VIEW_PIN` scope, `set-pin` for the `SET_PIN` and `CHANGE_PIN` scopes) and a `controlId` field (the token `id`). Note that you must use `set-pin` as the `operation` for the `CHANGE_PIN` scope as well.
317
+ * @summary Request PIN Control Access Token
318
+ * @param {string} id Unique identifier of the card for which you want to access the PIN.
319
+ * @param {PinControlInfoRequestBody} pinControlInfoRequestBody
320
+ * @param {string} [xAuditUser] Optional audit user header
321
+ * @param {*} [options] Override http request option.
322
+ * @throws {RequiredError}
323
+ */
324
+ createPinControl: (id_1, pinControlInfoRequestBody_1, xAuditUser_1, ...args_1) => __awaiter(this, [id_1, pinControlInfoRequestBody_1, xAuditUser_1, ...args_1], void 0, function* (id, pinControlInfoRequestBody, xAuditUser, options = {}) {
325
+ // verify required parameter 'id' is not null or undefined
326
+ (0, common_1.assertParamExists)('createPinControl', 'id', id);
327
+ // verify required parameter 'pinControlInfoRequestBody' is not null or undefined
328
+ (0, common_1.assertParamExists)('createPinControl', 'pinControlInfoRequestBody', pinControlInfoRequestBody);
329
+ const localVarPath = `/v1/cards/{id}/pinControl`
330
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
331
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
332
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
333
+ let baseOptions;
334
+ if (configuration) {
335
+ baseOptions = configuration.baseOptions;
336
+ }
337
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
338
+ const localVarHeaderParameter = {};
339
+ const localVarQueryParameter = {};
340
+ // authentication bearerAuth required
341
+ // http bearer authentication required
342
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
343
+ localVarHeaderParameter['Content-Type'] = 'application/json';
344
+ if (xAuditUser != null) {
345
+ localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
346
+ }
347
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
348
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
349
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
350
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(pinControlInfoRequestBody, localVarRequestOptions, configuration);
351
+ return {
352
+ url: (0, common_1.toPathString)(localVarUrlObj),
353
+ options: localVarRequestOptions,
354
+ };
355
+ }),
356
+ };
357
+ };
358
+ exports.CreatePINControlAccessTokenApiAxiosParamCreator = CreatePINControlAccessTokenApiAxiosParamCreator;
359
+ /**
360
+ * CreatePINControlAccessTokenApi - functional programming interface
361
+ * @export
362
+ */
363
+ const CreatePINControlAccessTokenApiFp = function (configuration) {
364
+ const localVarAxiosParamCreator = (0, exports.CreatePINControlAccessTokenApiAxiosParamCreator)(configuration);
365
+ return {
366
+ /**
367
+ * Send a request to this endpoint to generate a PIN control access token for a specific card version. The requested `scope` determines which PIN operation the token authorises: `VIEW_PIN`, `SET_PIN` or `CHANGE_PIN`. If no `sequenceNumber` is provided, the latest card version is used. A successful response returns the token `id`, a `pinUrl` for the mobile device webview and a `pinFrameUrl` for the desktop browser iframe. Both URLs are specific to the requested `scope`. The token is valid for 30 seconds. For the mobile webview flow, the device sends another API request — a `POST` to the `pinUrl`, including the token `id` in a parameter named `controlId`. For the desktop browser flow, open an iframe to the `pinFrameUrl`. After the iframe has loaded, the browser makes a `window.postMessage()` call to the iframe. The message object contains an `operation` field (`view-pin` for the `VIEW_PIN` scope, `set-pin` for the `SET_PIN` and `CHANGE_PIN` scopes) and a `controlId` field (the token `id`). Note that you must use `set-pin` as the `operation` for the `CHANGE_PIN` scope as well.
368
+ * @summary Request PIN Control Access Token
369
+ * @param {string} id Unique identifier of the card for which you want to access the PIN.
370
+ * @param {PinControlInfoRequestBody} pinControlInfoRequestBody
371
+ * @param {string} [xAuditUser] Optional audit user header
372
+ * @param {*} [options] Override http request option.
373
+ * @throws {RequiredError}
374
+ */
375
+ createPinControl(id, pinControlInfoRequestBody, xAuditUser, options) {
376
+ return __awaiter(this, void 0, void 0, function* () {
377
+ var _a, _b, _c;
378
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createPinControl(id, pinControlInfoRequestBody, xAuditUser, options);
379
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
380
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CreatePINControlAccessTokenApi.createPinControl']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
381
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
382
+ });
383
+ },
384
+ };
385
+ };
386
+ exports.CreatePINControlAccessTokenApiFp = CreatePINControlAccessTokenApiFp;
387
+ /**
388
+ * CreatePINControlAccessTokenApi - factory interface
389
+ * @export
390
+ */
391
+ const CreatePINControlAccessTokenApiFactory = function (configuration, basePath, axios) {
392
+ const localVarFp = (0, exports.CreatePINControlAccessTokenApiFp)(configuration);
393
+ return {
394
+ /**
395
+ * Send a request to this endpoint to generate a PIN control access token for a specific card version. The requested `scope` determines which PIN operation the token authorises: `VIEW_PIN`, `SET_PIN` or `CHANGE_PIN`. If no `sequenceNumber` is provided, the latest card version is used. A successful response returns the token `id`, a `pinUrl` for the mobile device webview and a `pinFrameUrl` for the desktop browser iframe. Both URLs are specific to the requested `scope`. The token is valid for 30 seconds. For the mobile webview flow, the device sends another API request — a `POST` to the `pinUrl`, including the token `id` in a parameter named `controlId`. For the desktop browser flow, open an iframe to the `pinFrameUrl`. After the iframe has loaded, the browser makes a `window.postMessage()` call to the iframe. The message object contains an `operation` field (`view-pin` for the `VIEW_PIN` scope, `set-pin` for the `SET_PIN` and `CHANGE_PIN` scopes) and a `controlId` field (the token `id`). Note that you must use `set-pin` as the `operation` for the `CHANGE_PIN` scope as well.
396
+ * @summary Request PIN Control Access Token
397
+ * @param {string} id Unique identifier of the card for which you want to access the PIN.
398
+ * @param {PinControlInfoRequestBody} pinControlInfoRequestBody
399
+ * @param {string} [xAuditUser] Optional audit user header
400
+ * @param {*} [options] Override http request option.
401
+ * @throws {RequiredError}
402
+ */
403
+ createPinControl(id, pinControlInfoRequestBody, xAuditUser, options) {
404
+ return localVarFp.createPinControl(id, pinControlInfoRequestBody, xAuditUser, options).then((request) => request(axios, basePath));
405
+ },
406
+ };
407
+ };
408
+ exports.CreatePINControlAccessTokenApiFactory = CreatePINControlAccessTokenApiFactory;
409
+ /**
410
+ * CreatePINControlAccessTokenApi - object-oriented interface
411
+ * @export
412
+ * @class CreatePINControlAccessTokenApi
413
+ * @extends {BaseAPI}
414
+ */
415
+ class CreatePINControlAccessTokenApi extends base_1.BaseAPI {
416
+ /**
417
+ * Send a request to this endpoint to generate a PIN control access token for a specific card version. The requested `scope` determines which PIN operation the token authorises: `VIEW_PIN`, `SET_PIN` or `CHANGE_PIN`. If no `sequenceNumber` is provided, the latest card version is used. A successful response returns the token `id`, a `pinUrl` for the mobile device webview and a `pinFrameUrl` for the desktop browser iframe. Both URLs are specific to the requested `scope`. The token is valid for 30 seconds. For the mobile webview flow, the device sends another API request — a `POST` to the `pinUrl`, including the token `id` in a parameter named `controlId`. For the desktop browser flow, open an iframe to the `pinFrameUrl`. After the iframe has loaded, the browser makes a `window.postMessage()` call to the iframe. The message object contains an `operation` field (`view-pin` for the `VIEW_PIN` scope, `set-pin` for the `SET_PIN` and `CHANGE_PIN` scopes) and a `controlId` field (the token `id`). Note that you must use `set-pin` as the `operation` for the `CHANGE_PIN` scope as well.
418
+ * @summary Request PIN Control Access Token
419
+ * @param {string} id Unique identifier of the card for which you want to access the PIN.
420
+ * @param {PinControlInfoRequestBody} pinControlInfoRequestBody
421
+ * @param {string} [xAuditUser] Optional audit user header
422
+ * @param {*} [options] Override http request option.
423
+ * @throws {RequiredError}
424
+ * @memberof CreatePINControlAccessTokenApi
425
+ */
426
+ createPinControl(id, pinControlInfoRequestBody, xAuditUser, options) {
427
+ return (0, exports.CreatePINControlAccessTokenApiFp)(this.configuration).createPinControl(id, pinControlInfoRequestBody, xAuditUser, options).then((request) => request(this.axios, this.basePath));
428
+ }
429
+ }
430
+ exports.CreatePINControlAccessTokenApi = CreatePINControlAccessTokenApi;
431
+ /**
432
+ * GetCardApi - axios parameter creator
433
+ * @export
434
+ */
435
+ const GetCardApiAxiosParamCreator = function (configuration) {
436
+ return {
437
+ /**
438
+ *
439
+ * @summary Get Card
440
+ * @param {string} id Unique identifier of the card you want to retrieve.
441
+ * @param {string} [xAuditUser] Optional audit user header
442
+ * @param {*} [options] Override http request option.
443
+ * @throws {RequiredError}
444
+ */
445
+ getCard: (id_1, xAuditUser_1, ...args_1) => __awaiter(this, [id_1, xAuditUser_1, ...args_1], void 0, function* (id, xAuditUser, options = {}) {
446
+ // verify required parameter 'id' is not null or undefined
447
+ (0, common_1.assertParamExists)('getCard', 'id', id);
448
+ const localVarPath = `/v1/cards/{id}`
449
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
450
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
451
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
452
+ let baseOptions;
453
+ if (configuration) {
454
+ baseOptions = configuration.baseOptions;
455
+ }
456
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
457
+ const localVarHeaderParameter = {};
458
+ const localVarQueryParameter = {};
459
+ // authentication bearerAuth required
460
+ // http bearer authentication required
461
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
462
+ if (xAuditUser != null) {
463
+ localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
464
+ }
465
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
466
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
467
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
468
+ return {
469
+ url: (0, common_1.toPathString)(localVarUrlObj),
470
+ options: localVarRequestOptions,
471
+ };
472
+ }),
473
+ /**
474
+ * Send a request to this endpoint when the cardholder wants to retrieve card data, such as PAN, expiry and CVV2/CVC2. If no sequence number is specified, the latest card version is used by default. Only card versions not in CLOSED status are allowed.
475
+ * @summary Initiate Card Data Retrieval
476
+ * @param {string} id Unique identifier of the card.
477
+ * @param {string} [xAuditUser] Optional audit user header
478
+ * @param {ControlTokenRequestBody} [controlTokenRequestBody]
479
+ * @param {*} [options] Override http request option.
480
+ * @throws {RequiredError}
481
+ */
482
+ getCardDataControlToken: (id_1, xAuditUser_1, controlTokenRequestBody_1, ...args_1) => __awaiter(this, [id_1, xAuditUser_1, controlTokenRequestBody_1, ...args_1], void 0, function* (id, xAuditUser, controlTokenRequestBody, options = {}) {
483
+ // verify required parameter 'id' is not null or undefined
484
+ (0, common_1.assertParamExists)('getCardDataControlToken', 'id', id);
485
+ const localVarPath = `/v1/cards/{id}/controlToken`
486
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
487
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
488
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
489
+ let baseOptions;
490
+ if (configuration) {
491
+ baseOptions = configuration.baseOptions;
492
+ }
493
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
494
+ const localVarHeaderParameter = {};
495
+ const localVarQueryParameter = {};
496
+ // authentication bearerAuth required
497
+ // http bearer authentication required
498
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
499
+ localVarHeaderParameter['Content-Type'] = 'application/json';
500
+ if (xAuditUser != null) {
501
+ localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
502
+ }
503
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
504
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
505
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
506
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(controlTokenRequestBody, localVarRequestOptions, configuration);
507
+ return {
508
+ url: (0, common_1.toPathString)(localVarUrlObj),
509
+ options: localVarRequestOptions,
510
+ };
511
+ }),
512
+ /**
513
+ * Send a request to this endpoint to return all card applications for a specific main card. If the main card does not exist, an empty array is returned.
514
+ * @summary Get Card Applications for Main Card
515
+ * @param {string} mainCardId Unique identifier of the main card for which you want to retrieve the list of card applications.
516
+ * @param {string} [xAuditUser] Optional audit user header
517
+ * @param {*} [options] Override http request option.
518
+ * @throws {RequiredError}
519
+ */
520
+ getCards: (mainCardId_1, xAuditUser_1, ...args_1) => __awaiter(this, [mainCardId_1, xAuditUser_1, ...args_1], void 0, function* (mainCardId, xAuditUser, options = {}) {
521
+ // verify required parameter 'mainCardId' is not null or undefined
522
+ (0, common_1.assertParamExists)('getCards', 'mainCardId', mainCardId);
523
+ const localVarPath = `/v1/cards`;
524
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
525
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
526
+ let baseOptions;
527
+ if (configuration) {
528
+ baseOptions = configuration.baseOptions;
529
+ }
530
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
531
+ const localVarHeaderParameter = {};
532
+ const localVarQueryParameter = {};
533
+ // authentication bearerAuth required
534
+ // http bearer authentication required
535
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
536
+ if (mainCardId !== undefined) {
537
+ localVarQueryParameter['mainCardId'] = mainCardId;
538
+ }
539
+ if (xAuditUser != null) {
540
+ localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
541
+ }
542
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
543
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
544
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
545
+ return {
546
+ url: (0, common_1.toPathString)(localVarUrlObj),
547
+ options: localVarRequestOptions,
548
+ };
549
+ }),
550
+ };
551
+ };
552
+ exports.GetCardApiAxiosParamCreator = GetCardApiAxiosParamCreator;
553
+ /**
554
+ * GetCardApi - functional programming interface
555
+ * @export
556
+ */
557
+ const GetCardApiFp = function (configuration) {
558
+ const localVarAxiosParamCreator = (0, exports.GetCardApiAxiosParamCreator)(configuration);
559
+ return {
560
+ /**
561
+ *
562
+ * @summary Get Card
563
+ * @param {string} id Unique identifier of the card you want to retrieve.
564
+ * @param {string} [xAuditUser] Optional audit user header
565
+ * @param {*} [options] Override http request option.
566
+ * @throws {RequiredError}
567
+ */
568
+ getCard(id, xAuditUser, options) {
569
+ return __awaiter(this, void 0, void 0, function* () {
570
+ var _a, _b, _c;
571
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getCard(id, xAuditUser, options);
572
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
573
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['GetCardApi.getCard']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
574
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
575
+ });
576
+ },
577
+ /**
578
+ * Send a request to this endpoint when the cardholder wants to retrieve card data, such as PAN, expiry and CVV2/CVC2. If no sequence number is specified, the latest card version is used by default. Only card versions not in CLOSED status are allowed.
579
+ * @summary Initiate Card Data Retrieval
580
+ * @param {string} id Unique identifier of the card.
581
+ * @param {string} [xAuditUser] Optional audit user header
582
+ * @param {ControlTokenRequestBody} [controlTokenRequestBody]
583
+ * @param {*} [options] Override http request option.
584
+ * @throws {RequiredError}
585
+ */
586
+ getCardDataControlToken(id, xAuditUser, controlTokenRequestBody, options) {
587
+ return __awaiter(this, void 0, void 0, function* () {
588
+ var _a, _b, _c;
589
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getCardDataControlToken(id, xAuditUser, controlTokenRequestBody, options);
590
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
591
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['GetCardApi.getCardDataControlToken']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
592
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
593
+ });
594
+ },
595
+ /**
596
+ * Send a request to this endpoint to return all card applications for a specific main card. If the main card does not exist, an empty array is returned.
597
+ * @summary Get Card Applications for Main Card
598
+ * @param {string} mainCardId Unique identifier of the main card for which you want to retrieve the list of card applications.
599
+ * @param {string} [xAuditUser] Optional audit user header
600
+ * @param {*} [options] Override http request option.
601
+ * @throws {RequiredError}
602
+ */
603
+ getCards(mainCardId, xAuditUser, options) {
604
+ return __awaiter(this, void 0, void 0, function* () {
605
+ var _a, _b, _c;
606
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getCards(mainCardId, xAuditUser, options);
607
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
608
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['GetCardApi.getCards']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
609
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
610
+ });
611
+ },
612
+ };
613
+ };
614
+ exports.GetCardApiFp = GetCardApiFp;
615
+ /**
616
+ * GetCardApi - factory interface
617
+ * @export
618
+ */
619
+ const GetCardApiFactory = function (configuration, basePath, axios) {
620
+ const localVarFp = (0, exports.GetCardApiFp)(configuration);
621
+ return {
622
+ /**
623
+ *
624
+ * @summary Get Card
625
+ * @param {string} id Unique identifier of the card you want to retrieve.
626
+ * @param {string} [xAuditUser] Optional audit user header
627
+ * @param {*} [options] Override http request option.
628
+ * @throws {RequiredError}
629
+ */
630
+ getCard(id, xAuditUser, options) {
631
+ return localVarFp.getCard(id, xAuditUser, options).then((request) => request(axios, basePath));
632
+ },
633
+ /**
634
+ * Send a request to this endpoint when the cardholder wants to retrieve card data, such as PAN, expiry and CVV2/CVC2. If no sequence number is specified, the latest card version is used by default. Only card versions not in CLOSED status are allowed.
635
+ * @summary Initiate Card Data Retrieval
636
+ * @param {string} id Unique identifier of the card.
637
+ * @param {string} [xAuditUser] Optional audit user header
638
+ * @param {ControlTokenRequestBody} [controlTokenRequestBody]
639
+ * @param {*} [options] Override http request option.
640
+ * @throws {RequiredError}
641
+ */
642
+ getCardDataControlToken(id, xAuditUser, controlTokenRequestBody, options) {
643
+ return localVarFp.getCardDataControlToken(id, xAuditUser, controlTokenRequestBody, options).then((request) => request(axios, basePath));
644
+ },
645
+ /**
646
+ * Send a request to this endpoint to return all card applications for a specific main card. If the main card does not exist, an empty array is returned.
647
+ * @summary Get Card Applications for Main Card
648
+ * @param {string} mainCardId Unique identifier of the main card for which you want to retrieve the list of card applications.
649
+ * @param {string} [xAuditUser] Optional audit user header
650
+ * @param {*} [options] Override http request option.
651
+ * @throws {RequiredError}
652
+ */
653
+ getCards(mainCardId, xAuditUser, options) {
654
+ return localVarFp.getCards(mainCardId, xAuditUser, options).then((request) => request(axios, basePath));
655
+ },
656
+ };
657
+ };
658
+ exports.GetCardApiFactory = GetCardApiFactory;
659
+ /**
660
+ * GetCardApi - object-oriented interface
661
+ * @export
662
+ * @class GetCardApi
663
+ * @extends {BaseAPI}
664
+ */
665
+ class GetCardApi extends base_1.BaseAPI {
666
+ /**
667
+ *
668
+ * @summary Get Card
669
+ * @param {string} id Unique identifier of the card you want to retrieve.
670
+ * @param {string} [xAuditUser] Optional audit user header
671
+ * @param {*} [options] Override http request option.
672
+ * @throws {RequiredError}
673
+ * @memberof GetCardApi
674
+ */
675
+ getCard(id, xAuditUser, options) {
676
+ return (0, exports.GetCardApiFp)(this.configuration).getCard(id, xAuditUser, options).then((request) => request(this.axios, this.basePath));
677
+ }
678
+ /**
679
+ * Send a request to this endpoint when the cardholder wants to retrieve card data, such as PAN, expiry and CVV2/CVC2. If no sequence number is specified, the latest card version is used by default. Only card versions not in CLOSED status are allowed.
680
+ * @summary Initiate Card Data Retrieval
681
+ * @param {string} id Unique identifier of the card.
682
+ * @param {string} [xAuditUser] Optional audit user header
683
+ * @param {ControlTokenRequestBody} [controlTokenRequestBody]
684
+ * @param {*} [options] Override http request option.
685
+ * @throws {RequiredError}
686
+ * @memberof GetCardApi
687
+ */
688
+ getCardDataControlToken(id, xAuditUser, controlTokenRequestBody, options) {
689
+ return (0, exports.GetCardApiFp)(this.configuration).getCardDataControlToken(id, xAuditUser, controlTokenRequestBody, options).then((request) => request(this.axios, this.basePath));
690
+ }
691
+ /**
692
+ * Send a request to this endpoint to return all card applications for a specific main card. If the main card does not exist, an empty array is returned.
693
+ * @summary Get Card Applications for Main Card
694
+ * @param {string} mainCardId Unique identifier of the main card for which you want to retrieve the list of card applications.
695
+ * @param {string} [xAuditUser] Optional audit user header
696
+ * @param {*} [options] Override http request option.
697
+ * @throws {RequiredError}
698
+ * @memberof GetCardApi
699
+ */
700
+ getCards(mainCardId, xAuditUser, options) {
701
+ return (0, exports.GetCardApiFp)(this.configuration).getCards(mainCardId, xAuditUser, options).then((request) => request(this.axios, this.basePath));
702
+ }
703
+ }
704
+ exports.GetCardApi = GetCardApi;
705
+ /**
706
+ * GetCardPaymentInfoApi - axios parameter creator
707
+ * @export
708
+ */
709
+ const GetCardPaymentInfoApiAxiosParamCreator = function (configuration) {
710
+ return {
711
+ /**
712
+ * This is a web service designed to retrieve the card data required for completing e-commerce payments — PAN, CVC2/CVV2, expiry date of the card can be retrieved. The returned payload is encrypted with an asymmetric public key; this enables end-to-end encryption to the card holder device. The parameters that were included in the request are only returned. The caller is responsible of validating the integrity of the public key. <Note><ul><li>Send a request to this endpoint, if you are not using the Enfuce BIN sponsorship.</li><li>Retrieving card data through this endpoint implies PCI DSS compliance of the client with the Scheme. An easier method that you can use is the `Initiate Card Data Retrieval` endpoint — this endpoint enables rendering of card information to the cardholder\'s device without requiring compliance of the client with PCI DSS.</li></ul></Note> ## Example: ```java // ... import java.security.KeyFactory; import java.security.PrivateKey; import java.security.spec.PKCS8EncodedKeySpec; import java.util.Base64; import javax.crypto.Cipher; // ... ## Example of decrypting an encrypted field ```java private String decrypt(String data, String privKeyPEM) throws Exception { ## Example of preparing the key ```java String privKeyString = privKeyPEM.replaceAll(\"\\\\n\", \"\").replace(\"-----BEGIN PRIVATE KEY-----\", \"\").replace(\"-----END PRIVATE KEY-----\", \"\"); byte[] encodedKey = Base64.getDecoder().decode(privKeyString); PKCS8EncodedKeySpec spec = new PKCS8EncodedKeySpec(encodedKey); KeyFactory kf = KeyFactory.getInstance(\"RSA\"); PrivateKey privateKey = kf.generatePrivate(spec); ## Example of preparing the decryption ```java Cipher cipher = Cipher.getInstance(\"RSA/ECB/OAEPWithSHA-256AndMGF1Padding\"); cipher.init(Cipher.DECRYPT_MODE, privateKey); ## Example of preparing the data ```java byte[] cryptogram = Base64.getDecoder().decode(data); ## Example of decryption ```java byte[] decryptedBytes = cipher.doFinal(cryptogram); return new String(decryptedBytes);
713
+ * @summary Retrieve Card Data | Additional Method
714
+ * @param {string} id Unique identifier of the card whose details you want to retrieve.
715
+ * @param {EncryptCardPaymentInfoRequestBody} encryptCardPaymentInfoRequestBody
716
+ * @param {string} [xAuditUser] Optional audit user header
717
+ * @param {*} [options] Override http request option.
718
+ * @throws {RequiredError}
719
+ */
720
+ encryptCardPaymentInfo: (id_1, encryptCardPaymentInfoRequestBody_1, xAuditUser_1, ...args_1) => __awaiter(this, [id_1, encryptCardPaymentInfoRequestBody_1, xAuditUser_1, ...args_1], void 0, function* (id, encryptCardPaymentInfoRequestBody, xAuditUser, options = {}) {
721
+ // verify required parameter 'id' is not null or undefined
722
+ (0, common_1.assertParamExists)('encryptCardPaymentInfo', 'id', id);
723
+ // verify required parameter 'encryptCardPaymentInfoRequestBody' is not null or undefined
724
+ (0, common_1.assertParamExists)('encryptCardPaymentInfo', 'encryptCardPaymentInfoRequestBody', encryptCardPaymentInfoRequestBody);
725
+ const localVarPath = `/v1/cards/{id}/encrypt`
726
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
727
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
728
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
729
+ let baseOptions;
730
+ if (configuration) {
731
+ baseOptions = configuration.baseOptions;
732
+ }
733
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
734
+ const localVarHeaderParameter = {};
735
+ const localVarQueryParameter = {};
736
+ // authentication bearerAuth required
737
+ // http bearer authentication required
738
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
739
+ localVarHeaderParameter['Content-Type'] = 'application/json';
740
+ if (xAuditUser != null) {
741
+ localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
742
+ }
743
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
744
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
745
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
746
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(encryptCardPaymentInfoRequestBody, localVarRequestOptions, configuration);
747
+ return {
748
+ url: (0, common_1.toPathString)(localVarUrlObj),
749
+ options: localVarRequestOptions,
750
+ };
751
+ }),
752
+ };
753
+ };
754
+ exports.GetCardPaymentInfoApiAxiosParamCreator = GetCardPaymentInfoApiAxiosParamCreator;
755
+ /**
756
+ * GetCardPaymentInfoApi - functional programming interface
757
+ * @export
758
+ */
759
+ const GetCardPaymentInfoApiFp = function (configuration) {
760
+ const localVarAxiosParamCreator = (0, exports.GetCardPaymentInfoApiAxiosParamCreator)(configuration);
761
+ return {
762
+ /**
763
+ * This is a web service designed to retrieve the card data required for completing e-commerce payments — PAN, CVC2/CVV2, expiry date of the card can be retrieved. The returned payload is encrypted with an asymmetric public key; this enables end-to-end encryption to the card holder device. The parameters that were included in the request are only returned. The caller is responsible of validating the integrity of the public key. <Note><ul><li>Send a request to this endpoint, if you are not using the Enfuce BIN sponsorship.</li><li>Retrieving card data through this endpoint implies PCI DSS compliance of the client with the Scheme. An easier method that you can use is the `Initiate Card Data Retrieval` endpoint — this endpoint enables rendering of card information to the cardholder\'s device without requiring compliance of the client with PCI DSS.</li></ul></Note> ## Example: ```java // ... import java.security.KeyFactory; import java.security.PrivateKey; import java.security.spec.PKCS8EncodedKeySpec; import java.util.Base64; import javax.crypto.Cipher; // ... ## Example of decrypting an encrypted field ```java private String decrypt(String data, String privKeyPEM) throws Exception { ## Example of preparing the key ```java String privKeyString = privKeyPEM.replaceAll(\"\\\\n\", \"\").replace(\"-----BEGIN PRIVATE KEY-----\", \"\").replace(\"-----END PRIVATE KEY-----\", \"\"); byte[] encodedKey = Base64.getDecoder().decode(privKeyString); PKCS8EncodedKeySpec spec = new PKCS8EncodedKeySpec(encodedKey); KeyFactory kf = KeyFactory.getInstance(\"RSA\"); PrivateKey privateKey = kf.generatePrivate(spec); ## Example of preparing the decryption ```java Cipher cipher = Cipher.getInstance(\"RSA/ECB/OAEPWithSHA-256AndMGF1Padding\"); cipher.init(Cipher.DECRYPT_MODE, privateKey); ## Example of preparing the data ```java byte[] cryptogram = Base64.getDecoder().decode(data); ## Example of decryption ```java byte[] decryptedBytes = cipher.doFinal(cryptogram); return new String(decryptedBytes);
764
+ * @summary Retrieve Card Data | Additional Method
765
+ * @param {string} id Unique identifier of the card whose details you want to retrieve.
766
+ * @param {EncryptCardPaymentInfoRequestBody} encryptCardPaymentInfoRequestBody
767
+ * @param {string} [xAuditUser] Optional audit user header
768
+ * @param {*} [options] Override http request option.
769
+ * @throws {RequiredError}
770
+ */
771
+ encryptCardPaymentInfo(id, encryptCardPaymentInfoRequestBody, xAuditUser, options) {
772
+ return __awaiter(this, void 0, void 0, function* () {
773
+ var _a, _b, _c;
774
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.encryptCardPaymentInfo(id, encryptCardPaymentInfoRequestBody, xAuditUser, options);
775
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
776
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['GetCardPaymentInfoApi.encryptCardPaymentInfo']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
777
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
778
+ });
779
+ },
780
+ };
781
+ };
782
+ exports.GetCardPaymentInfoApiFp = GetCardPaymentInfoApiFp;
783
+ /**
784
+ * GetCardPaymentInfoApi - factory interface
785
+ * @export
786
+ */
787
+ const GetCardPaymentInfoApiFactory = function (configuration, basePath, axios) {
788
+ const localVarFp = (0, exports.GetCardPaymentInfoApiFp)(configuration);
789
+ return {
790
+ /**
791
+ * This is a web service designed to retrieve the card data required for completing e-commerce payments — PAN, CVC2/CVV2, expiry date of the card can be retrieved. The returned payload is encrypted with an asymmetric public key; this enables end-to-end encryption to the card holder device. The parameters that were included in the request are only returned. The caller is responsible of validating the integrity of the public key. <Note><ul><li>Send a request to this endpoint, if you are not using the Enfuce BIN sponsorship.</li><li>Retrieving card data through this endpoint implies PCI DSS compliance of the client with the Scheme. An easier method that you can use is the `Initiate Card Data Retrieval` endpoint — this endpoint enables rendering of card information to the cardholder\'s device without requiring compliance of the client with PCI DSS.</li></ul></Note> ## Example: ```java // ... import java.security.KeyFactory; import java.security.PrivateKey; import java.security.spec.PKCS8EncodedKeySpec; import java.util.Base64; import javax.crypto.Cipher; // ... ## Example of decrypting an encrypted field ```java private String decrypt(String data, String privKeyPEM) throws Exception { ## Example of preparing the key ```java String privKeyString = privKeyPEM.replaceAll(\"\\\\n\", \"\").replace(\"-----BEGIN PRIVATE KEY-----\", \"\").replace(\"-----END PRIVATE KEY-----\", \"\"); byte[] encodedKey = Base64.getDecoder().decode(privKeyString); PKCS8EncodedKeySpec spec = new PKCS8EncodedKeySpec(encodedKey); KeyFactory kf = KeyFactory.getInstance(\"RSA\"); PrivateKey privateKey = kf.generatePrivate(spec); ## Example of preparing the decryption ```java Cipher cipher = Cipher.getInstance(\"RSA/ECB/OAEPWithSHA-256AndMGF1Padding\"); cipher.init(Cipher.DECRYPT_MODE, privateKey); ## Example of preparing the data ```java byte[] cryptogram = Base64.getDecoder().decode(data); ## Example of decryption ```java byte[] decryptedBytes = cipher.doFinal(cryptogram); return new String(decryptedBytes);
792
+ * @summary Retrieve Card Data | Additional Method
793
+ * @param {string} id Unique identifier of the card whose details you want to retrieve.
794
+ * @param {EncryptCardPaymentInfoRequestBody} encryptCardPaymentInfoRequestBody
795
+ * @param {string} [xAuditUser] Optional audit user header
796
+ * @param {*} [options] Override http request option.
797
+ * @throws {RequiredError}
798
+ */
799
+ encryptCardPaymentInfo(id, encryptCardPaymentInfoRequestBody, xAuditUser, options) {
800
+ return localVarFp.encryptCardPaymentInfo(id, encryptCardPaymentInfoRequestBody, xAuditUser, options).then((request) => request(axios, basePath));
801
+ },
802
+ };
803
+ };
804
+ exports.GetCardPaymentInfoApiFactory = GetCardPaymentInfoApiFactory;
805
+ /**
806
+ * GetCardPaymentInfoApi - object-oriented interface
807
+ * @export
808
+ * @class GetCardPaymentInfoApi
809
+ * @extends {BaseAPI}
810
+ */
811
+ class GetCardPaymentInfoApi extends base_1.BaseAPI {
812
+ /**
813
+ * This is a web service designed to retrieve the card data required for completing e-commerce payments — PAN, CVC2/CVV2, expiry date of the card can be retrieved. The returned payload is encrypted with an asymmetric public key; this enables end-to-end encryption to the card holder device. The parameters that were included in the request are only returned. The caller is responsible of validating the integrity of the public key. <Note><ul><li>Send a request to this endpoint, if you are not using the Enfuce BIN sponsorship.</li><li>Retrieving card data through this endpoint implies PCI DSS compliance of the client with the Scheme. An easier method that you can use is the `Initiate Card Data Retrieval` endpoint — this endpoint enables rendering of card information to the cardholder\'s device without requiring compliance of the client with PCI DSS.</li></ul></Note> ## Example: ```java // ... import java.security.KeyFactory; import java.security.PrivateKey; import java.security.spec.PKCS8EncodedKeySpec; import java.util.Base64; import javax.crypto.Cipher; // ... ## Example of decrypting an encrypted field ```java private String decrypt(String data, String privKeyPEM) throws Exception { ## Example of preparing the key ```java String privKeyString = privKeyPEM.replaceAll(\"\\\\n\", \"\").replace(\"-----BEGIN PRIVATE KEY-----\", \"\").replace(\"-----END PRIVATE KEY-----\", \"\"); byte[] encodedKey = Base64.getDecoder().decode(privKeyString); PKCS8EncodedKeySpec spec = new PKCS8EncodedKeySpec(encodedKey); KeyFactory kf = KeyFactory.getInstance(\"RSA\"); PrivateKey privateKey = kf.generatePrivate(spec); ## Example of preparing the decryption ```java Cipher cipher = Cipher.getInstance(\"RSA/ECB/OAEPWithSHA-256AndMGF1Padding\"); cipher.init(Cipher.DECRYPT_MODE, privateKey); ## Example of preparing the data ```java byte[] cryptogram = Base64.getDecoder().decode(data); ## Example of decryption ```java byte[] decryptedBytes = cipher.doFinal(cryptogram); return new String(decryptedBytes);
814
+ * @summary Retrieve Card Data | Additional Method
815
+ * @param {string} id Unique identifier of the card whose details you want to retrieve.
816
+ * @param {EncryptCardPaymentInfoRequestBody} encryptCardPaymentInfoRequestBody
817
+ * @param {string} [xAuditUser] Optional audit user header
818
+ * @param {*} [options] Override http request option.
819
+ * @throws {RequiredError}
820
+ * @memberof GetCardPaymentInfoApi
821
+ */
822
+ encryptCardPaymentInfo(id, encryptCardPaymentInfoRequestBody, xAuditUser, options) {
823
+ return (0, exports.GetCardPaymentInfoApiFp)(this.configuration).encryptCardPaymentInfo(id, encryptCardPaymentInfoRequestBody, xAuditUser, options).then((request) => request(this.axios, this.basePath));
824
+ }
825
+ }
826
+ exports.GetCardPaymentInfoApi = GetCardPaymentInfoApi;
827
+ /**
828
+ * GetPlasticManufacturingHistoryApi - axios parameter creator
829
+ * @export
830
+ */
831
+ const GetPlasticManufacturingHistoryApiAxiosParamCreator = function (configuration) {
832
+ return {
833
+ /**
834
+ * Send a request to this endpoint to retrieve a detailed list of all past occurrences when the card has been physically manufactured.
835
+ * @summary Retrieve Manufacturing History of Card
836
+ * @param {string} id Unique identifier of the card for which you want to retrieve the manufacturing history.
837
+ * @param {string} [xAuditUser] Optional audit user header
838
+ * @param {*} [options] Override http request option.
839
+ * @throws {RequiredError}
840
+ */
841
+ manufacturingHistory: (id_1, xAuditUser_1, ...args_1) => __awaiter(this, [id_1, xAuditUser_1, ...args_1], void 0, function* (id, xAuditUser, options = {}) {
842
+ // verify required parameter 'id' is not null or undefined
843
+ (0, common_1.assertParamExists)('manufacturingHistory', 'id', id);
844
+ const localVarPath = `/v1/cards/{id}/manufacturing-history`
845
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
846
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
847
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
848
+ let baseOptions;
849
+ if (configuration) {
850
+ baseOptions = configuration.baseOptions;
851
+ }
852
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
853
+ const localVarHeaderParameter = {};
854
+ const localVarQueryParameter = {};
855
+ // authentication bearerAuth required
856
+ // http bearer authentication required
857
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
858
+ if (xAuditUser != null) {
859
+ localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
860
+ }
861
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
862
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
863
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
864
+ return {
865
+ url: (0, common_1.toPathString)(localVarUrlObj),
866
+ options: localVarRequestOptions,
867
+ };
868
+ }),
869
+ };
870
+ };
871
+ exports.GetPlasticManufacturingHistoryApiAxiosParamCreator = GetPlasticManufacturingHistoryApiAxiosParamCreator;
872
+ /**
873
+ * GetPlasticManufacturingHistoryApi - functional programming interface
874
+ * @export
875
+ */
876
+ const GetPlasticManufacturingHistoryApiFp = function (configuration) {
877
+ const localVarAxiosParamCreator = (0, exports.GetPlasticManufacturingHistoryApiAxiosParamCreator)(configuration);
878
+ return {
879
+ /**
880
+ * Send a request to this endpoint to retrieve a detailed list of all past occurrences when the card has been physically manufactured.
881
+ * @summary Retrieve Manufacturing History of Card
882
+ * @param {string} id Unique identifier of the card for which you want to retrieve the manufacturing history.
883
+ * @param {string} [xAuditUser] Optional audit user header
884
+ * @param {*} [options] Override http request option.
885
+ * @throws {RequiredError}
886
+ */
887
+ manufacturingHistory(id, xAuditUser, options) {
888
+ return __awaiter(this, void 0, void 0, function* () {
889
+ var _a, _b, _c;
890
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.manufacturingHistory(id, xAuditUser, options);
891
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
892
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['GetPlasticManufacturingHistoryApi.manufacturingHistory']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
893
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
894
+ });
895
+ },
896
+ };
897
+ };
898
+ exports.GetPlasticManufacturingHistoryApiFp = GetPlasticManufacturingHistoryApiFp;
899
+ /**
900
+ * GetPlasticManufacturingHistoryApi - factory interface
901
+ * @export
902
+ */
903
+ const GetPlasticManufacturingHistoryApiFactory = function (configuration, basePath, axios) {
904
+ const localVarFp = (0, exports.GetPlasticManufacturingHistoryApiFp)(configuration);
905
+ return {
906
+ /**
907
+ * Send a request to this endpoint to retrieve a detailed list of all past occurrences when the card has been physically manufactured.
908
+ * @summary Retrieve Manufacturing History of Card
909
+ * @param {string} id Unique identifier of the card for which you want to retrieve the manufacturing history.
910
+ * @param {string} [xAuditUser] Optional audit user header
911
+ * @param {*} [options] Override http request option.
912
+ * @throws {RequiredError}
913
+ */
914
+ manufacturingHistory(id, xAuditUser, options) {
915
+ return localVarFp.manufacturingHistory(id, xAuditUser, options).then((request) => request(axios, basePath));
916
+ },
917
+ };
918
+ };
919
+ exports.GetPlasticManufacturingHistoryApiFactory = GetPlasticManufacturingHistoryApiFactory;
920
+ /**
921
+ * GetPlasticManufacturingHistoryApi - object-oriented interface
922
+ * @export
923
+ * @class GetPlasticManufacturingHistoryApi
924
+ * @extends {BaseAPI}
925
+ */
926
+ class GetPlasticManufacturingHistoryApi extends base_1.BaseAPI {
927
+ /**
928
+ * Send a request to this endpoint to retrieve a detailed list of all past occurrences when the card has been physically manufactured.
929
+ * @summary Retrieve Manufacturing History of Card
930
+ * @param {string} id Unique identifier of the card for which you want to retrieve the manufacturing history.
931
+ * @param {string} [xAuditUser] Optional audit user header
932
+ * @param {*} [options] Override http request option.
933
+ * @throws {RequiredError}
934
+ * @memberof GetPlasticManufacturingHistoryApi
935
+ */
936
+ manufacturingHistory(id, xAuditUser, options) {
937
+ return (0, exports.GetPlasticManufacturingHistoryApiFp)(this.configuration).manufacturingHistory(id, xAuditUser, options).then((request) => request(this.axios, this.basePath));
938
+ }
939
+ }
940
+ exports.GetPlasticManufacturingHistoryApi = GetPlasticManufacturingHistoryApi;
941
+ /**
942
+ * UpdateCardApi - axios parameter creator
943
+ * @export
944
+ */
945
+ const UpdateCardApiAxiosParamCreator = function (configuration) {
946
+ return {
947
+ /**
948
+ * To change the latest card version status from `INITIAL` to `ACTIVE`, send a request to this endpoint.
949
+ * @summary Activate Card
950
+ * @param {string} id Unique ID of the card that you want to activate.
951
+ * @param {string} [xIdempotencyKey] Idempotency key of the request
952
+ * @param {string} [xAuditUser] Optional audit user header
953
+ * @param {*} [options] Override http request option.
954
+ * @throws {RequiredError}
955
+ */
956
+ activateCard: (id_1, xIdempotencyKey_1, xAuditUser_1, ...args_1) => __awaiter(this, [id_1, xIdempotencyKey_1, xAuditUser_1, ...args_1], void 0, function* (id, xIdempotencyKey, xAuditUser, options = {}) {
957
+ // verify required parameter 'id' is not null or undefined
958
+ (0, common_1.assertParamExists)('activateCard', 'id', id);
959
+ const localVarPath = `/v1/cards/{id}/activate`
960
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
961
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
962
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
963
+ let baseOptions;
964
+ if (configuration) {
965
+ baseOptions = configuration.baseOptions;
966
+ }
967
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
968
+ const localVarHeaderParameter = {};
969
+ const localVarQueryParameter = {};
970
+ // authentication bearerAuth required
971
+ // http bearer authentication required
972
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
973
+ if (xIdempotencyKey != null) {
974
+ localVarHeaderParameter['x-idempotency-key'] = String(xIdempotencyKey);
975
+ }
976
+ if (xAuditUser != null) {
977
+ localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
978
+ }
979
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
980
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
981
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
982
+ return {
983
+ url: (0, common_1.toPathString)(localVarUrlObj),
984
+ options: localVarRequestOptions,
985
+ };
986
+ }),
987
+ /**
988
+ * Send a request to this endpoint when you want to update details of a specific card.
989
+ * @summary Partially Update Card
990
+ * @param {string} id Unique identifier of the card that you want to update.
991
+ * @param {UpdateCardBody} updateCardBody Details of the card that you want to update.
992
+ * @param {string} [xAuditUser] Optional audit user header
993
+ * @param {*} [options] Override http request option.
994
+ * @throws {RequiredError}
995
+ */
996
+ patchCard: (id_1, updateCardBody_1, xAuditUser_1, ...args_1) => __awaiter(this, [id_1, updateCardBody_1, xAuditUser_1, ...args_1], void 0, function* (id, updateCardBody, xAuditUser, options = {}) {
997
+ // verify required parameter 'id' is not null or undefined
998
+ (0, common_1.assertParamExists)('patchCard', 'id', id);
999
+ // verify required parameter 'updateCardBody' is not null or undefined
1000
+ (0, common_1.assertParamExists)('patchCard', 'updateCardBody', updateCardBody);
1001
+ const localVarPath = `/v1/cards/{id}`
1002
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1003
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1004
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1005
+ let baseOptions;
1006
+ if (configuration) {
1007
+ baseOptions = configuration.baseOptions;
1008
+ }
1009
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
1010
+ const localVarHeaderParameter = {};
1011
+ const localVarQueryParameter = {};
1012
+ // authentication bearerAuth required
1013
+ // http bearer authentication required
1014
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1015
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1016
+ if (xAuditUser != null) {
1017
+ localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
1018
+ }
1019
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1020
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1021
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1022
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateCardBody, localVarRequestOptions, configuration);
1023
+ return {
1024
+ url: (0, common_1.toPathString)(localVarUrlObj),
1025
+ options: localVarRequestOptions,
1026
+ };
1027
+ }),
1028
+ /**
1029
+ * Send a request to this endpoint when you want to reissue a card.
1030
+ * @summary Reissue Card
1031
+ * @param {string} id Unique identifier of the card that you want to reissue.
1032
+ * @param {string} [xIdempotencyKey] Idempotency key of the request
1033
+ * @param {string} [xAuditUser] Optional audit user header
1034
+ * @param {ReissueCardBody} [reissueCardBody]
1035
+ * @param {*} [options] Override http request option.
1036
+ * @throws {RequiredError}
1037
+ */
1038
+ reissueCard: (id_1, xIdempotencyKey_1, xAuditUser_1, reissueCardBody_1, ...args_1) => __awaiter(this, [id_1, xIdempotencyKey_1, xAuditUser_1, reissueCardBody_1, ...args_1], void 0, function* (id, xIdempotencyKey, xAuditUser, reissueCardBody, options = {}) {
1039
+ // verify required parameter 'id' is not null or undefined
1040
+ (0, common_1.assertParamExists)('reissueCard', 'id', id);
1041
+ const localVarPath = `/v1/cards/{id}/reissue`
1042
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1043
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1044
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1045
+ let baseOptions;
1046
+ if (configuration) {
1047
+ baseOptions = configuration.baseOptions;
1048
+ }
1049
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1050
+ const localVarHeaderParameter = {};
1051
+ const localVarQueryParameter = {};
1052
+ // authentication bearerAuth required
1053
+ // http bearer authentication required
1054
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1055
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1056
+ if (xIdempotencyKey != null) {
1057
+ localVarHeaderParameter['x-idempotency-key'] = String(xIdempotencyKey);
1058
+ }
1059
+ if (xAuditUser != null) {
1060
+ localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
1061
+ }
1062
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1063
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1064
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1065
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(reissueCardBody, localVarRequestOptions, configuration);
1066
+ return {
1067
+ url: (0, common_1.toPathString)(localVarUrlObj),
1068
+ options: localVarRequestOptions,
1069
+ };
1070
+ }),
1071
+ /**
1072
+ * Send a request to this endpoint when you want to reorder existing PIN for a plastic card, if the cardholder has forgotten it. The PIN is delivered to the `preferredPinAddress`. If `preferredPinAddress` is absent, the PIN is delivered to the `preferredCardAddress`.
1073
+ * @summary Reorder PIN for Card
1074
+ * @param {string} id Unique identifier of the card for which you want to reorder PIN.
1075
+ * @param {string} [xIdempotencyKey] Idempotency key of the request.
1076
+ * @param {string} [xAuditUser] Optional audit user header
1077
+ * @param {*} [options] Override http request option.
1078
+ * @throws {RequiredError}
1079
+ */
1080
+ reorderPin: (id_1, xIdempotencyKey_1, xAuditUser_1, ...args_1) => __awaiter(this, [id_1, xIdempotencyKey_1, xAuditUser_1, ...args_1], void 0, function* (id, xIdempotencyKey, xAuditUser, options = {}) {
1081
+ // verify required parameter 'id' is not null or undefined
1082
+ (0, common_1.assertParamExists)('reorderPin', 'id', id);
1083
+ const localVarPath = `/v1/cards/{id}/reorder-pin`
1084
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1085
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1086
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1087
+ let baseOptions;
1088
+ if (configuration) {
1089
+ baseOptions = configuration.baseOptions;
1090
+ }
1091
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1092
+ const localVarHeaderParameter = {};
1093
+ const localVarQueryParameter = {};
1094
+ // authentication bearerAuth required
1095
+ // http bearer authentication required
1096
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1097
+ if (xIdempotencyKey != null) {
1098
+ localVarHeaderParameter['x-idempotency-key'] = String(xIdempotencyKey);
1099
+ }
1100
+ if (xAuditUser != null) {
1101
+ localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
1102
+ }
1103
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1104
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1105
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1106
+ return {
1107
+ url: (0, common_1.toPathString)(localVarUrlObj),
1108
+ options: localVarRequestOptions,
1109
+ };
1110
+ }),
1111
+ /**
1112
+ * Send a request to this endpoint when you want to replace the current card. The old card is closed and a new card is issued, where the PAN and the expiry date are updated.
1113
+ * @summary Replace Card
1114
+ * @param {string} id Unique identifier of the card to be replaced.
1115
+ * @param {string} [xIdempotencyKey] Idempotency key of the request.
1116
+ * @param {string} [xAuditUser] Optional audit user header
1117
+ * @param {ReplaceCardBody} [replaceCardBody]
1118
+ * @param {*} [options] Override http request option.
1119
+ * @throws {RequiredError}
1120
+ */
1121
+ replaceCard: (id_1, xIdempotencyKey_1, xAuditUser_1, replaceCardBody_1, ...args_1) => __awaiter(this, [id_1, xIdempotencyKey_1, xAuditUser_1, replaceCardBody_1, ...args_1], void 0, function* (id, xIdempotencyKey, xAuditUser, replaceCardBody, options = {}) {
1122
+ // verify required parameter 'id' is not null or undefined
1123
+ (0, common_1.assertParamExists)('replaceCard', 'id', id);
1124
+ const localVarPath = `/v1/cards/{id}/replace`
1125
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1126
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1127
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1128
+ let baseOptions;
1129
+ if (configuration) {
1130
+ baseOptions = configuration.baseOptions;
1131
+ }
1132
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1133
+ const localVarHeaderParameter = {};
1134
+ const localVarQueryParameter = {};
1135
+ // authentication bearerAuth required
1136
+ // http bearer authentication required
1137
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1138
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1139
+ if (xIdempotencyKey != null) {
1140
+ localVarHeaderParameter['x-idempotency-key'] = String(xIdempotencyKey);
1141
+ }
1142
+ if (xAuditUser != null) {
1143
+ localVarHeaderParameter['x-audit-user'] = String(xAuditUser);
1144
+ }
1145
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1146
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1147
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1148
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(replaceCardBody, localVarRequestOptions, configuration);
1149
+ return {
1150
+ url: (0, common_1.toPathString)(localVarUrlObj),
1151
+ options: localVarRequestOptions,
1152
+ };
1153
+ }),
1154
+ };
1155
+ };
1156
+ exports.UpdateCardApiAxiosParamCreator = UpdateCardApiAxiosParamCreator;
1157
+ /**
1158
+ * UpdateCardApi - functional programming interface
1159
+ * @export
1160
+ */
1161
+ const UpdateCardApiFp = function (configuration) {
1162
+ const localVarAxiosParamCreator = (0, exports.UpdateCardApiAxiosParamCreator)(configuration);
1163
+ return {
1164
+ /**
1165
+ * To change the latest card version status from `INITIAL` to `ACTIVE`, send a request to this endpoint.
1166
+ * @summary Activate Card
1167
+ * @param {string} id Unique ID of the card that you want to activate.
1168
+ * @param {string} [xIdempotencyKey] Idempotency key of the request
1169
+ * @param {string} [xAuditUser] Optional audit user header
1170
+ * @param {*} [options] Override http request option.
1171
+ * @throws {RequiredError}
1172
+ */
1173
+ activateCard(id, xIdempotencyKey, xAuditUser, options) {
1174
+ return __awaiter(this, void 0, void 0, function* () {
1175
+ var _a, _b, _c;
1176
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.activateCard(id, xIdempotencyKey, xAuditUser, options);
1177
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1178
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UpdateCardApi.activateCard']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1179
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1180
+ });
1181
+ },
1182
+ /**
1183
+ * Send a request to this endpoint when you want to update details of a specific card.
1184
+ * @summary Partially Update Card
1185
+ * @param {string} id Unique identifier of the card that you want to update.
1186
+ * @param {UpdateCardBody} updateCardBody Details of the card that you want to update.
1187
+ * @param {string} [xAuditUser] Optional audit user header
1188
+ * @param {*} [options] Override http request option.
1189
+ * @throws {RequiredError}
1190
+ */
1191
+ patchCard(id, updateCardBody, xAuditUser, options) {
1192
+ return __awaiter(this, void 0, void 0, function* () {
1193
+ var _a, _b, _c;
1194
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.patchCard(id, updateCardBody, xAuditUser, options);
1195
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1196
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UpdateCardApi.patchCard']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1197
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1198
+ });
1199
+ },
1200
+ /**
1201
+ * Send a request to this endpoint when you want to reissue a card.
1202
+ * @summary Reissue Card
1203
+ * @param {string} id Unique identifier of the card that you want to reissue.
1204
+ * @param {string} [xIdempotencyKey] Idempotency key of the request
1205
+ * @param {string} [xAuditUser] Optional audit user header
1206
+ * @param {ReissueCardBody} [reissueCardBody]
1207
+ * @param {*} [options] Override http request option.
1208
+ * @throws {RequiredError}
1209
+ */
1210
+ reissueCard(id, xIdempotencyKey, xAuditUser, reissueCardBody, options) {
1211
+ return __awaiter(this, void 0, void 0, function* () {
1212
+ var _a, _b, _c;
1213
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.reissueCard(id, xIdempotencyKey, xAuditUser, reissueCardBody, options);
1214
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1215
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UpdateCardApi.reissueCard']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1216
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1217
+ });
1218
+ },
1219
+ /**
1220
+ * Send a request to this endpoint when you want to reorder existing PIN for a plastic card, if the cardholder has forgotten it. The PIN is delivered to the `preferredPinAddress`. If `preferredPinAddress` is absent, the PIN is delivered to the `preferredCardAddress`.
1221
+ * @summary Reorder PIN for Card
1222
+ * @param {string} id Unique identifier of the card for which you want to reorder PIN.
1223
+ * @param {string} [xIdempotencyKey] Idempotency key of the request.
1224
+ * @param {string} [xAuditUser] Optional audit user header
1225
+ * @param {*} [options] Override http request option.
1226
+ * @throws {RequiredError}
1227
+ */
1228
+ reorderPin(id, xIdempotencyKey, xAuditUser, options) {
1229
+ return __awaiter(this, void 0, void 0, function* () {
1230
+ var _a, _b, _c;
1231
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.reorderPin(id, xIdempotencyKey, xAuditUser, options);
1232
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1233
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UpdateCardApi.reorderPin']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1234
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1235
+ });
1236
+ },
1237
+ /**
1238
+ * Send a request to this endpoint when you want to replace the current card. The old card is closed and a new card is issued, where the PAN and the expiry date are updated.
1239
+ * @summary Replace Card
1240
+ * @param {string} id Unique identifier of the card to be replaced.
1241
+ * @param {string} [xIdempotencyKey] Idempotency key of the request.
1242
+ * @param {string} [xAuditUser] Optional audit user header
1243
+ * @param {ReplaceCardBody} [replaceCardBody]
1244
+ * @param {*} [options] Override http request option.
1245
+ * @throws {RequiredError}
1246
+ */
1247
+ replaceCard(id, xIdempotencyKey, xAuditUser, replaceCardBody, options) {
1248
+ return __awaiter(this, void 0, void 0, function* () {
1249
+ var _a, _b, _c;
1250
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.replaceCard(id, xIdempotencyKey, xAuditUser, replaceCardBody, options);
1251
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1252
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UpdateCardApi.replaceCard']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1253
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1254
+ });
1255
+ },
1256
+ };
1257
+ };
1258
+ exports.UpdateCardApiFp = UpdateCardApiFp;
1259
+ /**
1260
+ * UpdateCardApi - factory interface
1261
+ * @export
1262
+ */
1263
+ const UpdateCardApiFactory = function (configuration, basePath, axios) {
1264
+ const localVarFp = (0, exports.UpdateCardApiFp)(configuration);
1265
+ return {
1266
+ /**
1267
+ * To change the latest card version status from `INITIAL` to `ACTIVE`, send a request to this endpoint.
1268
+ * @summary Activate Card
1269
+ * @param {string} id Unique ID of the card that you want to activate.
1270
+ * @param {string} [xIdempotencyKey] Idempotency key of the request
1271
+ * @param {string} [xAuditUser] Optional audit user header
1272
+ * @param {*} [options] Override http request option.
1273
+ * @throws {RequiredError}
1274
+ */
1275
+ activateCard(id, xIdempotencyKey, xAuditUser, options) {
1276
+ return localVarFp.activateCard(id, xIdempotencyKey, xAuditUser, options).then((request) => request(axios, basePath));
1277
+ },
1278
+ /**
1279
+ * Send a request to this endpoint when you want to update details of a specific card.
1280
+ * @summary Partially Update Card
1281
+ * @param {string} id Unique identifier of the card that you want to update.
1282
+ * @param {UpdateCardBody} updateCardBody Details of the card that you want to update.
1283
+ * @param {string} [xAuditUser] Optional audit user header
1284
+ * @param {*} [options] Override http request option.
1285
+ * @throws {RequiredError}
1286
+ */
1287
+ patchCard(id, updateCardBody, xAuditUser, options) {
1288
+ return localVarFp.patchCard(id, updateCardBody, xAuditUser, options).then((request) => request(axios, basePath));
1289
+ },
1290
+ /**
1291
+ * Send a request to this endpoint when you want to reissue a card.
1292
+ * @summary Reissue Card
1293
+ * @param {string} id Unique identifier of the card that you want to reissue.
1294
+ * @param {string} [xIdempotencyKey] Idempotency key of the request
1295
+ * @param {string} [xAuditUser] Optional audit user header
1296
+ * @param {ReissueCardBody} [reissueCardBody]
1297
+ * @param {*} [options] Override http request option.
1298
+ * @throws {RequiredError}
1299
+ */
1300
+ reissueCard(id, xIdempotencyKey, xAuditUser, reissueCardBody, options) {
1301
+ return localVarFp.reissueCard(id, xIdempotencyKey, xAuditUser, reissueCardBody, options).then((request) => request(axios, basePath));
1302
+ },
1303
+ /**
1304
+ * Send a request to this endpoint when you want to reorder existing PIN for a plastic card, if the cardholder has forgotten it. The PIN is delivered to the `preferredPinAddress`. If `preferredPinAddress` is absent, the PIN is delivered to the `preferredCardAddress`.
1305
+ * @summary Reorder PIN for Card
1306
+ * @param {string} id Unique identifier of the card for which you want to reorder PIN.
1307
+ * @param {string} [xIdempotencyKey] Idempotency key of the request.
1308
+ * @param {string} [xAuditUser] Optional audit user header
1309
+ * @param {*} [options] Override http request option.
1310
+ * @throws {RequiredError}
1311
+ */
1312
+ reorderPin(id, xIdempotencyKey, xAuditUser, options) {
1313
+ return localVarFp.reorderPin(id, xIdempotencyKey, xAuditUser, options).then((request) => request(axios, basePath));
1314
+ },
1315
+ /**
1316
+ * Send a request to this endpoint when you want to replace the current card. The old card is closed and a new card is issued, where the PAN and the expiry date are updated.
1317
+ * @summary Replace Card
1318
+ * @param {string} id Unique identifier of the card to be replaced.
1319
+ * @param {string} [xIdempotencyKey] Idempotency key of the request.
1320
+ * @param {string} [xAuditUser] Optional audit user header
1321
+ * @param {ReplaceCardBody} [replaceCardBody]
1322
+ * @param {*} [options] Override http request option.
1323
+ * @throws {RequiredError}
1324
+ */
1325
+ replaceCard(id, xIdempotencyKey, xAuditUser, replaceCardBody, options) {
1326
+ return localVarFp.replaceCard(id, xIdempotencyKey, xAuditUser, replaceCardBody, options).then((request) => request(axios, basePath));
1327
+ },
1328
+ };
1329
+ };
1330
+ exports.UpdateCardApiFactory = UpdateCardApiFactory;
1331
+ /**
1332
+ * UpdateCardApi - object-oriented interface
1333
+ * @export
1334
+ * @class UpdateCardApi
1335
+ * @extends {BaseAPI}
1336
+ */
1337
+ class UpdateCardApi extends base_1.BaseAPI {
1338
+ /**
1339
+ * To change the latest card version status from `INITIAL` to `ACTIVE`, send a request to this endpoint.
1340
+ * @summary Activate Card
1341
+ * @param {string} id Unique ID of the card that you want to activate.
1342
+ * @param {string} [xIdempotencyKey] Idempotency key of the request
1343
+ * @param {string} [xAuditUser] Optional audit user header
1344
+ * @param {*} [options] Override http request option.
1345
+ * @throws {RequiredError}
1346
+ * @memberof UpdateCardApi
1347
+ */
1348
+ activateCard(id, xIdempotencyKey, xAuditUser, options) {
1349
+ return (0, exports.UpdateCardApiFp)(this.configuration).activateCard(id, xIdempotencyKey, xAuditUser, options).then((request) => request(this.axios, this.basePath));
1350
+ }
1351
+ /**
1352
+ * Send a request to this endpoint when you want to update details of a specific card.
1353
+ * @summary Partially Update Card
1354
+ * @param {string} id Unique identifier of the card that you want to update.
1355
+ * @param {UpdateCardBody} updateCardBody Details of the card that you want to update.
1356
+ * @param {string} [xAuditUser] Optional audit user header
1357
+ * @param {*} [options] Override http request option.
1358
+ * @throws {RequiredError}
1359
+ * @memberof UpdateCardApi
1360
+ */
1361
+ patchCard(id, updateCardBody, xAuditUser, options) {
1362
+ return (0, exports.UpdateCardApiFp)(this.configuration).patchCard(id, updateCardBody, xAuditUser, options).then((request) => request(this.axios, this.basePath));
1363
+ }
1364
+ /**
1365
+ * Send a request to this endpoint when you want to reissue a card.
1366
+ * @summary Reissue Card
1367
+ * @param {string} id Unique identifier of the card that you want to reissue.
1368
+ * @param {string} [xIdempotencyKey] Idempotency key of the request
1369
+ * @param {string} [xAuditUser] Optional audit user header
1370
+ * @param {ReissueCardBody} [reissueCardBody]
1371
+ * @param {*} [options] Override http request option.
1372
+ * @throws {RequiredError}
1373
+ * @memberof UpdateCardApi
1374
+ */
1375
+ reissueCard(id, xIdempotencyKey, xAuditUser, reissueCardBody, options) {
1376
+ return (0, exports.UpdateCardApiFp)(this.configuration).reissueCard(id, xIdempotencyKey, xAuditUser, reissueCardBody, options).then((request) => request(this.axios, this.basePath));
1377
+ }
1378
+ /**
1379
+ * Send a request to this endpoint when you want to reorder existing PIN for a plastic card, if the cardholder has forgotten it. The PIN is delivered to the `preferredPinAddress`. If `preferredPinAddress` is absent, the PIN is delivered to the `preferredCardAddress`.
1380
+ * @summary Reorder PIN for Card
1381
+ * @param {string} id Unique identifier of the card for which you want to reorder PIN.
1382
+ * @param {string} [xIdempotencyKey] Idempotency key of the request.
1383
+ * @param {string} [xAuditUser] Optional audit user header
1384
+ * @param {*} [options] Override http request option.
1385
+ * @throws {RequiredError}
1386
+ * @memberof UpdateCardApi
1387
+ */
1388
+ reorderPin(id, xIdempotencyKey, xAuditUser, options) {
1389
+ return (0, exports.UpdateCardApiFp)(this.configuration).reorderPin(id, xIdempotencyKey, xAuditUser, options).then((request) => request(this.axios, this.basePath));
1390
+ }
1391
+ /**
1392
+ * Send a request to this endpoint when you want to replace the current card. The old card is closed and a new card is issued, where the PAN and the expiry date are updated.
1393
+ * @summary Replace Card
1394
+ * @param {string} id Unique identifier of the card to be replaced.
1395
+ * @param {string} [xIdempotencyKey] Idempotency key of the request.
1396
+ * @param {string} [xAuditUser] Optional audit user header
1397
+ * @param {ReplaceCardBody} [replaceCardBody]
1398
+ * @param {*} [options] Override http request option.
1399
+ * @throws {RequiredError}
1400
+ * @memberof UpdateCardApi
1401
+ */
1402
+ replaceCard(id, xIdempotencyKey, xAuditUser, replaceCardBody, options) {
1403
+ return (0, exports.UpdateCardApiFp)(this.configuration).replaceCard(id, xIdempotencyKey, xAuditUser, replaceCardBody, options).then((request) => request(this.axios, this.basePath));
1404
+ }
1405
+ }
1406
+ exports.UpdateCardApi = UpdateCardApi;