UNPKG

square-connect

Version:

JavaScript client library for the Square Connect v2 API

78 lines (61 loc) 2.65 kB
/** * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: developers@squareup.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * * Swagger Codegen version: 2.3.0-SNAPSHOT * */ var ApiClient = require('../ApiClient'); var FilterValue = require('./FilterValue'); /** * The SegmentFilter model module. * Note: This model is in beta. * @module model/SegmentFilter */ /** * Constructs a new <code>SegmentFilter</code>. * A query filter to search for appointment segments by. * @alias module:model/SegmentFilter * @class * @param serviceVariationId {String} The ID of the `CatalogItemVariation` representing the service booked in this segment. */ var exports = function(serviceVariationId) { var _this = this; _this['service_variation_id'] = serviceVariationId; }; /** * Constructs a <code>SegmentFilter</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/SegmentFilter} obj Optional instance to populate. * @return {module:model/SegmentFilter} The populated <code>SegmentFilter</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('service_variation_id')) { obj['service_variation_id'] = ApiClient.convertToType(data['service_variation_id'], 'String'); } if (data.hasOwnProperty('team_member_id_filter')) { obj['team_member_id_filter'] = FilterValue.constructFromObject(data['team_member_id_filter']); } } return obj; } /** * The ID of the `CatalogItemVariation` representing the service booked in this segment. * @member {String} service_variation_id */ exports.prototype['service_variation_id'] = undefined; /** * A query expression specifying which team members satisfy the condition. Supported expressions are - `ANY`: include team members whose IDs match any member of the specified list. - `NONE`: exclude team members whose IDs match members of the specified list. The `ALL` expression is not supported in the Bookings API. When no expression is specified, any service-providing team member is eligible to fulfill the Booking. * @member {module:model/FilterValue} team_member_id_filter */ exports.prototype['team_member_id_filter'] = undefined; module.exports = exports;