square-connect
Version:
JavaScript client library for the Square Connect v2 API
75 lines (57 loc) • 2.07 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 TimeRange model module.
* @module model/TimeRange
*/
/**
* Constructs a new <code>TimeRange</code>.
* Represents a generic time range. The start and end values are represented in RFC 3339 format. Time ranges are customized to be inclusive or exclusive based on the needs of a particular endpoint. Refer to the relevant endpoint-specific documentation to determine how time ranges are handled.
* @alias module:model/TimeRange
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>TimeRange</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/TimeRange} obj Optional instance to populate.
* @return {module:model/TimeRange} The populated <code>TimeRange</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('start_at')) {
obj['start_at'] = ApiClient.convertToType(data['start_at'], 'String');
}
if (data.hasOwnProperty('end_at')) {
obj['end_at'] = ApiClient.convertToType(data['end_at'], 'String');
}
}
return obj;
}
/**
* A datetime value in RFC 3339 format indicating when the time range starts.
* @member {String} start_at
*/
exports.prototype['start_at'] = undefined;
/**
* A datetime value in RFC 3339 format indicating when the time range ends.
* @member {String} end_at
*/
exports.prototype['end_at'] = undefined;
module.exports = exports;