UNPKG

cybersource-rest-client

Version:

Node.js SDK for the CyberSource REST API

135 lines (119 loc) 4.58 kB
/** * CyberSource Merged Spec * All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html * * OpenAPI spec version: 0.0.1 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * * Swagger Codegen version: 2.4.38 * * Do not edit the class manually. * */ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define(['ApiClient'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient')); } else { // Browser globals (root is window) if (!root.CyberSource) { root.CyberSource = {}; } root.CyberSource.Acpv1mppcredentialsChallengeEncryptionJwk = factory(root.CyberSource.ApiClient); } }(this, function(ApiClient) { 'use strict'; /** * The Acpv1mppcredentialsChallengeEncryptionJwk model module. * @module model/Acpv1mppcredentialsChallengeEncryptionJwk * @version 0.0.1 */ /** * Constructs a new <code>Acpv1mppcredentialsChallengeEncryptionJwk</code>. * Merchant RSA public encryption key as a JSON Web Key (JWK, RFC 7517). Must be RSA (kty=RSA), alg=RSA-OAEP-256, use=enc. Used to encrypt the token payload using RSA-OAEP with SHA-256 per MPP spec Section 7.4. * @alias module:model/Acpv1mppcredentialsChallengeEncryptionJwk * @class * @param kty {String} Key type. MUST be 'RSA'. * @param kid {String} Key ID. Identifies the key within a JWKS. * @param use {String} Public key use. MUST be 'enc'. * @param alg {String} Algorithm. MUST be 'RSA-OAEP-256'. * @param n {String} RSA modulus (Base64urlUInt-encoded per RFC 7518 Section 6.3.1.1). * @param e {String} RSA public exponent (Base64urlUInt-encoded per RFC 7518 Section 6.3.1.2). */ var exports = function(kty, kid, use, alg, n, e) { var _this = this; _this['kty'] = kty; _this['kid'] = kid; _this['use'] = use; _this['alg'] = alg; _this['n'] = n; _this['e'] = e; }; /** * Constructs a <code>Acpv1mppcredentialsChallengeEncryptionJwk</code> from a plain JavaScript object, optionally creating a new instance. * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. * @param {Object} data The plain JavaScript object bearing properties of interest. * @param {module:model/Acpv1mppcredentialsChallengeEncryptionJwk} obj Optional instance to populate. * @return {module:model/Acpv1mppcredentialsChallengeEncryptionJwk} The populated <code>Acpv1mppcredentialsChallengeEncryptionJwk</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('kty')) { obj['kty'] = ApiClient.convertToType(data['kty'], 'String'); } if (data.hasOwnProperty('kid')) { obj['kid'] = ApiClient.convertToType(data['kid'], 'String'); } if (data.hasOwnProperty('use')) { obj['use'] = ApiClient.convertToType(data['use'], 'String'); } if (data.hasOwnProperty('alg')) { obj['alg'] = ApiClient.convertToType(data['alg'], 'String'); } if (data.hasOwnProperty('n')) { obj['n'] = ApiClient.convertToType(data['n'], 'String'); } if (data.hasOwnProperty('e')) { obj['e'] = ApiClient.convertToType(data['e'], 'String'); } } return obj; } /** * Key type. MUST be 'RSA'. * @member {String} kty */ exports.prototype['kty'] = undefined; /** * Key ID. Identifies the key within a JWKS. * @member {String} kid */ exports.prototype['kid'] = undefined; /** * Public key use. MUST be 'enc'. * @member {String} use */ exports.prototype['use'] = undefined; /** * Algorithm. MUST be 'RSA-OAEP-256'. * @member {String} alg */ exports.prototype['alg'] = undefined; /** * RSA modulus (Base64urlUInt-encoded per RFC 7518 Section 6.3.1.1). * @member {String} n */ exports.prototype['n'] = undefined; /** * RSA public exponent (Base64urlUInt-encoded per RFC 7518 Section 6.3.1.2). * @member {String} e */ exports.prototype['e'] = undefined; return exports; }));