Skip to content

Commit 7e9a0cb

Browse files
committed
added missing files
1 parent c6ca059 commit 7e9a0cb

19 files changed

Lines changed: 4240 additions & 0 deletions

nodejs/MDES_Digital_Enablement.yaml

Lines changed: 2579 additions & 0 deletions
Large diffs are not rendered by default.

nodejs/config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"useES6" : false
3+
}

nodejs/generate-api-client.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
openapi-generator generate -i MDES_Digital_Enablement.yaml -g javascript -o . -c config.json
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
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+
}));
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
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/BillingAddress', 'model/PhoneNumber'], 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('./BillingAddress'), require('./PhoneNumber'));
23+
} else {
24+
// Browser globals (root is window)
25+
if (!root.MdesForMerchants) {
26+
root.MdesForMerchants = {};
27+
}
28+
root.MdesForMerchants.AccountHolderData = factory(root.MdesForMerchants.ApiClient, root.MdesForMerchants.BillingAddress, root.MdesForMerchants.PhoneNumber);
29+
}
30+
}(this, function(ApiClient, BillingAddress, PhoneNumber) {
31+
'use strict';
32+
33+
34+
35+
/**
36+
* The AccountHolderData model module.
37+
* @module model/AccountHolderData
38+
* @version 1.2.9
39+
*/
40+
41+
/**
42+
* Constructs a new <code>AccountHolderData</code>.
43+
* @alias module:model/AccountHolderData
44+
* @class
45+
*/
46+
var exports = function() {
47+
var _this = this;
48+
49+
};
50+
51+
/**
52+
* Constructs a <code>AccountHolderData</code> from a plain JavaScript object, optionally creating a new instance.
53+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
54+
* @param {Object} data The plain JavaScript object bearing properties of interest.
55+
* @param {module:model/AccountHolderData} obj Optional instance to populate.
56+
* @return {module:model/AccountHolderData} The populated <code>AccountHolderData</code> instance.
57+
*/
58+
exports.constructFromObject = function(data, obj) {
59+
if (data) {
60+
obj = obj || new exports();
61+
if (data.hasOwnProperty('accountHolderName')) {
62+
obj['accountHolderName'] = ApiClient.convertToType(data['accountHolderName'], 'String');
63+
}
64+
if (data.hasOwnProperty('accountHolderAddress')) {
65+
obj['accountHolderAddress'] = BillingAddress.constructFromObject(data['accountHolderAddress']);
66+
}
67+
if (data.hasOwnProperty('consumerIdentifier')) {
68+
obj['consumerIdentifier'] = ApiClient.convertToType(data['consumerIdentifier'], 'String');
69+
}
70+
if (data.hasOwnProperty('accountHolderEmailAddress')) {
71+
obj['accountHolderEmailAddress'] = ApiClient.convertToType(data['accountHolderEmailAddress'], 'String');
72+
}
73+
if (data.hasOwnProperty('accountHolderMobilePhoneNumber')) {
74+
obj['accountHolderMobilePhoneNumber'] = PhoneNumber.constructFromObject(data['accountHolderMobilePhoneNumber']);
75+
}
76+
}
77+
return obj;
78+
}
79+
80+
/**
81+
* __(OPTIONAL)__ The name of the cardholder in the format LASTNAME/FIRSTNAME or FIRSTNAME LASTNAME<br> __Max Length:27__
82+
* @member {String} accountHolderName
83+
*/
84+
exports.prototype['accountHolderName'] = undefined;
85+
/**
86+
* @member {module:model/BillingAddress} accountHolderAddress
87+
*/
88+
exports.prototype['accountHolderAddress'] = undefined;
89+
/**
90+
* __(OPTIONAL)__ Customer Identifier that may be required in some regions.<br> __Max Length:88__
91+
* @member {String} consumerIdentifier
92+
*/
93+
exports.prototype['consumerIdentifier'] = undefined;
94+
/**
95+
* __(OPTIONAL)__ The e-mail address of the Account Holder<br> __Max Length: 320__
96+
* @member {String} accountHolderEmailAddress
97+
*/
98+
exports.prototype['accountHolderEmailAddress'] = undefined;
99+
/**
100+
* @member {module:model/PhoneNumber} accountHolderMobilePhoneNumber
101+
*/
102+
exports.prototype['accountHolderMobilePhoneNumber'] = undefined;
103+
104+
105+
106+
return exports;
107+
}));
108+
109+
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
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/BillingAddress', 'model/PhoneNumber'], 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('./BillingAddress'), require('./PhoneNumber'));
23+
} else {
24+
// Browser globals (root is window)
25+
if (!root.MdesForMerchants) {
26+
root.MdesForMerchants = {};
27+
}
28+
root.MdesForMerchants.AccountHolderDataOutbound = factory(root.MdesForMerchants.ApiClient, root.MdesForMerchants.BillingAddress, root.MdesForMerchants.PhoneNumber);
29+
}
30+
}(this, function(ApiClient, BillingAddress, PhoneNumber) {
31+
'use strict';
32+
33+
34+
35+
/**
36+
* The AccountHolderDataOutbound model module.
37+
* @module model/AccountHolderDataOutbound
38+
* @version 1.2.9
39+
*/
40+
41+
/**
42+
* Constructs a new <code>AccountHolderDataOutbound</code>.
43+
* __(CONDITIONAL)__&lt;br&gt; Present in tokenize response if supported by the Merchant, if using a pushAccountReceipt and if there is account holder data associated with the pushAccountReceipt in case that the issuer decision is APPROVED. Refer to &lt;a href&#x3D;\&quot;https://developer.mastercard.com/devzone/api/portal/download/0000016a-f9a1-d055-ad7a-f9efc8d50000\&quot;&gt;MDES Token Connect Token Requestor Implementation Guide and Specification &lt;/a&gt; for more details. &lt;/br&gt;
44+
* @alias module:model/AccountHolderDataOutbound
45+
* @class
46+
*/
47+
var exports = function() {
48+
var _this = this;
49+
50+
};
51+
52+
/**
53+
* Constructs a <code>AccountHolderDataOutbound</code> from a plain JavaScript object, optionally creating a new instance.
54+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
55+
* @param {Object} data The plain JavaScript object bearing properties of interest.
56+
* @param {module:model/AccountHolderDataOutbound} obj Optional instance to populate.
57+
* @return {module:model/AccountHolderDataOutbound} The populated <code>AccountHolderDataOutbound</code> instance.
58+
*/
59+
exports.constructFromObject = function(data, obj) {
60+
if (data) {
61+
obj = obj || new exports();
62+
if (data.hasOwnProperty('accountHolderName')) {
63+
obj['accountHolderName'] = ApiClient.convertToType(data['accountHolderName'], 'String');
64+
}
65+
if (data.hasOwnProperty('accountHolderAddress')) {
66+
obj['accountHolderAddress'] = BillingAddress.constructFromObject(data['accountHolderAddress']);
67+
}
68+
if (data.hasOwnProperty('accountHolderEmailAddress')) {
69+
obj['accountHolderEmailAddress'] = ApiClient.convertToType(data['accountHolderEmailAddress'], 'String');
70+
}
71+
if (data.hasOwnProperty('accountHolderMobilePhoneNumber')) {
72+
obj['accountHolderMobilePhoneNumber'] = PhoneNumber.constructFromObject(data['accountHolderMobilePhoneNumber']);
73+
}
74+
}
75+
return obj;
76+
}
77+
78+
/**
79+
* __(OPTIONAL)__ The name of the cardholder<br> __Max Length:27__
80+
* @member {String} accountHolderName
81+
*/
82+
exports.prototype['accountHolderName'] = undefined;
83+
/**
84+
* @member {module:model/BillingAddress} accountHolderAddress
85+
*/
86+
exports.prototype['accountHolderAddress'] = undefined;
87+
/**
88+
* __(OPTIONAL)__ The e-mail address of the Account Holder<br> __Max Length:320__
89+
* @member {String} accountHolderEmailAddress
90+
*/
91+
exports.prototype['accountHolderEmailAddress'] = undefined;
92+
/**
93+
* @member {module:model/PhoneNumber} accountHolderMobilePhoneNumber
94+
*/
95+
exports.prototype['accountHolderMobilePhoneNumber'] = undefined;
96+
97+
98+
99+
return exports;
100+
}));
101+
102+

0 commit comments

Comments
 (0)