|
| 1 | +/** |
| 2 | + * MDES for Merchants |
| 3 | + * The MDES APIs are designed as RPC style stateless web services where each API endpoint represents an operation to be performed. All request and response payloads are sent in the JSON (JavaScript Object Notation) data-interchange format. Each endpoint in the API specifies the HTTP Method used to access it. All strings in request and response objects are to be UTF-8 encoded. Each API URI includes the major and minor version of API that it conforms to. This will allow multiple concurrent versions of the API to be deployed simultaneously. <br> __Authentication__ Mastercard uses OAuth 1.0a with body hash extension for authenticating the API clients. This requires every request that you send to Mastercard to be signed with an RSA private key. A private-public RSA key pair must be generated consisting of: <br> 1 . A private key for the OAuth signature for API requests. It is recommended to keep the private key in a password-protected or hardware keystore. <br> 2. A public key is shared with Mastercard during the project setup process through either a certificate signing request (CSR) or the API Key Generator. Mastercard will use the public key to verify the OAuth signature that is provided on every API call.<br> An OAUTH1.0a signer library is available on [GitHub](https://github.com/Mastercard/oauth1-signer-java) <br> __Encryption__<br> All communications between Issuer web service and the Mastercard gateway is encrypted using TLS. <br> __Additional Encryption of Sensitive Data__ In addition to the OAuth authentication, when using MDES Digital Enablement Service, any PCI sensitive and all account holder Personally Identifiable Information (PII) data must be encrypted. This requirement applies to the API fields containing encryptedData. Sensitive data is encrypted using a symmetric session (one-time-use) key. The symmetric session key is then wrapped with an RSA Public Key supplied by Mastercard during API setup phase (the Customer Encryption Key). <br> Java Client Encryption Library available on [GitHub](https://github.com/Mastercard/client-encryption-java) |
| 4 | + * |
| 5 | + * The version of the OpenAPI document: 1.2.9 |
| 6 | + * |
| 7 | + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). |
| 8 | + * https://openapi-generator.tech |
| 9 | + * |
| 10 | + * OpenAPI Generator version: 4.1.0 |
| 11 | + * |
| 12 | + * Do not edit the class manually. |
| 13 | + * |
| 14 | + */ |
| 15 | + |
| 16 | +(function(root, factory) { |
| 17 | + if (typeof define === 'function' && define.amd) { |
| 18 | + // AMD. Register as an anonymous module. |
| 19 | + define(['ApiClient', 'model/ErrorsResponse', 'model/GetDigitalAssetsRequestSchema', 'model/GetDigitalAssetsResponseSchema'], factory); |
| 20 | + } else if (typeof module === 'object' && module.exports) { |
| 21 | + // CommonJS-like environments that support module.exports, like Node. |
| 22 | + module.exports = factory(require('../ApiClient'), require('../model/ErrorsResponse'), require('../model/GetDigitalAssetsRequestSchema'), require('../model/GetDigitalAssetsResponseSchema')); |
| 23 | + } else { |
| 24 | + // Browser globals (root is window) |
| 25 | + if (!root.MdesForMerchants) { |
| 26 | + root.MdesForMerchants = {}; |
| 27 | + } |
| 28 | + root.MdesForMerchants.GetDigitalAssetsApi = factory(root.MdesForMerchants.ApiClient, root.MdesForMerchants.ErrorsResponse, root.MdesForMerchants.GetDigitalAssetsRequestSchema, root.MdesForMerchants.GetDigitalAssetsResponseSchema); |
| 29 | + } |
| 30 | +}(this, function(ApiClient, ErrorsResponse, GetDigitalAssetsRequestSchema, GetDigitalAssetsResponseSchema) { |
| 31 | + 'use strict'; |
| 32 | + |
| 33 | + /** |
| 34 | + * GetDigitalAssets service. |
| 35 | + * @module api/GetDigitalAssetsApi |
| 36 | + * @version 1.2.9 |
| 37 | + */ |
| 38 | + |
| 39 | + /** |
| 40 | + * Constructs a new GetDigitalAssetsApi. |
| 41 | + * @alias module:api/GetDigitalAssetsApi |
| 42 | + * @class |
| 43 | + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, |
| 44 | + * default to {@link module:ApiClient#instance} if unspecified. |
| 45 | + */ |
| 46 | + var exports = function(apiClient) { |
| 47 | + this.apiClient = apiClient || ApiClient.instance; |
| 48 | + |
| 49 | + |
| 50 | + /** |
| 51 | + * Callback function to receive the result of the getDigitalAssets operation. |
| 52 | + * @callback module:api/GetDigitalAssetsApi~getDigitalAssetsCallback |
| 53 | + * @param {String} error Error message, if any. |
| 54 | + * @param {module:model/GetDigitalAssetsResponseSchema} data The data returned by the service call. |
| 55 | + * @param {String} response The complete HTTP response. |
| 56 | + */ |
| 57 | + |
| 58 | + /** |
| 59 | + * Used to retrieve digital assets derived from a funding PAN. |
| 60 | + * Get Digital Asset API is used to retrieve digital assets from a funding pan. |
| 61 | + * @param {Object} opts Optional parameters |
| 62 | + * @param {module:model/GetDigitalAssetsRequestSchema} opts.encryptedPayload Contains an encrypted CardAccountData object. |
| 63 | + * @param {module:api/GetDigitalAssetsApi~getDigitalAssetsCallback} callback The callback function, accepting three arguments: error, data, response |
| 64 | + * data is of type: {@link module:model/GetDigitalAssetsResponseSchema} |
| 65 | + */ |
| 66 | + this.getDigitalAssets = function(opts, callback) { |
| 67 | + opts = opts || {}; |
| 68 | + var postBody = opts['encryptedPayload']; |
| 69 | + |
| 70 | + var pathParams = { |
| 71 | + }; |
| 72 | + var queryParams = { |
| 73 | + }; |
| 74 | + var collectionQueryParams = { |
| 75 | + }; |
| 76 | + var headerParams = { |
| 77 | + }; |
| 78 | + var formParams = { |
| 79 | + }; |
| 80 | + |
| 81 | + var authNames = []; |
| 82 | + var contentTypes = ['application/json']; |
| 83 | + var accepts = ['application/json']; |
| 84 | + var returnType = GetDigitalAssetsResponseSchema; |
| 85 | + return this.apiClient.callApi( |
| 86 | + '/digitization/static/1/0/getDigitalAssets', 'POST', |
| 87 | + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, |
| 88 | + authNames, contentTypes, accepts, returnType, null, callback |
| 89 | + ); |
| 90 | + } |
| 91 | + }; |
| 92 | + |
| 93 | + return exports; |
| 94 | +})); |
0 commit comments