UNPKG

square-connect

Version:

JavaScript client library for the Square Connect v2 API

78 lines (61 loc) 2.24 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 Booking = require('./Booking'); /** * The UpdateBookingRequest model module. * Note: This model is in beta. * @module model/UpdateBookingRequest */ /** * Constructs a new <code>UpdateBookingRequest</code>. * * @alias module:model/UpdateBookingRequest * @class * @param booking {module:model/Booking} The booking to be updated. Individual attributes explicitly specified here override the corresponding values of the existing booking. */ var exports = function(booking) { var _this = this; _this['booking'] = booking; }; /** * Constructs a <code>UpdateBookingRequest</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/UpdateBookingRequest} obj Optional instance to populate. * @return {module:model/UpdateBookingRequest} The populated <code>UpdateBookingRequest</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('idempotency_key')) { obj['idempotency_key'] = ApiClient.convertToType(data['idempotency_key'], 'String'); } if (data.hasOwnProperty('booking')) { obj['booking'] = Booking.constructFromObject(data['booking']); } } return obj; } /** * A unique key to make this request an idempotent operation. * @member {String} idempotency_key */ exports.prototype['idempotency_key'] = undefined; /** * The booking to be updated. Individual attributes explicitly specified here override the corresponding values of the existing booking. * @member {module:model/Booking} booking */ exports.prototype['booking'] = undefined; module.exports = exports;