cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
145 lines (121 loc) • 5.15 kB
JavaScript
/**
* 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', 'model/Notificationsubscriptionsv2webhooksProducts', 'model/Notificationsubscriptionsv2webhooksSecurityPolicy'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./Notificationsubscriptionsv2webhooksProducts'), require('./Notificationsubscriptionsv2webhooksSecurityPolicy'));
} else {
// Browser globals (root is window)
if (!root.CyberSource) {
root.CyberSource = {};
}
root.CyberSource.UpdateWebhook = factory(root.CyberSource.ApiClient, root.CyberSource.Notificationsubscriptionsv2webhooksProducts, root.CyberSource.Notificationsubscriptionsv2webhooksSecurityPolicy);
}
}(this, function(ApiClient, Notificationsubscriptionsv2webhooksProducts, Notificationsubscriptionsv2webhooksSecurityPolicy) {
'use strict';
/**
* The UpdateWebhook model module.
* @module model/UpdateWebhook
* @version 0.0.1
*/
/**
* Constructs a new <code>UpdateWebhook</code>.
* @alias module:model/UpdateWebhook
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>UpdateWebhook</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/UpdateWebhook} obj Optional instance to populate.
* @return {module:model/UpdateWebhook} The populated <code>UpdateWebhook</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
if (data.hasOwnProperty('organizationId')) {
obj['organizationId'] = ApiClient.convertToType(data['organizationId'], 'String');
}
if (data.hasOwnProperty('description')) {
obj['description'] = ApiClient.convertToType(data['description'], 'String');
}
if (data.hasOwnProperty('products')) {
obj['products'] = ApiClient.convertToType(data['products'], [Notificationsubscriptionsv2webhooksProducts]);
}
if (data.hasOwnProperty('webhookUrl')) {
obj['webhookUrl'] = ApiClient.convertToType(data['webhookUrl'], 'String');
}
if (data.hasOwnProperty('notificationScope')) {
obj['notificationScope'] = ApiClient.convertToType(data['notificationScope'], 'String');
}
if (data.hasOwnProperty('healthCheckUrl')) {
obj['healthCheckUrl'] = ApiClient.convertToType(data['healthCheckUrl'], 'String');
}
if (data.hasOwnProperty('securityPolicy')) {
obj['securityPolicy'] = Notificationsubscriptionsv2webhooksSecurityPolicy.constructFromObject(data['securityPolicy']);
}
}
return obj;
}
/**
* Client friendly webhook name.
* @member {String} name
*/
exports.prototype['name'] = undefined;
/**
* Organization Id.
* @member {String} organizationId
*/
exports.prototype['organizationId'] = undefined;
/**
* Client friendly webhook description.
* @member {String} description
*/
exports.prototype['description'] = undefined;
/**
* @member {Array.<module:model/Notificationsubscriptionsv2webhooksProducts>} products
*/
exports.prototype['products'] = undefined;
/**
* The client's endpoint (URL) to receive webhooks.
* @member {String} webhookUrl
*/
exports.prototype['webhookUrl'] = undefined;
/**
* The webhook scope. 1. SELF The Webhook is used to deliver webhooks for only this Organization (or Merchant). 2. DESCENDANTS The Webhook is used to deliver webhooks for this Organization and its children. This field is optional. Possible values: - SELF - DESCENDANTS
* @member {String} notificationScope
* @default 'DESCENDANTS'
*/
exports.prototype['notificationScope'] = 'DESCENDANTS';
/**
* The client's health check endpoint (URL).
* @member {String} healthCheckUrl
*/
exports.prototype['healthCheckUrl'] = undefined;
/**
* @member {module:model/Notificationsubscriptionsv2webhooksSecurityPolicy} securityPolicy
*/
exports.prototype['securityPolicy'] = undefined;
return exports;
}));