UNPKG

square-connect

Version:

JavaScript client library for the Square Connect v2 API

77 lines (60 loc) 2.38 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'); /** * The SearchLoyaltyRewardsRequestLoyaltyRewardQuery model module. * Note: This model is in beta. * @module model/SearchLoyaltyRewardsRequestLoyaltyRewardQuery */ /** * Constructs a new <code>SearchLoyaltyRewardsRequestLoyaltyRewardQuery</code>. * The set of search requirements. * @alias module:model/SearchLoyaltyRewardsRequestLoyaltyRewardQuery * @class * @param loyaltyAccountId {String} The ID of the `loyalty account` to which the loyalty reward belongs. */ var exports = function(loyaltyAccountId) { var _this = this; _this['loyalty_account_id'] = loyaltyAccountId; }; /** * Constructs a <code>SearchLoyaltyRewardsRequestLoyaltyRewardQuery</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/SearchLoyaltyRewardsRequestLoyaltyRewardQuery} obj Optional instance to populate. * @return {module:model/SearchLoyaltyRewardsRequestLoyaltyRewardQuery} The populated <code>SearchLoyaltyRewardsRequestLoyaltyRewardQuery</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('loyalty_account_id')) { obj['loyalty_account_id'] = ApiClient.convertToType(data['loyalty_account_id'], 'String'); } if (data.hasOwnProperty('status')) { obj['status'] = ApiClient.convertToType(data['status'], 'String'); } } return obj; } /** * The ID of the `loyalty account` to which the loyalty reward belongs. * @member {String} loyalty_account_id */ exports.prototype['loyalty_account_id'] = undefined; /** * The status of the loyalty reward. See [LoyaltyRewardStatus](#type-loyaltyrewardstatus) for possible values * @member {String} status */ exports.prototype['status'] = undefined; module.exports = exports;