UNPKG

cybersource-rest-client

Version:

Node.js SDK for the CyberSource REST API

137 lines (114 loc) 5.15 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.CreateSearchRequest = factory(root.CyberSource.ApiClient); } }(this, function(ApiClient) { 'use strict'; /** * The CreateSearchRequest model module. * @module model/CreateSearchRequest * @version 0.0.1 */ /** * Constructs a new <code>CreateSearchRequest</code>. * @alias module:model/CreateSearchRequest * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>CreateSearchRequest</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/CreateSearchRequest} obj Optional instance to populate. * @return {module:model/CreateSearchRequest} The populated <code>CreateSearchRequest</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('save')) { obj['save'] = ApiClient.convertToType(data['save'], 'Boolean'); } if (data.hasOwnProperty('name')) { obj['name'] = ApiClient.convertToType(data['name'], 'String'); } if (data.hasOwnProperty('timezone')) { obj['timezone'] = ApiClient.convertToType(data['timezone'], 'String'); } if (data.hasOwnProperty('query')) { obj['query'] = ApiClient.convertToType(data['query'], 'String'); } if (data.hasOwnProperty('offset')) { obj['offset'] = ApiClient.convertToType(data['offset'], 'Number'); } if (data.hasOwnProperty('limit')) { obj['limit'] = ApiClient.convertToType(data['limit'], 'Number'); } if (data.hasOwnProperty('sort')) { obj['sort'] = ApiClient.convertToType(data['sort'], 'String'); } } return obj; } /** * Indicates whether or not you want to save this search request for future use. The options are: * `true` * `false` (default value) If set to `true`, this field returns `searchID` in the response. You can use this value to retrieve the details of the saved search. * @member {Boolean} save */ exports.prototype['save'] = undefined; /** * Name of this search. When `save` is set to `true`, this search is saved with this name. * @member {String} name */ exports.prototype['name'] = undefined; /** * Merchant's time zone in ISO standard, using the TZ database format. For example: `America/Chicago` * @member {String} timezone */ exports.prototype['timezone'] = undefined; /** * String that contains the filters and variables for which you want to search. For information about supported field-filters and operators, see the [Query Filters]( https://developer.cybersource.com/api/developer-guides/dita-txn-search-details-rest-api-dev-guide-102718/txn-search-intro/txn-filtering.html) section of the Transaction Search Developer Guide. * @member {String} query */ exports.prototype['query'] = undefined; /** * Controls the starting point within the collection of results, which defaults to 0. The first item in the collection is retrieved by setting a zero offset. For example, if you have a collection of 15 items to be retrieved from a resource and you specify limit=5, you can retrieve the entire set of results in 3 successive requests by varying the offset value like this: `offset=0` `offset=5` `offset=10` **Note:** If an offset larger than the number of results is provided, this will result in no embedded object being returned. * @member {Number} offset */ exports.prototype['offset'] = undefined; /** * Controls the maximum number of items that may be returned for a single request. The default is 20, the maximum is 2500. * @member {Number} limit */ exports.prototype['limit'] = undefined; /** * A comma separated list of the following form: `submitTimeUtc:desc` * @member {String} sort */ exports.prototype['sort'] = undefined; return exports; }));