square-connect
Version:
JavaScript client library for the Square Connect v2 API
113 lines (93 loc) • 3.87 kB
JavaScript
/**
* 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 WorkweekConfig model module.
* @module model/WorkweekConfig
*/
/**
* Constructs a new <code>WorkweekConfig</code>.
* Sets the Day of the week and hour of the day that a business starts a work week. Used for the calculation of overtime pay.
* @alias module:model/WorkweekConfig
* @class
* @param startOfWeek {String} The day of the week on which a business week cuts over for compensation purposes. See [Weekday](#type-weekday) for possible values
* @param startOfDayLocalTime {String} The local time at which a business week cuts over. Represented as a string in `HH:MM` format (`HH:MM:SS` is also accepted, but seconds are truncated).
*/
var exports = function(startOfWeek, startOfDayLocalTime) {
var _this = this;
_this['start_of_week'] = startOfWeek;
_this['start_of_day_local_time'] = startOfDayLocalTime;
};
/**
* Constructs a <code>WorkweekConfig</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/WorkweekConfig} obj Optional instance to populate.
* @return {module:model/WorkweekConfig} The populated <code>WorkweekConfig</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('id')) {
obj['id'] = ApiClient.convertToType(data['id'], 'String');
}
if (data.hasOwnProperty('start_of_week')) {
obj['start_of_week'] = ApiClient.convertToType(data['start_of_week'], 'String');
}
if (data.hasOwnProperty('start_of_day_local_time')) {
obj['start_of_day_local_time'] = ApiClient.convertToType(data['start_of_day_local_time'], 'String');
}
if (data.hasOwnProperty('version')) {
obj['version'] = ApiClient.convertToType(data['version'], 'Number');
}
if (data.hasOwnProperty('created_at')) {
obj['created_at'] = ApiClient.convertToType(data['created_at'], 'String');
}
if (data.hasOwnProperty('updated_at')) {
obj['updated_at'] = ApiClient.convertToType(data['updated_at'], 'String');
}
}
return obj;
}
/**
* UUID for this object
* @member {String} id
*/
exports.prototype['id'] = undefined;
/**
* The day of the week on which a business week cuts over for compensation purposes. See [Weekday](#type-weekday) for possible values
* @member {String} start_of_week
*/
exports.prototype['start_of_week'] = undefined;
/**
* The local time at which a business week cuts over. Represented as a string in `HH:MM` format (`HH:MM:SS` is also accepted, but seconds are truncated).
* @member {String} start_of_day_local_time
*/
exports.prototype['start_of_day_local_time'] = undefined;
/**
* Used for resolving concurrency issues; request will fail if version provided does not match server version at time of request. If not provided, Square executes a blind write; potentially overwriting data from another write.
* @member {Number} version
*/
exports.prototype['version'] = undefined;
/**
* A read-only timestamp in RFC 3339 format; presented in UTC
* @member {String} created_at
*/
exports.prototype['created_at'] = undefined;
/**
* A read-only timestamp in RFC 3339 format; presented in UTC
* @member {String} updated_at
*/
exports.prototype['updated_at'] = undefined;
module.exports = exports;